ddx 0.6.0
Libary for domain-decomposition methods for polarizable continuum models
ddx_harmonics Module Reference

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...
 

Detailed Description

Harmonics-related core routines.

Function/Subroutine Documentation

◆ ylmscale()

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 \).

Parameters
[in]pMaximal degree of spherical harmonics. p >= 0
[out]vscalesArray of scaling factors. Dimension is (p+1)**2
[out]vscalesArray of values 4pi/(2l+1). Dimension is p+1
[out]vscales_relArray of relative scaling factors. Dimension is (p+1)**2.

Definition at line 37 of file ddx_harmonics.f90.

◆ fmm_constants()

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.

Parameters
[in]dmaxMaximal degree of spherical harmonics to be evaluated. dmax >= 0
[in]pmMaximal degree of the multipole expansion. pm >= 0.
[in]plMaximal degree of the local expansion. pl >= 0.
[out]vcnkArray of squre roots of combinatorial factors C_n^k. Dimension is (2*dmax+1)*(dmax+1).
[out]m2l_ztranslate_coefConstants for M2L translation over OZ axis. Dimension is (pm+1, pl+1, pl+1).
[out]m2l_ztranslate_coefConstants for adjoint M2L translation over OZ axis. Dimension is (pl+1, pl+1, pm+1).

Definition at line 80 of file ddx_harmonics.f90.

◆ carttosph()

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) \).

Parameters
[in]xCartesian 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.

◆ ylmbas()

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) \).

Parameters
[in]xTarget point
[out]rhoEuclidian 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]pMaximal degree of spherical harmonics. p >= 0
[in]vscalesScaling factors of real normalized spherical harmonics. Dimension is (p+1)**2
[out]vylmValues of spherical harmonics \( Y_\ell^m(x) \). Dimension is (p+1)**2
[out]vplmValues of associated Legendre polynomials \( P_\ell^m( \theta) \). Dimension is (p+1)**2
[out]vcosArray of alues of \( \cos(m\phi) \) of a dimension (p+1)
[out]vsinarray of values of \( \sin(m\phi) \) of a dimension (p+1)

Definition at line 214 of file ddx_harmonics.f90.

◆ trgev()

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.

Parameters
[in]cphi\( \cos(\phi) \). -1 <= cphi <= 1
[in]sphi\( \sin(\phi) \). -1 <= sphi <= 1
[in]pMaximal value of \( m \), for which to compute \( \cos(m \phi) \) and \( \sin(m\phi) \). p >= 0
[out]vcosArray of \( \cos(m\phi) \) for \( m=0..p \). Dimension is (p+1)
[out]vsinArray of \( \sin(m\phi) \) for \( m=0..p \). Dimension is (p+1)

Definition at line 348 of file ddx_harmonics.f90.

◆ polleg()

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}

Parameters
[in]ctheta\( \cos(\theta) \). -1 <= ctheta <= 1
[in]stheta\( \sin(\theta) \). 0 <= stheta <= 1
[in]pMaximal degree of polynomials to compute. p >= 0
[out]vplmValues of associated Legendre polynomials. Dimension is (p+1)**2

Definition at line 452 of file ddx_harmonics.f90.

◆ polleg_work()

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}

Parameters
[in]ctheta\( \cos(\theta) \). -1 <= ctheta <= 1
[in]stheta\( \sin(\theta) \). 0 <= stheta <= 1
[in]pMaximal degree of polynomials to compute. p >= 0
[out]vplmValues of associated Legendre polynomials. Dimension is (p+1)**2

Definition at line 482 of file ddx_harmonics.f90.

◆ modified_spherical_bessel_first_kind()

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.

◆ modified_spherical_bessel_second_kind()

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.

◆ fmm_p2m()

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} \).

Parameters
[in]cRadius-vector from the particle to the center of harmonics
[in]src_qCharge of the source particle
[in]dst_rRadius of output multipole spherical harmonics
[in]pMaximal degree of output multipole spherical harmonics
[in]vscalesNormalization constants for spherical harmonics
[in]betaScaling factor for dst_m
[in,out]dst_mMultipole coefficients
See also
fmm_m2p

Definition at line 710 of file ddx_harmonics.f90.

◆ fmm_p2m_work()

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} \).

Parameters
[in]cRadius-vector from the particle to the center of harmonics
[in]src_qCharge of the source particle
[in]dst_rRadius of output multipole spherical harmonics
[in]pMaximal degree of output multipole spherical harmonics
[in]vscalesNormalization constants for spherical harmonics
[in]betaScaling factor for dst_m
[in,out]dst_mMultipole coefficients
[out]workTemporary workspace of a size (2*(p+1)*(p+2))
See also
fmm_m2p

Definition at line 749 of file ddx_harmonics.f90.

◆ fmm_m2p()

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 \).

Parameters
[in]cCoordinates of a particle (relative to center of harmonics)
[in]rRadius of spherical harmonics
[in]pMaximal degree of multipole basis functions
[in]vscales_relRelative normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2
[in]alphaScalar multiplier for src_m
[in]src_mMultipole coefficients. Dimension is (p+1)**2
[in]betaScalar multiplier for v
[in,out]vValue of induced potential

Definition at line 848 of file ddx_harmonics.f90.

◆ fmm_m2p_work()

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 \).

