Skip to content

Commit

Permalink
Add regression test requested by Rogerio
Browse files Browse the repository at this point in the history
  • Loading branch information
landreman committed Apr 26, 2024
1 parent 4041b14 commit bc79d97
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/geo/test_surface_rzfourier.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,23 +712,25 @@ def test_make_rotating_ellipse_iota(self):
eq.indata.ntor = 4
eq.indata.ftol_array[:2] = [1e-8, 1e-10]

# Try the case of elongation=1 with positive torsion:
# Try the case of elongation=1 with positive axis torsion:
major_radius = 8.4
minor_radius = 1.3
elongation = 1.0
torsion = 0.9
eq.boundary.make_rotating_ellipse(major_radius, minor_radius, elongation, torsion)
eq.run()
np.testing.assert_array_less(0, eq.wout.iotaf)
np.testing.assert_allclose(eq.mean_iota(), 0.26990720954583547, rtol=1e-6)

# Try the case of zero torsion with rotating elongation:
# Try the case of zero axis torsion with rotating elongation:
major_radius = 8.4
minor_radius = 1.3
elongation = 2.1
torsion = 0.0
eq.boundary.make_rotating_ellipse(major_radius, minor_radius, elongation, torsion)
eq.run()
np.testing.assert_array_less(0, eq.wout.iotaf)
np.testing.assert_allclose(eq.mean_iota(), 0.4291137962772453, rtol=1e-6)


class SurfaceRZPseudospectralTests(unittest.TestCase):
Expand Down

0 comments on commit bc79d97

Please sign in to comment.