Skip to content

Commit

Permalink
coilset.get_dof_order defaluts zeroth order for non-FCs
Browse files Browse the repository at this point in the history
  • Loading branch information
smiet committed Jan 8, 2024
1 parent f51a558 commit 64559b6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/simsopt/field/coil.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ def get_dof_orders(self):
"""
import re
dof_names = self.dof_names
orders = np.ones(self.dof_size)
orders = np.zeros(self.dof_size) # dofs which are not Fourier coefficients are treated as zeroth' order.
# test if coils are CurveXYZFourier:
if type(self.coils[0].curve) is not CurveXYZFourier:
raise ValueError("Coils must be of type CurveXYZFourier")
Expand All @@ -542,8 +542,7 @@ def get_dof_orders(self):
match = re.search(r'\((\d+)\)', name)
if match:
order = int(match.group(1))
if order > 0: # leave zeroth order alone
orders[dof_names.index(name)] = order
orders[dof_names.index(name)] = order
return orders


Expand Down

0 comments on commit 64559b6

Please sign in to comment.