ddx 0.6.0
Libary for domain-decomposition methods for polarizable continuum models
|
Harmonics-related core routines. More...
Functions/Subroutines | |
subroutine | ylmscale (p, vscales, v4pi2lp1, vscales_rel) |
Compute scaling factors of real normalized spherical harmonics. More... | |
subroutine | fmm_constants (dmax, pm, pl, vcnk, m2l_ztranslate_coef, m2l_ztranslate_adj_coef) |
Compute FMM-related constants. More... | |
subroutine | carttosph (x, rho, ctheta, stheta, cphi, sphi) |
Convert input cartesian coordinate into spherical coordinate. More... | |
subroutine | ylmbas (x, rho, ctheta, stheta, cphi, sphi, p, vscales, vylm, vplm, vcos, vsin) |
Compute all spherical harmonics up to a given degree at a given point. More... | |
subroutine | trgev (cphi, sphi, p, vcos, vsin) |
Compute arrays of \( \cos(m \phi) \) and \( \sin(m \phi) \). More... | |
subroutine | polleg (ctheta, stheta, p, vplm) |
Compute associated Legendre polynomials. More... | |
subroutine | polleg_work (ctheta, stheta, p, vplm, work) |
Compute associated Legendre polynomials. More... | |
subroutine | modified_spherical_bessel_first_kind (lmax, argument, SI, DI, work) |
subroutine | modified_spherical_bessel_second_kind (lmax, argument, SK, DK, work) |
subroutine | fmm_p2m (c, src_q, dst_r, p, vscales, beta, dst_m) |
Accumulate a multipole expansion induced by a particle of a given charge. More... | |
subroutine | fmm_p2m_work (c, src_q, dst_r, p, vscales, beta, dst_m, work) |
Accumulate a multipole expansion induced by a particle of a given charge. More... | |
subroutine | fmm_m2p (c, src_r, p, vscales_rel, alpha, src_m, beta, dst_v) |
Accumulate potential, induced by multipole spherical harmonics. More... | |
subroutine | fmm_m2p_work (c, src_r, p, vscales_rel, alpha, src_m, beta, dst_v, work) |
Accumulate potential, induced by multipole spherical harmonics. More... | |
subroutine | fmm_m2p_bessel (c, src_r, p, vscales, alpha, src_m, beta, dst_v) |
Accumulate potential, induced by multipole spherical harmonics. More... | |
subroutine | fmm_m2p_bessel_work (c, p, vscales, SK_ri, alpha, src_m, beta, dst_v, work_complex, work) |
Accumulate Bessel potential, induced by multipole spherical harmonics. More... | |
subroutine | fmm_m2p_bessel_grad (c, src_r, p, vscales, alpha, src_m, beta, dst_g) |
subroutine | fmm_m2p_adj (c, src_q, dst_r, p, vscales_rel, beta, dst_m) |
Adjoint M2P operation. More... | |
subroutine | fmm_m2p_adj_work (c, src_q, dst_r, p, vscales_rel, beta, dst_m, work) |
Adjoint M2P operation. More... | |
subroutine | fmm_m2p_bessel_adj (c, src_q, dst_r, kappa, p, vscales, beta, dst_m) |
Adjoint M2P operation. More... | |
subroutine | fmm_m2p_bessel_adj_work (c, src_q, dst_sk, p, vscales, beta, dst_m, work_complex, work) |
Adjoint M2P operation. More... | |
subroutine | fmm_m2p_mat (c, r, p, vscales, mat) |
Accumulate potentials, induced by each multipole spherical harmonic. More... | |
subroutine | fmm_l2p (c, src_r, p, vscales, alpha, src_l, beta, dst_v) |
Accumulate potential, induced by local spherical harmonics. More... | |
subroutine | fmm_l2p_work (c, src_r, p, vscales_rel, alpha, src_l, beta, dst_v, work) |
Accumulate potential, induced by local spherical harmonics. More... | |
subroutine | fmm_l2p_bessel (c, src_r, p, vscales, alpha, src_l, beta, dst_v) |
Accumulate potential, induced by local spherical harmonics. More... | |
subroutine | fmm_l2p_bessel_work (c, p, vscales, SI_ri, alpha, src_l, beta, dst_v, work_complex, work) |
Accumulate Bessel potential, induced by local spherical harmonics. More... | |
subroutine | fmm_l2p_bessel_grad (c, src_r, p, vscales, alpha, src_l, beta, dst_g) |
subroutine | fmm_l2p_adj (c, src_q, dst_r, p, vscales_rel, beta, dst_l) |
Adjoint of L2P. More... | |
subroutine | fmm_l2p_adj_work (c, src_q, dst_r, p, vscales_rel, beta, dst_l, work) |
Adjoint L2P. More... | |
subroutine | fmm_sph_transform (p, r1, alpha, src, beta, dst) |
Transform coefficients of spherical harmonics to a new cartesion system. More... | |
subroutine | fmm_sph_transform_work (p, r1, alpha, src, beta, dst, work) |
Transform spherical harmonics to a new cartesion system of coordinates. More... | |
subroutine | fmm_sph_rotate_oz (p, vcos, vsin, alpha, src, beta, dst) |
Rotate spherical harmonics around OZ axis. More... | |
subroutine | fmm_sph_rotate_oz_work (p, vcos, vsin, alpha, src, beta, dst) |
Rotate spherical harmonics around OZ axis. More... | |
subroutine | fmm_sph_rotate_oz_adj (p, vcos, vsin, alpha, src, beta, dst) |
Rotate spherical harmonics around OZ axis in an opposite direction. More... | |
subroutine | fmm_sph_rotate_oz_adj_work (p, vcos, vsin, alpha, src, beta, dst) |
Rotate spherical harmonics around OZ axis in an opposite direction. More... | |
subroutine | fmm_sph_rotate_oxz (p, ctheta, stheta, alpha, src, beta, dst) |
Transform spherical harmonics in the OXZ plane. More... | |
subroutine | fmm_sph_rotate_oxz_work (p, ctheta, stheta, alpha, src, beta, dst, work) |
Transform spherical harmonics in the OXZ plane. More... | |
subroutine | fmm_m2m_ztranslate (z, src_r, dst_r, p, vscales, vcnk, alpha, src_m, beta, dst_m) |
Direct M2M translation over OZ axis. More... | |
subroutine | fmm_m2m_ztranslate_work (z, src_r, dst_r, p, vscales, vcnk, alpha, src_m, beta, dst_m, work) |
Direct M2M translation over OZ axis. More... | |
subroutine | fmm_m2m_bessel_ztranslate (z, src_sk, dst_sk, p, vscales, alpha, src_m, beta, dst_m) |
Direct M2M translation over OZ axis. More... | |
subroutine | fmm_m2m_bessel_ztranslate_work (z, src_sk, dst_sk, p, vscales, alpha, src_m, beta, dst_m, work, work_complex) |
Direct M2M translation over OZ axis. More... | |
subroutine | fmm_m2m_bessel_ztranslate_adj (z, src_sk, dst_sk, p, vscales, alpha, src_m, beta, dst_m) |
Direct M2M translation over OZ axis. More... | |
subroutine | fmm_m2m_bessel_ztranslate_adj_work (z, src_sk, dst_sk, p, vscales, alpha, src_m, beta, dst_m, work, work_complex) |
Direct M2M translation over OZ axis. More... | |
subroutine | fmm_m2m_bessel_derivative_ztranslate_work (src_sk, p, vscales, alpha, src_m, beta, dst_m) |
Direct M2M translation over OZ axis. More... | |
subroutine | fmm_m2m_ztranslate_adj (z, src_r, dst_r, p, vscales, vcnk, alpha, src_m, beta, dst_m) |
Adjoint M2M translation over OZ axis. More... | |
subroutine | fmm_m2m_ztranslate_adj_work (z, src_r, dst_r, p, vscales, vcnk, alpha, src_m, beta, dst_m, work) |
Adjoint M2M translation over OZ axis. More... | |
subroutine | fmm_m2m_scale (src_r, dst_r, p, alpha, src_m, beta, dst_m) |
Scale M2M, when spherical harmonics are centered in the same point. More... | |
subroutine | fmm_m2m_scale_adj (src_r, dst_r, p, alpha, src_m, beta, dst_m) |
Adjoint scale M2M, when spherical harmonics are centered in the same point. More... | |
subroutine | fmm_m2m_rotation (c, src_r, dst_r, p, vscales, vcnk, alpha, src_m, beta, dst_m) |
Direct M2M translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_m2m_rotation_work (c, src_r, dst_r, p, vscales, vcnk, alpha, src_m, beta, dst_m, work) |
Direct M2M translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_m2m_bessel_rotation (c, src_r, dst_r, kappa, p, vscales, alpha, src_m, beta, dst_m) |
Direct M2M translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_m2m_bessel_rotation_work (c, src_sk, dst_sk, p, vscales, alpha, src_m, beta, dst_m, work, work_complex) |
Direct M2M translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_m2m_bessel_rotation_adj (c, src_r, dst_r, kappa, p, vscales, alpha, src_m, beta, dst_m) |
Direct M2M translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_m2m_bessel_rotation_adj_work (c, src_sk, dst_sk, p, vscales, alpha, src_m, beta, dst_m, work, work_complex) |
Direct M2M translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_m2m_rotation_adj (c, src_r, dst_r, p, vscales, vcnk, alpha, src_m, beta, dst_m) |
Adjoint M2M translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_m2m_rotation_adj_work (c, src_r, dst_r, p, vscales, vcnk, alpha, src_m, beta, dst_m, work) |
Adjoint M2M translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_m2m_bessel_grad (p, sph_sk, vscales, sph_m, sph_m_grad) |
subroutine | fmm_l2l_ztranslate (z, src_r, dst_r, p, vscales, vfact, alpha, src_l, beta, dst_l) |
Direct L2L translation over OZ axis. More... | |
subroutine | fmm_l2l_ztranslate_work (z, src_r, dst_r, p, vscales, vfact, alpha, src_l, beta, dst_l, work) |
Direct L2L translation over OZ axis. More... | |
subroutine | fmm_l2l_bessel_ztranslate (z, src_si, dst_si, p, vscales, alpha, src_l, beta, dst_l) |
Direct M2M translation over OZ axis. More... | |
subroutine | fmm_l2l_bessel_ztranslate_work (z, src_si, dst_si, p, vscales, alpha, src_l, beta, dst_l, work, work_complex) |
Direct M2M translation over OZ axis. More... | |
subroutine | fmm_l2l_bessel_ztranslate_adj (z, src_si, dst_si, p, vscales, alpha, src_l, beta, dst_l) |
Direct M2M translation over OZ axis. More... | |
subroutine | fmm_l2l_bessel_ztranslate_adj_work (z, src_si, dst_si, p, vscales, alpha, src_l, beta, dst_l, work, work_complex) |
Direct M2M translation over OZ axis. More... | |
subroutine | fmm_l2l_bessel_derivative_ztranslate_work (src_si, p, vscales, alpha, src_l, beta, dst_l) |
Direct M2M translation over OZ axis. More... | |
subroutine | fmm_l2l_ztranslate_adj (z, src_r, dst_r, p, vscales, vfact, alpha, src_l, beta, dst_l) |
Adjoint L2L translation over OZ axis. More... | |
subroutine | fmm_l2l_ztranslate_adj_work (z, src_r, dst_r, p, vscales, vfact, alpha, src_l, beta, dst_l, work) |
Adjoint L2L translation over OZ axis. More... | |
subroutine | fmm_l2l_scale (src_r, dst_r, p, alpha, src_l, beta, dst_l) |
Scale L2L, when spherical harmonics are centered in the same point. More... | |
subroutine | fmm_l2l_scale_adj (src_r, dst_r, p, alpha, src_l, beta, dst_l) |
Adjoint scale L2L, when spherical harmonics are centered in the same point. More... | |
subroutine | fmm_l2l_rotation (c, src_r, dst_r, p, vscales, vfact, alpha, src_l, beta, dst_l) |
Direct L2L translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_l2l_rotation_work (c, src_r, dst_r, p, vscales, vfact, alpha, src_l, beta, dst_l, work) |
Direct L2L translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_l2l_bessel_rotation (c, src_r, dst_r, kappa, p, vscales, alpha, src_l, beta, dst_l) |
Direct L2L translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_l2l_bessel_rotation_work (c, src_si, dst_si, p, vscales, alpha, src_l, beta, dst_l, work, work_complex) |
Direct L2L translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_l2l_bessel_rotation_adj (c, src_r, dst_r, kappa, p, vscales, alpha, src_l, beta, dst_l) |
Direct L2L translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_l2l_bessel_rotation_adj_work (c, src_si, dst_si, p, vscales, alpha, src_l, beta, dst_l, work, work_complex) |
Direct L2L translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_l2l_bessel_grad (p, sph_si, vscales, sph_l, sph_l_grad) |
subroutine | fmm_l2l_rotation_adj (c, src_r, dst_r, p, vscales, vfact, alpha, src_l, beta, dst_l) |
Adjoint L2L translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_l2l_rotation_adj_work (c, src_r, dst_r, p, vscales, vfact, alpha, src_l, beta, dst_l, work) |
Adjoint L2L translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_m2l_ztranslate (z, src_r, dst_r, pm, pl, vscales, m2l_ztranslate_coef, alpha, src_m, beta, dst_l) |
Direct M2L translation over OZ axis. More... | |
subroutine | fmm_m2l_ztranslate_work (z, src_r, dst_r, pm, pl, vscales, m2l_ztranslate_coef, alpha, src_m, beta, dst_l, work) |
Direct M2L translation over OZ axis. More... | |
subroutine | fmm_m2l_ztranslate_adj (z, src_r, dst_r, pl, pm, vscales, m2l_ztranslate_adj_coef, alpha, src_l, beta, dst_m) |
Adjoint M2L translation over OZ axis. More... | |
subroutine | fmm_m2l_ztranslate_adj_work (z, src_r, dst_r, pl, pm, vscales, m2l_ztranslate_adj_coef, alpha, src_l, beta, dst_m, work) |
Adjoint M2L translation over OZ axis. More... | |
subroutine | fmm_m2l_rotation (c, src_r, dst_r, pm, pl, vscales, m2l_ztranslate_coef, alpha, src_m, beta, dst_l) |
Direct M2L translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_m2l_rotation_work (c, src_r, dst_r, pm, pl, vscales, m2l_ztranslate_coef, alpha, src_m, beta, dst_l, work) |
Direct M2L translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_m2l_bessel_rotation (c, src_r, dst_r, kappa, p, vscales, alpha, src_m, beta, dst_l) |
Direct M2M translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_m2l_bessel_rotation_work (c, src_sk, dst_si, p, vscales, alpha, src_m, beta, dst_l, work, work_complex) |
Direct M2M translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_m2l_bessel_rotation_adj (c, src_r, dst_r, kappa, p, vscales, alpha, src_m, beta, dst_l) |
Direct M2M translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_m2l_bessel_rotation_adj_work (c, src_sk, dst_si, p, vscales, alpha, src_m, beta, dst_l, work, work_complex) |
Direct M2M translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_m2l_bessel_ztranslate (z, src_sk, dst_si, p, vscales, alpha, src_m, beta, dst_l) |
Direct M2M translation over OZ axis. More... | |
subroutine | fmm_m2l_bessel_ztranslate_work (z, src_sk, dst_si, p, vscales, alpha, src_m, beta, dst_l, work, work_complex) |
Direct M2M translation over OZ axis. More... | |
subroutine | fmm_m2l_bessel_ztranslate_adj (z, src_sk, dst_si, p, vscales, alpha, src_m, beta, dst_l) |
Direct M2M translation over OZ axis. More... | |
subroutine | fmm_m2l_bessel_ztranslate_adj_work (z, src_sk, dst_si, p, vscales, alpha, src_m, beta, dst_l, work, work_complex) |
Direct M2M translation over OZ axis. More... | |
subroutine | fmm_m2l_rotation_adj (c, src_r, dst_r, pl, pm, vscales, m2l_ztranslate_adj_coef, alpha, src_l, beta, dst_m) |
Adjoint M2L translation by 4 rotations and 1 translation. More... | |
subroutine | fmm_m2l_rotation_adj_work (c, src_r, dst_r, pl, pm, vscales, m2l_ztranslate_adj_coef, alpha, src_l, beta, dst_m, work) |
Adjoint M2L translation by 4 rotations and 1 translation. More... | |
Harmonics-related core routines.
subroutine ddx_harmonics::ylmscale | ( | integer, intent(in) | p, |
real(dp), dimension((p+1)**2), intent(out) | vscales, | ||
real(dp), dimension(p+1), intent(out) | v4pi2lp1, | ||
real(dp), dimension((p+1)**2), intent(out) | vscales_rel | ||
) |
Compute scaling factors of real normalized spherical harmonics.
Output values of scaling factors of \( Y_\ell^m \) harmonics are filled only for non-negative \( m \) since scaling factor of \( Y_\ell^{-m} \) is the same as scaling factor of \( Y_\ell^m \).
[in] | p | Maximal degree of spherical harmonics. p >= 0 |
[out] | vscales | Array of scaling factors. Dimension is (p+1)**2 |
[out] | vscales | Array of values 4pi/(2l+1). Dimension is p+1 |
[out] | vscales_rel | Array of relative scaling factors. Dimension is (p+1)**2 . |
Definition at line 37 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_constants | ( | integer, intent(in) | dmax, |
integer, intent(in) | pm, | ||
integer, intent(in) | pl, | ||
real(dp), dimension((2*dmax+1)*(dmax+1)), intent(out) | vcnk, | ||
real(dp), dimension(pm+1, pl+1, pl+1), intent(out) | m2l_ztranslate_coef, | ||
real(dp), dimension(pl+1, pl+1, pm+1), intent(out) | m2l_ztranslate_adj_coef | ||
) |
Compute FMM-related constants.
[in] | dmax | Maximal degree of spherical harmonics to be evaluated. dmax >= 0 |
[in] | pm | Maximal degree of the multipole expansion. pm >= 0. |
[in] | pl | Maximal degree of the local expansion. pl >= 0. |
[out] | vcnk | Array of squre roots of combinatorial factors C_n^k. Dimension is (2*dmax+1)*(dmax+1) . |
[out] | m2l_ztranslate_coef | Constants for M2L translation over OZ axis. Dimension is (pm+1, pl+1, pl+1) . |
[out] | m2l_ztranslate_coef | Constants for adjoint M2L translation over OZ axis. Dimension is (pl+1, pl+1, pm+1) . |
Definition at line 80 of file ddx_harmonics.f90.
subroutine ddx_harmonics::carttosph | ( | real(dp), dimension(3), intent(in) | x, |
real(dp), intent(out) | rho, | ||
real(dp), intent(out) | ctheta, | ||
real(dp), intent(out) | stheta, | ||
real(dp), intent(out) | cphi, | ||
real(dp), intent(out) | sphi | ||
) |
Convert input cartesian coordinate into spherical coordinate.
Output coordinate \( (\rho, \theta, \phi) \) is presented by \( (\rho, \cos \theta, \sin \theta, \cos \phi, \sin\phi) \).
[in] | x | Cartesian coordinate |
[out] | rho | \( \rho \) |
[out] | ctheta | \( \cos \theta \) |
[out] | stheta | \( \sin \theta \) |
[out] | cphi | \( \cos \phi \) |
[out] | sphi | \( \sin \phi \) |
Definition at line 142 of file ddx_harmonics.f90.
subroutine ddx_harmonics::ylmbas | ( | real(dp), dimension(3), intent(in) | x, |
real(dp), intent(out) | rho, | ||
real(dp), intent(out) | ctheta, | ||
real(dp), intent(out) | stheta, | ||
real(dp), intent(out) | cphi, | ||
real(dp), intent(out) | sphi, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)**2), intent(in) | vscales, | ||
real(dp), dimension((p+1)**2), intent(out) | vylm, | ||
real(dp), dimension((p+1)**2), intent(out) | vplm, | ||
real(dp), dimension(p+1), intent(out) | vcos, | ||
real(dp), dimension(p+1), intent(out) | vsin | ||
) |
Compute all spherical harmonics up to a given degree at a given point.
Spherical harmonics are computed for a point \( x / \|x\| \). Cartesian coordinate of input x
is translated into a spherical coordinate \( (\rho,
\theta, \phi) \) that is represented by \( \rho, \cos \theta, \sin \theta,
\cos \phi \) and \( \sin \phi \). If \( \rho=0 \) nothing is computed, only zero \( \rho \) is returned without doing anything else. If \(
\rho>0 \) values \( \cos \theta \) and \( \sin \theta \) are computed. If \( \sin \theta \ne 0 \) then \( \cos \phi \) and \( \sin \phi \) are computed. Auxiliary values of associated Legendre polynomials \( P_\ell^m(\theta) \) are computed along with \( \cos (m \phi) \) and \( \sin(m \phi) \).
[in] | x | Target point |
[out] | rho | Euclidian length of x |
[out] | ctheta | \( -1 \leq \cos \theta \leq 1\) |
[out] | stheta | \( 0 \leq \sin \theta \leq 1\) |
[out] | cphi | \( -1 \leq \cos \phi \leq 1\) |
[out] | sphi | \( -1 \leq \sin \phi \leq 1\) |
[in] | p | Maximal degree of spherical harmonics. p >= 0 |
[in] | vscales | Scaling factors of real normalized spherical harmonics. Dimension is (p+1)**2 |
[out] | vylm | Values of spherical harmonics \( Y_\ell^m(x) \). Dimension is (p+1)**2 |
[out] | vplm | Values of associated Legendre polynomials \( P_\ell^m(
\theta) \). Dimension is (p+1)**2 |
[out] | vcos | Array of alues of \( \cos(m\phi) \) of a dimension (p+1) |
[out] | vsin | array of values of \( \sin(m\phi) \) of a dimension (p+1) |
Definition at line 214 of file ddx_harmonics.f90.
subroutine ddx_harmonics::trgev | ( | real(dp), intent(in) | cphi, |
real(dp), intent(in) | sphi, | ||
integer, intent(in) | p, | ||
real(dp), dimension(p+1), intent(out) | vcos, | ||
real(dp), dimension(p+1), intent(out) | vsin | ||
) |
Compute arrays of \( \cos(m \phi) \) and \( \sin(m \phi) \).
All values are computed recurrently from input \( \cos(\phi) \) and \( \sin(\phi) \) without accessing arccos or arcsin functions.
[in] | cphi | \( \cos(\phi) \). -1 <= cphi <= 1 |
[in] | sphi | \( \sin(\phi) \). -1 <= sphi <= 1 |
[in] | p | Maximal value of \( m \), for which to compute \( \cos(m
\phi) \) and \( \sin(m\phi) \). p >= 0 |
[out] | vcos | Array of \( \cos(m\phi) \) for \( m=0..p \). Dimension is (p+1) |
[out] | vsin | Array of \( \sin(m\phi) \) for \( m=0..p \). Dimension is (p+1) |
Definition at line 348 of file ddx_harmonics.f90.
subroutine ddx_harmonics::polleg | ( | real(dp), intent(in) | ctheta, |
real(dp), intent(in) | stheta, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)**2), intent(out) | vplm | ||
) |
Compute associated Legendre polynomials.
Only polynomials \( P_\ell^m (\cos \theta) \) with non-negative parameter \( m \) are computed. Implemented via following recurrent formulas:
\begin{align} &P_0^0(\cos \theta) = 1\\ &P_{m+1}^{m+1}(\cos \theta) = -(2m+1) \sin \theta P_m^m(\cos \theta) \\ &P_{m+1}^m(\cos \theta) = \cos \theta (2m+1) P_m^m(\cos \theta) \\ &P_\ell^m(\cos \theta) = \frac{1}{\ell-m} \left( \cos \theta (2\ell-1) P_{\ell-1}^m(\cos \theta) - (\ell+m-1)P_{\ell-2}^m(\cos \theta) \right), \quad \forall \ell \geq m+2. \end{align}
[in] | ctheta | \( \cos(\theta) \). -1 <= ctheta <= 1 |
[in] | stheta | \( \sin(\theta) \). 0 <= stheta <= 1 |
[in] | p | Maximal degree of polynomials to compute. p >= 0 |
[out] | vplm | Values of associated Legendre polynomials. Dimension is (p+1)**2 |
Definition at line 452 of file ddx_harmonics.f90.
subroutine ddx_harmonics::polleg_work | ( | real(dp), intent(in) | ctheta, |
real(dp), intent(in) | stheta, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)**2), intent(out) | vplm, | ||
real(dp), dimension(p+1), intent(out) | work | ||
) |
Compute associated Legendre polynomials.
Only polynomials \( P_\ell^m (\cos \theta) \) with non-negative parameter \( m \) are computed. Implemented via following recurrent formulas:
\begin{align} &P_0^0(\cos \theta) = 1\\ &P_{m+1}^{m+1}(\cos \theta) = -(2m+1) \sin \theta P_m^m(\cos \theta) \\ &P_{m+1}^m(\cos \theta) = \cos \theta (2m+1) P_m^m(\cos \theta) \\ &P_\ell^m(\cos \theta) = \frac{1}{\ell-m} \left( \cos \theta (2\ell-1) P_{\ell-1}^m(\cos \theta) - (\ell+m-1)P_{\ell-2}^m(\cos \theta) \right), \quad \forall \ell \geq m+2. \end{align}
[in] | ctheta | \( \cos(\theta) \). -1 <= ctheta <= 1 |
[in] | stheta | \( \sin(\theta) \). 0 <= stheta <= 1 |
[in] | p | Maximal degree of polynomials to compute. p >= 0 |
[out] | vplm | Values of associated Legendre polynomials. Dimension is (p+1)**2 |
Definition at line 482 of file ddx_harmonics.f90.
subroutine ddx_harmonics::modified_spherical_bessel_first_kind | ( | integer, intent(in) | lmax, |
real(dp), intent(in) | argument, | ||
real(dp), dimension(0:lmax), intent(out) | SI, | ||
real(dp), dimension(0:lmax), intent(out) | DI, | ||
complex(dp), dimension(0:max(1, lmax)), intent(out) | work | ||
) |
Definition at line 572 of file ddx_harmonics.f90.
subroutine ddx_harmonics::modified_spherical_bessel_second_kind | ( | integer, intent(in) | lmax, |
real(dp), intent(in) | argument, | ||
real(dp), dimension(0:lmax), intent(out) | SK, | ||
real(dp), dimension(0:lmax), intent(out) | DK, | ||
complex(dp), dimension(0:max(1, lmax)), intent(out) | work | ||
) |
Definition at line 635 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_p2m | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_q, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)**2), intent(in) | vscales, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)**2), intent(inout) | dst_m | ||
) |
Accumulate a multipole expansion induced by a particle of a given charge.
Computes the following sums:
\[ \forall \ell=0, \ldots, p, \quad \forall m=-\ell, \ldots, \ell : \quad M_\ell^m = \beta M_\ell^m + \frac{q \|c\|^\ell}{r^{\ell+1}} Y_\ell^m \left( \frac{c}{\|c\|} \right), \]
where \( M \) is a vector of coefficients of output harmonics of a degree up to \( p \) inclusively with a convergence radius \( r \) located at the origin, \( \beta \) is a scaling factor, \( q \) and \( c \) are a charge and coordinates of a particle.
Based on normalized real spherical harmonics \( Y_\ell^m \), scaled by \( r^{\ell+1} \). It means corresponding coefficients are simply scaled by an additional factor \( r^{-\ell-1} \).
[in] | c | Radius-vector from the particle to the center of harmonics |
[in] | src_q | Charge of the source particle |
[in] | dst_r | Radius of output multipole spherical harmonics |
[in] | p | Maximal degree of output multipole spherical harmonics |
[in] | vscales | Normalization constants for spherical harmonics |
[in] | beta | Scaling factor for dst_m |
[in,out] | dst_m | Multipole coefficients |
Definition at line 710 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_p2m_work | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_q, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)**2), intent(in) | vscales, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)**2), intent(inout) | dst_m, | ||
real(dp), dimension(2*(p+1)*(p+2)), intent(out), target | work | ||
) |
Accumulate a multipole expansion induced by a particle of a given charge.
Computes the following sums:
\[ \forall \ell=0, \ldots, p, \quad \forall m=-\ell, \ldots, \ell : \quad M_\ell^m = \beta M_\ell^m + \frac{q \|c\|^\ell}{r^{\ell+1}} Y_\ell^m \left( \frac{c}{\|c\|} \right), \]
where \( M \) is a vector of coefficients of output harmonics of a degree up to \( p \) inclusively with a convergence radius \( r \) located at the origin, \( \beta \) is a scaling factor, \( q \) and \( c \) are a charge and coordinates of a particle.
Based on normalized real spherical harmonics \( Y_\ell^m \), scaled by \( r^{\ell+1} \). It means corresponding coefficients are simply scaled by an additional factor \( r^{-\ell-1} \).
[in] | c | Radius-vector from the particle to the center of harmonics |
[in] | src_q | Charge of the source particle |
[in] | dst_r | Radius of output multipole spherical harmonics |
[in] | p | Maximal degree of output multipole spherical harmonics |
[in] | vscales | Normalization constants for spherical harmonics |
[in] | beta | Scaling factor for dst_m |
[in,out] | dst_m | Multipole coefficients |
[out] | work | Temporary workspace of a size (2*(p+1)*(p+2)) |
Definition at line 749 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2p | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales_rel, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), intent(inout) | dst_v | ||
) |
Accumulate potential, induced by multipole spherical harmonics.
Computes the following sum:
\[ v = \beta v + \alpha \sum_{\ell=0}^p \frac{4\pi}{\sqrt{2\ell+1}} \left( \frac{r}{\|c\|} \right)^{\ell+1} \sum_{m=-\ell}^\ell M_\ell^m Y_\ell^m \left( \frac{c}{\|c\|} \right), \]
where \( M \) is a vector of coefficients of input harmonics of a degree up to \( p \) inclusively with a convergence radius \( r \) located at the origin, \( \alpha \) and \( \beta \) are scaling factors and \( c \) is a location of a particle.
Based on normalized real spherical harmonics \( Y_\ell^m \), scaled by \( r^{-\ell} \). It means corresponding coefficients are simply scaled by an additional factor \( r^\ell \).
[in] | c | Coordinates of a particle (relative to center of harmonics) |
[in] | r | Radius of spherical harmonics |
[in] | p | Maximal degree of multipole basis functions |
[in] | vscales_rel | Relative normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2 |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_m | Multipole coefficients. Dimension is (p+1)**2 |
[in] | beta | Scalar multiplier for v |
[in,out] | v | Value of induced potential |
Definition at line 848 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2p_work | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales_rel, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), intent(inout) | dst_v, | ||
real(dp), dimension(p+1), intent(out), target | work | ||
) |
Accumulate potential, induced by multipole spherical harmonics.
This function relies on a user-provided temporary workspace
Computes the following sum:
\[ v = \beta v + \alpha \sum_{\ell=0}^p \frac{4\pi}{\sqrt{2\ell+1}} \left( \frac{r}{\|c\|} \right)^{\ell+1} \sum_{m=-\ell}^\ell M_\ell^m Y_\ell^m \left( \frac{c}{\|c\|} \right), \]
where \( M \) is a vector of coefficients of input harmonics of a degree up to \( p \) inclusively with a convergence radius \( r \) located at the origin, \( \alpha \) and \( \beta \) are scaling factors and \( c \) is a location of a particle.
Based on normalized real spherical harmonics \( Y_\ell^m \), scaled by \( r^{-\ell} \). It means corresponding coefficients are simply scaled by an additional factor \( r^\ell \).
[in] | c | Coordinates of a particle (relative to center of harmonics) |
[in] | r | Radius of spherical harmonics |
[in] | p | Maximal degree of multipole basis functions |
[in] | vscales_rel | Relative normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2 |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_m | Multipole coefficients. Dimension is (p+1)**2 |
[in] | beta | Scalar multiplier for v |
[in,out] | v | Value of induced potential |
[out] | work | Temporary workspace of size (p+1) |
Definition at line 891 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2p_bessel | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), intent(inout) | dst_v | ||
) |
Accumulate potential, induced by multipole spherical harmonics.
Computes the following sum:
\[ v = \beta v + \alpha \sum_{\ell=0}^p \frac{4\pi}{\sqrt{2\ell+1}} \left( \frac{r}{\|c\|} \right)^{\ell+1} \sum_{m=-\ell}^\ell M_\ell^m Y_\ell^m \left( \frac{c}{\|c\|} \right), \]
where \( M \) is a vector of coefficients of input harmonics of a degree up to \( p \) inclusively with a convergence radius \( r \) located at the origin, \( \alpha \) and \( \beta \) are scaling factors and \( c \) is a location of a particle.
Based on normalized real spherical harmonics \( Y_\ell^m \), scaled by \( r^{-\ell} \). It means corresponding coefficients are simply scaled by an additional factor \( r^\ell \).
[in] | c | Coordinates of a particle (relative to center of harmonics) |
[in] | r | Radius of spherical harmonics |
[in] | p | Maximal degree of multipole basis functions |
[in] | vscales | Normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2 |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_m | Multipole coefficients. Dimension is (p+1)**2 |
[in] | beta | Scalar multiplier for v |
[in,out] | v | Value of induced potential |
Definition at line 1086 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2p_bessel_work | ( | real(dp), dimension(3), intent(in) | c, |
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), dimension(p+1), intent(in) | SK_ri, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), intent(inout) | dst_v, | ||
complex(dp), dimension(p+1), intent(out) | work_complex, | ||
real(dp), dimension(p+1), intent(out) | work | ||
) |
Accumulate Bessel potential, induced by multipole spherical harmonics.
This function relies on a user-provided temporary workspace
Computes the following sum:
\[ \]
where \( M \) is a vector of coefficients of input harmonics of a degree up to \( p \) inclusively with a convergence radius \( r \) located at the origin, \( \alpha \) and \( \beta \) are scaling factors and \( c \) is a location of a particle.
Based on normalized real spherical harmonics \( Y_\ell^m \), scaled by \( r^{-\ell} \). It means corresponding coefficients are simply scaled by an additional factor \( r^\ell \).
[in] | c | Coordinates of a particle (relative to center of harmonics) |
[in] | r | Radius of spherical harmonics |
[in] | p | Maximal degree of multipole basis functions |
[in] | vscales | Normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2 |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_m | Multipole coefficients. Dimension is (p+1)**2 |
[in] | beta | Scalar multiplier for v |
[in,out] | v | Value of induced potential |
[out] | work | Temporary workspace of size (p+1) |
Definition at line 1132 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2p_bessel_grad | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+2)*(p+2)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension(3), intent(inout) | dst_g | ||
) |
Definition at line 1318 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2p_adj | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_q, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales_rel, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)**2), intent(inout) | dst_m | ||
) |
Adjoint M2P operation.
Computes the following sum:
\[ v = \beta v + \alpha \sum_{\ell=0}^p \frac{4\pi}{\sqrt{2\ell+1}} \left( \frac{r}{\|c\|} \right)^{\ell+1} \sum_{m=-\ell}^\ell M_\ell^m Y_\ell^m \left( \frac{c}{\|c\|} \right), \]
where \( M \) is a vector of coefficients of input harmonics of a degree up to \( p \) inclusively with a convergence radius \( r \) located at the origin, \( \alpha \) and \( \beta \) are scaling factors and \( c \) is a location of a particle.
Based on normalized real spherical harmonics \( Y_\ell^m \), scaled by \( r^{-\ell} \). It means corresponding coefficients are simply scaled by an additional factor \( r^\ell \).
[in] | c | Coordinates of a particle (relative to center of harmonics) |
[in] | src_q | Charge of the source particle |
[in] | dst_r | Radius of output multipole spherical harmonics |
[in] | p | Maximal degree of multipole basis functions |
[in] | vscales_rel | Relative normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2 |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_m | Multipole coefficients. Dimension is (p+1)**2 |
Definition at line 1366 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2p_adj_work | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_q, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales_rel, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)**2), intent(inout) | dst_m, | ||
real(dp), dimension(p+1), intent(out), target | work | ||
) |
Adjoint M2P operation.
Computes the following sum:
\[ v = \beta v + \alpha \sum_{\ell=0}^p \frac{4\pi}{\sqrt{2\ell+1}} \left( \frac{r}{\|c\|} \right)^{\ell+1} \sum_{m=-\ell}^\ell M_\ell^m Y_\ell^m \left( \frac{c}{\|c\|} \right), \]
where \( M \) is a vector of coefficients of input harmonics of a degree up to \( p \) inclusively with a convergence radius \( r \) located at the origin, \( \alpha \) and \( \beta \) are scaling factors and \( c \) is a location of a particle.
Based on normalized real spherical harmonics \( Y_\ell^m \), scaled by \( r^{-\ell} \). It means corresponding coefficients are simply scaled by an additional factor \( r^\ell \).
[in] | c | Coordinates of a particle (relative to center of harmonics) |
[in] | src_q | Charge of the source particle |
[in] | dst_r | Radius of output multipole spherical harmonics |
[in] | p | Maximal degree of multipole basis functions |
[in] | vscales_rel | Relative normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2 |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_m | Multipole coefficients. Dimension is (p+1)**2 |
[out] | work | Temporary workspace of a size ((p+1)*(p+1)+3*p) |
Definition at line 1404 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2p_bessel_adj | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_q, | ||
real(dp), intent(in) | dst_r, | ||
real(dp), intent(in) | kappa, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)**2), intent(inout) | dst_m | ||
) |
Adjoint M2P operation.
Computes the following sum:
\[ v = \beta v + \alpha \sum_{\ell=0}^p \frac{4\pi}{\sqrt{2\ell+1}} \left( \frac{r}{\|c\|} \right)^{\ell+1} \sum_{m=-\ell}^\ell M_\ell^m Y_\ell^m \left( \frac{c}{\|c\|} \right), \]
where \( M \) is a vector of coefficients of input harmonics of a degree up to \( p \) inclusively with a convergence radius \( r \) located at the origin, \( \alpha \) and \( \beta \) are scaling factors and \( c \) is a location of a particle.
Based on normalized real spherical harmonics \( Y_\ell^m \), scaled by \( r^{-\ell} \). It means corresponding coefficients are simply scaled by an additional factor \( r^\ell \).
[in] | c | Coordinates of a particle (relative to center of harmonics) |
[in] | src_q | Charge of the source particle |
[in] | dst_r | Radius of output multipole spherical harmonics |
[in] | p | Maximal degree of multipole basis functions |
[in] | vscales_rel | Relative normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2 |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_m | Multipole coefficients. Dimension is (p+1)**2 |
Definition at line 1703 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2p_bessel_adj_work | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_q, | ||
real(dp), dimension(p+1), intent(in) | dst_sk, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)**2), intent(inout) | dst_m, | ||
complex(dp), dimension(p+1), intent(out) | work_complex, | ||
real(dp), dimension(p+1), intent(out) | work | ||
) |
Adjoint M2P operation.
Computes the following sum:
\[ v = \beta v + \alpha \sum_{\ell=0}^p \frac{4\pi}{\sqrt{2\ell+1}} \left( \frac{r}{\|c\|} \right)^{\ell+1} \sum_{m=-\ell}^\ell M_\ell^m Y_\ell^m \left( \frac{c}{\|c\|} \right), \]
where \( M \) is a vector of coefficients of input harmonics of a degree up to \( p \) inclusively with a convergence radius \( r \) located at the origin, \( \alpha \) and \( \beta \) are scaling factors and \( c \) is a location of a particle.
Based on normalized real spherical harmonics \( Y_\ell^m \), scaled by \( r^{-\ell} \). It means corresponding coefficients are simply scaled by an additional factor \( r^\ell \).
[in] | c | Coordinates of a particle (relative to center of harmonics) |
[in] | src_q | Charge of the source particle |
[in] | dst_r | Radius of output multipole spherical harmonics |
[in] | p | Maximal degree of multipole basis functions |
[in] | vscales_rel | Relative normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2 |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_m | Multipole coefficients. Dimension is (p+1)**2 |
[out] | work | Temporary workspace of a size ((p+1)*(p+1)+3*p) |
Definition at line 1749 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2p_mat | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)**2), intent(in) | vscales, | ||
real(dp), dimension((p+1)**2), intent(out) | mat | ||
) |
Accumulate potentials, induced by each multipole spherical harmonic.
Computes the following sum:
\[ v = \beta v + \alpha \sum_{\ell=0}^p \frac{4\pi}{\sqrt{2\ell+1}} \left( \frac{r}{\|c\|} \right)^{\ell+1} \sum_{m=-\ell}^\ell M_\ell^m Y_\ell^m \left( \frac{c}{\|c\|} \right), \]
where \( M \) is a vector of coefficients of input harmonics of a degree up to \( p \) inclusively with a convergence radius \( r \) located at the origin, \( \alpha \) and \( \beta \) are scaling factors and \( c \) is a location of a particle.
Based on normalized real spherical harmonics \( Y_\ell^m \), scaled by \( r^{-\ell} \). It means corresponding coefficients are simply scaled by an additional factor \( r^\ell \).
[in] | c | Coordinates of a particle (relative to center of harmonics) |
[in] | r | Radius of spherical harmonics |
[in] | p | Maximal degree of multipole basis functions |
[in] | vscales | Normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2 |
[in,out] | mat | Values of potentials induced by each spherical harmonic |
Definition at line 2073 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2p | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), intent(inout) | dst_v | ||
) |
Accumulate potential, induced by local spherical harmonics.
Computes the following sum:
\[ v = \beta v + \alpha \sum_{\ell=0}^p \frac{4\pi}{\sqrt{2\ell+1}} \left( \frac{\|c\|}{r} \right)^\ell \sum_{m=-\ell}^\ell L_\ell^m Y_\ell^m \left( \frac{c}{\|c\|} \right), \]
where \( L \) is a vector of coefficients of input harmonics of a degree up to \( p \) inclusively with a convergence radius \( r \) located at the origin, \( \alpha \) and \( \beta \) are scaling factors and \( c \) is a location of a particle. Based on normalized real spherical harmonics \( Y_\ell^m \), scaled by \( r^{-\ell} \). It means corresponding coefficients are simply scaled by an additional factor \( r^\ell \).
[in] | c | Coordinates of a particle (relative to center of harmonics) |
[in] | src_r | Radius of spherical harmonics |
[in] | p | Maximal degree of local basis functions |
[in] | vscales | Normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2 |
[in] | alpha | Scalar multiplier for src_l |
[in] | src_l | Local coefficients. Dimension is (p+1)**2 |
[in] | beta | Scalar multiplier for dst_v |
[in,out] | dst_v | Value of induced potential |
Definition at line 2126 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2p_work | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales_rel, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), intent(inout) | dst_v, | ||
real(dp), dimension(p+1), intent(out), target | work | ||
) |
Accumulate potential, induced by local spherical harmonics.
Computes the following sum:
\[ v = \beta v + \alpha \sum_{\ell=0}^p \frac{4\pi}{\sqrt{2\ell+1}} \left( \frac{\|c\|}{r} \right)^\ell \sum_{m=-\ell}^\ell L_\ell^m Y_\ell^m \left( \frac{c}{\|c\|} \right), \]
where \( L \) is a vector of coefficients of input harmonics of a degree up to \( p \) inclusively with a convergence radius \( r \) located at the origin, \( \alpha \) and \( \beta \) are scaling factors and \( c \) is a location of a particle. Based on normalized real spherical harmonics \( Y_\ell^m \), scaled by \( r^{-\ell} \). It means corresponding coefficients are simply scaled by an additional factor \( r^\ell \).
[in] | c | Coordinates of a particle (relative to center of harmonics) |
[in] | src_r | Radius of spherical harmonics |
[in] | p | Maximal degree of local basis functions |
[in] | vscales | Normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2 |
[in] | alpha | Scalar multiplier for src_l |
[in] | src_l | Local coefficients. Dimension is (p+1)**2 |
[in] | beta | Scalar multiplier for dst_v |
[in,out] | dst_v | Value of induced potential |
[out] | work | Temporary workspace of a size (p+1) |
Definition at line 2165 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2p_bessel | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), intent(inout) | dst_v | ||
) |
Accumulate potential, induced by local spherical harmonics.
Computes the following sum:
\[ v = \beta v + \alpha \sum_{\ell=0}^p \frac{4\pi}{\sqrt{2\ell+1}} \left( \frac{\|c\|}{r} \right)^\ell \sum_{m=-\ell}^\ell L_\ell^m Y_\ell^m \left( \frac{c}{\|c\|} \right), \]
where \( L \) is a vector of coefficients of input harmonics of a degree up to \( p \) inclusively with a convergence radius \( r \) located at the origin, \( \alpha \) and \( \beta \) are scaling factors and \( c \) is a location of a particle. Based on normalized real spherical harmonics \( Y_\ell^m \), scaled by \( r^{-\ell} \). It means corresponding coefficients are simply scaled by an additional factor \( r^\ell \).
[in] | c | Coordinates of a particle (relative to center of harmonics) |
[in] | src_r | Radius of spherical harmonics |
[in] | p | Maximal degree of local basis functions |
[in] | vscales | Normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2 |
[in] | alpha | Scalar multiplier for src_l |
[in] | src_l | Local coefficients. Dimension is (p+1)**2 |
[in] | beta | Scalar multiplier for dst_v |
[in,out] | dst_v | Value of induced potential |
Definition at line 2356 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2p_bessel_work | ( | real(dp), dimension(3), intent(in) | c, |
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), dimension(p+1), intent(in) | SI_ri, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), intent(inout) | dst_v, | ||
complex(dp), dimension(p+1), intent(out) | work_complex, | ||
real(dp), dimension(p+1), intent(out) | work | ||
) |
Accumulate Bessel potential, induced by local spherical harmonics.
This function relies on a user-provided temporary workspace
Computes the following sum:
\[ \]
where \( M \) is a vector of coefficients of input harmonics of a degree up to \( p \) inclusively with a convergence radius \( r \) located at the origin, \( \alpha \) and \( \beta \) are scaling factors and \( c \) is a location of a particle.
Based on normalized real spherical harmonics \( Y_\ell^m \), scaled by \( r^{-\ell} \). It means corresponding coefficients are simply scaled by an additional factor \( r^\ell \).
[in] | c | Coordinates of a particle (relative to center of harmonics) |
[in] | r | Radius of spherical harmonics |
[in] | p | Maximal degree of local basis functions |
[in] | vscales | Normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2 |
[in] | alpha | Scalar multiplier for src_l |
[in] | src_l | Local coefficients. Dimension is (p+1)**2 |
[in] | beta | Scalar multiplier for v |
[in,out] | v | Value of induced potential |
[out] | work | Temporary workspace of size (p+1) |
Definition at line 2401 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2p_bessel_grad | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+2)*(p+2)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension(3), intent(inout) | dst_g | ||
) |
Definition at line 2588 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2p_adj | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_q, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales_rel, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)**2), intent(inout) | dst_l | ||
) |
Adjoint of L2P.
Computes the following sum:
\[ v = \beta v + \alpha \sum_{\ell=0}^p \frac{4\pi}{\sqrt{2\ell+1}} \left( \frac{\|c\|}{r} \right)^\ell \sum_{m=-\ell}^\ell L_\ell^m Y_\ell^m \left( \frac{c}{\|c\|} \right), \]
where \( L \) is a vector of coefficients of input harmonics of a degree up to \( p \) inclusively with a convergence radius \( r \) located at the origin, \( \alpha \) and \( \beta \) are scaling factors and \( c \) is a location of a particle. Based on normalized real spherical harmonics \( Y_\ell^m \), scaled by \( r^{-\ell} \). It means corresponding coefficients are simply scaled by an additional factor \( r^\ell \).
[in] | c | Coordinates of a particle (relative to center of harmonics) |
[in] | src_q | Charge of the source particle |
[in] | dst_r | Radius of output local spherical harmonics |
[in] | p | Maximal degree of local basis functions |
[in] | vscales_rel | Relative normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2 |
[in] | beta | Scalar multiplier for dst_l |
[in,out] | dst_l | Local coefficients. Dimension is (p+1)**2 |
Definition at line 2635 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2p_adj_work | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_q, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales_rel, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)**2), intent(inout) | dst_l, | ||
real(dp), dimension(p+1), intent(out), target | work | ||
) |
Adjoint L2P.
Computes the following sum:
\[ v = \beta v + \alpha \sum_{\ell=0}^p \frac{4\pi}{\sqrt{2\ell+1}} \left( \frac{\|c\|}{r} \right)^\ell \sum_{m=-\ell}^\ell L_\ell^m Y_\ell^m \left( \frac{c}{\|c\|} \right), \]
where \( L \) is a vector of coefficients of input harmonics of a degree up to \( p \) inclusively with a convergence radius \( r \) located at the origin, \( \alpha \) and \( \beta \) are scaling factors and \( c \) is a location of a particle. Based on normalized real spherical harmonics \( Y_\ell^m \), scaled by \( r^{-\ell} \). It means corresponding coefficients are simply scaled by an additional factor \( r^\ell \).
[in] | c | Coordinates of a particle (relative to center of harmonics) |
[in] | src_q | Charge of the source particle |
[in] | dst_r | Radius of output local spherical harmonics |
[in] | p | Maximal degree of local basis functions |
[in] | vscales_rel | Relative normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2 |
[in] | beta | Scalar multiplier for dst_l |
[in,out] | dst_l | Local coefficients. Dimension is (p+1)**2 |
[out] | work | Temporary workspace of a size (p+1) |
Definition at line 2672 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_sph_transform | ( | integer, intent(in) | p, |
real(dp), dimension(-1:1, -1:1), intent(in) | r1, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst | ||
) |
Transform coefficients of spherical harmonics to a new cartesion system.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha R \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics corresponding to a new cartesion system of coordinates, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics corresponding to the standard cartesian system of coordinates and \( R \) is a '(p+1)**2'-by-'(p+1)**2' matrix that transforms coefficients of the source spherical harmonics to the destination spherical harmonics while preserving values of any function on a unit sphere defined as a linear combination of the source spherical harmonics.
Input 3-by-3 matrix r1
must be an orthogonal matrix \( R_1 \) of a transform of new cartesion coordinates \( (\widetilde{y}, \widetilde{z},
\widetilde{x}) \) into initial cartesian coordinates \( (y, z, x) \). This is due to the following equalities:
\begin{align} Y_1^{-1} (\theta, \phi) &= \sqrt{\frac{3}{4\pi}} \sin \theta \sin \phi = \sqrt{\frac{3}{4\pi}} y, \\ Y_1^0 (\theta, \phi) &= \sqrt{\frac{3}{4\pi}} \cos \theta = \sqrt{\frac{3}{4\pi}} z, \\ Y_1^1 (\theta, \phi) &= \sqrt{\frac{3}{4\pi}} \sin \theta \cos \phi = \sqrt{\frac{3}{4\pi}} x. \end{align}
So, to find a column-vector \( \widetilde{c} \) of coefficients of spherical harmonics \( Y_1^{-1}, Y_1^0 \) and \( Y_1^1 \) in a new system of coordinates \( (\widetilde{y}, \widetilde{z}, \widetilde{x}) \) the following system needs to be solved:
\[ \widetilde{c}^\top \cdot \begin{bmatrix} Y_1^{-1} (\widetilde{\theta}, \widetilde{\phi}) \\ Y_1^0 (\widetilde{\theta}, \widetilde{\phi}) \\ Y_1^1 (\widetilde{\theta}, \widetilde{\phi}) \end{bmatrix} = c ^\top \cdot \begin{bmatrix} Y_1^{-1} (\theta, \phi) \\ Y_1^0 (\theta, \phi) \\ Y_1^1 (\theta, \phi) \end{bmatrix}. \]
The solution has the following obvious form:
\[ \widetilde{c} = R_1^\top c. \]
Translation of spherical harmonics of all other degrees is computed recursively as is described in the following source: [ir-realharms-1996] [ir-realharms-1998]
[in] | p | Maximum degree of spherical harmonics |
[in] | r1 | Transformation from new to old cartesian coordinates |
[in] | alpha | Scalar multipler for src |
[in] | src | Coefficients of initial spherical harmonics |
[in] | beta | Scalar multipler for dst |
[in,out] | dst | Coefficients of transformed spherical harmonics |
Definition at line 2998 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_sph_transform_work | ( | integer, intent(in) | p, |
real(dp), dimension(-1:1, -1:1), intent(in) | r1, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(out) | dst, | ||
real(dp), dimension(2*(2*p+1)*(2*p+3)), intent(out), target | work | ||
) |
Transform spherical harmonics to a new cartesion system of coordinates.
This function implements fmm_sph_transform with predefined values of parameters alpha=one
and beta=zero
.
[in] | p | Maximum degree of spherical harmonics |
[in] | r1 | Transformation from new to old cartesian coordinates |
[in] | alpha | Scalar multipler for src |
[in] | src | Coefficients of initial spherical harmonics |
[in] | beta | Scalar multipler for dst |
[in,out] | dst | Coefficients of transformed spherical harmonics |
[out] | work | Temporary workspace of a size (2*(2*p+1)*(2*p+3)) |
Definition at line 3023 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_sph_rotate_oz | ( | integer, intent(in) | p, |
real(dp), dimension(p+1), intent(in) | vcos, | ||
real(dp), dimension(p+1), intent(in) | vsin, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst | ||
) |
Rotate spherical harmonics around OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha R \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics corresponding to a new cartesion system of coordinates, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics corresponding to the standard cartesian system of coordinates and \( R \) is a matrix of rotation of coordinates around OZ axis on angle \( \phi \), presented by \( \cos(m \phi) \) and \( \sin(m \phi) \).
[in] | p | Maximal order of spherical harmonics |
[in] | vcos | Vector \( \{ \cos(m \phi) \}_{m=0}^p \) |
[in] | vsin | Vector \( \{ \sin(m \phi) \}_{m=0}^p \) |
[in] | alpha | Scalar multiplier for src |
[in] | src | Coefficients of initial spherical harmonics |
[in] | beta | Scalar multipler for dst |
[in,out] | dst | Coefficients of rotated spherical harmonics |
Definition at line 3667 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_sph_rotate_oz_work | ( | integer, intent(in) | p, |
real(dp), dimension(p+1), intent(in) | vcos, | ||
real(dp), dimension(p+1), intent(in) | vsin, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst | ||
) |
Rotate spherical harmonics around OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha R \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics corresponding to a new cartesion system of coordinates, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics corresponding to the standard cartesian system of coordinates and \( R \) is a matrix of rotation of coordinates around OZ axis on angle \( \phi \), presented by \( \cos(m \phi) \) and \( \sin(m \phi) \).
[in] | p | Maximal order of spherical harmonics |
[in] | vcos | Vector \( \{ \cos(m \phi) \}_{m=0}^p \) |
[in] | vsin | Vector \( \{ \sin(m \phi) \}_{m=0}^p \) |
[in] | alpha | Scalar multiplier for src |
[in] | src | Coefficients of initial spherical harmonics |
[in] | beta | Scalar multipler for dst |
[in,out] | dst | Coefficients of rotated spherical harmonics |
Definition at line 3698 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_sph_rotate_oz_adj | ( | integer, intent(in) | p, |
real(dp), dimension(p+1), intent(in) | vcos, | ||
real(dp), dimension(p+1), intent(in) | vsin, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst | ||
) |
Rotate spherical harmonics around OZ axis in an opposite direction.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha R \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics corresponding to a new cartesion system of coordinates, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics corresponding to the standard cartesian system of coordinates and \( R \) is a matrix of rotation of coordinates around OZ axis on angle \( \phi \), presented by \( \cos(m \phi) \) and \( \sin(m \phi) \).
[in] | p | Maximal order of spherical harmonics |
[in] | vcos | Vector \( \{ \cos(m \phi) \}_{m=0}^p \) |
[in] | vsin | Vector \( \{ \sin(m \phi) \}_{m=0}^p \) |
[in] | alpha | Scalar multiplier for src |
[in] | src | Coefficients of initial spherical harmonics |
[in] | beta | Scalar multipler for dst |
[in,out] | dst | Coefficients of rotated spherical harmonics |
Definition at line 3788 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_sph_rotate_oz_adj_work | ( | integer, intent(in) | p, |
real(dp), dimension(p+1), intent(in) | vcos, | ||
real(dp), dimension(p+1), intent(in) | vsin, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst | ||
) |
Rotate spherical harmonics around OZ axis in an opposite direction.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha R \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics corresponding to a new cartesion system of coordinates, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics corresponding to the standard cartesian system of coordinates and \( R \) is a matrix of rotation of coordinates around OZ axis on angle \( \phi \), presented by \( \cos(m \phi) \) and \( \sin(m \phi) \).
[in] | p | Maximal order of spherical harmonics |
[in] | vcos | Vector \( \{ \cos(m \phi) \}_{m=0}^p \) |
[in] | vsin | Vector \( \{ \sin(m \phi) \}_{m=0}^p \) |
[in] | alpha | Scalar multiplier for src |
[in] | src | Coefficients of initial spherical harmonics |
[in] | beta | Scalar multipler for dst |
[in,out] | dst | Coefficients of rotated spherical harmonics |
Definition at line 3819 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_sph_rotate_oxz | ( | integer, intent(in) | p, |
real(dp), intent(in) | ctheta, | ||
real(dp), intent(in) | stheta, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)**2), intent(in) | src, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)**2), intent(inout) | dst | ||
) |
Transform spherical harmonics in the OXZ plane.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha R \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics corresponding to a new cartesion system of coordinates, \(
\mathrm{src} \) is a vector of coefficients of input spherical harmonics corresponding to the standard cartesian system of coordinates and \(
R \) is a matrix of transformation of coordinates in the OXZ plane (y coordinate remains the same) presented by 2-by-2 matrix r1xz
.
Based on fmm_sph_transform by assuming r1(-1, 0) = r1(-1, 1) = r1(0, -1) = r1(1, -1) = 0
and r1(-1, -1) = 1
, which corresponds to the following transformation matrix:
\[ R_1 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & a & b \\ 0 & c & d \end{bmatrix}, \]
where unkown elements represent input r1xz
2x2 array:
\[ R_1^{xz} = \begin{bmatrix} a & b \\ c & d \end{bmatrix}. \]
[in] | p | Maximal order of spherical harmonics |
[in] | r1xz | Transformation from new to old coordinates in the OXZ plane |
[in] | alpha | Scalar multiplier for src |
[in] | src | Coefficients of initial spherical harmonics |
[in] | beta | Scalar multipler for dst |
[in,out] | dst | Coefficients of transformed spherical harmonics |
Definition at line 3916 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_sph_rotate_oxz_work | ( | integer, intent(in) | p, |
real(dp), intent(in) | ctheta, | ||
real(dp), intent(in) | stheta, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)**2), intent(in) | src, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(out) | dst, | ||
real(dp), dimension(4*p*p+13*p+4), intent(out), target | work | ||
) |
Transform spherical harmonics in the OXZ plane.
This function implements fmm_sph_rotate_oxz with predefined values of parameters alpha=one
and beta=zero
.
[in] | p | maximum order of spherical harmonics |
[in] | r1xz | 2D transformation matrix in the OXZ plane |
[in] | alpha | Scalar multiplier for src |
[in] | src | Coefficients of initial spherical harmonics |
[in] | beta | Scalar multipler for dst |
[out] | dst | coefficients of rotated spherical harmonics |
[out] | work | Temporary workspace of a size (2*(2*p+1)*(2*p+3)) |
Definition at line 3941 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2m_ztranslate | ( | real(dp), intent(in) | z, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), dimension((2*p+1)*(p+1)), intent(in) | vcnk, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_m | ||
) |
Direct M2M translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of multipole-to-multipole translation over OZ axis.
[in] | z | OZ coordinate from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics @parma[in] p: Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | vcnk | Square roots of combinatorial numbers C_n^k |
[in] | alpha | Scalar multipler for alpha |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multipler for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
Definition at line 4225 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2m_ztranslate_work | ( | real(dp), intent(in) | z, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), dimension((2*p+1)*(p+1)), intent(in) | vcnk, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_m, | ||
real(dp), dimension(2*(p+1)), intent(out), target | work | ||
) |
Direct M2M translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of multipole-to-multipole translation over OZ axis.
[in] | z | OZ coordinate from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics @parma[in] p: Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | vcnk | Square roots of combinatorial numbers C_n^k |
[in] | alpha | Scalar multipler for alpha |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multipler for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
[out] | work | Temporary workspace of a size (2*(p+1)) |
Definition at line 4263 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2m_bessel_ztranslate | ( | real(dp), intent(in) | z, |
real(dp), dimension(p+1), intent(in) | src_sk, | ||
real(dp), dimension(p+1), intent(in) | dst_sk, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_m | ||
) |
Direct M2M translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of multipole-to-multipole translation over OZ axis.
[in] | z | OZ coordinate from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics @parma[in] p: Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | alpha | Scalar multipler for alpha |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multipler for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
Definition at line 4435 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2m_bessel_ztranslate_work | ( | real(dp), intent(in) | z, |
real(dp), dimension(p+1), intent(in) | src_sk, | ||
real(dp), dimension(p+1), intent(in) | dst_sk, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_m, | ||
real(dp), dimension(2*p+1), intent(out), target | work, | ||
complex(dp), dimension(2*p+1), intent(out) | work_complex | ||
) |
Direct M2M translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of multipole-to-multipole translation over OZ axis.
[in] | z | OZ coordinate from old to new centers of harmonics. Standard FMM M2M operation requires z to be OZ coordinate from new to old. |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics @parma[in] p: Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | alpha | Scalar multipler for alpha |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multipler for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
[out] | work | Temporary workspace of a size (2*(p+1)) |
Definition at line 4474 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2m_bessel_ztranslate_adj | ( | real(dp), intent(in) | z, |
real(dp), dimension(p+1), intent(in) | src_sk, | ||
real(dp), dimension(p+1), intent(in) | dst_sk, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_m | ||
) |
Direct M2M translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of multipole-to-multipole translation over OZ axis.
[in] | z | OZ coordinate from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics @parma[in] p: Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | alpha | Scalar multipler for alpha |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multipler for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
Definition at line 4674 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2m_bessel_ztranslate_adj_work | ( | real(dp), intent(in) | z, |
real(dp), dimension(p+1), intent(in) | src_sk, | ||
real(dp), dimension(p+1), intent(in) | dst_sk, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_m, | ||
real(dp), dimension(2*p+1), intent(out), target | work, | ||
complex(dp), dimension(2*p+1), intent(out) | work_complex | ||
) |
Direct M2M translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of multipole-to-multipole translation over OZ axis.
[in] | z | OZ coordinate from old to new centers of harmonics. Standard FMM M2M operation requires z to be OZ coordinate from new to old. |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics @parma[in] p: Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | alpha | Scalar multipler for alpha |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multipler for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
[out] | work | Temporary workspace of a size (2*(p+1)) |
Definition at line 4713 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2m_bessel_derivative_ztranslate_work | ( | real(dp), dimension(p+2), intent(in) | src_sk, |
integer, intent(in) | p, | ||
real(dp), dimension((p+2)*(p+2)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+2)*(p+2)), intent(inout) | dst_m | ||
) |
Direct M2M translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of multipole-to-multipole translation over OZ axis.
[in] | z | OZ coordinate from old to new centers of harmonics. Standard FMM M2M operation requires z to be OZ coordinate from new to old. |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics @parma[in] p: Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | alpha | Scalar multipler for alpha |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multipler for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
[out] | work | Temporary workspace of a size (2*(p+1)) |
Definition at line 4915 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2m_ztranslate_adj | ( | real(dp), intent(in) | z, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), dimension((2*p+1)*(p+1)), intent(in) | vcnk, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_m | ||
) |
Adjoint M2M translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M^\top \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M^\top \) is an adjoint matrix of multipole-to-multipole translation over OZ axis.
[in] | z | OZ coordinate from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics @parma[in] p: Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | vcnk | Square roots of combinatorial numbers C_n^k |
[in] | alpha | Scalar multipler for src_m |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multipler for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
Definition at line 5402 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2m_ztranslate_adj_work | ( | real(dp), intent(in) | z, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), dimension((2*p+1)*(p+1)), intent(in) | vcnk, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_m, | ||
real(dp), dimension(2*(p+1)), intent(out), target | work | ||
) |
Adjoint M2M translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M^\top \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M^\top \) is an adjoint matrix of multipole-to-multipole translation over OZ axis.
[in] | z | OZ coordinate from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics @parma[in] p: Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | vcnk | Square roots of combinatorial numbers C_n^k |
[in] | alpha | Scalar multipler for src_m |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multipler for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
[out] | work | Temporary workspace of a size (2*(p+1)) |
Definition at line 5440 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2m_scale | ( | real(dp), intent(in) | src_r, |
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_m | ||
) |
Scale M2M, when spherical harmonics are centered in the same point.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of a multipole-to-multipole translation when harmonics are centered in the same point.
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_m | Multipole expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_m | Multipole expansion in new harmonics |
Definition at line 5603 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2m_scale_adj | ( | real(dp), intent(in) | src_r, |
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_m | ||
) |
Adjoint scale M2M, when spherical harmonics are centered in the same point.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M^\top \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M^\top \) is an adjoint matrix of a multipole-to-multipole translation when harmonics are centered in the same point.
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_m | Multipole expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_m | Multipole expansion in new harmonics |
Definition at line 5649 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2m_rotation | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), dimension((2*p+1)*(p+1)), intent(in) | vcnk, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_m | ||
) |
Direct M2M translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of a multipole-to-multipole translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for Y_lm |
[in] | vcnk | Square roots of combinatorial numbers C_n^k |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
Definition at line 5700 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2m_rotation_work | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), dimension((2*p+1)*(p+1)), intent(in) | vcnk, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_m, | ||
real(dp), dimension(6*p*p + 19*p + 8), intent(out), target | work | ||
) |
Direct M2M translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of a multipole-to-multipole translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for Y_lm |
[in] | vcnk | Square roots of combinatorial numbers C_n^k |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
[out] | work | Temporary workspace of a size 6*p*p+19*p+8 |
Definition at line 5741 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2m_bessel_rotation | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
real(dp), intent(in) | kappa, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_m | ||
) |
Direct M2M translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of a multipole-to-multipole translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for Y_lm |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
Definition at line 5817 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2m_bessel_rotation_work | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), dimension(p+1), intent(in) | src_sk, | ||
real(dp), dimension(p+1), intent(in) | dst_sk, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_m, | ||
real(dp), dimension(6*p*p + 19*p + 8), intent(out), target | work, | ||
complex(dp), dimension(2*p+1), intent(out) | work_complex | ||
) |
Direct M2M translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of a multipole-to-multipole translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from old to new centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for Y_lm |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
[out] | work | Temporary workspace of a size 6*p*p+19*p+8 |
Definition at line 5876 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2m_bessel_rotation_adj | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
real(dp), intent(in) | kappa, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_m | ||
) |
Direct M2M translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of a multipole-to-multipole translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for Y_lm |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
Definition at line 5953 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2m_bessel_rotation_adj_work | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), dimension(p+1), intent(in) | src_sk, | ||
real(dp), dimension(p+1), intent(in) | dst_sk, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_m, | ||
real(dp), dimension(6*p*p + 19*p + 8), intent(out), target | work, | ||
complex(dp), dimension(2*p+1), intent(out) | work_complex | ||
) |
Direct M2M translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of a multipole-to-multipole translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from old to new centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for Y_lm |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
[out] | work | Temporary workspace of a size 6*p*p+19*p+8 |
Definition at line 6012 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2m_rotation_adj | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), dimension((2*p+1)*(p+1)), intent(in) | vcnk, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_m | ||
) |
Adjoint M2M translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M^\top \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M^\top \) is aa adjoint matrix of a multipole-to-multipole translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | vscales | normalization constants for Y_lm |
[in] | vcnk | Square roots of combinatorial numbers C_n^k |
[in] | src_m | expansion in old harmonics |
[in,out] | dst_m | expansion in new harmonics |
Definition at line 6088 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2m_rotation_adj_work | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), dimension((2*p+1)*(p+1)), intent(in) | vcnk, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_m, | ||
real(dp), dimension(6*p*p + 19*p + 8), intent(out), target | work | ||
) |
Adjoint M2M translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M^\top \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M^\top \) is aa adjoint matrix of a multipole-to-multipole translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | vscales | normalization constants for Y_lm |
[in] | vcnk | Square roots of combinatorial numbers C_n^k |
[in] | src_m | expansion in old harmonics |
[in,out] | dst_m | expansion in new harmonics |
[out] | work | Temporary workspace of a size 6*p*p+19*p+8 |
Definition at line 6127 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2m_bessel_grad | ( | integer, intent(in) | p, |
real(dp), dimension(p+2), intent(in) | sph_sk, | ||
real(dp), dimension((p+2)**2), intent(in) | vscales, | ||
real(dp), dimension((p+1)**2), intent(in) | sph_m, | ||
real(dp), dimension((p+2)**2, 3), intent(out) | sph_m_grad | ||
) |
Definition at line 6179 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2l_ztranslate | ( | real(dp), intent(in) | z, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), dimension(2*p+1), intent(in) | vfact, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l | ||
) |
Direct L2L translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha L_L \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( L_L \) is a matrix of local-to-local translation over OZ axis.
[in] | z | OZ coordinate from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics @parma[in] p: Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | vfact | Square roots of factorials |
[in] | alpha | Scalar multipler for src_l |
[in] | src_l | Expansion in old harmonics |
[in] | beta | Scalar multipler for dst_l |
[in,out] | dst_l | Expansion in new harmonics |
Definition at line 6241 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2l_ztranslate_work | ( | real(dp), intent(in) | z, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), dimension(2*p+1), intent(in) | vfact, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l, | ||
real(dp), dimension(2*(p+1)), intent(out), target | work | ||
) |
Direct L2L translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha L_L \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( L_L \) is a matrix of local-to-local translation over OZ axis.
[in] | z | OZ coordinate from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics @parma[in] p: Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | vfact | Square roots of factorials |
[in] | alpha | Scalar multipler for src_l |
[in] | src_l | Expansion in old harmonics |
[in] | beta | Scalar multipler for dst_l |
[in,out] | dst_l | Expansion in new harmonics |
[out] | work | Temporary workspace of a size (2*(p+1)) |
Definition at line 6279 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2l_bessel_ztranslate | ( | real(dp), intent(in) | z, |
real(dp), dimension(p+1), intent(in) | src_si, | ||
real(dp), dimension(p+1), intent(in) | dst_si, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l | ||
) |
Direct M2M translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of multipole-to-multipole translation over OZ axis.
[in] | z | OZ coordinate from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics @parma[in] p: Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | alpha | Scalar multipler for alpha |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multipler for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
Definition at line 6372 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2l_bessel_ztranslate_work | ( | real(dp), intent(in) | z, |
real(dp), dimension(p+1), intent(in) | src_si, | ||
real(dp), dimension(p+1), intent(in) | dst_si, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l, | ||
real(dp), dimension(2*p+1), intent(out), target | work, | ||
complex(dp), dimension(2*p+1), intent(out) | work_complex | ||
) |
Direct M2M translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of multipole-to-multipole translation over OZ axis.
[in] | z | OZ coordinate from old to new centers of harmonics. Standard FMM M2M operation requires z to be OZ coordinate from new to old. |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics @parma[in] p: Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | alpha | Scalar multipler for alpha |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multipler for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
[out] | work | Temporary workspace of a size (2*(p+1)) |
Definition at line 6411 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2l_bessel_ztranslate_adj | ( | real(dp), intent(in) | z, |
real(dp), dimension(p+1), intent(in) | src_si, | ||
real(dp), dimension(p+1), intent(in) | dst_si, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l | ||
) |
Direct M2M translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of multipole-to-multipole translation over OZ axis.
[in] | z | OZ coordinate from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics @parma[in] p: Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | alpha | Scalar multipler for alpha |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multipler for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
Definition at line 6611 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2l_bessel_ztranslate_adj_work | ( | real(dp), intent(in) | z, |
real(dp), dimension(p+1), intent(in) | src_si, | ||
real(dp), dimension(p+1), intent(in) | dst_si, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l, | ||
real(dp), dimension(2*p+1), intent(out), target | work, | ||
complex(dp), dimension(2*p+1), intent(out) | work_complex | ||
) |
Direct M2M translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of multipole-to-multipole translation over OZ axis.
[in] | z | OZ coordinate from old to new centers of harmonics. Standard FMM M2M operation requires z to be OZ coordinate from new to old. |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics @parma[in] p: Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | alpha | Scalar multipler for alpha |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multipler for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
[out] | work | Temporary workspace of a size (2*(p+1)) |
Definition at line 6650 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2l_bessel_derivative_ztranslate_work | ( | real(dp), dimension(p+2), intent(in) | src_si, |
integer, intent(in) | p, | ||
real(dp), dimension((p+2)*(p+2)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+2)*(p+2)), intent(inout) | dst_l | ||
) |
Direct M2M translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of multipole-to-multipole translation over OZ axis.
[in] | z | OZ coordinate from old to new centers of harmonics. Standard FMM M2M operation requires z to be OZ coordinate from new to old. |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics @parma[in] p: Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | alpha | Scalar multipler for alpha |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multipler for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
[out] | work | Temporary workspace of a size (2*(p+1)) |
Definition at line 6853 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2l_ztranslate_adj | ( | real(dp), intent(in) | z, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), dimension(2*p+1), intent(in) | vfact, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l | ||
) |
Adjoint L2L translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha L_L^\top \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( L_L^\top \) is an adjoint matrix of local-to-local translation over OZ axis.
[in] | z | OZ coordinate from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics @parma[in] p: Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | vfact | Square roots of factorials |
[in] | alpha | Scalar multipler for src_l |
[in] | src_l | Expansion in old harmonics |
[in] | beta | Scalar multipler for dst_l |
[in,out] | dst_l | Expansion in new harmonics |
Definition at line 6889 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2l_ztranslate_adj_work | ( | real(dp), intent(in) | z, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), dimension(2*p+1), intent(in) | vfact, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l, | ||
real(dp), dimension(2*(p+1)), intent(out), target | work | ||
) |
Adjoint L2L translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha L_L^\top \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( L_L^\top \) is an adjoint matrix of local-to-local translation over OZ axis.
[in] | z | OZ coordinate from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics @parma[in] p: Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | vfact | Square roots of factorials |
[in] | alpha | Scalar multipler for src_l |
[in] | src_l | Expansion in old harmonics |
[in] | beta | Scalar multipler for dst_l |
[in,out] | dst_l | Expansion in new harmonics |
[out] | work | Temporary workspace of a size (2*(p+1)) |
Definition at line 6927 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2l_scale | ( | real(dp), intent(in) | src_r, |
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l | ||
) |
Scale L2L, when spherical harmonics are centered in the same point.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha L_L \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( L_L \) is a matrix of a local-to-local translation when harmonics are centered in the same point.
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_l | Multipole expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_l | Multipole expansion in new harmonics |
Definition at line 7017 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2l_scale_adj | ( | real(dp), intent(in) | src_r, |
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l | ||
) |
Adjoint scale L2L, when spherical harmonics are centered in the same point.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha L_L^\top \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( L_L^\top \) is an adjoint matrix of a local-to-local translation when harmonics are centered in the same point.
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_l | Multipole expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_l | Multipole expansion in new harmonics |
Definition at line 7062 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2l_rotation | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), dimension(2*p+1), intent(in) | vfact, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l | ||
) |
Direct L2L translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha L_L \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( L_L \) is a matrix of a local-to-local translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for Y_lm |
[in] | vfact | Square roots of factorials |
[in] | alpha | Scalar multiplier for src_l |
[in] | src_l | Expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_l |
[in,out] | dst_l | Expansion in new harmonics |
Definition at line 7113 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2l_rotation_work | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), dimension(2*p+1), intent(in) | vfact, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l, | ||
real(dp), dimension(6*p*p + 19*p + 8), intent(out), target | work | ||
) |
Direct L2L translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha L_L \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( L_L \) is a matrix of a local-to-local translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for Y_lm |
[in] | vfact | Square roots of factorials |
[in] | alpha | Scalar multiplier for src_l |
[in] | src_l | Expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_l |
[in,out] | dst_l | Expansion in new harmonics |
[out] | work | Temporary workspace of a size 6*p*p+19*p+8 |
Definition at line 7154 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2l_bessel_rotation | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
real(dp), intent(in) | kappa, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l | ||
) |
Direct L2L translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of a multipole-to-multipole translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for Y_lm |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
Definition at line 7230 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2l_bessel_rotation_work | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), dimension(p+1), intent(in) | src_si, | ||
real(dp), dimension(p+1), intent(in) | dst_si, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l, | ||
real(dp), dimension(6*p*p + 19*p + 8), intent(out), target | work, | ||
complex(dp), dimension(2*p+1), intent(out) | work_complex | ||
) |
Direct L2L translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of a multipole-to-multipole translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from old to new centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for Y_lm |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
[out] | work | Temporary workspace of a size 6*p*p+19*p+8 |
Definition at line 7288 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2l_bessel_rotation_adj | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
real(dp), intent(in) | kappa, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l | ||
) |
Direct L2L translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of a multipole-to-multipole translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for Y_lm |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
Definition at line 7364 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2l_bessel_rotation_adj_work | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), dimension(p+1), intent(in) | src_si, | ||
real(dp), dimension(p+1), intent(in) | dst_si, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l, | ||
real(dp), dimension(6*p*p + 19*p + 8), intent(out), target | work, | ||
complex(dp), dimension(2*p+1), intent(out) | work_complex | ||
) |
Direct L2L translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of a multipole-to-multipole translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from old to new centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for Y_lm |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
[out] | work | Temporary workspace of a size 6*p*p+19*p+8 |
Definition at line 7422 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2l_bessel_grad | ( | integer, intent(in) | p, |
real(dp), dimension(p+2), intent(in) | sph_si, | ||
real(dp), dimension((p+2)**2), intent(in) | vscales, | ||
real(dp), dimension((p+1)**2), intent(in) | sph_l, | ||
real(dp), dimension((p+2)**2, 3), intent(out) | sph_l_grad | ||
) |
Definition at line 7475 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2l_rotation_adj | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), dimension(2*p+1), intent(in) | vfact, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l | ||
) |
Adjoint L2L translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha L_L^\top \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( L_L^\top \) is an adjoint matrix of a local-to-local translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for Y_lm |
[in] | vfact | Square roots of factorials |
[in] | alpha | Scalar multiplier for src_l |
[in] | src_l | Expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_l |
[in,out] | dst_l | Expansion in new harmonics |
Definition at line 7539 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_l2l_rotation_adj_work | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), dimension(2*p+1), intent(in) | vfact, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l, | ||
real(dp), dimension(6*p*p + 19*p + 8), intent(out), target | work | ||
) |
Adjoint L2L translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha L_L^\top \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( L_L^\top \) is an adjoint matrix of a local-to-local translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for Y_lm |
[in] | vfact | Square roots of factorials |
[in] | alpha | Scalar multiplier for src_l |
[in] | src_l | Expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_l |
[in,out] | dst_l | Expansion in new harmonics |
[out] | work | Temporary workspace of a size 6*p*p+19*p+8 |
Definition at line 7580 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2l_ztranslate | ( | real(dp), intent(in) | z, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | pm, | ||
integer, intent(in) | pl, | ||
real(dp), dimension((pm+pl+1)*(pm+pl+1)), intent(in) | vscales, | ||
real(dp), dimension(pm+1, pl+1, pl+1), intent(in) | m2l_ztranslate_coef, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((pm+1)*(pm+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((pl+1)*(pl+1)), intent(inout) | dst_l | ||
) |
Direct M2L translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha L_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( L_M \) is a matrix of multipole-to-local translation over OZ axis.
[in] | z | OZ coordinate from new to old centers of harmonics |
[in] | src_r | Radius of old (multipole) harmonics |
[in] | dst_r | Radius of new (local) harmonics @parma[in] pm: Maximal degree of multipole spherical harmonics @parma[in] pl: Maximal degree of local spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | m2l_ztranslate_coef | |
[in] | alpha | Scalar multipler for src_m |
[in] | src_m | Expansion in old (multipole) harmonics |
[in] | beta | Scalar multipler for dst_l |
[in,out] | dst_l | Expansion in new (local) harmonics |
Definition at line 7655 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2l_ztranslate_work | ( | real(dp), intent(in) | z, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | pm, | ||
integer, intent(in) | pl, | ||
real(dp), dimension((pm+pl+1)*(pm+pl+1)), intent(in) | vscales, | ||
real(dp), dimension(pm+1, pl+1, pl+1), intent(in) | m2l_ztranslate_coef, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((pm+1)*(pm+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((pl+1)*(pl+1)), intent(inout) | dst_l, | ||
real(dp), dimension((pm+2)*(pm+1)), intent(out), target | work | ||
) |
Direct M2L translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha L_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( L_M \) is a matrix of multipole-to-local translation over OZ axis.
[in] | z | OZ coordinate from new to old centers of harmonics |
[in] | src_r | Radius of old (multipole) harmonics |
[in] | dst_r | Radius of new (local) harmonics @parma[in] pm: Maximal degree of multipole spherical harmonics @parma[in] pl: Maximal degree of local spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | m2l_ztranslate_coef | |
[in] | alpha | Scalar multipler for src_m |
[in] | src_m | Expansion in old (multipole) harmonics |
[in] | beta | Scalar multipler for dst_l |
[in,out] | dst_l | Expansion in new (local) harmonics |
[out] | work | Temporary workspace of a size (pm+2)*(pm+1) |
Definition at line 7695 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2l_ztranslate_adj | ( | real(dp), intent(in) | z, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | pl, | ||
integer, intent(in) | pm, | ||
real(dp), dimension((pm+pl+1)*(pm+pl+1)), intent(in) | vscales, | ||
real(dp), dimension(pl+1, pl+1, pm+1), intent(in) | m2l_ztranslate_adj_coef, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((pl+1)*(pl+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((pm+1)*(pm+1)), intent(inout) | dst_m | ||
) |
Adjoint M2L translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha L_M^\top \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( L_M^\top \) is an adjoint matrix of multipole-to-local translation over OZ axis.
[in] | z | OZ coordinate from new to old centers of harmonics |
[in] | src_r | Radius of old (local) harmonics |
[in] | dst_r | Radius of new (multipole) harmonics @parma[in] pl: Maximal degree of local spherical harmonics @parma[in] pm: Maximal degree of multipole spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | m2l_ztranslate_adj_coef | |
[in] | alpha | Scalar multipler for src_l |
[in] | src_l | Expansion in old (local) harmonics |
[in] | beta | Scalar multipler for dst_m |
[in,out] | dst_m | Expansion in new (multipole) harmonics |
Definition at line 7854 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2l_ztranslate_adj_work | ( | real(dp), intent(in) | z, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | pl, | ||
integer, intent(in) | pm, | ||
real(dp), dimension((pm+pl+1)*(pm+pl+1)), intent(in) | vscales, | ||
real(dp), dimension(pl+1, pl+1, pm+1), intent(in) | m2l_ztranslate_adj_coef, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((pl+1)*(pl+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((pm+1)*(pm+1)), intent(inout) | dst_m, | ||
real(dp), dimension((pl+2)*(pl+1)), intent(out), target | work | ||
) |
Adjoint M2L translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha L_M^\top \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( L_M^\top \) is an adjoint matrix of multipole-to-local translation over OZ axis.
[in] | z | OZ coordinate from new to old centers of harmonics |
[in] | src_r | Radius of old (local) harmonics |
[in] | dst_r | Radius of new (multipole) harmonics @parma[in] pl: Maximal degree of local spherical harmonics @parma[in] pm: Maximal degree of multipole spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | m2l_ztranslate_adj_coef | |
[in] | alpha | Scalar multipler for src_l |
[in] | src_l | Expansion in old (local) harmonics |
[in] | beta | Scalar multipler for dst_m |
[in,out] | dst_m | Expansion in new (multipole) harmonics |
Definition at line 7893 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2l_rotation | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | pm, | ||
integer, intent(in) | pl, | ||
real(dp), dimension((pm+pl+1)**2), intent(in) | vscales, | ||
real(dp), dimension(pm+1, pl+1, pl+1), intent(in) | m2l_ztranslate_coef, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((pm+1)*(pm+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((pl+1)*(pl+1)), intent(inout) | dst_l | ||
) |
Direct M2L translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha L_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( L_M \) is a matrix of a multipole-to-local translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | pm | Maximal degree of multipole spherical harmonics |
[in] | pl | Maximal degree of local spherical harmonics |
[in] | vscales | Normalization constants for Y_lm |
[in] | m2l_ztranslate_coef | |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_l |
[in,out] | dst_l | Expansion in new harmonics |
Definition at line 8054 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2l_rotation_work | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | pm, | ||
integer, intent(in) | pl, | ||
real(dp), dimension((pm+pl+1)**2), intent(in) | vscales, | ||
real(dp), dimension(pm+1, pl+1, pl+1), intent(in) | m2l_ztranslate_coef, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((pm+1)*(pm+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((pl+1)*(pl+1)), intent(inout) | dst_l, | ||
real(dp), dimension(6*max(pm, pl)**2 + 19*max(pm, pl) + 8), intent(out), target | work | ||
) |
Direct M2L translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha L_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( L_M \) is a matrix of a multipole-to-local translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | pm | Maximal degree of multipole spherical harmonics |
[in] | pl | Maximal degree of local spherical harmonics |
[in] | vscales | Normalization constants for Y_lm |
[in] | m2l_ztranslate_coef | |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_l |
[in,out] | dst_l | Expansion in new harmonics |
[out] | work | Temporary workspace of a size 6*p*p+19*p+8 where p is a maximum of pm and pl |
Definition at line 8098 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2l_bessel_rotation | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
real(dp), intent(in) | kappa, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l | ||
) |
Direct M2M translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of a multipole-to-multipole translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for Y_lm |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
Definition at line 8177 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2l_bessel_rotation_work | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), dimension(p+1), intent(in) | src_sk, | ||
real(dp), dimension(p+1), intent(in) | dst_si, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l, | ||
real(dp), dimension(6*p*p + 19*p + 8), intent(out), target | work, | ||
complex(dp), dimension(2*p+1), intent(out) | work_complex | ||
) |
Direct M2M translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of a multipole-to-multipole translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from old to new centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for Y_lm |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
[out] | work | Temporary workspace of a size 6*p*p+19*p+8 |
Definition at line 8235 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2l_bessel_rotation_adj | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
real(dp), intent(in) | kappa, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l | ||
) |
Direct M2M translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of a multipole-to-multipole translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for Y_lm |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
Definition at line 8312 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2l_bessel_rotation_adj_work | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), dimension(p+1), intent(in) | src_sk, | ||
real(dp), dimension(p+1), intent(in) | dst_si, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l, | ||
real(dp), dimension(6*p*p + 19*p + 8), intent(out), target | work, | ||
complex(dp), dimension(2*p+1), intent(out) | work_complex | ||
) |
Direct M2M translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of a multipole-to-multipole translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from old to new centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | p | Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for Y_lm |
[in] | alpha | Scalar multiplier for src_m |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
[out] | work | Temporary workspace of a size 6*p*p+19*p+8 |
Definition at line 8371 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2l_bessel_ztranslate | ( | real(dp), intent(in) | z, |
real(dp), dimension(p+1), intent(in) | src_sk, | ||
real(dp), dimension(p+1), intent(in) | dst_si, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l | ||
) |
Direct M2M translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of multipole-to-multipole translation over OZ axis.
[in] | z | OZ coordinate from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics @parma[in] p: Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | alpha | Scalar multipler for alpha |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multipler for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
Definition at line 8445 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2l_bessel_ztranslate_work | ( | real(dp), intent(in) | z, |
real(dp), dimension(p+1), intent(in) | src_sk, | ||
real(dp), dimension(p+1), intent(in) | dst_si, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l, | ||
real(dp), dimension(2*p+1), intent(out), target | work, | ||
complex(dp), dimension(2*p+1), intent(out) | work_complex | ||
) |
Direct M2M translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of multipole-to-multipole translation over OZ axis.
[in] | z | OZ coordinate from old to new centers of harmonics. Standard FMM M2M operation requires z to be OZ coordinate from new to old. |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics @parma[in] p: Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | alpha | Scalar multipler for alpha |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multipler for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
[out] | work | Temporary workspace of a size (2*(p+1)) |
Definition at line 8484 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2l_bessel_ztranslate_adj | ( | real(dp), intent(in) | z, |
real(dp), dimension(p+1), intent(in) | src_sk, | ||
real(dp), dimension(p+1), intent(in) | dst_si, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l | ||
) |
Direct M2M translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of multipole-to-multipole translation over OZ axis.
[in] | z | OZ coordinate from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics @parma[in] p: Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | alpha | Scalar multipler for alpha |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multipler for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
Definition at line 8684 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2l_bessel_ztranslate_adj_work | ( | real(dp), intent(in) | z, |
real(dp), dimension(p+1), intent(in) | src_sk, | ||
real(dp), dimension(p+1), intent(in) | dst_si, | ||
integer, intent(in) | p, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | vscales, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((p+1)*(p+1)), intent(in) | src_m, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((p+1)*(p+1)), intent(inout) | dst_l, | ||
real(dp), dimension(2*p+1), intent(out), target | work, | ||
complex(dp), dimension(2*p+1), intent(out) | work_complex | ||
) |
Direct M2M translation over OZ axis.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha M_M \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( M_M \) is a matrix of multipole-to-multipole translation over OZ axis.
[in] | z | OZ coordinate from old to new centers of harmonics. Standard FMM M2M operation requires z to be OZ coordinate from new to old. |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics @parma[in] p: Maximal degree of spherical harmonics |
[in] | vscales | Normalization constants for harmonics |
[in] | alpha | Scalar multipler for alpha |
[in] | src_m | Expansion in old harmonics |
[in] | beta | Scalar multipler for dst_m |
[in,out] | dst_m | Expansion in new harmonics |
[out] | work | Temporary workspace of a size (2*(p+1)) |
Definition at line 8723 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2l_rotation_adj | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | pl, | ||
integer, intent(in) | pm, | ||
real(dp), dimension((pm+pl+1)**2), intent(in) | vscales, | ||
real(dp), dimension(pl+1, pl+1, pm+1), intent(in) | m2l_ztranslate_adj_coef, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((pl+1)*(pl+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((pm+1)*(pm+1)), intent(inout) | dst_m | ||
) |
Adjoint M2L translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha L_M^\top \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( L_M^\top \) is an adjoint matrix of a multipole-to-local translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | pl | Maximal degree of local spherical harmonics |
[in] | pm | Maximal degree of multipole spherical harmonics |
[in] | vscales | normalization constants for Y_lm |
[in] | m2l_ztranslate_adj_oef | |
[in] | alpha | Scalar multiplier for src_l |
[in] | src_l | expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_m | expansion in new harmonics |
Definition at line 8928 of file ddx_harmonics.f90.
subroutine ddx_harmonics::fmm_m2l_rotation_adj_work | ( | real(dp), dimension(3), intent(in) | c, |
real(dp), intent(in) | src_r, | ||
real(dp), intent(in) | dst_r, | ||
integer, intent(in) | pl, | ||
integer, intent(in) | pm, | ||
real(dp), dimension((pm+pl+1)**2), intent(in) | vscales, | ||
real(dp), dimension(pl+1, pl+1, pm+1), intent(in) | m2l_ztranslate_adj_coef, | ||
real(dp), intent(in) | alpha, | ||
real(dp), dimension((pl+1)*(pl+1)), intent(in) | src_l, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension((pm+1)*(pm+1)), intent(inout) | dst_m, | ||
real(dp), dimension(6*max(pm, pl)**2 + 19*max(pm, pl) + 8), intent(out), target | work | ||
) |
Adjoint M2L translation by 4 rotations and 1 translation.
Compute the following matrix-vector product:
\[ \mathrm{dst} = \beta \mathrm{dst} + \alpha L_M^\top \mathrm{src}, \]
where \( \mathrm{dst} \) is a vector of coefficients of output spherical harmonics, \( \mathrm{src} \) is a vector of coefficients of input spherical harmonics and \( L_M^\top \) is an adjoint matrix of a multipole-to-local translation.
Rotates around OZ and OY axes, translates over OZ and then rotates back around OY and OZ axes.
[in] | c | Radius-vector from new to old centers of harmonics |
[in] | src_r | Radius of old harmonics |
[in] | dst_r | Radius of new harmonics |
[in] | pl | Maximal degree of local spherical harmonics |
[in] | pm | Maximal degree of multipole spherical harmonics |
[in] | vscales | normalization constants for Y_lm |
[in] | m2l_ztranslate_adj_coef | |
[in] | alpha | Scalar multiplier for src_l |
[in] | src_l | expansion in old harmonics |
[in] | beta | Scalar multiplier for dst_m |
[in,out] | dst_m | expansion in new harmonics |
[out] | work | Temporary workspace of a size 6*p*p+19*p+8 where p is a maximum of pm and pl |
Definition at line 8972 of file ddx_harmonics.f90.