desc.geometry.ZernikeRZToroidalSection
- class desc.geometry.ZernikeRZToroidalSection(R_lmn=None, Z_lmn=None, modes_R=None, modes_Z=None, spectral_indexing='ansi', sym='auto', L=None, M=None, zeta=0.0, name='', check_orientation=True)Source
A toroidal cross section represented by a Zernike polynomial in R,Z.
- Parameters:
R_lmn (array-like, shape(k,)) – zernike coefficients
Z_lmn (array-like, shape(k,)) – zernike coefficients
modes_R (array-like, shape(k,2)) – radial and poloidal mode numbers [l,m] for R_lmn
modes_Z (array-like, shape(k,2)) – radial and poloidal mode numbers [l,m] for Z_lmn. If None defaults to modes_R.
sym (bool) – whether to enforce stellarator symmetry. Default is “auto” which enforces if modes are symmetric. If True, non-symmetric modes will be truncated.
spectral_indexing ({
'ansi'
,'fringe'
}) –Indexing method, default value =
'ansi'
For L=0, all methods are equivalent and give a “chevron” shaped basis (only the outer edge of the zernike pyramid of width M). For L>0, the indexing scheme defines order of the basis functions:
'ansi'
: ANSI indexing fills in the pyramid with triangles of decreasing size, ending in a triangle shape. For L == M, the traditional ANSI pyramid indexing is recovered. For L>M, adds rows to the bottom of the pyramid, increasing L while keeping M constant, giving a “house” shape'fringe'
: Fringe indexing fills in the pyramid with chevrons of decreasing size, ending in a diamond shape for L=2*M where the traditional fringe/U of Arizona indexing is recovered. For L > 2*M, adds chevrons to the bottom, making a hexagonal diamondL (int or None) – Maximum radial and poloidal mode numbers. Defaults to max from modes_R and modes_Z.
M (int or None) – Maximum radial and poloidal mode numbers. Defaults to max from modes_R and modes_Z.
zeta (float [0,2pi)) – toroidal angle for the section.
name (str) – name for this surface
check_orientation (bool) – ensure that this surface has a right handed orientation. Do not set to False unless you are sure the parameterization you have given is right handed (ie, e_theta x e_zeta points outward from the surface).
Methods
change_resolution
(*args, **kwargs)Change the maximum radial and poloidal resolution.
compute
(names[, grid, params, transforms, ...])Compute the quantity given by name on grid.
copy
([deepcopy])Return a (deep)copy of this object.
equiv
(other)Compare equivalence between DESC objects.
get_coeffs
(l[, m])Get Zernike coefficients for given mode number(s).
load
(load_from[, file_format])Initialize from file.
pack_params
(p)Convert a dictionary of parameters into a single array.
save
(file_name[, file_format, file_mode])Save the object.
set_coeffs
(l[, m, R, Z])Set specific Zernike coefficients.
Convert a single array of concatenated parameters into a dictionary.
Attributes
Maximum radial mode number.
Maximum poloidal mode number.
Maximum toroidal mode number.
Spectral basis for R.
Spectral coefficients for R.
Spectral basis for Z.
Spectral coefficients for Z.
total number of optimizable parameters.
dictionary of integers of sizes of each optimizable parameter.
Name of the surface.
string names of parameters that have been declared optimizable.
dictionary of arrays of optimizable parameters.
Type of spectral indexing for Zernike basis.
Whether or not the surface is stellarator symmetric.
arrays of indices for each parameter in concatenated array.
Toroidal angle.