Skip to content

Commit

Permalink
Merge pull request #372 from hiddenSymmetries/leftover_code
Browse files Browse the repository at this point in the history
Remove the test in surface_rzfourier based on legacy Dofs class
  • Loading branch information
landreman authored Oct 31, 2023
2 parents 065bef6 + c30d035 commit 317b846
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions tests/geo/test_surface_rzfourier.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,28 +517,6 @@ def test_area_volume(self):
self.assertAlmostEqual(s.area(), true_area, places=4)
self.assertAlmostEqual(s.volume(), true_volume, places=3)

@unittest.skip
def test_derivatives(self):
"""
Check the automatic differentiation for area and volume.
"""
for mpol in range(1, 3):
for ntor in range(2):
for nfp in range(1, 4):
s = SurfaceRZFourier(nfp=nfp, mpol=mpol, ntor=ntor)
x0 = s.get_dofs()
x = np.random.rand(len(x0)) - 0.5
x[0] = np.random.rand() + 2
# This surface will probably self-intersect, but I
# don't think this actually matters here.
s.set_dofs(x)

dofs = Dofs([s.area, s.volume])
jac = dofs.jac()
fd_jac = dofs.fd_jac()
print('difference for surface test_derivatives:', jac - fd_jac)
np.testing.assert_allclose(jac, fd_jac, rtol=1e-4, atol=1e-4)

def test_vjps(self):
mpol = 10
ntor = 10
Expand Down

0 comments on commit 317b846

Please sign in to comment.