XGC1
Functions/Subroutines | Variables
nintegrals_mod Module Reference

A module for evaluating some angular integrals encountered in Fourier decomposition of Green's function boundary condition for Poisson and Ampere equations. More...

Functions/Subroutines

real(kind=8) function nintegrals_gn (k, n)
 Evaluates the integral \( \int_0^{2\pi}\frac{\cos(nx)}{\sqrt{1-k\cos(x)}}dx \). More...
 
real(kind=8) function nintegrals_integrand (x, k)
 
real(kind=8) function nintegrals_integrand_noparams (x)
 

Variables

real(kind=8), parameter epsrel = 1.D-2
 tolerance parameters for the adaptive integrations More...
 
real(kind=8), parameter epsabs = 1.D-2
 
real(kind=8), parameter pi = 4*atan(1.0D0)
 value for pi used inside the module. More...
 
real(kind=8), dimension(:), allocatable ksave
 

Detailed Description

A module for evaluating some angular integrals encountered in Fourier decomposition of Green's function boundary condition for Poisson and Ampere equations.

Author
Eero Hirvijoki

Function/Subroutine Documentation

◆ nintegrals_gn()

real(kind=8) function nintegrals_mod::nintegrals_gn ( real(kind=8)  k,
integer  n 
)

Evaluates the integral \( \int_0^{2\pi}\frac{\cos(nx)}{\sqrt{1-k\cos(x)}}dx \).

Author
Eero Hirvijoki
Parameters
[in]kA parameter for the integrator
[in]nthe Fourier mode
Todo:
Right now only \( -1 < k < 1 \) is can be handled. If k falls outside this range, one most probably encounters a segmentation fault.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ nintegrals_integrand()

real(kind=8) function nintegrals_mod::nintegrals_integrand ( real(kind=8)  x,
real(kind=8), intent(in), optional  k 
)
Here is the caller graph for this function:

◆ nintegrals_integrand_noparams()

real(kind=8) function nintegrals_mod::nintegrals_integrand_noparams ( real(kind=8)  x)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ epsabs

real(kind=8), parameter nintegrals_mod::epsabs = 1.D-2

◆ epsrel

real(kind=8), parameter nintegrals_mod::epsrel = 1.D-2

tolerance parameters for the adaptive integrations

◆ ksave

real (kind=8), dimension(:), allocatable nintegrals_mod::ksave

◆ pi

real(kind=8), parameter nintegrals_mod::pi = 4*atan(1.0D0)

value for pi used inside the module.