Parameters
[in]cCoordinates of a particle (relative to center of harmonics)
[in]rRadius of spherical harmonics
[in]pMaximal degree of multipole basis functions
[in]vscales_relRelative normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2
[in]alphaScalar multiplier for src_m
[in]src_mMultipole coefficients. Dimension is (p+1)**2
[in]betaScalar multiplier for v
[in,out]vValue of induced potential
[out]workTemporary workspace of size (p+1)

Definition at line 891 of file ddx_harmonics.f90.

◆ fmm_m2p_bessel()

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 \).

Parameters
[in]cCoordinates of a particle (relative to center of harmonics)
[in]rRadius of spherical harmonics
[in]pMaximal degree of multipole basis functions
[in]vscalesNormalization constants for \( Y_\ell^m \). Dimension is (p+1)**2
[in]alphaScalar multiplier for src_m
[in]src_mMultipole coefficients. Dimension is (p+1)**2
[in]betaScalar multiplier for v
[in,out]vValue of induced potential

Definition at line 1086 of file ddx_harmonics.f90.

◆ fmm_m2p_bessel_work()

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 \).

Parameters
[in]cCoordinates of a particle (relative to center of harmonics)
[in]rRadius of spherical harmonics
[in]pMaximal degree of multipole basis functions
[in]vscalesNormalization constants for \( Y_\ell^m \). Dimension is (p+1)**2
[in]alphaScalar multiplier for src_m
[in]src_mMultipole coefficients. Dimension is (p+1)**2
[in]betaScalar multiplier for v
[in,out]vValue of induced potential
[out]workTemporary workspace of size (p+1)

Definition at line 1132 of file ddx_harmonics.f90.

◆ fmm_m2p_bessel_grad()

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.

◆ fmm_m2p_adj()

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 \).

Parameters
[in]cCoordinates of a particle (relative to center of harmonics)
[in]src_qCharge of the source particle
[in]dst_rRadius of output multipole spherical harmonics
[in]pMaximal degree of multipole basis functions
[in]vscales_relRelative normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2
[in]betaScalar multiplier for dst_m
[in,out]dst_mMultipole coefficients. Dimension is (p+1)**2

Definition at line 1366 of file ddx_harmonics.f90.

◆ fmm_m2p_adj_work()

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 \).

Parameters
[in]cCoordinates of a particle (relative to center of harmonics)
[in]src_qCharge of the source particle
[in]dst_rRadius of output multipole spherical harmonics
[in]pMaximal degree of multipole basis functions
[in]vscales_relRelative normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2
[in]betaScalar multiplier for dst_m
[in,out]dst_mMultipole coefficients. Dimension is (p+1)**2
[out]workTemporary workspace of a size ((p+1)*(p+1)+3*p)

Definition at line 1404 of file ddx_harmonics.f90.

◆ fmm_m2p_bessel_adj()

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 \).

Parameters
[in]cCoordinates of a particle (relative to center of harmonics)
[in]src_qCharge of the source particle
[in]dst_rRadius of output multipole spherical harmonics
[in]pMaximal degree of multipole basis functions
[in]vscales_relRelative normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2
[in]betaScalar multiplier for dst_m
[in,out]dst_mMultipole coefficients. Dimension is (p+1)**2

Definition at line 1703 of file ddx_harmonics.f90.

◆ fmm_m2p_bessel_adj_work()

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 \).

Parameters
[in]cCoordinates of a particle (relative to center of harmonics)
[in]src_qCharge of the source particle
[in]dst_rRadius of output multipole spherical harmonics
[in]pMaximal degree of multipole basis functions
[in]vscales_relRelative normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2
[in]betaScalar multiplier for dst_m
[in,out]dst_mMultipole coefficients. Dimension is (p+1)**2
[out]workTemporary workspace of a size ((p+1)*(p+1)+3*p)

Definition at line 1749 of file ddx_harmonics.f90.

◆ fmm_m2p_mat()

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 \).

Parameters
[in]cCoordinates of a particle (relative to center of harmonics)
[in]rRadius of spherical harmonics
[in]pMaximal degree of multipole basis functions
[in]vscalesNormalization constants for \( Y_\ell^m \). Dimension is (p+1)**2
[in,out]matValues of potentials induced by each spherical harmonic

Definition at line 2073 of file ddx_harmonics.f90.

◆ fmm_l2p()

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 \).

Parameters
[in]cCoordinates of a particle (relative to center of harmonics)
[in]src_rRadius of spherical harmonics
[in]pMaximal degree of local basis functions
[in]vscalesNormalization constants for \( Y_\ell^m \). Dimension is (p+1)**2
[in]alphaScalar multiplier for src_l
[in]src_lLocal coefficients. Dimension is (p+1)**2
[in]betaScalar multiplier for dst_v
[in,out]dst_vValue of induced potential

Definition at line 2126 of file ddx_harmonics.f90.

◆ fmm_l2p_work()

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 \).

Parameters
[in]cCoordinates of a particle (relative to center of harmonics)
[in]src_rRadius of spherical harmonics
[in]pMaximal degree of local basis functions
[in]vscalesNormalization constants for \( Y_\ell^m \). Dimension is (p+1)**2
[in]alphaScalar multiplier for src_l
[in]src_lLocal coefficients. Dimension is (p+1)**2
[in]betaScalar multiplier for dst_v
[in,out]dst_vValue of induced potential
[out]workTemporary workspace of a size (p+1)

