![]() |
Stellarator-Tools
|
Defines routines for compute analytic integration that accounds for the singularity. More...
Functions/Subroutines | |
| subroutine | analyt (grpmn, bvec, ivacskip, ndim) |
| Main routine. | |
| subroutine | chebyshev_moments (a, b2, c, tl) |
| Chebyshev moments of the tangent-plane kernel. | |
| pure real(dp) function | t0_integral (a, b2, c) |
| Zeroth moment of the tangent-plane kernel. | |
| subroutine | moment_factors (kmax) |
| Tabulate the factors of the five-term moment recurrence. | |
Defines routines for compute analytic integration that accounds for the singularity.
| subroutine analytic::analyt | ( | real(dp), dimension(mnpd2,nuv3), intent(out) | grpmn, |
| real(dp), dimension(mnpd,ndim), intent(out) | bvec, | ||
| integer, intent(in) | ivacskip, | ||
| integer, intent(in) | ndim ) |
Main routine.
| [out] | grpmn | |
| [out] | grpmn | |
| [in] | ivacskip | |
| [in] | ivacskip |
| subroutine analytic::chebyshev_moments | ( | real(dp), dimension(nuv3min:nuv3max), intent(in) | a, |
| real(dp), dimension(nuv3min:nuv3max), intent(in) | b2, | ||
| real(dp), dimension(nuv3min:nuv3max), intent(in) | c, | ||
| real(dp), dimension(nuv3min:nuv3max,0:nf + mf), intent(out) | tl ) |
Chebyshev moments of the tangent-plane kernel.
M_k = Int[-1,1] T_k(t)/SQRT(Q(t)) dt for k = 0, ..., mf + nf, where Q = A t^2 + 2 d t + B with A = a + b2 + c, B = a - b2 + c and d = c - a.
Integrating d/dt (F_k SQRT(Q)) with F_k' = T_k, F_k = T_(k+1)/(2 (k + 1)) - T_(k-1)/(2 (k - 1)), gives for k >= 2 the five-term recurrence whose factors moment_factors tabulates. Its characteristic roots are those of Q((z + 1/z)/2) = 0: a complex pair of modulus rho > 1 and their reciprocals, so two homogeneous solutions grow and two decay in either direction and neither a forward nor a backward pass is stable. The moments decay like k^-2 only, and they are the solution of the boundary-value problem whose lower boundary values are M_0 and M_1 and whose upper boundary values are the asymptotic M_k = -(1/SQRT(Q(1)) + (-1)^k/SQRT(Q(-1)))/(k^2 - 1) + O(k^-4), which a pentadiagonal elimination solves. The rows of its matrix tend to those of the Toeplitz matrix with the symbol Q(COS(theta)) > 0, and the elimination runs without pivoting. It is sequential in k and independent across grid points, so nbatch points are eliminated together, over the largest of their extents.
| [in] | a | guu on the local grid points. |
| [in] | b2 | guv on the local grid points, with its factor of two. Its negative gives the moments of the minus parity. |
| [in] | c | gvv on the local grid points. |
| [out] | tl | Chebyshev moments by grid point and order. |
| subroutine analytic::moment_factors | ( | integer, intent(in) | kmax | ) |
Tabulate the factors of the five-term moment recurrence.
At order k >= 2 the recurrence reads A fsup2 M_(k+2) + d fsup1 M_(k+1) + (A/2 + B - A fdiag) M_k
| [in] | kmax | Largest order needed. |
| pure real(dp) function analytic::t0_integral | ( | real(dp), intent(in) | a, |
| real(dp), intent(in) | b2, | ||
| real(dp), intent(in) | c ) |
Zeroth moment of the tangent-plane kernel.
T_0 = Int[-1,1] dt/SQRT(A t^2 + 2 d t + B) for A = a + b2 + c, B = a - b2 + c and d = c - a: SQRT(A) T_0 = LOG((2 SQRT(c A) + 2 c + b2)/(2 SQRT(a A) - 2 a - b2)). A term of the quotient that is a difference of nearly equal numbers, as the denominator is for gvv << guu, is taken in its conjugate form, whose numerator 4 a c - b2^2 is the determinant of the metric.
| [in] | a | guu |
| [in] | b2 | guv with its factor of two. |
| [in] | c | gvv |