Initialise magnetic field from flat Fourier mode lists and evaluated via 2D spline interpolation.
The field strength is given by
B(theta, phi) = sum_k B_mn(k) * cos(m(k)*theta - nfp*n(k)*phi)
where theta and phi are Boozer angles and nfp the number of field
periods. During initialisation the series is evaluated on a
n_fft x n_fft equidistant grid of the angles via fft, where
n_fft = 2^k >= n_grid_in - 1 for smallest k. It then fits a 2D
periodic quintic spline. Note again that n is considered normalized to
the number of field periods nfp. If the user does not specificy
n_grid_in explicitly, grid is chosen so Nynquist criterion is satisfied.
| 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) |