Definition at line 2165 of file ddx_harmonics.f90.

◆ fmm_l2p_bessel()

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 \).

Parameters
[in]cCoordinates of a particle (relative to center of harmonics)
[in]src_rRadius of spherical harmonics
[in]pMaximal degree of local basis functions
[in]vscalesNormalization constants for \( Y_\ell^m \). Dimension is (p+1)**2
[in]alphaScalar multiplier for src_l
[in]src_lLocal coefficients. Dimension is (p+1)**2
[in]betaScalar multiplier for dst_v
[in,out]dst_vValue of induced potential

Definition at line 2356 of file ddx_harmonics.f90.

◆ fmm_l2p_bessel_work()

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 \).

Parameters
[in]cCoordinates of a particle (relative to center of harmonics)
[in]rRadius of spherical harmonics
[in]pMaximal degree of local basis functions
[in]vscalesNormalization constants for \( Y_\ell^m \). Dimension is (p+1)**2
[in]alphaScalar multiplier for src_l
[in]src_lLocal coefficients. Dimension is (p+1)**2
[in]betaScalar multiplier for v
[in,out]vValue of induced potential
[out]workTemporary workspace of size (p+1)

Definition at line 2401 of file ddx_harmonics.f90.

◆ fmm_l2p_bessel_grad()

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.

◆ fmm_l2p_adj()

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 \).

Parameters
[in]cCoordinates of a particle (relative to center of harmonics)
[in]src_qCharge of the source particle
[in]dst_rRadius of output local spherical harmonics
[in]pMaximal degree of local basis functions
[in]vscales_relRelative normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2
[in]betaScalar multiplier for dst_l
[in,out]dst_lLocal coefficients. Dimension is (p+1)**2

Definition at line 2635 of file ddx_harmonics.f90.

◆ fmm_l2p_adj_work()

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 \).

Parameters
[in]cCoordinates of a particle (relative to center of harmonics)
[in]src_qCharge of the source particle
[in]dst_rRadius of output local spherical harmonics
[in]pMaximal degree of local basis functions
[in]vscales_relRelative normalization constants for \( Y_\ell^m \). Dimension is (p+1)**2
[in]betaScalar multiplier for dst_l
[in,out]dst_lLocal coefficients. Dimension is (p+1)**2
[out]workTemporary workspace of a size (p+1)

Definition at line 2672 of file ddx_harmonics.f90.

◆ fmm_sph_transform()

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]

Parameters
[in]pMaximum degree of spherical harmonics
[in]r1Transformation from new to old cartesian coordinates
[in]alphaScalar multipler for src
[in]srcCoefficients of initial spherical harmonics
[in]betaScalar multipler for dst
[in,out]dstCoefficients of transformed spherical harmonics

Definition at line 2998 of file ddx_harmonics.f90.

◆ fmm_sph_transform_work()

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.

Parameters
[in]pMaximum degree of spherical harmonics
[in]r1Transformation from new to old cartesian coordinates
[in]alphaScalar multipler for src
[in]srcCoefficients of initial spherical harmonics
[in]betaScalar multipler for dst
[in,out]dstCoefficients of transformed spherical harmonics
[out]workTemporary workspace of a size (2*(2*p+1)*(2*p+3))

Definition at line 3023 of file ddx_harmonics.f90.

◆ fmm_sph_rotate_oz()

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) \).

Parameters
[in]pMaximal order of spherical harmonics
[in]vcosVector \( \{ \cos(m \phi) \}_{m=0}^p \)
[in]vsinVector \( \{ \sin(m \phi) \}_{m=0}^p \)
[in]alphaScalar multiplier for src
[in]srcCoefficients of initial spherical harmonics
[in]betaScalar multipler for dst
[in,out]dstCoefficients of rotated spherical harmonics

Definition at line 3667 of file ddx_harmonics.f90.

◆ fmm_sph_rotate_oz_work()

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) \).

Parameters
[in]pMaximal order of spherical harmonics
[in]vcosVector \( \{ \cos(m \phi) \}_{m=0}^p \)
[in]vsinVector \( \{ \sin(m \phi) \}_{m=0}^p \)
[in]alphaScalar multiplier for src
[in]srcCoefficients of initial spherical harmonics
[in]betaScalar multipler for dst
[in,out]dstCoefficients of rotated spherical harmonics

Definition at line 3698 of file ddx_harmonics.f90.

◆ fmm_sph_rotate_oz_adj()

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) \).

Parameters
[in]pMaximal order of spherical harmonics
[in]vcosVector \( \{ \cos(m \phi) \}_{m=0}^p \)
[in]vsinVector \( \{ \sin(m \phi) \}_{m=0}^p \)
[in]alphaScalar multiplier for src
[in]srcCoefficients of initial spherical harmonics
[in]betaScalar multipler for dst
[in,out]dstCoefficients of rotated spherical harmonics

Definition at line 3788 of file ddx_harmonics.f90.

◆ fmm_sph_rotate_oz_adj_work()

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) \).

Parameters
[in]pMaximal order of spherical harmonics
[in]vcosVector \( \{ \cos(m \phi) \}_{m=0}^p \)
[in]vsinVector \( \{ \sin(m \phi) \}_{m=0}^p \)
[in]alphaScalar multiplier for src
[in]srcCoefficients of initial spherical harmonics
[in]betaScalar multipler for dst
[in,out]dstCoefficients of rotated spherical harmonics

