PB3D
[2.45]
Ideal linear high-n MHD stability in 3-D
|
Calculation of toroidal functions P_{n-1/2}^m \left(z\right) and Q_{n-1/2}^m \left(z\right). More...
Functions/Subroutines | |
integer function, public | dtorh1 (z, m, nmax, pl, ql, newn, mode, ipre) |
Calculates toroidal harmonics of a fixed order m and degrees up to nmax . More... | |
Calculation of toroidal functions P_{n-1/2}^m \left(z\right) and Q_{n-1/2}^m \left(z\right).
integer function, public dtorh::dtorh1 | ( | real(dp), intent(in) | z, |
integer, intent(in) | m, | ||
integer, intent(in) | nmax, | ||
real(dp), dimension(0:nmax), intent(inout) | pl, | ||
real(dp), dimension(0:nmax), intent(inout) | ql, | ||
integer, intent(inout) | newn, | ||
integer, intent(in), optional | mode, | ||
integer, intent(in), optional | ipre | ||
) |
Calculates toroidal harmonics of a fixed order m
and degrees up to nmax
.
Optionally, the mode
can be specified to be different from 0 [default]
mode=1
:\frac{P_{n-1/2}^m \left(z\right)}{\Gamma(m+1/2)} \ ,\quad \frac{Q_{n-1/2}^m \left(z\right)}{\Gamma(m+1/2)},
which are respectively stored in the arrayspl(n)
, ql(n)
.mode=2
:Also, the parameter ipre
can be used to select a different precision:
ipre=1
, the precision is 10^{-12}, taking \epsilon<10^{-12}ipre=2
, the precision is 10^{-8}, taking \epsilon<10^{-8}where \epsilon controls the accuracy.
mode
2 only if high m
's for z>20 are required. The evaluation of the cf may fail to converge for too high z
's.pl(0)
.pl(0)
.[in] | z | (real) point at which toroidal harmonics are evaluated |
[in] | m | order of toroidal harmonics (m>0 ) |
[in] | nmax | maximum degree of toroidal harmonics (nmax>0 ) |
[in,out] | pl | toroidal harmonics of first kind P_{n-1/2}^m\left(z\right) |
[in,out] | ql | toroidal harmonics of second kind Q_{n-1/2}^m\left(z\right) |
[in,out] | newn | maximum order of functions calculated when pl(nmax+1)>1/tiny with tiny= 10^{-290} |
[in] | mode | mode that controls output |
[in] | ipre | precision |
Definition at line 75 of file dtorh.f90.