PB3D
[2.45]
Ideal linear high-n MHD stability in 3-D
|
Inverse Fourier transformation, from VMEC. More...
Public Member Functions | |
integer function | fourier2real_1 (varf_c, varf_s, trigon_factors, varr, sym, deriv) |
version with trigonometric factors More... | |
integer function | fourier2real_2 (varf_c, varf_s, theta, zeta, varr, sym, deriv) |
version with angles More... | |
Inverse Fourier transformation, from VMEC.
Also calculates the poloidal or toroidal derivatives in VMEC coords., as indicated by the variable deriv(2)
.
(The normal derivative is done on the variables in Fourier space, and should be provided here in varf_i
if needed).
There are two variants:
Both these versions make use of a factor that represents angular derivatives. For deriv = [j,k]
, this is:
varf_c
,varf_s
,where the divisions have to be done using integers, i.e. without remainder. The first two factors are straightforward, and the third one originates in the change of sign when deriving a cosine, but not for a sine.
Finally, depending on whether \((j+k)\) is even or odd, the correct \(\cos\) or \(\sin\) is chosen.
Definition at line 56 of file VMEC_utilities.f90.
integer function vmec_utilities::fourier2real::fourier2real_1 | ( | real(dp), dimension(:,:), intent(in) | varf_c, |
real(dp), dimension(:,:), intent(in) | varf_s, | ||
real(dp), dimension(:,:,:,:,:), intent(in) | trigon_factors, | ||
real(dp), dimension(:,:,:), intent(inout) | varr, | ||
logical, dimension(2), intent(in), optional | sym, | ||
integer, dimension(2), intent(in), optional | deriv | ||
) |
version with trigonometric factors
[in] | varf_c | \(\cos\) factor of variable in Fourier space |
[in] | varf_s | \(\sin\) factor of variable in Fourier space |
[in] | trigon_factors | trigonometric factor cosine and sine at these angles (see calc_trigon_factors()) |
[in,out] | varr | variable in real space |
[in] | sym | whether to use varf_c (1) and / or varf_s (2) |
[in] | deriv | optional derivatives in angular coordinates |
Definition at line 67 of file VMEC_utilities.f90.
integer function vmec_utilities::fourier2real::fourier2real_2 | ( | real(dp), dimension(:,:), intent(in) | varf_c, |
real(dp), dimension(:,:), intent(in) | varf_s, | ||
real(dp), dimension(:,:,:), intent(in) | theta, | ||
real(dp), dimension(:,:,:), intent(in) | zeta, | ||
real(dp), dimension(:,:,:), intent(inout) | varr, | ||
logical, dimension(2), intent(in), optional | sym, | ||
integer, dimension(2), intent(in), optional | deriv | ||
) |
version with angles
[in] | varf_c | \(\cos\) factor of variable in Fourier space |
[in] | varf_s | \(\sin\) factor of variable in Fourier space |
[in] | theta | \(\theta_\text{E}\) |
[in] | zeta | \(\zeta_\text{E}\) |
[in,out] | varr | variable in real space |
[in] | sym | whether to use varf_c (1) and / or varf_s (2) |
[in] | deriv | optional derivatives in angular coordinates |
Definition at line 165 of file VMEC_utilities.f90.