Definition at line 3819 of file ddx_harmonics.f90.

◆ fmm_sph_rotate_oxz()

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}. \]

Parameters
[in]pMaximal order of spherical harmonics
[in]r1xzTransformation from new to old coordinates in the OXZ plane
[in]alphaScalar multiplier for src
[in]srcCoefficients of initial spherical harmonics
[in]betaScalar multipler for dst
[in,out]dstCoefficients of transformed spherical harmonics

Definition at line 3916 of file ddx_harmonics.f90.

◆ fmm_sph_rotate_oxz_work()

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.

Parameters
[in]pmaximum order of spherical harmonics
[in]r1xz2D transformation matrix in the OXZ plane
[in]alphaScalar multiplier for src
[in]srcCoefficients of initial spherical harmonics
[in]betaScalar multipler for dst
[out]dstcoefficients of rotated spherical harmonics
[out]workTemporary workspace of a size (2*(2*p+1)*(2*p+3))

Definition at line 3941 of file ddx_harmonics.f90.

◆ fmm_m2m_ztranslate()

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.

Parameters
[in]zOZ coordinate from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics @parma[in] p: Maximal degree of spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]vcnkSquare roots of combinatorial numbers C_n^k
[in]alphaScalar multipler for alpha
[in]src_mExpansion in old harmonics
[in]betaScalar multipler for dst_m
[in,out]dst_mExpansion in new harmonics

Definition at line 4225 of file ddx_harmonics.f90.

◆ fmm_m2m_ztranslate_work()

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.

Parameters
[in]zOZ coordinate from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics @parma[in] p: Maximal degree of spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]vcnkSquare roots of combinatorial numbers C_n^k
[in]alphaScalar multipler for alpha
[in]src_mExpansion in old harmonics
[in]betaScalar multipler for dst_m
[in,out]dst_mExpansion in new harmonics
[out]workTemporary workspace of a size (2*(p+1))

Definition at line 4263 of file ddx_harmonics.f90.

◆ fmm_m2m_bessel_ztranslate()

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.

Parameters
[in]zOZ coordinate from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics @parma[in] p: Maximal degree of spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]alphaScalar multipler for alpha
[in]src_mExpansion in old harmonics
[in]betaScalar multipler for dst_m
[in,out]dst_mExpansion in new harmonics

Definition at line 4435 of file ddx_harmonics.f90.

◆ fmm_m2m_bessel_ztranslate_work()

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.

Parameters
[in]zOZ coordinate from old to new centers of harmonics. Standard FMM M2M operation requires z to be OZ coordinate from new to old.
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics @parma[in] p: Maximal degree of spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]alphaScalar multipler for alpha
[in]src_mExpansion in old harmonics
[in]betaScalar multipler for dst_m
[in,out]dst_mExpansion in new harmonics
[out]workTemporary workspace of a size (2*(p+1))

Definition at line 4474 of file ddx_harmonics.f90.

◆ fmm_m2m_bessel_ztranslate_adj()

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.

Parameters
[in]zOZ coordinate from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics @parma[in] p: Maximal degree of spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]alphaScalar multipler for alpha
[in]src_mExpansion in old harmonics
[in]betaScalar multipler for dst_m
[in,out]dst_mExpansion in new harmonics

Definition at line 4674 of file ddx_harmonics.f90.

◆ fmm_m2m_bessel_ztranslate_adj_work()

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.

Parameters
[in]zOZ coordinate from old to new centers of harmonics. Standard FMM M2M operation requires z to be OZ coordinate from new to old.
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics @parma[in] p: Maximal degree of spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]alphaScalar multipler for alpha
[in]src_mExpansion in old harmonics
[in]betaScalar multipler for dst_m
[in,out]dst_mExpansion in new harmonics
[out]workTemporary workspace of a size (2*(p+1))

Definition at line 4713 of file ddx_harmonics.f90.

◆ fmm_m2m_bessel_derivative_ztranslate_work()

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.

Parameters
[in]zOZ coordinate from old to new centers of harmonics. Standard FMM M2M operation requires z to be OZ coordinate from new to old.
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics @parma[in] p: Maximal degree of spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]alphaScalar multipler for alpha
[in]src_mExpansion in old harmonics
[in]betaScalar multipler for dst_m
[in,out]dst_mExpansion in new harmonics
[out]workTemporary workspace of a size (2*(p+1))

Definition at line 4915 of file ddx_harmonics.f90.

◆ fmm_m2m_ztranslate_adj()

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.

Parameters
[in]zOZ coordinate from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics @parma[in] p: Maximal degree of spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]vcnkSquare roots of combinatorial numbers C_n^k
[in]alphaScalar multipler for src_m
[in]src_mExpansion in old harmonics
[in]betaScalar multipler for dst_m
[in,out]dst_mExpansion in new harmonics

Definition at line 5402 of file ddx_harmonics.f90.

◆ fmm_m2m_ztranslate_adj_work()

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.

Parameters
[in]zOZ coordinate from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics @parma[in] p: Maximal degree of spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]vcnkSquare roots of combinatorial numbers C_n^k
[in]alphaScalar multipler for src_m
[in]src_mExpansion in old harmonics
[in]betaScalar multipler for dst_m
[in,out]dst_mExpansion in new harmonics
[out]workTemporary workspace of a size (2*(p+1))

