Skip to content

Commit

Permalink
define Iotas.dJ upon init
Browse files Browse the repository at this point in the history
  • Loading branch information
smiet committed Nov 1, 2023
1 parent b1986cf commit a246dda
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/simsopt/geo/surfaceobjectives.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ def parameter_derivatives(surface: Surface,
1d array of size (ndofs)
"""
N = surface.normal()
norm_N = np.linalg.norm(N, axis=2)
dx_by_dc = surface.dgamma_by_dcoeff()
N_dot_dx_by_dc = np.einsum('ijk,ijkl->ijl', N, dx_by_dc)
nphi = surface.gamma().shape[0]
Expand Down Expand Up @@ -790,6 +791,7 @@ def dJ(self):

def recompute_bell(self, parent=None):
self._J = None
self._dJ = None
self._dJ_by_dcoefficients = None
self._dJ_by_dcoilcurrents = None

Expand Down

0 comments on commit a246dda

Please sign in to comment.