From 64559b6d668b82b46447116f0b80ce49c541c2f1 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 8 Jan 2024 16:53:05 +0100 Subject: [PATCH] coilset.get_dof_order defaluts zeroth order for non-FCs --- src/simsopt/field/coil.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/simsopt/field/coil.py b/src/simsopt/field/coil.py index 732c28e29..99772cdac 100644 --- a/src/simsopt/field/coil.py +++ b/src/simsopt/field/coil.py @@ -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") @@ -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