Definition at line 5440 of file ddx_harmonics.f90.

◆ fmm_m2m_scale()

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.

Parameters
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]alphaScalar multiplier for src_m
[in]src_mMultipole expansion in old harmonics
[in]betaScalar multiplier for dst_m
[in,out]dst_mMultipole expansion in new harmonics

Definition at line 5603 of file ddx_harmonics.f90.

◆ fmm_m2m_scale_adj()

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.

Parameters
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]alphaScalar multiplier for src_m
[in]src_mMultipole expansion in old harmonics
[in]betaScalar multiplier for dst_m
[in,out]dst_mMultipole expansion in new harmonics

Definition at line 5649 of file ddx_harmonics.f90.

◆ fmm_m2m_rotation()

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.

Parameters
[in]cRadius-vector from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]vscalesNormalization constants for Y_lm
[in]vcnkSquare roots of combinatorial numbers C_n^k
[in]alphaScalar multiplier for src_m
[in]src_mExpansion in old harmonics
[in]betaScalar multiplier for dst_m
[in,out]dst_mExpansion in new harmonics

Definition at line 5700 of file ddx_harmonics.f90.

◆ fmm_m2m_rotation_work()

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.

Parameters
[in]cRadius-vector from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]vscalesNormalization constants for Y_lm
[in]vcnkSquare roots of combinatorial numbers C_n^k
[in]alphaScalar multiplier for src_m
[in]src_mExpansion in old harmonics
[in]betaScalar multiplier for dst_m
[in,out]dst_mExpansion in new harmonics
[out]workTemporary workspace of a size 6*p*p+19*p+8

Definition at line 5741 of file ddx_harmonics.f90.

◆ fmm_m2m_bessel_rotation()

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.

Parameters
[in]cRadius-vector from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]vscalesNormalization constants for Y_lm
[in]alphaScalar multiplier for src_m
[in]src_mExpansion in old harmonics
[in]betaScalar multiplier for dst_m
[in,out]dst_mExpansion in new harmonics

Definition at line 5817 of file ddx_harmonics.f90.

◆ fmm_m2m_bessel_rotation_work()

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.

Parameters
[in]cRadius-vector from old to new centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]vscalesNormalization constants for Y_lm
[in]alphaScalar multiplier for src_m
[in]src_mExpansion in old harmonics
[in]betaScalar multiplier for dst_m
[in,out]dst_mExpansion in new harmonics
[out]workTemporary workspace of a size 6*p*p+19*p+8

Definition at line 5876 of file ddx_harmonics.f90.

◆ fmm_m2m_bessel_rotation_adj()

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.

Parameters
[in]cRadius-vector from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]vscalesNormalization constants for Y_lm
[in]alphaScalar multiplier for src_m
[in]src_mExpansion in old harmonics
[in]betaScalar multiplier for dst_m
[in,out]dst_mExpansion in new harmonics

Definition at line 5953 of file ddx_harmonics.f90.

◆ fmm_m2m_bessel_rotation_adj_work()

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.

Parameters
[in]cRadius-vector from old to new centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]vscalesNormalization constants for Y_lm
[in]alphaScalar multiplier for src_m
[in]src_mExpansion in old harmonics
[in]betaScalar multiplier for dst_m
[in,out]dst_mExpansion in new harmonics
[out]workTemporary workspace of a size 6*p*p+19*p+8

Definition at line 6012 of file ddx_harmonics.f90.

◆ fmm_m2m_rotation_adj()

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.

Parameters
[in]cRadius-vector from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]vscalesnormalization constants for Y_lm
[in]vcnkSquare roots of combinatorial numbers C_n^k
[in]src_mexpansion in old harmonics
[in,out]dst_mexpansion in new harmonics

Definition at line 6088 of file ddx_harmonics.f90.

◆ fmm_m2m_rotation_adj_work()

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.

Parameters
[in]cRadius-vector from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]vscalesnormalization constants for Y_lm
[in]vcnkSquare roots of combinatorial numbers C_n^k
[in]src_mexpansion in old harmonics
[in,out]dst_mexpansion in new harmonics
[out]workTemporary workspace of a size 6*p*p+19*p+8

Definition at line 6127 of file ddx_harmonics.f90.

◆ fmm_m2m_bessel_grad()

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.

◆ fmm_l2l_ztranslate()

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.

Parameters
[in]zOZ coordinate from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics @parma[in] p: Maximal degree of spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]vfactSquare roots of factorials
[in]alphaScalar multipler for src_l
[in]src_lExpansion in old harmonics
[in]betaScalar multipler for dst_l
[in,out]dst_lExpansion in new harmonics

Definition at line 6241 of file ddx_harmonics.f90.

◆ fmm_l2l_ztranslate_work()

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.

Parameters
[in]zOZ coordinate from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics @parma[in] p: Maximal degree of spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]vfactSquare roots of factorials
[in]alphaScalar multipler for src_l
[in]src_lExpansion in old harmonics
[in]betaScalar multipler for dst_l
[in,out]dst_lExpansion in new harmonics
[out]workTemporary workspace of a size (2*(p+1))

Definition at line 6279 of file ddx_harmonics.f90.

◆ fmm_l2l_bessel_ztranslate()

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.

