Updates to Spec and NormalField and a few helper functions .
Spec class has been updated with the following features:
detection when free-boundary solution is not converged
re-set to initial state when not converged or not in force balance
re-written loops pythonically where possible (for vol in range(self.inputlist.mvol+1) -> `for surface in self.initial_guess:')
implemented array_translator to further reduce lists over index counters.
activate_profile: make a profile of your spec equilibrium optimizable in simsopt
The NormalField class has been augmented to:
include the boundary on which it is defined
store the Fourier components that describe it in array-form
include getters and setters for the FCs in array form
set the dofs in their entirety even when setting single (fixes bug where changing a DOF did not trigger recompute bell)
The Surface base class has two methods: fourier_transform_field and inverse_fourier_transform_field to efficiently calculate fourier transforms in the VMEC convention (-ntor to ntor toroidal components, 0:mpol poloidal). Allows for different Fourier normalization conventions through the 'normalization' parameter.
This is PR 1 of 3, the following two:
CoilSet and ReducedCoilSet: helper classes to enable interchanging of coils, and create new optimization variables through SVD on coil DOFS
CoilNormalField and misc changes: class inheriting form NormalField that interfaces to the CoilSets, all other misc changes needed to make the single-stage optimizations work.
Updates to Spec and NormalField and a few helper functions .
Spec class has been updated with the following features:
for vol in range(self.inputlist.mvol+1)
-> `for surface in self.initial_guess:')array_translator
to further reduce lists over index counters.The NormalField class has been augmented to:
The Surface base class has two methods:
fourier_transform_field
andinverse_fourier_transform_field
to efficiently calculate fourier transforms in the VMEC convention (-ntor
tontor
toroidal components,0
:mpol
poloidal). Allows for different Fourier normalization conventions through the 'normalization' parameter.This is PR 1 of 3, the following two: