Skip to content

Commit

Permalink
added another unit test for self-intersecting surfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgiuliani committed Apr 16, 2024
1 parent d1e71db commit 464b3e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/geo/test_boozersurface.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def subtest_boozer_surface_optimisation_convergence(self, surfacetype,
s = get_surface(surfacetype, stellsym, nfp=ma.nfp)
s.fit_to_curve(ma, 0.1)
if get_data is get_ncsx_data:
iota = -0.3
iota = -0.4
elif get_data is get_giuliani_data:
iota = 0.4
elif get_data is get_hsx_data:
Expand Down Expand Up @@ -326,6 +326,8 @@ def subtest_boozer_surface_optimisation_convergence(self, surfacetype,

print('Residual norm after second stage', np.linalg.norm(res['residual']))
assert res['success']
assert boozer_surface.surface.is_self_intersecting(thetas=100)

# For the stellsym case we have z(0, 0) = y(0, 0) = 0. For the not
# stellsym case, we enforce z(0, 0) = 0, but expect y(0, 0) \neq 0
gammazero = s.gamma()[0, 0, :]
Expand Down

0 comments on commit 464b3e5

Please sign in to comment.