(git:15c1bfc)
Loading...
Searching...
No Matches
erf_complex Module Reference

Module to compute the error function of a complex argument. More...

Functions/Subroutines

elemental complex(kind=dp) function, public faddeyeva_accurate (z, err)
 Computes the Faddeyeva function w(z) = exp(-z**2) * erfc(-i*z)
 
elemental complex(kind=dp) function, public erfz_accurate (z, err)
 Computes the error function of a complex argument using the Zaghloul and Ali algorithm.
 
elemental complex(kind=dp) function, public faddeyeva_fast (z)
 Computes the Faddeyeva function w(z) = exp(-z**2) * erfc(-i*z)
 
elemental complex(kind=dp) function, public erfz_fast (z)
 Computes the error function of a complex argument using the Poppe and Wijers algorithm.
 

Variables

real(kind=dp), parameter zero = 0.0_dp
 
real(kind=dp), parameter one = 1.0_dp
 
real(kind=dp), parameter two = 2.0_dp
 
real(kind=dp), parameter half = 0.5_dp
 
real(kind=dp), parameter rmin = TINY(one)
 
real(kind=dp), parameter eps0 = EPSILON(one)
 
real(kind=dp), parameter sqrt_log_rmin = SQRT(-LOG(rmin))
 
real(kind=dp), parameter pi2 = pi*pi
 
real(kind=dp), parameter one_sqrt_pi = one/SQRT(pi)
 
complex(kind=dp), parameter cmplxj = CMPLX(zero, one, kind=dp)
 
complex(kind=dp), parameter cmplx0 = CMPLX(zero, zero, kind=dp)
 

Detailed Description

Module to compute the error function of a complex argument.

History
08.2025 Adapted to use CP2K intrinsics and constants
Author
Stefano Battaglia

Function/Subroutine Documentation

◆ faddeyeva_accurate()

elemental complex(kind=dp) function, public erf_complex::faddeyeva_accurate ( complex(kind=dp), intent(in)  z,
real(kind=dp), intent(in)  err 
)

Computes the Faddeyeva function w(z) = exp(-z**2) * erfc(-i*z)

Parameters
zcomplex argument
errdesired accuracy (positive)
Returns
Faddeyeva function w(z)

Definition at line 76 of file erf_complex.F.

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

◆ erfz_accurate()

elemental complex(kind=dp) function, public erf_complex::erfz_accurate ( complex(kind=dp), intent(in)  z,
real(kind=dp), intent(in)  err 
)

Computes the error function of a complex argument using the Zaghloul and Ali algorithm.

Parameters
zcomplex argument
errdesired accuracy (positive)
Returns
error function of z

Definition at line 284 of file erf_complex.F.

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

◆ faddeyeva_fast()

elemental complex(kind=dp) function, public erf_complex::faddeyeva_fast ( complex(kind=dp), intent(in)  z)

Computes the Faddeyeva function w(z) = exp(-z**2) * erfc(-i*z)

Parameters
zcomplex argument
Returns
Faddeyeva function w(z)

Definition at line 300 of file erf_complex.F.

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

◆ erfz_fast()

elemental complex(kind=dp) function, public erf_complex::erfz_fast ( complex(kind=dp), intent(in)  z)

Computes the error function of a complex argument using the Poppe and Wijers algorithm.

Parameters
zcomplex argument
Returns
error function of z

Definition at line 474 of file erf_complex.F.

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

Variable Documentation

◆ zero

real(kind=dp), parameter erf_complex::zero = 0.0_dp

Definition at line 57 of file erf_complex.F.

◆ one

real(kind=dp), parameter erf_complex::one = 1.0_dp

Definition at line 57 of file erf_complex.F.

◆ two

real(kind=dp), parameter erf_complex::two = 2.0_dp

Definition at line 57 of file erf_complex.F.

◆ half

real(kind=dp), parameter erf_complex::half = 0.5_dp

Definition at line 57 of file erf_complex.F.

◆ rmin

real(kind=dp), parameter erf_complex::rmin = TINY(one)

Definition at line 57 of file erf_complex.F.

◆ eps0

real(kind=dp), parameter erf_complex::eps0 = EPSILON(one)

Definition at line 57 of file erf_complex.F.

◆ sqrt_log_rmin

real(kind=dp), parameter erf_complex::sqrt_log_rmin = SQRT(-LOG(rmin))

Definition at line 57 of file erf_complex.F.

◆ pi2

real(kind=dp), parameter erf_complex::pi2 = pi*pi

Definition at line 57 of file erf_complex.F.

◆ one_sqrt_pi

real(kind=dp), parameter erf_complex::one_sqrt_pi = one/SQRT(pi)

Definition at line 57 of file erf_complex.F.

◆ cmplxj

complex(kind=dp), parameter erf_complex::cmplxj = CMPLX(zero, one, kind=dp)

Definition at line 61 of file erf_complex.F.

◆ cmplx0

complex(kind=dp), parameter erf_complex::cmplx0 = CMPLX(zero, zero, kind=dp)

Definition at line 61 of file erf_complex.F.