|
CLASSpp Manual
Cosmology reference and developer manual
|
#include <ppf_fluid.h>
Inheritance diagram for PpfFluid:Public Member Functions | |
| std::unique_ptr< BaseSpecies::PerturbLayout > | CreatePerturbLayout () const override |
| void | PerturbDerivs (const BaseSpecies::PerturbLayout &layout, double tau, const double *y, double *dy, const perturb_parameters_and_workspace &ppaw) const override |
| void | FillSources (const BaseSpecies::PerturbLayout &layout, const double *y, const double *dy, PerturbSourceContext &ctx) const override |
| void | PrintVariables (PerturbColumnWriter &writer, double tau, const double *y, const PerturbationsModule &mod, const perturb_workspace *ppw) const override |
| void | CopyPerturbationsAcrossSwitch (const BaseSpecies::PerturbLayout &old_layout, const BaseSpecies::PerturbLayout &new_layout, const double *old_y, double *new_y, const PerturbSwitchContext &ctx) const override |
| void | ComputePpf (double k, double a, double a_prime_over_a, const precision *ppr, const double *y, perturb_workspace *ppw) const |
Public Member Functions inherited from FluidSpecies | |
| double | GetOmega0 () 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 |
| double | W (const double *pvecback) const |
| virtual void | ComputeWFld (double a, double *w_fld, double *dw_over_da_fld, double *integral_fld) const |
| virtual double | Cs2 (double, double) const |
| virtual bool | ReachesPhantomDivide () const |
| virtual bool | HyrecCplApproximation (double *w0, double *wa) const |
| void | RegisterTransferSourceIndices (int &index_tp, const SourceRequestContext &ctx) override |
| void | ApplyInitialConditions (const BaseSpecies::PerturbLayout &layout, double *y, const PerturbIcContext &ctx) override |
| void | PerturbSynchronousToNewtonian (const BaseSpecies::PerturbLayout &layout, double *y, const PerturbIcContext &ctx) override |
| StressEnergyContribution | StressEnergy (const BaseSpecies::PerturbLayout &layout, const perturb_vector *pv, const double *y, const double *pvecback, const perturb_workspace *ppw) const override |
| void | WriteOutputColumns (PerturbColumnWriter &writer, const PerturbationsModule &mod, file_format fmt, TransferColumnSection section=TransferColumnSection::all) const 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 | 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 |
| 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 double | RhoDotOverRho (const double *pvecback, double a_prime_over_a) const |
| virtual void | MarkUsedInSources (const PerturbLayout &, const perturb_workspace *, int *) 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 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 |
PPF (Parametrised Post-Friedmann) dark-energy fluid. Same background as FluidSpecies; the perturbations use the Gamma closure (Hu 0808.3125) instead of delta/theta. At most one PPF fluid may exist (PPF is defined relative to the whole universe).
|
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 FluidSpecies.
|
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.
Reimplemented from FluidSpecies.
|
overridevirtual |
Write per-k, per-tau source values for this species into the source table. Called in perturb_sources_member() after metric/temperature sources are set. Use ctx.p_mod->SetSourceValue(ctx.index_md, ctx.index_ic, ctx.p_mod->index_tp_XXX_, ctx.index_tau, ctx.index_k, value). All addressing (index_md, index_ic, index_k, index_tau) is in ctx. Default: no-op.
Reimplemented from FluidSpecies.
|
overridevirtual |
Append this species' time-evolution variables to writer. Called from perturb_prepare_k_output (title mode, tau=0/y=nullptr/ppw=nullptr) and perturb_print_variables_member (data mode). Guard computation behind: if (!writer.IsTitleMode()) { ... compute ... } Use writer.Add(title, computed_value, active).
Reimplemented from FluidSpecies.
|
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 FluidSpecies.
| void PpfFluid::ComputePpf | ( | double | k, |
| double | a, | ||
| double | a_prime_over_a, | ||
| const precision * | ppr, | ||
| const double * | y, | ||
| perturb_workspace * | ppw | ||
| ) | const |
The equation is too stiff for Runge-Kutta when c_gamma_k_H_square is large. Use the asymptotic solution Gamma=Gamma'=0 in that case.
We must now check the stiffenss criterion again and set Gamma_prime_fld accordingly.
Now construct the pressure perturbation, see 1903.xxxxx.
Construct energy density and pressure for DE (_fld) and the rest (_t). Also compute derivatives.
Compute background quantities X,Y,Z and their derivatives.
Construct theta_t and its derivative from the Euler equation
Analytic derivative of the equation for ppw->rho_plus_p_theta_fld above.
We can finally compute the pressure perturbation using the Euler equation for theta_fld