alps_fns_rel Module

This module contains the relativistic numerical functions of ALPS.


Used by

  • module~~alps_fns_rel~~UsedByGraph module~alps_fns_rel alps_fns_rel proc~derivative_f0 derivative_f0 proc~derivative_f0->module~alps_fns_rel proc~determine_bessel_array determine_bessel_array proc~determine_bessel_array->module~alps_fns_rel proc~determine_nmax determine_nmax proc~determine_nmax->module~alps_fns_rel proc~disp disp proc~disp->module~alps_fns_rel proc~full_integrate full_integrate proc~full_integrate->module~alps_fns_rel

Functions

public function integrate_res_rel(om, nn, mode)

This function performs the integration near resonances as described in Section 3.1 of the code paper for a relativistic calculation. It is only called if resonances are present in or near the integration domain.

Arguments

Type IntentOptional Attributes Name
double complex, intent(in) :: om

Complex wave frequency .

integer, intent(in) :: nn

Order of the Bessel function.

integer, intent(in) :: mode

Index of the entries in the T-tensor of Eq. (2.10).

Return Value doublecomplex

private function integrate_resU_rel(sproc_rel, om, nn, mode, igamma)

This function evaluates the integral with the integrand proportional to in Eq. (2.9) of the code paper for a relativistic calculation.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: sproc_rel

is_rel of the current process.

double complex, intent(in) :: om

Complex wave frequency .

integer, intent(in) :: nn

Order of the Bessel function.

integer, intent(in) :: mode

Index of the entries in the T-tensor of Eq. (2.10).

integer, intent(in) :: igamma

Index to loop over .

Return Value doublecomplex

public function principal_integral_rel(sproc_rel, om, nn, mode, igamma, ipparbar_res, upperlimit)

This function performs the integration near resonances as described in Section 3.1 of the code paper for a relativistic calculation. It is only called if resonances are present in or near the integration domain.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: sproc_rel

is_rel of the current process.

double complex, intent(in) :: om

Complex wave frequency .

integer, intent(in) :: nn

Order of the Bessel function.

integer, intent(in) :: mode

Index of the entries in the T-tensor of Eq. (2.10).

integer, intent(in) :: igamma

Index to loop over .

integer, intent(in) :: ipparbar_res

Index of the nearest relativistic parallel momentum to the resonance.

integer, intent(in) :: upperlimit

Index of upper limit for integration according to Eq. (3.5).

Return Value doublecomplex

private function funct_g_rel(sproc_rel, pparbar, igamma, om, nn, mode)

This function returns the function from Eq. (3.2) of the code paper for a relativistic calculation.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: sproc_rel

is_rel of the current process.

double precision, intent(in) :: pparbar

Relativistic parallel momentum.

integer, intent(in) :: igamma

Index of .

double complex, intent(in) :: om

Complex wave frequency .

integer, intent(in) :: nn

Order of the Bessel function.

integer, intent(in) :: mode

Index of the entries in the T-tensor of Eq. (2.10).

Return Value doublecomplex

public function landau_integrate_rel(om, nn, mode)

This function evaluates the Landau contour according to Eqs. (3.8) and (3.9) of the code paper for a relativistic calculation.

Arguments

Type IntentOptional Attributes Name
double complex, intent(in) :: om

Complex wave frequency .

integer, intent(in) :: nn

Order of the Bessel function.

integer, intent(in) :: mode

Index of the entries in the T-tensor of Eq. (2.10).

Return Value doublecomplex

public function int_ee_rel(om)

This function returns the ee term in Eq. (2.9) for the relativistic calculation.

Arguments

Type IntentOptional Attributes Name
double complex, intent(in) :: om

Complex wave frequency .

Return Value doublecomplex

public function resU_rel(sproc_rel, om, nn, igamma, ipparbar)

This function evaluates the term proportional to in Eq. (2.9) of the code paper for the relativistic calculation.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: sproc_rel

is_rel of the current process.

double complex, intent(in) :: om

Complex wave frequency .

integer, intent(in) :: nn

Order of the Bessel function.

integer, intent(in) :: igamma

Index to loop over .

integer, intent(in) :: ipparbar

Index to loop over relativistic parallel momentum.

Return Value doublecomplex

private function int_T_rel(sproc_rel, nn, igamma, ipparbar, mode)

This function returns the T-tensor according to Eq. (2.10) of the code paper for the relativistic calculation.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: sproc_rel

is_rel of the current process.

integer, intent(in) :: nn

Order of the Bessel function.

integer, intent(in) :: igamma

Index to loop over .

integer, intent(in) :: ipparbar

Index to loop over relativistic parallel momentum.

integer, intent(in) :: mode

Index of the entries in the T-tensor of Eq. (2.10).

Return Value doublecomplex

private function int_T_res_rel(sproc_rel, nn, igamma, pparbar, mode)

This function returns the T-tensor according to Eq. (2.10) of the code paper for the case in which it is evaluated at the complex resonance momentum for the relativistic calculation.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: sproc_rel

