Recombination Module Source file:recfast

Dependencies

Subroutines
  • EnsureRecfastStorage(Calc, target_nz, OK)
    • RecombinationData intent(inout)  :: Calc
    • integer intent(in) :: target_nz
    • logical intent(out) :: OK
  • EscapeProbabilityAndDerivative(tau, p_escape, dp_dtau)
    • real(dl) intent(in) :: tau
    • real(dl) intent(out) :: p_escape
    • real(dl) intent(out) :: dp_dtau
  • EvaluateRecfastODE(this, Ndim, z, y, f, force_full_hydrogen, jacobian)
    • TRecfast target  :: this
    • integer intent(in) :: Ndim
    • real(dl) intent(in) :: z
    • real(dl) intent(in) :: y(Ndim)
    • real(dl) intent(out) :: f(Ndim)
    • logical intent(in), optional :: force_full_hydrogen
    • real(dl) intent(out), optional :: jacobian(Ndim, Ndim)
  • EvaluateRecfastODETimeDerivative(this, Ndim, z, y, h, f0, f_t)
    One-sided difference in z of the full smooth (force_full_hydrogen) system, reusing the already-computed f0 = f(z, y)
    • TRecfast target  :: this
    • integer intent(in) :: Ndim
    • real(dl) intent(in) :: z
    • real(dl) intent(in) :: y(Ndim)
    • real(dl) intent(in) :: h
    • real(dl) intent(in) :: f0(Ndim)
    • real(dl) intent(out) :: f_t(Ndim)
  • FactorSmallLinearSystem(a, ipiv, ok)
    In-place LU factorization with partial pivoting; multipliers stored below the diagonal
    • real(dl) intent(inout) :: a(:, :)
    • integer intent(out) :: ipiv(:)
    • logical intent(out) :: ok
  • get_init(Calc, z, x0, x_H0, x_He0)
    Set up the initial conditions so it will work for general, but not pathological choices of zstart Initial ionization fraction using Saha for relevant species
    • RecombinationData   :: Calc
    • real(dl)  :: z
    • real(dl)  :: x0
    • real(dl)  :: x_H0
    • real(dl)  :: x_He0
  • ION(this, Ndim, z, y, f)
    • TRecfast target  :: this
    • integer  :: Ndim
    • real(dl)  :: z
    • real(dl)  :: y(Ndim)
    • real(dl)  :: f(Ndim)
  • RecfastROS2Step(this, z, y, h, f, f_t, jac, yout, yerr, ok)
    • TRecfast target  :: this
    • real(dl) intent(in) :: z
    • real(dl) intent(in) :: y(:)
    • real(dl) intent(in) :: h
    • real(dl) intent(in) :: f(:)
    • real(dl) intent(in) :: f_t(:)
    • real(dl) intent(in) :: jac(:, :)
    • real(dl) intent(out) :: yout(:)
    • real(dl) intent(out) :: yerr(:)
    • logical intent(out) :: ok
  • RecfastRosenbrockAdvance(this, zstart, zend, tol, y, ok)
    • TRecfast target  :: this
    • real(dl) intent(in) :: zstart
    • real(dl) intent(in) :: zend
    • real(dl) intent(in) :: tol
    • real(dl) intent(inout) :: y(:)
    • logical intent(out) :: ok
  • SolveFactoredSmallLinearSystem(a, rhs, ipiv, solution, ok)
    Forward/back substitution using the output of FactorSmallLinearSystem
    • real(dl) intent(in) :: a(:, :)
    • real(dl) intent(in) :: rhs(:)
    • integer intent(in) :: ipiv(:)
    • real(dl) intent(out) :: solution(:)
    • logical intent(out) :: ok
Functions
  • logical
    RecfastRosenbrockStateOK(y)
    • real(dl) intent(in) :: y(:)