|
CLASSpp Manual
Cosmology reference and developer manual
|
#include <nede_species.h>
Inheritance diagram for NEDESpecies:Public Member Functions | |
| double | GetOmega0 () const override |
| std::optional< double > | GetParam (const std::string &name) const override |
| void | SetBackgroundModule (const BackgroundModule *bgm) override |
| void | RegisterBackgroundIndices (int &index_bg) override |
| void | RegisterIntegrationIndices (int &index_bi) override |
| void | SetBackgroundInitialConditions (const BackgroundICContext &ctx) 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 *pvecback_B, const double *pvecback) const override |
| void | WriteBackgroundColumnTitles (BackgroundColumnWriter &w) const override |
| void | WriteBackgroundData (const double *pvecback, BackgroundColumnWriter &w) const override |
| int | ApproximationCount () const override |
| bool | SupportsNewtonianGauge () const override |
| int | ApproximationRegimeAt (int which, double k, const double *pvecback) const override |
| std::unique_ptr< BaseSpecies::PerturbLayout > | CreatePerturbLayout () const override |
| void | PerturbDerivs (const BaseSpecies::PerturbLayout &base, double tau, const double *y, double *dy, const perturb_parameters_and_workspace &ppaw) const override |
| void | CopyPerturbationsAcrossSwitch (const BaseSpecies::PerturbLayout &old_base, const BaseSpecies::PerturbLayout &new_base, const double *old_y, double *new_y, const PerturbSwitchContext &ctx) const override |
| StressEnergyContribution | StressEnergy (const BaseSpecies::PerturbLayout &base, const perturb_vector *pv, const double *y, const double *pvecback, const perturb_workspace *ppw) const override |
Public Member Functions inherited from BaseSpecies | |
| virtual void | SetThermodynamicsModule (const ThermodynamicsModule *) |
| virtual void | SetPerturbs (const perturbs *) |
| virtual void | BackgroundDerivsDiagonal (double tau, const double *y, double *diag, const double *pvecback) |
| virtual void | FinalizeBackground (double a, double H, const double *pvecback_B, double *pvecback) |
| virtual bool | IsFreestreaming () const |
| virtual double | FreestreamingRho (const double *pvecback) const |
| bool | IsPresent () const |
| int | bg_rho_index () const |
| virtual void | ProcessBackgroundTable (const double *, int, int, const double *) |
| virtual void | RegisterTransferSourceIndices (int &, const SourceRequestContext &) |
| virtual void | PerturbDerivsDiagonal (const PerturbLayout &, double, const double *, double *, const perturb_parameters_and_workspace &) const |
| 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 | ApplyTensorInitialConditions (const PerturbLayout &, double *, double, const double *) 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 &, const PerturbLayout *, double, const double *, const PerturbationsModule &, const perturb_workspace *) const |
| virtual void | FillSources (const PerturbLayout &, const double *, const double *, PerturbSourceContext &) const |
| virtual void | ApplyInitialConditions (const PerturbLayout &, double *, const PerturbIcContext &) |
| int | ApproximationRegime (const perturb_workspace *ppw, int which=0) const |
| int | ApproximationRegimeBefore (const PerturbSwitchContext &ctx, int which=0) const |
| virtual bool | SupportsIsocurvatureInitialConditions () const |
| virtual double | RhoPrimeOverRho (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 | BackgroundDensityOverH0Sq (double a, double H0) const |
| virtual double | GetRadiationOmega0 () const |
| virtual double | DarkRadiationRhoToday (const double *) const |
| virtual double | NeutrinoOmega0 () const |
| virtual double | NeffContribution (double) const |
| virtual void | PrintNeffInfo () const |
| virtual void | PrintMassInfo () const |
| virtual void | PrintBackgroundDetails (const double *, double) const |
| virtual double | TensorMasslessRelativisticRho (const double *) const |
| virtual double | DeviationFromRadiation (const double *) const |
| virtual std::vector< double > | FreeStreamingWavenumbers () const |
| virtual void | WarnIfNonlinearUnreliable (double) const |
| virtual std::optional< double > | ChildOmega0 (const std::string &) 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 |
| virtual double | NonClusteringOmega0 () const |
| virtual double | ColdMatterRho (const double *pvecback) const |
| virtual double | ColdMatterOmega0 () const |
| virtual bool | HasNcdm () const |
| virtual double | SourceSamplingRate (const double *) const |
| virtual int | MaxMultipole (const precision *, bool) const |
| virtual bool | SupportsExplicitPerturbationEvolver () const |
| virtual bool | PrefersExponentialPerturbationEvolver () const |
| virtual bool | SupportsExponentialPerturbationEvolver () 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 |
Cold New Early Dark Energy (Niedermann & Sloth, arXiv:1910.10739 and 2006.06686; the NEDE model of the H0 Olympics, arXiv:2107.10291 sec. 2.4.5), following TriggerCLASS.
A vacuum energy decays in a first-order phase transition once the expansion rate falls to H_* = H_over_m_NEDE m_NEDE, where m_NEDE is the mass of a subdominant trigger field:
a < a_*: rho = f_NEDE H_*^2, w = -1 a >= a_*: rho = f_NEDE H_*^2 (a_* / a)^{3(1+w_NEDE)}, w = c_s^2 = w_NEDE
f_NEDE is NEDE's share of the total density at the transition, where rho_tot = H_*^2.
NEDE has no perturbations before the transition and a fluid's delta and theta after it, so it owns an approximation with these two regimes. Before the transition the trigger's delta_phi is evolved instead. The transition happens on a surface of constant trigger field, and the junction conditions of 2006.06686 seed the fluid from it:
delta = -3 (1+w) aH delta_phi/phi', theta = k^2 delta_phi/phi', shear = 0.
The trigger's potential m^2 phi^2/2 makes its equations linear, so delta_phi/phi' does not depend on the field's amplitude: the trigger is a clock rather than a component. It is left out of the energy budget and frozen after the transition. Synchronous gauge only.
|
overridevirtual |
Returns the species' contribution to Omega0 (used for budget closure during construction). For composites, this defaults to summing children. For decay-product species starting at zero, override returning 0.
Implements BaseSpecies.
|
overridevirtual |
Generic species-param accessor for the Python wrapper layer and cross-module readers that don't want to downcast. Each species may opt in by overriding this and returning the named param; default is std::nullopt.
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 |
Set initial conditions for ODE-integrated background variables.
| ctx | Background initial-condition context (a_ini, rho_rad, and the integration vector to fill). |
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.
|
overridevirtual |
Energy density at current background state.
Implements BaseSpecies.
|
overridevirtual |
Pressure at current background state.
Implements BaseSpecies.
|
overridevirtual |
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 |
Write this species' background column titles into writer. Called by BackgroundModule::background_output_titles(). Default: no-op (species with no background output need not override).
Reimplemented from BaseSpecies.
|
overridevirtual |
Write this species' background data values into writer. pvecback is the full background vector at the current time step. Called by BackgroundModule::background_output_data(). Default: no-op.
Reimplemented from BaseSpecies.
|
inlineoverridevirtual |
How many approximations this species owns. Default 0.
Reimplemented from BaseSpecies.
|
inlineoverridevirtual |
The trigger equation lacks the Newtonian metric terms.
Reimplemented from BaseSpecies.
|
overridevirtual |
The regime of approximation which for wavenumber k at the time of pvecback.
Reimplemented from BaseSpecies.
|
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.
|
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 |
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.
|
overridevirtual |
All scalar stress-energy perturbations in one call.
Implements BaseSpecies.