Parameters
[in]zOZ coordinate from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics @parma[in] p: Maximal degree of spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]alphaScalar multipler for alpha
[in]src_mExpansion in old harmonics
[in]betaScalar multipler for dst_m
[in,out]dst_mExpansion in new harmonics

Definition at line 6372 of file ddx_harmonics.f90.

◆ fmm_l2l_bessel_ztranslate_work()

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.

Parameters
[in]zOZ coordinate from old to new centers of harmonics. Standard FMM M2M operation requires z to be OZ coordinate from new to old.
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics @parma[in] p: Maximal degree of spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]alphaScalar multipler for alpha
[in]src_mExpansion in old harmonics
[in]betaScalar multipler for dst_m
[in,out]dst_mExpansion in new harmonics
[out]workTemporary workspace of a size (2*(p+1))

Definition at line 6411 of file ddx_harmonics.f90.

◆ fmm_l2l_bessel_ztranslate_adj()

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.

Parameters
[in]zOZ coordinate from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics @parma[in] p: Maximal degree of spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]alphaScalar multipler for alpha
[in]src_mExpansion in old harmonics
[in]betaScalar multipler for dst_m
[in,out]dst_mExpansion in new harmonics

Definition at line 6611 of file ddx_harmonics.f90.

◆ fmm_l2l_bessel_ztranslate_adj_work()

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.

Parameters
[in]zOZ coordinate from old to new centers of harmonics. Standard FMM M2M operation requires z to be OZ coordinate from new to old.
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics @parma[in] p: Maximal degree of spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]alphaScalar multipler for alpha
[in]src_mExpansion in old harmonics
[in]betaScalar multipler for dst_m
[in,out]dst_mExpansion in new harmonics
[out]workTemporary workspace of a size (2*(p+1))

Definition at line 6650 of file ddx_harmonics.f90.

◆ fmm_l2l_bessel_derivative_ztranslate_work()

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.

Parameters
[in]zOZ coordinate from old to new centers of harmonics. Standard FMM M2M operation requires z to be OZ coordinate from new to old.
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics @parma[in] p: Maximal degree of spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]alphaScalar multipler for alpha
[in]src_mExpansion in old harmonics
[in]betaScalar multipler for dst_m
[in,out]dst_mExpansion in new harmonics
[out]workTemporary workspace of a size (2*(p+1))

Definition at line 6853 of file ddx_harmonics.f90.

◆ fmm_l2l_ztranslate_adj()

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.

Parameters
[in]zOZ coordinate from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics @parma[in] p: Maximal degree of spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]vfactSquare roots of factorials
[in]alphaScalar multipler for src_l
[in]src_lExpansion in old harmonics
[in]betaScalar multipler for dst_l
[in,out]dst_lExpansion in new harmonics

Definition at line 6889 of file ddx_harmonics.f90.

◆ fmm_l2l_ztranslate_adj_work()

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.

Parameters
[in]zOZ coordinate from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics @parma[in] p: Maximal degree of spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]vfactSquare roots of factorials
[in]alphaScalar multipler for src_l
[in]src_lExpansion in old harmonics
[in]betaScalar multipler for dst_l
[in,out]dst_lExpansion in new harmonics
[out]workTemporary workspace of a size (2*(p+1))

Definition at line 6927 of file ddx_harmonics.f90.

◆ fmm_l2l_scale()

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.

Parameters
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]alphaScalar multiplier for src_m
[in]src_lMultipole expansion in old harmonics
[in]betaScalar multiplier for dst_m
[in,out]dst_lMultipole expansion in new harmonics

Definition at line 7017 of file ddx_harmonics.f90.

◆ fmm_l2l_scale_adj()

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.

Parameters
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]alphaScalar multiplier for src_m
[in]src_lMultipole expansion in old harmonics
[in]betaScalar multiplier for dst_m
[in,out]dst_lMultipole expansion in new harmonics

Definition at line 7062 of file ddx_harmonics.f90.

◆ fmm_l2l_rotation()

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.

Parameters
[in]cRadius-vector from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]vscalesNormalization constants for Y_lm
[in]vfactSquare roots of factorials
[in]alphaScalar multiplier for src_l
[in]src_lExpansion in old harmonics
[in]betaScalar multiplier for dst_l
[in,out]dst_lExpansion in new harmonics

Definition at line 7113 of file ddx_harmonics.f90.

◆ fmm_l2l_rotation_work()

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.

Parameters
[in]cRadius-vector from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]vscalesNormalization constants for Y_lm
[in]vfactSquare roots of factorials
[in]alphaScalar multiplier for src_l
[in]src_lExpansion in old harmonics
[in]betaScalar multiplier for dst_l
[in,out]dst_lExpansion in new harmonics
[out]workTemporary workspace of a size 6*p*p+19*p+8

Definition at line 7154 of file ddx_harmonics.f90.

◆ fmm_l2l_bessel_rotation()

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.

Parameters
[in]cRadius-vector from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]vscalesNormalization constants for Y_lm
[in]alphaScalar multiplier for src_m
[in]src_mExpansion in old harmonics
[in]betaScalar multiplier for dst_m
[in,out]dst_mExpansion in new harmonics

Definition at line 7230 of file ddx_harmonics.f90.

◆ fmm_l2l_bessel_rotation_work()

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.

