Multidip
1.0
Multi-photon matrix elements
|
Special functions and objects used by MULTIDIP. More...
Data Types | |
interface | coulfg |
interface | couln |
interface | cphaz |
interface | decay |
interface | dgemm |
interface | dgemv |
interface | zgemv |
interface | zgetrf |
interface | zgetri |
interface | zgetrs |
Functions/Subroutines | |
subroutine | calculate_S_matrix (Km, Sm, nopen) |
Calculate S-matrix from K-matrix. More... | |
subroutine | scatAk (rmatr, eig, etot, w, Ek, l, Km, Ak) |
Photoionization coefficient. More... | |
real(wp) function | cphase (l, k) |
Coulomb phase. More... | |
subroutine | coul (l, Ek, r, F, Fp, G, Gp) |
Coulomb functions. More... | |
subroutine | coul_gsl (l, Ek, r, F, Fp, G, Gp) |
Coulomb functions (GSL) More... | |
subroutine | coul_ukrmol (l, Ek, r, F, Fp, G, Gp) |
Coulomb functions (UKRmol) More... | |
subroutine | invert_matrix (T) |
Invert a complex matrix. More... | |
subroutine | solve_complex_system (n, A, X, Y) |
Solve system of equations with complex matrix. More... | |
logical function | next_permutation (p) |
Construct or advance permutation. More... | |
subroutine | swap (a, b) |
Exchange value of two integers. More... | |
subroutine | reverse (a) |
Reverse order of elements in array. More... | |
subroutine | kahan_add (X, dX, err) |
Compensated summation. More... | |
Variables | |
real(wp), parameter | rzero = 0 |
real(wp), parameter | rone = 1 |
Special functions and objects used by MULTIDIP.
subroutine multidip_special::calculate_S_matrix | ( | real(wp), dimension(:, :), intent(in) | Km, |
complex(wp), dimension(:, :), intent(inout), allocatable | Sm, | ||
integer, intent(in) | nopen | ||
) |
Calculate S-matrix from K-matrix.
Obtain the S-matrix from the definition formula
Definition at line 187 of file multidip_special.F90.
subroutine multidip_special::coul | ( | integer, intent(in) | l, |
real(wp), intent(in) | Ek, | ||
real(wp), intent(in) | r, | ||
real(wp), intent(inout) | F, | ||
real(wp), intent(inout) | Fp, | ||
real(wp), intent(inout) | G, | ||
real(wp), intent(inout) | Gp | ||
) |
Coulomb functions.
Evaluate the Coulomb wave (regular, irregular and derivatives). Uses GSL or the UKRmol-out library, depending on the configuration. For negative energies, evaluates the exponentially decreasing solution (into G and Gp) obtained from the Whittaker function (if charged) or from solution of the appropriate equation (if neutral).
The derivatives returned are with respect to 'r' already, so they should not be multiplied by the additional factor of 'k'.
Definition at line 315 of file multidip_special.F90.
subroutine multidip_special::coul_gsl | ( | integer, intent(in) | l, |
real(wp), intent(in) | Ek, | ||
real(wp), intent(in) | r, | ||
real(wp), intent(inout) | F, | ||
real(wp), intent(inout) | Fp, | ||
real(wp), intent(inout) | G, | ||
real(wp), intent(inout) | Gp | ||
) |
Coulomb functions (GSL)
Coulomb functions (positive- and negative-energy) calculated using GSL.
Definition at line 335 of file multidip_special.F90.
subroutine multidip_special::coul_ukrmol | ( | integer, intent(in) | l, |
real(wp), intent(in) | Ek, | ||
real(wp), intent(in) | r, | ||
real(wp), intent(inout) | F, | ||
real(wp), intent(inout) | Fp, | ||
real(wp), intent(inout) | G, | ||
real(wp), intent(inout) | Gp | ||
) |
Coulomb functions (UKRmol)
Coulomb functions (positive- and negative-energy) calculated using UKRmol-out.
Definition at line 383 of file multidip_special.F90.
real(wp) function multidip_special::cphase | ( | integer, intent(in) | l, |
real(wp), intent(in) | k | ||
) |
Coulomb phase.
Return the Coulomb phase, arg Gamma(l + 1 - i/k). Uses GSL or the UKRmol-out library, depending on the configuration.
Definition at line 283 of file multidip_special.F90.
subroutine multidip_special::invert_matrix | ( | complex(wp), dimension(:, :), intent(inout), allocatable | T | ) |
Invert a complex matrix.
Calculate inverse of a complex matrix. Use the standard LAPACK decompose+solve sequence.
Definition at line 421 of file multidip_special.F90.
subroutine multidip_special::kahan_add | ( | complex(wp), intent(inout) | X, |
complex(wp), intent(in) | dX, | ||
complex(wp), intent(inout) | err | ||
) |
Compensated summation.
Add dX to X, keep track of numerical error. Uses Kahan's algorithm. This subroutine is in infinite precision equivalent to just
but in the finite precision arithmetic it compensates the running numerical error. It mustn't be optimized away by the compiler! Flags like -ffast-math
or -Ofast
are detrimental here. Common optimization flags like -O2
or -O3
should be safe (but it may depend on the compiler).
Definition at line 599 of file multidip_special.F90.
logical function multidip_special::next_permutation | ( | integer, dimension(:), intent(inout) | p | ) |
Construct or advance permutation.
If the given integer array contains a negative element, fill it with identical permutation (i.e. the sequence 1, 2, ..., N) and return TRUE. Otherwise attempt to generate the "next" permutation of the N values in the manner compatible with C++ std::next_permutation (lexicographically ordered sequences). When no further permutation is possible, return FALSE.
The algorithm is shamelessly copied from the source of GCC's libstdc++ library and (except for the added initialization option) faithfully mimics the behaviour of the built-on C++ function std::next_permutation.
Definition at line 498 of file multidip_special.F90.
subroutine multidip_special::reverse | ( | integer, dimension(:), intent(inout) | a | ) |
Reverse order of elements in array.
This subroutine mimics the behaviour of the built-in C++ function std::reverse.
Definition at line 571 of file multidip_special.F90.
subroutine multidip_special::scatAk | ( | real(wp), intent(in) | rmatr, |
real(wp), dimension(:), intent(in) | eig, | ||
real(wp), intent(in) | etot, | ||
real(wp), dimension(:,:), intent(in) | w, | ||
real(wp), dimension(:), intent(in) | Ek, | ||
integer, dimension(:), intent(in) | l, | ||
real(wp), dimension(:,:), intent(in) | Km, | ||
complex(wp), dimension(:,:), intent(inout), allocatable | Ak | ||
) |
Photoionization coefficient.
Evaluates the wave function coefficient Ak for the final stationary photoionization wave. Ak needs to be allocated to neig x nchan.
Definition at line 221 of file multidip_special.F90.
subroutine multidip_special::solve_complex_system | ( | integer, intent(in) | n, |
complex(wp), dimension(:, :), intent(inout), allocatable | A, | ||
real(wp), dimension(:, :), intent(inout), allocatable | X, | ||
real(wp), dimension(:, :), intent(inout), allocatable | Y | ||
) |
Solve system of equations with complex matrix.
The matrix A is complex. The columns of matrices X and Y correspond to real and imaginary part of the right-hand side and of the solution, respectively.
Definition at line 456 of file multidip_special.F90.
subroutine multidip_special::swap | ( | integer, intent(inout) | a, |
integer, intent(inout) | b | ||
) |
Exchange value of two integers.
This subroutine mimics the behaviour of the built-in C++ function std::swap.
Definition at line 553 of file multidip_special.F90.
real(wp), parameter multidip_special::rone = 1 |
Definition at line 38 of file multidip_special.F90.
real(wp), parameter multidip_special::rzero = 0 |
Definition at line 37 of file multidip_special.F90.