Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding EQDSK support #391

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ dependencies = [
"h5netcdf>=1.3.0",
"scipy>=1.12.0",
"jaxtyping>=0.2.28",
"contourpy>=1.2.1",
"eqdsk>=0.4.0"
]

[project.urls]
Expand Down
6 changes: 5 additions & 1 deletion torax/config/build_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ def _build_standard_geometry_provider(
intermediate_builder = geometry.StandardGeometryIntermediates.from_chease
elif geometry_type == 'fbt':
intermediate_builder = geometry.StandardGeometryIntermediates.from_fbt
elif geometry_type == 'eqdsk':
intermediate_builder = geometry.StandardGeometryIntermediates.from_eqdsk
else:
raise ValueError(f'Unknown geometry type: {geometry_type}')
if 'geometry_configs' in kwargs:
Expand Down Expand Up @@ -143,10 +145,12 @@ def build_geometry_provider_from_config(
geometry_type = kwargs.pop('geometry_type').lower() # Remove from kwargs.
if geometry_type == 'circular':
return _build_circular_geometry_provider(**kwargs)
elif geometry_type == 'chease' or geometry_type == 'fbt':
# elif geometry_type == 'chease' or geometry_type == 'fbt':
elif geometry_type in ['chease', 'fbt', 'eqdsk']:
return _build_standard_geometry_provider(
geometry_type=geometry_type, **kwargs
)

raise ValueError(f'Unknown geometry type: {geometry_type}')


Expand Down
Loading