Skip to content

Commit

Permalink
make basis modes as static attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
YigitElma committed Feb 12, 2025
1 parent 72d8970 commit 6365a46
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions desc/basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class _Basis(IOAble, ABC):
"_sym",
"_spectral_indexing",
]
_static_attrs = ["_modes"]

def __init__(self):
self._enforce_symmetry()
Expand Down
1 change: 1 addition & 0 deletions desc/equilibrium/equilibrium.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ class Equilibrium(IOAble, Optimizable):
"_M_grid",
"_N_grid",
]
_static_attrs = ["_R_basis", "_Z_basis", "_L_basis"]

@execute_on_cpu
def __init__(
Expand Down
1 change: 1 addition & 0 deletions desc/geometry/surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class FourierRZToroidalSurface(Surface):
"_NFP",
"_rho",
]
_static_attrs = ["_R_basis", "_Z_basis"]

@execute_on_cpu
def __init__(
Expand Down

0 comments on commit 6365a46

Please sign in to comment.