is_rel of the current process.

integer, intent(in) :: nn

Order of the Bessel function.

integer, intent(in) :: igamma

Index to loop over .

double complex, intent(in) :: pparbar

Relativistic parallel momentum.

integer, intent(in) :: mode

Index of the entries in the T-tensor of Eq. (2.10).

Return Value doublecomplex

private function Fact(k)

This function returns the factorial k! of its argument k.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: k

Argument of the factorial.

Return Value doubleprecision

public function BESSJ(N, X)

This function calculates the first kind Bessel function of integer order N, for any REAL X. We use here the classical recursion formula, when X > N. For X < N, Miller's algorithm is used to avoid overflows. Reference: C.W.Clenshaw, Chebyshev Series for Mathematical Functions, Mathematical Tables, Vol. 5, 1962.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: N

Order of Bessel function.

double precision, intent(in) :: X

Argument of the Bessel function.

Return Value doubleprecision

public function BESSJ0(X)

This function calculates the first kind Bessel function of order 0, for any REAL X. The polynomial approximation by series of Chebyshev polynomials is used for 0<X<8 and 0<8/X<1. References: M.Abramowitz, I.A.Stegun, Handbook of Mathematical Functions, 1965. C.W.Clenshaw, Chebyshev Series for Mathematical Functions, Mathematical Tables, Vol. 5, 1962.

Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: X

Argument of the Bessel function.

Return Value doubleprecision

public function BESSJ1(X)

This subroutine calculates the First Kind Bessel Function of order 1, for any real number X. The polynomial approximation by series of Chebyshev polynomials is used for 0<X<8 and 0<8/X<1. References: M.Abramowitz, I.A.Stegun, Handbook of Mathematical Functions, 1965. C.W.Clenshaw, Chebyshev Series for Mathematical Functions, Mathematical Tables, Vol. 5, 1962.

Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: X

Argument of the Bessel function.

Return Value doubleprecision

public function Gamma(xx)

This function returns the Gamma-function.

Arguments

Type IntentOptional Attributes Name
double precision :: xx

Argument of the Gamma-function.

Return Value doubleprecision


Subroutines

public subroutine derivative_f0_rel(is, is_rel)

This subroutine calculates the derivatives of the background velocity distribution function f0 for the relativistic calculation.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: is

Index of particle species.

integer, intent(in) :: is_rel

Index for relativistic species (if any).

public subroutine polyharmonic_spline(grid_coarse, gamma_coarse, pparbar_coarse, n_coarse, gamma_rel, pparbar, ngamma, npparbar, smoothing, f0_rel, is_rel, nspec_rel)

This soubroutine interpolates the grid with a polyharmonic thin-plate spline. This subroutine needs the LUPACK and BLAS libraries to evoke the dgesv subroutine. The method uses the Thin Plate Spline. We use these resources: http://cseweb.ucsd.edu/~sjb/eccv_tps.pdf http://www.univie.ac.at/nuhag-php/bibtex/open_files/po94_M%20J%20D%20Powell%2003%2093.pdf http://vision.ucsd.edu/sites/default/files/fulltext(4).pdf

Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: grid_coarse(n_coarse)

Coarse input grid for interpolation.

double precision, intent(in) :: gamma_coarse(n_coarse)

Coordinates of on coarse grid.

double precision, intent(in) :: pparbar_coarse(n_coarse)

Coordinates of relativistic parallel momentum on coarse grid.

integer, intent(in) :: n_coarse

Number of entries in coarse grid.

double precision, intent(in) :: gamma_rel(nspec_rel,0:ngamma,0:npparbar)

Coordinates of on fine grid.

double precision, intent(in) :: pparbar(nspec_rel,0:ngamma,0:npparbar)

Coordinates of relativistic parallel momentum on fine grid.

integer, intent(in) :: ngamma

Number of steps on fine output grid.

integer, intent(in) :: npparbar

Number of parallel momentum steps on fine output grid.

double precision, intent(in) :: smoothing

Smoothing parameter for spline interpolation.

double precision, intent(out) :: f0_rel(nspec_rel,0:ngamma,0:npparbar)

Fine output grid after interpolation.

integer :: is_rel

Index for relativistic species (if any).

integer :: nspec_rel

Number of relativistic species.

private subroutine determine_sproc_rel(sproc_rel)

This subroutine determines sproc_rel for the given process.

Arguments

Type IntentOptional Attributes Name
integer, intent(out) :: sproc_rel

is_rel of the current process.

public subroutine CBESSJ(z, nu, z1)

This subroutine calculates the complex Bessel function. It is based on the CBESSJ function release 1.1 by J-P Moreau, Paris (www.jpmoreau.fr).

Arguments

Type IntentOptional Attributes Name
double complex, intent(in) :: z

Argument of the Bessel function.

integer, intent(in) :: nu

Order of Bessel function.

double complex, intent(out) :: z1

Resulting value of Bessel function.