desc.objectives.QuasisymmetryBoozer
- class desc.objectives.QuasisymmetryBoozer(eq=None, target=0, bounds=None, weight=1, normalize=True, normalize_target=True, grid=None, helicity=(1, 0), M_booz=None, N_booz=None, name='QS Boozer')[source]
Quasi-symmetry Boozer harmonics error.
- Parameters:
eq (Equilibrium, optional) – Equilibrium that will be optimized to satisfy the Objective.
target (float, ndarray, optional) – Target value(s) of the objective. Only used if bounds is None. len(target) must be equal to Objective.dim_f
bounds (tuple, optional) – Lower and upper bounds on the objective. Overrides target. len(bounds[0]) and len(bounds[1]) must be equal to Objective.dim_f
weight (float, ndarray, optional) – Weighting to apply to the Objective, relative to other Objectives. len(weight) must be equal to Objective.dim_f
normalize (bool) – Whether to compute the error in physical units or non-dimensionalize.
normalize_target (bool) – Whether target and bounds should be normalized before comparing to computed values. If normalize is True and the target is in physical units, this should also be set to True.
grid (Grid, ndarray, optional) – Collocation grid containing the nodes to evaluate at. Must be a LinearGrid with a single flux surface and sym=False.
helicity (tuple, optional) – Type of quasi-symmetry (M, N). Default = quasi-axisymmetry (1, 0).
M_booz (int, optional) – Poloidal resolution of Boozer transformation. Default = 2 * eq.M.
N_booz (int, optional) – Toroidal resolution of Boozer transformation. Default = 2 * eq.N.
name (str) – Name of the objective function.
Methods
build
(eq[, use_jit, verbose])Build constant arrays.
compute
(*args, **kwargs)Compute quasi-symmetry Boozer harmonics error.
compute_scalar
(*args, **kwargs)Compute the scalar form of the objective.
compute_scaled
(*args, **kwargs)Compute and apply the target/bounds, weighting, and normalization.
copy
([deepcopy])Return a (deep)copy of this object.
eq
(other)Compare equivalence between DESC objects.
jit
()Apply JIT to compute methods, or re-apply after updating self.
load
(load_from[, file_format])Initialize from file.
print_value
(*args, **kwargs)Print the value of the objective.
save
(file_name[, file_format, file_mode])Save the object.
update_target
(eq)Update target values using an Equilibrium.
xs
(eq)Return a tuple of args required by this objective from the Equilibrium eq.
Attributes
Names (str) of arguments to the compute functions.
Lower and upper bounds of the objective.
Whether the transforms have been precomputed (or not).
Derivatives of the function wrt the argument given by the dict keys.
Number of objective equations.
Dimensions of the argument given by the dict keys.
Whether the objective fixes individual parameters (or linear combo).
Type of quasi-symmetry (M, N).
Whether the objective is a linear function (or nonlinear).
Name of objective function (str).
normalizing scale factor.
Whether default "compute" method is a scalar or vector.
Target value(s) of the objective.
Name of argument corresponding to the target.
Weighting to apply to the Objective, relative to other Objectives.