Magnetic field from a flat list of Boozer Fourier modes, evaluated via 2D spline interpolation.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | initialized | = | .false. | ||
| type(SplineData2D), | public | :: | spl | ||||
| real(kind=dp), | public | :: | nfp | ||||
| real(kind=dp), | public | :: | B_theta_covariant | ||||
| real(kind=dp), | public | :: | B_phi_covariant | ||||
| integer, | public | :: | n_grid | ||||
| integer, | public | :: | mn_max |
| procedure, public :: compute_B_sqrtg_dB_dx | |
| procedure, public :: compute_B_and_dB_dx | |
| procedure, public :: compute_B_mod | |
| procedure, public :: compute_nabla_s | |
| procedure, public :: rel_accuracy_B | |
| procedure, public :: get_covariant_components |
Initialise magnetic field from flat Fourier mode lists and evaluated via 2D spline interpolation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(fourier_field_t), | intent(inout) | :: | field | |||
| integer, | intent(in) | :: | m(:) |
poloidal mode numbers (flat array, length mn_max) |
||
| integer, | intent(in) | :: | n(:) |
toroidal mode numbers normalised to nfp (flat array, length mn_max) |
||
| real(kind=dp), | intent(in) | :: | B_mn(:) |
Fourier coefficients of B in Tesla (flat array, length mn_max) |
||
| real(kind=dp), | intent(in) | :: | B_theta_covariant |
covariant poloidal component of B in T*m |
||
| real(kind=dp), | intent(in) | :: | B_phi_covariant |
covariant toroidal component of B in T*m |
||
| integer, | intent(in), | optional | :: | nfp |
number of field periods |
|
| integer, | intent(in), | optional | :: | n_grid_in |
spline grid points per angle (rounded up to 2^k + 1 for fft init) |
Evaluate B(theta, phi) = sum_k B_mn(k)*cos(m(k)*theta - nfp*n(k)*phi)
on the equidistant angle grid by a single 2D inverse FFT.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | m(:) |
poloidal mode numbers (flat array) |
||
| integer, | intent(in) | :: | n(:) |
toroidal mode numbers normalised to nfp (flat array) |
||
| real(kind=dp), | intent(in) | :: | B_mn(:) |
Fourier coefficients of B in Tesla (flat array) |
||
| integer, | intent(in) | :: | n_fft |
transform length per direction, a power of two above 2*mn_max |
||
| real(kind=dp), | intent(out) | :: | fft_B(:,:) |
field strength on the open (periodic point excluded) fft angle grid |