Quadrature scheme for accurate integrals: the multipole_preserving module

Quick access

Variables:g_rmax
Routines:finalize_real_space_conversion(), get_mp_exps_product(), initialize_real_space_conversion(), mp_exp(), mp_gaussian_workarrays(), mp_initialized(), mp_range(), scfdotf()

Needed modules

  • dynamic_memory
  • f_precisions (f_double => gp())
  • f_arrays
  • dictionaries (f_err_throw())
  • yaml_output (yaml_mapping_open(), yaml_mapping_close(), yaml_map(), yaml_comment())

Variables

  • multipole_preserving/g_rmax [real,public/parameter/optional/default=10.0_gp]

    < Maximum factor (g_rmax*rloc) to consider the values from a gaussian

Subroutines and functions

subroutine multipole_preserving/initialize_real_space_conversion([npoints, isf_m, rlocs, nmoms, verbose])
Options:
  • npoints [integer, in,] :: < Number of points (only 2**x)
  • isf_m [integer, in,] :: < Type of interpolatig scaling function
  • rlocs (*) [real, in,] :: < arrays of rloc
  • nmoms [integer, in,] :: < Number of preserved moments if /= 0
  • verbose [logical, in,] :: < If .true., display some information
Call to:

isf_family()

function multipole_preserving/mp_initialized()
Return:mp_initialized [logical]
subroutine multipole_preserving/mp_gaussian_workarrays(nterms, nbox, expo, lxyz, rxyz, hgrids)
Options:

nterms [integer, in,]

Parameters:
  • nbox (2,3) [integer, in]
  • expo [real, in]
  • lxyz (nterms,3) [integer, in]
  • rxyz (3) [real, in]
  • hgrids (3) [real, in]
Call to:

mp_exp()

function multipole_preserving/get_mp_exps_product(nterms, ival, factors)
Options:

nterms [integer, in,optional/default=len(factors)]

Parameters:
  • ival (3) [integer, in]
  • factors (nterms) [f_scalar, in]
Return:

f [f_scalar]

subroutine multipole_preserving/mp_range(mp, isf_m, nat, hxh, hyh, hzh, rlocmax, nx, ny, nz)
Parameters:
  • mp [logical, in] :: < multipole_preserving or not
  • isf_m [integer, in] :: < Type of interpolatig scaling function
  • nat [integer, in] :: < Number of atoms
  • hxh [real, in]
  • hyh [real, in]
  • hzh [real, in] :: < Grid step
  • rlocmax [real, in] :: < Max of rloc
  • nx [integer, out]
  • ny [integer, out]
  • nz [integer, out] :: < Range of the 1D arrays
subroutine multipole_preserving/finalize_real_space_conversion()
function multipole_preserving/mp_exp(hgrid, x0, expo, j, pow, modified)
Parameters:
  • hgrid [real, in]
  • x0 [real, in]
  • expo [real, in]
  • j [integer, in]
  • pow [integer, in]
  • modified [logical, in]
Return:

mp_exp [real]

Use :

numerics (safe_exp())

Called from:

mp_gaussian_workarrays(), mp_gaussian_density()

function multipole_preserving/scfdotf(j, hgrid, pgauss, x0, pow)
Parameters:
  • j [integer, in]
  • hgrid [real, in]
  • pgauss [real, in]
  • x0 [real, in]
  • pow [integer, in]
Return:

gint [real]

Use :

numerics (safe_exp())