desc.continuation.solve_continuation_automatic
- desc.continuation.solve_continuation_automatic(eq, objective='force', optimizer='lsq-exact', pert_order=2, ftol=None, xtol=None, gtol=None, nfev=100, verbose=1, checkpoint_path=None, **kwargs)[source]
Solve for an equilibrium using an automatic continuation method.
By default, the method first solves for a no pressure tokamak, then a finite beta tokamak, then a finite beta stellarator. Steps in resolution, pressure, and 3D shaping are determined adaptively, and the method may backtrack to use smaller steps if the initial steps are too large.
- Parameters:
eq (Equilibrium) – Unsolved Equilibrium with the final desired boundary, profiles, resolution.
objective ({"force", "energy", "vacuum"}) – function to solve for equilibrium solution
optimizer (str or Optimzer (optional)) – optimizer to use
pert_order (int) – order of perturbations to use.
ftol (float) – stopping tolerances for subproblem at each step. None will use defaults for given optimizer.
xtol (float) – stopping tolerances for subproblem at each step. None will use defaults for given optimizer.
gtol (float) – stopping tolerances for subproblem at each step. None will use defaults for given optimizer.
nfev (int) – maximum number of function evaluations in each equilibrium subproblem.
verbose (integer) –
0: no output
1: summary of each iteration
2: as above plus timing information
3: as above plus detailed solver output
checkpoint_path (str or path-like) – file to save checkpoint data (Default value = None)
**kwargs (control continuation step sizes) –
Valid keyword arguments are:
mres_step: int, the amount to increase Mpol by at each continuation step pres_step: float, 0<=pres_step<=1, the amount to increase pres_ratio by
at each continuation step
- bdry_step: float, 0<=bdry_step<=1, the amount to increase pres_ratio by
at each continuation step
- Returns:
eqfam (EquilibriaFamily) – family of equilibria for the intermediate steps, where the last member is the final desired configuration,