Parameters
[in]cRadius-vector from old to new centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]vscalesNormalization constants for Y_lm
[in]alphaScalar multiplier for src_m
[in]src_mExpansion in old harmonics
[in]betaScalar multiplier for dst_m
[in,out]dst_mExpansion in new harmonics
[out]workTemporary workspace of a size 6*p*p+19*p+8

Definition at line 7288 of file ddx_harmonics.f90.

◆ fmm_l2l_bessel_rotation_adj()

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.

Parameters
[in]cRadius-vector from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]vscalesNormalization constants for Y_lm
[in]alphaScalar multiplier for src_m
[in]src_mExpansion in old harmonics
[in]betaScalar multiplier for dst_m
[in,out]dst_mExpansion in new harmonics

Definition at line 7364 of file ddx_harmonics.f90.

◆ fmm_l2l_bessel_rotation_adj_work()

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.

Parameters
[in]cRadius-vector from old to new centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]vscalesNormalization constants for Y_lm
[in]alphaScalar multiplier for src_m
[in]src_mExpansion in old harmonics
[in]betaScalar multiplier for dst_m
[in,out]dst_mExpansion in new harmonics
[out]workTemporary workspace of a size 6*p*p+19*p+8

Definition at line 7422 of file ddx_harmonics.f90.

◆ fmm_l2l_bessel_grad()

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.

◆ fmm_l2l_rotation_adj()

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.

Parameters
[in]cRadius-vector from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]vscalesNormalization constants for Y_lm
[in]vfactSquare roots of factorials
[in]alphaScalar multiplier for src_l
[in]src_lExpansion in old harmonics
[in]betaScalar multiplier for dst_l
[in,out]dst_lExpansion in new harmonics

Definition at line 7539 of file ddx_harmonics.f90.

◆ fmm_l2l_rotation_adj_work()

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.

Parameters
[in]cRadius-vector from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]vscalesNormalization constants for Y_lm
[in]vfactSquare roots of factorials
[in]alphaScalar multiplier for src_l
[in]src_lExpansion in old harmonics
[in]betaScalar multiplier for dst_l
[in,out]dst_lExpansion in new harmonics
[out]workTemporary workspace of a size 6*p*p+19*p+8

Definition at line 7580 of file ddx_harmonics.f90.

◆ fmm_m2l_ztranslate()

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.

Parameters
[in]zOZ coordinate from new to old centers of harmonics
[in]src_rRadius of old (multipole) harmonics
[in]dst_rRadius of new (local) harmonics @parma[in] pm: Maximal degree of multipole spherical harmonics @parma[in] pl: Maximal degree of local spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]m2l_ztranslate_coef
[in]alphaScalar multipler for src_m
[in]src_mExpansion in old (multipole) harmonics
[in]betaScalar multipler for dst_l
[in,out]dst_lExpansion in new (local) harmonics

Definition at line 7655 of file ddx_harmonics.f90.

◆ fmm_m2l_ztranslate_work()

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.

Parameters
[in]zOZ coordinate from new to old centers of harmonics
[in]src_rRadius of old (multipole) harmonics
[in]dst_rRadius of new (local) harmonics @parma[in] pm: Maximal degree of multipole spherical harmonics @parma[in] pl: Maximal degree of local spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]m2l_ztranslate_coef
[in]alphaScalar multipler for src_m
[in]src_mExpansion in old (multipole) harmonics
[in]betaScalar multipler for dst_l
[in,out]dst_lExpansion in new (local) harmonics
[out]workTemporary workspace of a size (pm+2)*(pm+1)

Definition at line 7695 of file ddx_harmonics.f90.

◆ fmm_m2l_ztranslate_adj()

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.

Parameters
[in]zOZ coordinate from new to old centers of harmonics
[in]src_rRadius of old (local) harmonics
[in]dst_rRadius of new (multipole) harmonics @parma[in] pl: Maximal degree of local spherical harmonics @parma[in] pm: Maximal degree of multipole spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]m2l_ztranslate_adj_coef
[in]alphaScalar multipler for src_l
[in]src_lExpansion in old (local) harmonics
[in]betaScalar multipler for dst_m
[in,out]dst_mExpansion in new (multipole) harmonics

Definition at line 7854 of file ddx_harmonics.f90.

◆ fmm_m2l_ztranslate_adj_work()

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.

Parameters
[in]zOZ coordinate from new to old centers of harmonics
[in]src_rRadius of old (local) harmonics
[in]dst_rRadius of new (multipole) harmonics @parma[in] pl: Maximal degree of local spherical harmonics @parma[in] pm: Maximal degree of multipole spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]m2l_ztranslate_adj_coef
[in]alphaScalar multipler for src_l
[in]src_lExpansion in old (local) harmonics
[in]betaScalar multipler for dst_m
[in,out]dst_mExpansion in new (multipole) harmonics

Definition at line 7893 of file ddx_harmonics.f90.

◆ fmm_m2l_rotation()

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.

Parameters
[in]cRadius-vector from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pmMaximal degree of multipole spherical harmonics
[in]plMaximal degree of local spherical harmonics
[in]vscalesNormalization constants for Y_lm
[in]m2l_ztranslate_coef
[in]alphaScalar multiplier for src_m
[in]src_mExpansion in old harmonics
[in]betaScalar multiplier for dst_l
[in,out]dst_lExpansion in new harmonics

Definition at line 8054 of file ddx_harmonics.f90.

◆ fmm_m2l_rotation_work()

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.

