CAMBmain Module Source file:cmbmain


This code evolves the linearized perturbation equations of general relativity,
the Boltzmann equations and the fluid equations for perturbations
of a Friedmann-Robertson-Walker universe with a supplied system of gauge-dependent equation
in a modules called GaugeInterface.  The sources for the line of sight integral are
computed at sampled times during the evolution for various of wavenumbers. The sources
are then interpolated to a denser wavenumber sampling for computing the line of
sight integrals of the form Integral d(conformal time) source_k * bessel_k_l.
For flat models the bessel functions are interpolated from a pre-computed table, for
non-flat models the hyperspherical Bessel functions are computed by integrating their
differential equation. Both phases ('Evolution' and 'Integration') can do separate
wavenumbers in parallel.


The time variable is conformal  time dtau=dt/a(t) and the spatial dependence is Fourier transformed
with q=sqrt(k**2 + (|m|+1)K), comoving distances are x=r/a(t), with a(t)=1 today.
The units of both length and time are Mpc.


Many elements are part of derived types (to make thread safe or to allow non-sequential code use
CP = CAMB parameters
EV = Time evolution variables
IV = Source integration variables
CT = Cl transfer data
MT = matter transfer data



Classes

Dependencies

Subroutines
  • CalcLimberScalCls(CTrans)
  • CalcScalarSources(EV, taustart)
  • CalcScalCls(CTrans)
  • CalcScalCls2(CTrans)
    Calculate C_ll' for non-isotropic models Run with l_sample_boost=50 to get every l not used in normal CAMB
  • CalcTensCls(CTrans, GetInitPowers)
  • CalcTensorSources(EV, taustart)
  • CalcVecCls(CTrans, GetInitPowers)
  • CalcVectorSources(EV, taustart)
  • ClTransferToCl(State)
  • DoFlatIntegration(IV, ThisCT, llmax)
  • DoRangeInt(IV, l, nstart, nend, nu, dtau, chi, chiDisp, y1, y2, out)
    Non-flat version returns chi at end of integral (where integral stops, not neccessarily end) This subroutine integrates the source*ujl for steps nstart to nend It calculates ujl by integrating a second order differential equation from initial values. dtau is the spacing of the timesteps (they must be equally spaced)
    • IntegrationVars   :: IV
    • integer  :: l
    • integer  :: nstart
    • integer  :: nend
    • real(dl)  :: nu
    • real(dl)  :: dtau
    • real(dl)  :: chi
    • real(dl)  :: chiDisp
    • real(dl)  :: y1
    • real(dl)  :: y2
    • real(dl)  :: out(ThisSources%SourceNum)
  • DoRangeIntTensor(IV, l, nstart, nend, nu, dtau, chi, chiDisp, y1, y2, out)
    It calculates ujl by integrating a second order differential equation from initial values for calculating ujl. nstart and nend are the starting and finishing values of the integration. dtau is the spacing of the timesteps (they must be equally spaced)
    • IntegrationVars target  :: IV
    • integer  :: l
    • integer  :: nstart
    • integer  :: nend
    • real(dl)  :: nu
    • real(dl)  :: dtau
    • real(dl)  :: chi
    • real(dl)  :: chiDisp
    • real(dl)  :: y1
    • real(dl)  :: y2
    • real(dl)  :: out(ThisSources%SourceNum)
  • DoSourceIntegration(IV, ThisCT)
    for particular wave number q
  • DoSourcek(q_ix, EV)
  • GetInitPowerArrayTens(numks, pows, ks)
    • integer intent(in) :: numks
    • real(dl)  :: pows(numks)
    • real(dl)  :: ks(numks)
  • GetInitPowerArrayVec(numks, pows, ks)
    • integer intent(in) :: numks
    • real(dl)  :: pows(numks)
    • real(dl)  :: ks(numks)
  • GetLimberTransfers(ThisCT)
  • GetTransfer(EV, tau)
  • InitVars(state)
  • IntegrateSourcesBessels(IV, ThisCT, l, j, nu)
  • IntegrationVars_Init(IV)
  • InterpolateCls()
  • InterpolateSources(IV)
  • SetClosedkValuesFromArr(R, forInt)
    • TRanges intent(inout) :: R
    • logical intent(in) :: forInt
  • SetkValuesForInt(ThisCT)
  • SourceToTransfers(ThisCT, q_ix)
  • TimeSourcesToCl(ThisCT)
Functions
  • real(dl)
    GetTauStart(q)
    • real(dl) intent(IN) :: q
  • logical
    UseLimber(l)
    Calculate lensing potential power using Limber rather than j_l integration even when sources calculated as part of temperature calculation (Limber better on small scales unless step sizes made much smaller) This affects speed, esp. of non-flat case
    • integer  :: l