(git:b77b4be)
Loading...
Searching...
No Matches
grpp_specfunc_scaled_mod_sph_bessel.c File Reference
#include <math.h>
#include "grpp_specfunc.h"
#include "libgrpp.h"

Go to the source code of this file.

Macros

#define M_PI   3.1415926535897932384626433
 
#define LMAX   (LIBGRPP_MAX_BASIS_L + LIBGRPP_MAX_RPP_L)
 
#define NPOINTS   2000
 

Functions

static double modified_scaled_bessel_derivative (int n, int lambda, int ix)
 
static double bessel_asymptotic_R_function (int n, double x)
 
void libgrpp_pretabulate_bessel ()
 
double libgrpp_modified_bessel_scaled (int n, double x)
 

Variables

double bessel_table [NPOINTS][3 *LMAX][10]
 
const double rfun_coeffs [50][50]
 
const double bessel_table_0 [1601][60]
 

Macro Definition Documentation

◆ M_PI

#define M_PI   3.1415926535897932384626433

Definition at line 17 of file grpp_specfunc_scaled_mod_sph_bessel.c.

◆ LMAX

#define LMAX   (LIBGRPP_MAX_BASIS_L + LIBGRPP_MAX_RPP_L)

Definition at line 26 of file grpp_specfunc_scaled_mod_sph_bessel.c.

◆ NPOINTS

#define NPOINTS   2000

Definition at line 31 of file grpp_specfunc_scaled_mod_sph_bessel.c.

Function Documentation

◆ modified_scaled_bessel_derivative()

static double modified_scaled_bessel_derivative ( int  n,
int  lambda,
int  ix 
)
static

Calculates n-th order derivative on the scaled modified spherical Bessel function K_lambda(z).

Note that the formula (45) for derivatives in the paper of Flores-Moreno et al is wrong (you must also add: - K^(n-1)_{lambda}).

R. Flores-Moreno, R. J. Alvarez-Mendez, A. Vela, A. M. Koster, Half-numerical evaluation of pseudopotential integrals. J. Comput. Chem. 27 (9), 1009 (2006), doi: 10.1002/jcc.20410

Definition at line 132 of file grpp_specfunc_scaled_mod_sph_bessel.c.

Here is the caller graph for this function:

◆ bessel_asymptotic_R_function()

static double bessel_asymptotic_R_function ( int  n,
double  x 
)
static

Asymptotic formula for the scaled spherical modified Bessel function of order 'n'.

For the formula, see: R. Flores-Moreno, R. J. Alvarez-Mendez, A. Vela, A. M. Koster, Half-numerical evaluation of pseudopotential integrals. J. Comput. Chem. 27 (9), 1009 (2006), doi: 10.1002/jcc.20410

In the optimized version all factors used are pretabulated above in the 'rfun_coeffs' array. Unoptimized version of this code:

double sum = 0.0;

for (int k = 0; k <= n; k++) { sum += factorial(k + n) / (factorial(k) * factorial(n - k) * pow(2 * x, k)); }

Definition at line 175 of file grpp_specfunc_scaled_mod_sph_bessel.c.

Here is the caller graph for this function:

◆ libgrpp_pretabulate_bessel()

void libgrpp_pretabulate_bessel ( )

Definition at line 48 of file grpp_specfunc_scaled_mod_sph_bessel.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ libgrpp_modified_bessel_scaled()

double libgrpp_modified_bessel_scaled ( int  n,
double  x 
)

Definition at line 68 of file grpp_specfunc_scaled_mod_sph_bessel.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ bessel_table

double bessel_table[NPOINTS][3 *LMAX][10]

Definition at line 39 of file grpp_specfunc_scaled_mod_sph_bessel.c.

◆ rfun_coeffs

const double rfun_coeffs

Definition at line 194 of file grpp_specfunc_scaled_mod_sph_bessel.c.

◆ bessel_table_0

const double bessel_table_0[1601][60]
extern

Definition at line 34 of file grpp_specfunc_bessel_table.c.