Parameters
[in]cRadius-vector from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pmMaximal degree of multipole spherical harmonics
[in]plMaximal degree of local spherical harmonics
[in]vscalesNormalization constants for Y_lm
[in]m2l_ztranslate_coef
[in]alphaScalar multiplier for src_m
[in]src_mExpansion in old harmonics
[in]betaScalar multiplier for dst_l
[in,out]dst_lExpansion in new harmonics
[out]workTemporary 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.

◆ fmm_m2l_bessel_rotation()

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.

Parameters
[in]cRadius-vector from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]vscalesNormalization constants for Y_lm
[in]alphaScalar multiplier for src_m
[in]src_mExpansion in old harmonics
[in]betaScalar multiplier for dst_m
[in,out]dst_mExpansion in new harmonics

Definition at line 8177 of file ddx_harmonics.f90.

◆ fmm_m2l_bessel_rotation_work()

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.

Parameters
[in]cRadius-vector from old to new centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]vscalesNormalization constants for Y_lm
[in]alphaScalar multiplier for src_m
[in]src_mExpansion in old harmonics
[in]betaScalar multiplier for dst_m
[in,out]dst_mExpansion in new harmonics
[out]workTemporary workspace of a size 6*p*p+19*p+8

Definition at line 8235 of file ddx_harmonics.f90.

◆ fmm_m2l_bessel_rotation_adj()

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.

Parameters
[in]cRadius-vector from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]vscalesNormalization constants for Y_lm
[in]alphaScalar multiplier for src_m
[in]src_mExpansion in old harmonics
[in]betaScalar multiplier for dst_m
[in,out]dst_mExpansion in new harmonics

Definition at line 8312 of file ddx_harmonics.f90.

◆ fmm_m2l_bessel_rotation_adj_work()

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.

Parameters
[in]cRadius-vector from old to new centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]pMaximal degree of spherical harmonics
[in]vscalesNormalization constants for Y_lm
[in]alphaScalar multiplier for src_m
[in]src_mExpansion in old harmonics
[in]betaScalar multiplier for dst_m
[in,out]dst_mExpansion in new harmonics
[out]workTemporary workspace of a size 6*p*p+19*p+8

Definition at line 8371 of file ddx_harmonics.f90.

◆ fmm_m2l_bessel_ztranslate()

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.

Parameters
[in]zOZ coordinate from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics @parma[in] p: Maximal degree of spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]alphaScalar multipler for alpha
[in]src_mExpansion in old harmonics
[in]betaScalar multipler for dst_m
[in,out]dst_mExpansion in new harmonics

Definition at line 8445 of file ddx_harmonics.f90.

◆ fmm_m2l_bessel_ztranslate_work()

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.

Parameters
[in]zOZ coordinate from old to new centers of harmonics. Standard FMM M2M operation requires z to be OZ coordinate from new to old.
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics @parma[in] p: Maximal degree of spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]alphaScalar multipler for alpha
[in]src_mExpansion in old harmonics
[in]betaScalar multipler for dst_m
[in,out]dst_mExpansion in new harmonics
[out]workTemporary workspace of a size (2*(p+1))

Definition at line 8484 of file ddx_harmonics.f90.

◆ fmm_m2l_bessel_ztranslate_adj()

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.

Parameters
[in]zOZ coordinate from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics @parma[in] p: Maximal degree of spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]alphaScalar multipler for alpha
[in]src_mExpansion in old harmonics
[in]betaScalar multipler for dst_m
[in,out]dst_mExpansion in new harmonics

Definition at line 8684 of file ddx_harmonics.f90.

◆ fmm_m2l_bessel_ztranslate_adj_work()

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.

Parameters
[in]zOZ coordinate from old to new centers of harmonics. Standard FMM M2M operation requires z to be OZ coordinate from new to old.
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics @parma[in] p: Maximal degree of spherical harmonics
[in]vscalesNormalization constants for harmonics
[in]alphaScalar multipler for alpha
[in]src_mExpansion in old harmonics
[in]betaScalar multipler for dst_m
[in,out]dst_mExpansion in new harmonics
[out]workTemporary workspace of a size (2*(p+1))

Definition at line 8723 of file ddx_harmonics.f90.

◆ fmm_m2l_rotation_adj()

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.

Parameters
[in]cRadius-vector from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]plMaximal degree of local spherical harmonics
[in]pmMaximal degree of multipole spherical harmonics
[in]vscalesnormalization constants for Y_lm
[in]m2l_ztranslate_adj_oef
[in]alphaScalar multiplier for src_l
[in]src_lexpansion in old harmonics
[in]betaScalar multiplier for dst_m
[in,out]dst_mexpansion in new harmonics

Definition at line 8928 of file ddx_harmonics.f90.

◆ fmm_m2l_rotation_adj_work()

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.

Parameters
[in]cRadius-vector from new to old centers of harmonics
[in]src_rRadius of old harmonics
[in]dst_rRadius of new harmonics
[in]plMaximal degree of local spherical harmonics
[in]pmMaximal degree of multipole spherical harmonics
[in]vscalesnormalization constants for Y_lm
[in]m2l_ztranslate_adj_coef
[in]alphaScalar multiplier for src_l
[in]src_lexpansion in old harmonics
[in]betaScalar multiplier for dst_m
[in,out]dst_mexpansion in new harmonics
[out]workTemporary 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.