Skip to content
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: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ FetchContent_Declare(
FetchContent_Declare(
indata2json
GIT_REPOSITORY https://github.com/jonathanschilling/indata2json.git
GIT_TAG f59e3ddd66486b63536f141a786d39c23d654c77
GIT_TAG df7e911bb5badef1e071252f85cd1f9bf3b6c4f7
GIT_SHALLOW TRUE
)
FetchContent_Declare(
Expand Down
14 changes: 14 additions & 0 deletions tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,20 @@ def test_ensure_vmec2000_input_keeps_axis():
)


def test_ensure_vmecpp_input_keeps_trailing_zero_spline_value():
# a spline profile whose last value is exactly zero keeps all its knots
vmec2000_input_file = TEST_DATA_DIR / "input.cth_like_fixed_bdy_spline_pressure"
vmec_input = vmecpp.VmecInput.from_file(vmec2000_input_file)
reference = vmecpp.VmecInput.from_file(
TEST_DATA_DIR / "cth_like_fixed_bdy_spline_pressure.json"
)
assert len(vmec_input.am_aux_f) == len(vmec_input.am_aux_s) == 201
np.testing.assert_array_equal(vmec_input.am_aux_s, reference.am_aux_s)
np.testing.assert_allclose(
vmec_input.am_aux_f, reference.am_aux_f, rtol=1e-12, atol=0
)


def test_ensure_vmecpp_input_noop():
vmecpp_input_file = TEST_DATA_DIR / "cma.json"

Expand Down
Loading