Skip to content

Commit

Permalink
Fixing Nfp periodicity in BoozerAnalytic.
Browse files Browse the repository at this point in the history
  • Loading branch information
ejpaul committed Jan 23, 2024
1 parent db10d50 commit 3585880
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/simsopt/field/boozermagneticfield.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def _modB_impl(self, modB):
zetas = points[:, 2]
psi = s*self.psi0
r = np.sqrt(np.abs(2*psi/self.Bbar))
modB[:, 0] = self.B0*(1 + self.etabar*r*np.cos(thetas-self.N*zetas)) + self.B0z*np.cos(zetas)
modB[:, 0] = self.B0*(1 + self.etabar*r*np.cos(thetas-self.N*zetas)) + self.B0z*np.cos(self.N*zetas)

def _dmodBds_impl(self, dmodBds):
points = self.get_points_ref()
Expand Down Expand Up @@ -279,7 +279,7 @@ def _dmodBdzeta_impl(self, dmodBdzeta):
zetas = points[:, 2]
psi = s*self.psi0
r = np.sqrt(np.abs(2*psi/self.Bbar))
dmodBdzeta[:, 0] = self.N*self.B0*self.etabar*r*np.sin(thetas-self.N*zetas) - self.B0z*np.sin(zetas)
dmodBdzeta[:, 0] = self.N*self.B0*self.etabar*r*np.sin(thetas-self.N*zetas) - self.N*self.B0z*np.sin(self.N*zetas)

def _K_impl(self, K):
points = self.get_points_ref()
Expand Down

0 comments on commit 3585880

Please sign in to comment.