|
CLASSpp Manual
Cosmology reference and developer manual
|
#include <dark_radiation_species.h>
Inheritance diagram for DarkRadiationSpecies:Public Member Functions | |
| std::unique_ptr< BaseSpecies::PerturbLayout > | CreatePerturbLayout () const override |
| double | GetOmega0 () const override |
| bool | IsFreestreaming () const override |
| void | SetBackgroundModule (const BackgroundModule *bgm) override |
| void | RegisterBackgroundIndices (int &index_bg) override |
| void | RegisterIntegrationIndices (int &index_bi) override |
| void | ComputeBackground (double a, const double *pvecback_B, double *pvecback) override |
| void | BackgroundDerivs (double tau, const double *y, double *dy, const double *pvecback) override |
| double | Rho (const double *pvecback) const override |
| double | P (const double *pvecback) const override |
| double | PPrime (double a, double H, const double *, const double *pvecback) const override |
| void | PerturbDerivs (const BaseSpecies::PerturbLayout &layout, double tau, const double *y, double *dy, const perturb_parameters_and_workspace &ppaw) const override |
| StressEnergyContribution | StressEnergy (const BaseSpecies::PerturbLayout &layout, const perturb_vector *pv, const double *y, const double *pvecback, const perturb_workspace *ppw) const override |
| void | ApplyInitialConditions (const BaseSpecies::PerturbLayout &layout, double *y, const PerturbIcContext &ctx) override |
| void | PerturbNewtonianReseed (const PerturbLayout &layout, double *y, const PerturbIcContext &ctx, double decay_corr) const |
| void | CopyPerturbationsAcrossSwitch (const BaseSpecies::PerturbLayout &old_layout, const BaseSpecies::PerturbLayout &new_layout, const double *old_y, double *new_y, const PerturbSwitchContext &ctx) const override |
| double | DarkRadiationRhoToday (const double *pvecback_integration) const override |
| void | RegisterTransferSourceIndices (int &index_tp, const SourceRequestContext &ctx) override |
Public Member Functions inherited from BaseSpecies | |
| virtual void | SetThermodynamicsModule (const ThermodynamicsModule *) |
| virtual void | SetPerturbs (const perturbs *) |
| virtual std::optional< double > | GetParam (const std::string &) const |
| virtual void | SetBackgroundInitialConditions (const BackgroundICContext &ctx) |
| virtual void | FinalizeBackground (double a, double H, const double *pvecback_B, double *pvecback) |
| virtual double | FreestreamingRho (const double *pvecback) const |
| bool | IsPresent () const |
| virtual void | WriteBackgroundColumnTitles (BackgroundColumnWriter &) const |
| virtual void | WriteBackgroundData (const double *, BackgroundColumnWriter &) const |
| virtual void | ProcessBackgroundTable (const double *, int, int, const double *) |
| virtual void | PerturbVectorDerivs (const PerturbLayout &, double, const double *, double *, const perturb_parameters_and_workspace &) const |
| virtual void | PerturbTensorDerivs (const PerturbLayout &, double, const double *, double *, const perturb_parameters_and_workspace &) const |
| virtual void | WriteTensorOutputColumnTitles (std::string &) const |
| virtual void | ContributeTensorGwSource (const PerturbLayout &, double, const double *, perturb_workspace *) const |
| virtual void | WriteOutputColumns (PerturbColumnWriter &, const PerturbationsModule &, file_format, TransferColumnSection=TransferColumnSection::all) const |
| virtual void | PrintVariables (PerturbColumnWriter &, double, const double *, const PerturbationsModule &, const perturb_workspace *) const |
| virtual void | FillSources (const PerturbLayout &, const double *, const double *, PerturbSourceContext &) const |
| virtual double | RhoDotOverRho (const double *pvecback, double a_prime_over_a) const |
| virtual void | PerturbSynchronousToNewtonian (const PerturbLayout &, double *, const PerturbIcContext &) |
| virtual void | MarkUsedInSources (const PerturbLayout &, const perturb_workspace *, int *) const |
| virtual double | GetRadiationOmega0 () const |
| virtual double | NeutrinoOmega0 () const |
| virtual double | NeffContribution (double) const |
| virtual void | PrintNeffInfo () const |
| virtual void | PrintMassInfo () const |
| virtual double | TensorMasslessRelativisticRho (const double *) const |
| virtual void | CheckUltraRelativisticAtIc (const double *, double) const |
| virtual bool | IsUltraRelativisticAtIc (const double *, double) const |
| virtual void | WarnIfTooHeavyForHalofit (double) const |
| virtual double | BackgroundAIni (double a_proposed, double) const |
| bool | ClustersAsMatterCached () const |
| virtual void | FinalizeMatterClassification () |
| virtual bool | ClustersAsMatter () const |
| virtual bool | IsColdMatterSpecies () const |
| virtual bool | HasWarmMatter () const |
Additional Inherited Members | |
Public Types inherited from BaseSpecies | |
| enum class | EnergyType |
Protected Member Functions inherited from BaseSpecies | |
| void | ApplyFluidLikeNewtonianShift (double *y, int idx_delta, int idx_theta, const double *pvecback, const PerturbIcContext &ctx) const |
Dark Radiation: a single, self-contained free-streaming decay-radiation channel.
One instance == one decay channel. A composite that emits N decay-radiation products simply owns N instances (DR is not shared between channels). The decay source is injected by the parent composite (in BackgroundDerivs / AddCouplingDerivs); this species only carries dilution + the free-streaming Boltzmann hierarchy.
|
inlineoverridevirtual |
Produce a fresh layout for this species. Called once per pv during perturb_vector_init, before Register*PerturbationIndices. Default: empty base PerturbLayout (suitable for species with no perturbation slots, or as a placeholder during migration).
Reimplemented from BaseSpecies.
|
inlineoverridevirtual |
Decay product: no direct Omega0 input, starts at zero.
Implements BaseSpecies.
|
inlineoverridevirtual |
True for species that are free-streaming and massless at IC time (deep radiation domination). Used to accumulate rho_nu / fracnu in perturbation IC setup. Static at construction time. Default: false.
Reimplemented from BaseSpecies.
|
inlineoverridevirtual |
Called by BackgroundModule after construction to provide access to its indices (index_bg_a_, index_bg_H_, etc.) and background state. Species that need it override this; default is no-op.
Reimplemented from BaseSpecies.
|
overridevirtual |
Claim consecutive slots in pvecback. Called once during background_indices(). Implementation must assign index_bg_rho_ (and any other needed indices) and increment index_bg accordingly.
Implements BaseSpecies.
|
overridevirtual |
Claim slots in the ODE integration vector y. Called during background_indices(). Default: no integrated variables (analytic species do not need this).
Reimplemented from BaseSpecies.
|
overridevirtual |
Compute species background quantities at scale factor a. pvecback_B is the current ODE integration vector. Write density (and any other owned quantities) into pvecback.
Implements BaseSpecies.
|
overridevirtual |
Contribute to dy/dtau for species with ODE-integrated background variables. pvecback already contains all evaluated background quantities. Default: nothing (species with analytic rho(a) don't override this).
Reimplemented from BaseSpecies.
|
inlineoverridevirtual |
Energy density at current background state.
Implements BaseSpecies.
|
inlineoverridevirtual |
Pressure at current background state.
Implements BaseSpecies.
|
inlineoverridevirtual |
Post-Friedmann. This species' conformal-time pressure derivative p' (a' / a = a*H). pvecback_B is the ODE state (IN); pvecback is fully populated through H. Default 0 (matter / Lambda).
Reimplemented from BaseSpecies.
|
overridevirtual |
Contribute to dy for the scalar perturbation ODE at conformal time tau. The PerturbScalarContext inside ppaw->ppw has pre-computed metric terms, cross-species state (delta_g, theta_g, theta_b, ...), and approximation flags. The layout is this species' PerturbLayout slot (ppw->pv->species_layouts[i]); composites receive their own layout and pass nested sub-layouts to children.
Implements BaseSpecies.
|
overridevirtual |
DR perturbation variables F_l follow the convention of astro-ph/9907388: delta_rho_dr = rho_dr * F0 / f, where f = rho_dr * a^4 / H0^2 so delta_rho_dr = (H0/a^2)^2 * F0 = rho_dr_over_f * F0.
Implements BaseSpecies.
|
overridevirtual |
Write synchronous-gauge initial conditions for this species into y[]. y[] == ppw->pv->y. The module pre-computes ctx.delta_g_ic, ctx.delta_ur, etc. Guard each IC type: if (ctx.index_ic == ctx.p_mod->index_ic_ad_) { ... } Newtonian gauge transformation is handled by the module after this loop. Default: no-op.
Reimplemented from BaseSpecies.
| void DarkRadiationSpecies::PerturbNewtonianReseed | ( | const PerturbLayout & | layout, |
| double * | y, | ||
| const PerturbIcContext & | ctx, | ||
| double | decay_corr | ||
| ) | const |
Re-seed the DR multipole hierarchy from the gauge-shifted IC. decay_corr is supplied by the owning composite (= aΓ·ρ_parent/ρ_dr; 0 when ρ_dr == 0).
|
overridevirtual |
Copy perturbation state from one layout to another across an approximation switch. Called when the perturbation vector is reallocated (e.g., NCDM FA collapse from full Boltzmann hierarchy to fluid variables delta/theta/shear). Default: no-op. Most species have no approximation switches.
Reimplemented from BaseSpecies.
|
inlineoverridevirtual |
Dark-radiation energy density today, read from the integrated background vector. Default 0; DarkRadiationSpecies returns its own; composites sum.
Reimplemented from BaseSpecies.
|
overridevirtual |
Register this species' transfer-source (index_tp) slots. Set once in perturb_indices_of_perturbs() before the k-loop; mirrors RegisterBackgroundIndices (k-independent, cached in a plain species member). Takes no PerturbLayout — that absence marks it as non-per-k state. Default: no-op (species that emit no transfer functions).
Reimplemented from BaseSpecies.