Module that contains a number of more or less useful numerical routines.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=sp), | public, | parameter | :: | epss | = | 1.0e-5_sp | A single precision constant with a value used to determine convergence of iterative methods. |
real(kind=dp), | public, | parameter | :: | epsd | = | 1.0e-12_dp | A double precision constant with a value used to determine convergence of iterative methods. |
real(kind=qp), | public, | parameter | :: | epsq | = | 1.0e-32_qp | A quad precision constant with a value used to determine convergence of iterative methods. |
integer(kind=ip), | public, | parameter | :: | maxiter | = | 100 | An integer constant with a maximum number of iterations for iterative methods. |
Single precision version of a function that returns the convergence criterium.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp) | :: | real_var | Any single precision variable. |
The single precision convergence criterium.
Double precision version of a function that returns the convergence criterium.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp) | :: | real_var | Any double precision variable. |
The double precision convergence criterium.
Quad precision version of a function that returns the convergence criterium.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=qp) | :: | real_var | Any quad precision variable. |
The quad precision convergence criterium.
Single precision version of a function that returns the convergence criterium.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp) | :: | real_var | Any single precision variable. |
The single precision convergence criterium.
Double precision version of a function that returns the convergence criterium.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp) | :: | real_var | Any double precision variable. |
The double precision convergence criterium.
Quad precision version of a function that returns the convergence criterium.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=qp) | :: | real_var | Any quad precision variable. |
The quad precision convergence criterium.
Function to calculate Lambert's W-function.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | z | The input value. |
The return value Lambert(z).
Function to invert the tortoise radius as a function of Schwarzschild radius.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | z | The tortoise radius to invert, . |
||
real(kind=wp), | intent(in) | :: | mass | The mass of the black hole, . |
The return value is .
Function to invert the tortoise radius as a function of Schwarzschild radius.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | rstar | The tortoise radius to invert, . |
||
real(kind=wp), | intent(in) | :: | mass | The mass of the black hole, . |
The return value is .
Function to calculate the tortoise radius, , as function of the Schwarzschild radius, .
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | r | The schwarzschild radius, . |
||
real(kind=wp), | intent(in) | :: | mass | The mass of the black hole, . |
The return value is .
Function that calculates the higher order terms, in the self-force expansion over .
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=ip), | intent(in) | :: | l | The -value. |
||
integer(kind=ip), | intent(in) | :: | order | The order of the higher order term, . |
The return value is .
Function that calculates the sum of higher order terms, , provided by ldep from to .
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=ip), | intent(in) | :: | lmin | The value of at which to start the sum, . |
||
integer(kind=ip), | intent(in) | :: | order | The order of the higher order term, . |
The return value is .
Function that fits higher order terms to data containing amplitude as function of l-values and corrects the sum over the evolved l-modes with the contribution from the not evolved l-modes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | ydat | A 1d-array containing the amplitudes of the -modes. It is assumed, for now, that the data starts at . |
|
integer(kind=ip), | intent(in) | :: | nmodes | The number of -modes. |
||
integer(kind=ip), | intent(in) | :: | startfit | At what -value should the fit begin. |
||
integer(kind=ip), | intent(in) | :: | endfit | At what -value should the fit end. |
||
integer(kind=ip), | intent(in) | :: | order | What is the lowest order term that should be fitted. |
||
integer(kind=ip), | intent(in) | :: | npar | How many terms should be included in the correction. One more term is included in the fit, but the coefficient for the last fit coefficient is only used as an error estimator. |
A 1d-array of size 3 that on return contains the sum of evolved modes (first entry), the corrected sum (second entry) and the error estimate (third entry).
A simple factorial function. Use only for small values of as no consideration of efficiency has been made.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=ip), | intent(in) | :: | n | The value for which the factorial function should be calculated. |
The return value, .
Routine to calculate the smooth transition function, , and it's first and second derivative with respect to the computational coordinate, .
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | rho | The computational coordinate, , where the transition function should be calculated. Should be between and . |
||
real(kind=wp), | intent(in) | :: | R | The value of where should be . |
||
real(kind=wp), | intent(in) | :: | S | The value of where should be . |
||
real(kind=wp), | intent(out) | :: | fT | On return contains . |
||
real(kind=wp), | intent(out) | :: | fTp | On return contains . |
||
real(kind=wp), | intent(out) | :: | fTpp | On return contains . |
Routine to calculate a smooth "Gaussian" type time window function, and it's first and second time derivative.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | time | The time at which to calculate the time window function, . |
||
real(kind=wp), | intent(in) | :: | tsigma | The width of the time window function, . |
||
integer(kind=ip), | intent(in) | :: | norder | The order of the time window function, . |
||
real(kind=wp), | intent(out) | :: | tfac | On output contains |
||
real(kind=wp), | intent(out) | :: | dtfac_dt | On output contains |
||
real(kind=wp), | intent(out) | :: | d2tfac_dt2 | On output contains |