CLASSpp Manual
Cosmology reference and developer manual
Loading...
Searching...
No Matches
DNCDMInvSpecies Class Reference

#include <dncdm_inv_species.h>

+ Inheritance diagram for DNCDMInvSpecies:

Data Structures

struct  Scratch
 

Public Member Functions

bool HasNcdm () const override
 
double KappaStoredToBare () const
 
void SetBackgroundModule (const BackgroundModule *bgm) override
 
void BackgroundDerivs (double tau, const double *y, double *dy, const double *pvecback) override
 
void BackgroundDerivsDiagonal (double tau, const double *y, double *diag, const double *pvecback) override
 
void ApplyKernelBackgroundDerivs (double a, const double *y, double *dy, double a_prime_over_a=0.)
 
void WriteBackgroundColumnTitles (BackgroundColumnWriter &w) const override
 
void WriteBackgroundData (const double *pvecback, BackgroundColumnWriter &w) const override
 
void AddCouplingDerivs (double tau, const double *y, double *dy, const perturb_parameters_and_workspace &ppaw) const override
 
void ApplyKernelPerturbDerivs (double a, int l_max_col, const double *pvecback, const NCDMBaseSpecies::PerturbLayout &p_lay, const NCDMBaseSpecies::PerturbLayout &f_lay, const NCDMBaseSpecies::PerturbLayout &b_lay, const double *y, double *dy, Scratch &scratch, double k=0.) const
 
void ApplyKernelPerturbDiagonal (double a, int l_max_col, const double *pvecback, const NCDMBaseSpecies::PerturbLayout &p_lay, const NCDMBaseSpecies::PerturbLayout &f_lay, const NCDMBaseSpecies::PerturbLayout &b_lay, double *diag, Scratch &scratch) const
 
void PerturbDerivsDiagonal (const BaseSpecies::PerturbLayout &layout, double tau, const double *y, double *diag, const perturb_parameters_and_workspace &ppaw) const override
 
void ProcessBackgroundTable (const double *background_table, int n_rows, int row_stride, const double *z_table) override
 
void set_reduced_moments (int n)
 
bool reduced () const
 
void set_table_max_dlna (double dlna)
 
bool tabulated () const
 
void PrintVariables (PerturbColumnWriter &writer, const BaseSpecies::PerturbLayout *base, double tau, const double *y, const PerturbationsModule &mod, const perturb_workspace *ppw) const override
 
const std::vector< double > & KernelDfBgH (const Scratch &scratch) const
 
DecayTransitionKernel::Moments ConservationMoments (double a, const double *dy) const
 
double ClampedEnergyResidual () const
 
double SplitEnergyResidual () const
 
double SplitEnergyResidualPert (const Scratch &scratch) const
 
double ClampedEnergyResidualPert (const Scratch &scratch) const
 
- Public Member Functions inherited from DNCDMSector
double GetOmega0 () const override
 
- Public Member Functions inherited from CompositeSpecies
std::unique_ptr< BaseSpecies::PerturbLayout > CreatePerturbLayout () const override
 
void ApplyInitialConditions (const BaseSpecies::PerturbLayout &base, double *y, const PerturbIcContext &ctx) override
 
StressEnergyContribution StressEnergy (const BaseSpecies::PerturbLayout &base, const perturb_vector *pv, const double *y, const double *pvecback, const perturb_workspace *ppw) const override
 
void PerturbDerivs (const BaseSpecies::PerturbLayout &base, double tau, const double *y, double *dy, const perturb_parameters_and_workspace &ppaw) const override
 
void FillSources (const BaseSpecies::PerturbLayout &base, const double *y, const double *dy, PerturbSourceContext &ctx) const override
 
void WriteOutputColumns (PerturbColumnWriter &writer, const PerturbationsModule &mod, file_format fmt, TransferColumnSection section=TransferColumnSection::all) const override
 
void PerturbSynchronousToNewtonian (const BaseSpecies::PerturbLayout &base, double *y, const PerturbIcContext &ctx) 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
 
void RegisterBackgroundIndices (int &index_bg) override
 
void RegisterIntegrationIndices (int &index_bi) override
 
void RegisterTransferSourceIndices (int &index_tp, const SourceRequestContext &ctx) override
 
void AppendBudgetLines (const double *pvecback_today, double rho_crit, std::vector< BudgetLine > &out) const
 
bool SupportsExplicitPerturbationEvolver () const override
 
int MaxMultipole (const precision *ppr, bool tensors) const override
 
bool PrefersExponentialPerturbationEvolver () const override
 
bool SupportsExponentialPerturbationEvolver () const override
 
double GetRadiationOmega0 () const override
 
double DarkRadiationRhoToday (const double *pvecback_integration) const override
 
double NeutrinoOmega0 () const override
 
double NeffContribution (double z) const override
 
void PrintNeffInfo () const override
 
void PrintMassInfo () const override
 
void PrintBackgroundDetails (const double *pvecback_today, double rho_crit_today) const override
 
double TensorMasslessRelativisticRho (const double *pvecback) const override
 
double DeviationFromRadiation (const double *pvecback) const override
 
void WarnIfNonlinearUnreliable (double m_ev_threshold) const override
 
std::vector< double > FreeStreamingWavenumbers () const override
 
std::optional< double > ChildOmega0 (const std::string &name) const override
 
double BackgroundAIni (double a_proposed, double tol) const override
 
void SetThermodynamicsModule (const ThermodynamicsModule *thm) override
 
void SetPerturbs (const perturbs *ppt) override
 
void SetBackgroundInitialConditions (const BackgroundICContext &ctx) override
 
void ComputeBackground (double a, const double *pvecback_B, double *pvecback) override
 
void FinalizeBackground (double a, double H, const double *pvecback_B, 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
 
double FreestreamingRho (const double *pvecback) const override
 
bool ClustersAsMatter () const override
 
bool IsColdMatterSpecies () const override
 
bool HasWarmMatter () const override
 
double NonClusteringOmega0 () const override
 
double ColdMatterRho (const double *pvecback) const override
 
double ColdMatterOmega0 () const override
 
void FinalizeMatterClassification () override
 
- Public Member Functions inherited from BaseSpecies
virtual std::optional< double > GetParam (const std::string &) const
 
virtual bool IsFreestreaming () const
 
bool IsPresent () const
 
int bg_rho_index () 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 int ApproximationCount () const
 
virtual int ApproximationRegimeAt (int, double, const double *) const
 
int ApproximationRegime (const perturb_workspace *ppw, int which=0) const
 
int ApproximationRegimeBefore (const PerturbSwitchContext &ctx, int which=0) const
 
virtual bool SupportsNewtonianGauge () const
 
virtual bool SupportsIsocurvatureInitialConditions () const
 
virtual double RhoPrimeOverRho (const double *pvecback, double a_prime_over_a) const
 
virtual void MarkUsedInSources (const PerturbLayout &, const perturb_workspace *, int *) const
 
virtual double BackgroundDensityOverH0Sq (double a, double H0) const
 
bool ClustersAsMatterCached () const
 
virtual double SourceSamplingRate (const double *) const
 

Static Public Member Functions

static Named Create (std::unique_ptr< DNCDMSpecies > parent, const SpeciesBuildContext &ctx)
 

Static Public Attributes

static constexpr double kTableMaxDlnaDefault = 7e-3
 
static constexpr double kTableDefaultValidatedTo = 1e9
 

Protected Member Functions

double DaughtersInitialRadiationOmega0 (double H0) const override
 
bool HasInverseDecays () const override
 
- Protected Member Functions inherited from BaseSpecies
void ApplyFluidLikeNewtonianShift (double *y, int idx_delta, int idx_theta, const double *pvecback, const PerturbIcContext &ctx) const
 

Additional Inherited Members

- Public Types inherited from BaseSpecies
enum class  EnergyType
 

Detailed Description

DNCDMInvSpecies: the ν_H ↔ ν_l + φ composite (arXiv:2011.01502; design §5). Owns a collision-owned parent DNCDMSpecies (ν_H), a fermion DrPsdSpecies (ν_l), a boson DrPsdSpecies (φ), and DecayTransitionKernels that derive all three background derivatives (and the per-ℓ collision operator) from ONE discrete transition network each, so number/energy conservation and detailed balance hold on the grid to machine precision. TWO kernel instances, one per daughter-grid resolution: the background network on the daughters' fine grid, the perturbation network on their coarse dr_bg_refine-subsample. Only the BACKGROUND kernel is a member; the perturbation ones live per-k in Scratch (thread safety). Both read the daughters' background occupations at FULL resolution; only the deposit/hierarchy grid is coarsened (DecayTransitionKernel's ctor doc says why that distinction is not optional).

All three species carry the unnormalized F = δf as their perturbation variable (#386). The parent used to carry the normalized Ψ_H, which divides by an f̄_H that decays without bound and made high-Γ runs unintegrable.

The parent keeps ownership of its PSD (grid, ComputeMomenta, perturbation hierarchy); the composite only supplies its background RHS by writing the kernel source into the parent's f-slots in BackgroundDerivs — the same seam DCDM_WDM_Species uses. With inverse decays OFF the factory builds DNCDM_DR_Species instead, so the decay-only path is untouched.

Children order (the child_layouts contract, #358): kParent=0, kFermion=1, kBoson=2. Synchronous gauge only; no tensors, no fluid approximation for the coupled trio (all guarded at Create). The parent must be a single momentum grid (q_size == q_size_bg), also guarded at Create.

Member Function Documentation

◆ HasNcdm()

bool DNCDMInvSpecies::HasNcdm ( ) const
inlineoverridevirtual

Parent and both daughters are momentum-resolved NCDM hierarchies.

Reimplemented from BaseSpecies.

◆ Create()

Named DNCDMInvSpecies::Create ( std::unique_ptr< DNCDMSpecies >  parent,
const SpeciesBuildContext &  ctx 
)
static

Build the composite from a pre-built parent (from DNCDMSpecies::CreateAll). Reads inverse_decays / quantum_statistics / dr_* keys off the parent's instance; applies the input-time guards; constructs the two daughters and the kernel. Called by DNCDM_DR_Species::CreateAll when inverse_decays=yes.

◆ KappaStoredToBare()

double DNCDMInvSpecies::KappaStoredToBare ( ) const
inline

Kernel-boundary conversion (#385, occupation-suppression convention): bare-occupation = kappa * stored-occupation (parent leg only; the daughters already store bare occupation). g_H = 2 (design's parent spin dof). Reads GetDeg() LIVE at every call — shooting updates deg_H between iterations, so this must never be cached across a background/perturbation RHS. Public: the tests use it (dncdm_inv_test.cpp's perturbation-conservation reconstruction).

◆ SetBackgroundModule()

void DNCDMInvSpecies::SetBackgroundModule ( const BackgroundModule *  )
overridevirtual

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 CompositeSpecies.

◆ BackgroundDerivs()

void DNCDMInvSpecies::BackgroundDerivs ( double  tau,
const double *  y,
double *  dy,
const double *  pvecback 
)
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 CompositeSpecies.

◆ BackgroundDerivsDiagonal()

void DNCDMInvSpecies::BackgroundDerivsDiagonal ( double  tau,
const double *  y,
double *  diag,
const double *  pvecback 
)
overridevirtual

The collision's per-bin self-coupling, for the exponential evolver. This is the stiff part of the whole background system: diag_H -> -a*Gamma, which is what sets rkdp45's step (h*lambda = 3.0 against a stability radius of 3.3) for the ~90% of the run that happens after the parent is extinct.

Reimplemented from CompositeSpecies.

◆ ApplyKernelBackgroundDerivs()

void DNCDMInvSpecies::ApplyKernelBackgroundDerivs ( double  a,
const double *  y,
double *  dy,
double  a_prime_over_a = 0. 
)

Writes the kernel background source into the parent+daughter f-slots of dy. Split out of BackgroundDerivs so it can be driven with an explicit a in the conservation unit test (which has no BackgroundModule to read a from).

◆ WriteBackgroundColumnTitles()

void DNCDMInvSpecies::WriteBackgroundColumnTitles ( BackgroundColumnWriter &  ) const
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.

◆ WriteBackgroundData()

void DNCDMInvSpecies::WriteBackgroundData ( const double *  ,
BackgroundColumnWriter &   
) const
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.

◆ AddCouplingDerivs()

void DNCDMInvSpecies::AddCouplingDerivs ( double  tau,
const double *  y,
double *  dy,
const perturb_parameters_and_workspace &  ppaw 
) const
overridevirtual

Runs after each child's free-streaming PerturbDerivs (CompositeSpecies two- phase contract). Adds the kernel per-ℓ collision operator (ℓ ≤ l_max_dncdm_col). All THREE species evolve the unnormalized F = δf (#386), so the operator output is used verbatim and no −(f̄̇/f̄)Ψ dilution term appears anywhere: in F-space it cancels structurally. Synchronous, scalar only.

Reimplemented from CompositeSpecies.

◆ ApplyKernelPerturbDerivs()

void DNCDMInvSpecies::ApplyKernelPerturbDerivs ( double  a,
int  l_max_col,
const double *  pvecback,
const NCDMBaseSpecies::PerturbLayout &  p_lay,
const NCDMBaseSpecies::PerturbLayout &  f_lay,
const NCDMBaseSpecies::PerturbLayout &  b_lay,
const double *  y,
double *  dy,
Scratch &  scratch,
double  k = 0. 
) const

Pure worker behind AddCouplingDerivs: gathers the background PSDs from the interpolated columns in pvecback, runs the kernel once, and scatters the collision + background-evolution terms into dy. Split out (like ApplyKernelBackgroundDerivs) so the identity test can drive it with explicit layouts and a hand-built pvecback (no perturb_workspace). l_max_col already clamped to the children's l_max by the caller.

◆ ApplyKernelPerturbDiagonal()

void DNCDMInvSpecies::ApplyKernelPerturbDiagonal ( double  a,
int  l_max_col,
const double *  pvecback,
const NCDMBaseSpecies::PerturbLayout &  p_lay,
const NCDMBaseSpecies::PerturbLayout &  f_lay,
const NCDMBaseSpecies::PerturbLayout &  b_lay,
double *  diag,
Scratch &  scratch 
) const

Same split as ApplyKernelPerturbDerivs, for the Jacobian diagonal: gathers the background PSDs from pvecback, runs ONE kernel pass, and writes each bin's d(dy_i)/d(y_i) into every l slot of that bin.

The diagonal is l-INDEPENDENT (pinned in decay_kernel_test): the parent's loss is a same-bin local term with no angular factor, and the daughters' loss was lumped so it couples a bin only to itself. One CollisionDiagonal call therefore serves the whole hierarchy.

Public for the same reason as the derivs worker: the test drives it with explicit layouts and a hand-built pvecback, with no perturb_workspace.

◆ PerturbDerivsDiagonal()

void DNCDMInvSpecies::PerturbDerivsDiagonal ( const BaseSpecies::PerturbLayout &  ,
double  ,
const double *  ,
double *  ,
const perturb_parameters_and_workspace &   
) const
overridevirtual

The same for the scalar perturbation ODE; see BackgroundDerivsDiagonal for the accumulate contract, the zero default and the wrong-sign warning, which apply verbatim here.

Reimplemented from CompositeSpecies.

◆ ProcessBackgroundTable()

void DNCDMInvSpecies::ProcessBackgroundTable ( const double *  background_table,
int  n_rows,
int  row_stride,
const double *  z_table 
)
overridevirtual

Builds the frozen reduced basis, and the tabulated operator when both are asked for, once the background table exists (BaseSpecies hook). No-op in the exact scheme (dr_reduced_moments = 0).

Reimplemented from BaseSpecies.

◆ set_reduced_moments()

void DNCDMInvSpecies::set_reduced_moments ( int  n)
inline

dr_reduced_moments: carry N q-moments per daughter instead of the full grid. 0 (default) leaves the exact scheme untouched in every respect.

◆ reduced()

bool DNCDMInvSpecies::reduced ( ) const
inline

True once the frozen basis exists. Both conditions matter: the key can be set before ProcessBackgroundTable has run, and the perturbation RHS must not consult a basis that is not there yet.

◆ set_table_max_dlna()

void DNCDMInvSpecies::set_table_max_dlna ( double  dlna)
inline

dr_table_max_dlna: see kTableMaxDlnaDefault for the measured sizing rule and for why this is an input rather than a law evaluated from Gamma.

◆ tabulated()

bool DNCDMInvSpecies::tabulated ( ) const
inline

True once the tabulated operator exists and may be used on the hot path.

The table is built whenever the reduction is on. The matrix-free path survives only as the fallback for the cases where the table cannot serve a request — a hierarchy asking for more multipoles than were tabulated, and a background on which the collision is never active enough to bound a window.

⚠ MEMORY. One row is (l_max+1)·S² doubles — ~110 KB at S = 28 and 18 multipoles — and the window holds ~2000 background rows at Γ = 10⁷, so ~220 MB. That is one run's worth; it is NOT free to run 32 MCMC chains on a node. Thinning it by striding the rows was measured to save no wall time at all while costing 4.1e-3 → 5.4e-1 in C_ℓ^TT across Γ = 10⁸→10¹⁰, so the row spacing is not the lever to pull — dr_N_q is.

◆ PrintVariables()

void DNCDMInvSpecies::PrintVariables ( PerturbColumnWriter &  writer,
const BaseSpecies::PerturbLayout *  base,
double  tau,
const double *  y,
const PerturbationsModule &  mod,
const perturb_workspace *  ppw 
) const
overridevirtual

k_output_values time series: the sector's total anisotropic stress a⁴Π_νφ ≡ a⁴·Σ_{i∈{H,l,φ}} (ρ̄_i+p̄_i)σ_i (paper/thesis eq. 6.19), plus its per-child decomposition. Composite-owned like Type3Species::PrintVariables: the children carry no valid collection_index_, so their layouts are reached through THIS composite's nested layout.

Reimplemented from CompositeSpecies.

◆ KernelDfBgH()

const std::vector< double > & DNCDMInvSpecies::KernelDfBgH ( const Scratch &  scratch) const
inline

The parent's cached PERTURBATION-kernel background PSD rate f̄̇_H from the last ApplyKernelPerturbDerivs. Every species' Δdy is now already its F-space rate, so this is not needed to reconstruct one; what the test uses it for is the representation-independent decay-only statement, that pure decay leaves Ψ = F/f̄ invariant because dF/F equals f̄̇/f̄ bin by bin. Reads the PT kernel, not the background one: the comparison only holds against the same discrete network the ℓ-operator linearizes.

◆ ConservationMoments()

DecayTransitionKernel::Moments DNCDMInvSpecies::ConservationMoments ( double  a,
const double *  dy 
) const

Bare kernel moments of the derivs currently held in dy (read from the parent+daughter f-slots). The Fable-review conservation identities are N_H+N_l=0, 2N_H+N_phi=0, 2E_H+2E_l+E_phi=0 (×2 boson dof folded into df_phi). Precondition: dy's PARENT leg must be in STORED units (i.e. exactly what ApplyKernelBackgroundDerivs writes back, /kappa'd) — this method internally re-scales a scratch copy by kappa (#385) before handing it to the kernel, which itself only ever works in bare units; the daughter legs need no such conversion, they are already bare.

◆ ClampedEnergyResidual()

double DNCDMInvSpecies::ClampedEnergyResidual ( ) const
inline

Off-grid energy clamped by the BACKGROUND kernel (fine daughter grids).

◆ SplitEnergyResidual()

double DNCDMInvSpecies::SplitEnergyResidual ( ) const
inline

Energy the BACKGROUND kernel's lumped daughter loss deliberately misplaces, in the same bare units ConservationMoments returns, so that 2 E_H + 2 E_l + E_phi == SplitEnergyResidual() to machine precision. See DecayTransitionKernel::split_energy_residual() for why it is not zero.

◆ SplitEnergyResidualPert()

double DNCDMInvSpecies::SplitEnergyResidualPert ( const Scratch &  scratch) const
inline

Energy / momentum the PERTURBATION kernel's lumped daughter loss misplaces, so that 2eH+2el+ephi and 2momH+2moml+momphi close. Reset by PrepareTransitions, so both survive a full l = 0,1,2,... sweep.

◆ ClampedEnergyResidualPert()

double DNCDMInvSpecies::ClampedEnergyResidualPert ( const Scratch &  scratch) const
inline

Off-grid energy clamped by the PERTURBATION kernel (coarse daughter grids). Separate from the background one: the two kernels hold independent scratch, so after ApplyKernelPerturbDerivs only THIS one is fresh.

◆ DaughtersInitialRadiationOmega0()

double DNCDMInvSpecies::DaughtersInitialRadiationOmega0 ( double  H0) const
overrideprotectedvirtual

The daughters' initial populations as free radiation today, a^4 rho / H0^2. 0 when they start empty.

Implements DNCDMSector.

◆ HasInverseDecays()

bool DNCDMInvSpecies::HasInverseDecays ( ) const
inlineoverrideprotectedvirtual

Whether inverse decays hold the parent at chemical equilibrium (the high-Gamma seed).

Implements DNCDMSector.

Field Documentation

◆ kTableMaxDlnaDefault

constexpr double DNCDMInvSpecies::kTableMaxDlnaDefault = 7e-3
staticconstexpr

dr_table_max_dlna: largest ln-a step the tabulated operator may be interpolated across. The table owns this; it is NOT back_integration_stepsize, which is what the row spacing used to be and which this species neither owns nor can see.

⚠ THE DEFAULT IS VALIDATED ONLY TO Gamma = 1e9. It is a fixed spacing while the requirement grows with Gamma, so above that it must be set explicitly. Left at the default it does not fail, it degrades: measured C_2^TT against the Gamma-independent 1.481e-10, m = 0.3, six-moment Galerkin –

Gamma   1e9    1e9.5   1e10   1e10.5   1e11    1e11.5    1e12
err    -0.1%   -0.7%   -2.4%   -7.9%  -30.1%   +506%   +4e10%

and the run reports nothing, because the identities the kernel asserts are number identities that a mis-interpolated operator still satisfies.

WHY THIS IS AN INPUT AND NOT A LAW IN THE CODE. Deriving it from Gamma internally would be one line, and it is deliberately not done: this model has several knobs whose requirement grows with Gamma (dr_N_q and the daughter grid above all), a cell costs hundreds of core-hours, and a caller who has not been made to think about one of them has not been made to think about the others either. An explicit key also gives the convergence test a handle – halve it and the pair brackets the answer – which a hidden law does not have. Set it from the campaign's own sizing rule, the way dr_N_q already is.

THE MEASURED REQUIREMENT. The operator is interpolated linearly, so its error is O(h^2) in the realised spacing h = dlna_row / n_sub:

err(Gamma, m, n_sub) = A(m) (Gamma/1e11)^1.10 / n_sub^2,
A(0.30 eV) = 0.295,  A(0.06 eV) = 0.868

fitted to the n_sub = 1 ladder above and validated against an independent sweep in n_sub at fixed Gamma, which it reproduces to ~30% wherever the error is small enough for the h^2 law to hold at all (0.083% predicted / 0.1% observed at Gamma = 3.16e10, n_sub = 10; 0.295% / 0.3% at 1e11, n_sub = 10; 0.074% / 0.1% at 1e11, n_sub = 20). Since the sub-division drives the realised spacing to this key, the error is err = A(m) (Gamma/1e11)^1.10 (h/h_ref)^2 and a target error eps wants

dr_table_max_dlna = h_ref * sqrt(eps / (A(m) (Gamma/1e11)^1.10)),  h_ref = 7.0e-3

⚠ h_ref is the spacing the fit was CALIBRATED at – the realised spacing when n_sub came out 1 on a 7e-3 background grid – and NOT back_integration_stepsize. They are the same number today, and that is a coincidence of this campaign rather than a coupling: the requirement is a property of how fast the operator varies in ln a, so halving back_integration_stepsize should leave this key alone and halve n_sub instead. That decoupling is the reason the key exists; do not put the background's own stepsize back into the sizing rule.

Equivalently n_sub ~ Gamma^0.55, NOT the Gamma^0.60 an earlier estimate quoted – that one read its index off a point already in the runaway, where O(h^2) does not apply. A(m) is two masses and one interpolation, so treat it as calibrated on [0.06, 0.3] eV and nowhere else.

7e-3 is where the answer is converged at LOW Gamma, not merely where it stops moving: at Gamma = 1e6, m = 0.3 the C_2^TT it gives agrees with a 32x finer grid to 7e-5 relative. The cell that needs even that is the fastest-varying one, Gamma = 1e9 / m = 0.06, which reads max|phi| = 101 against 0.4734 correct when the table simply inherits the 0.07 default and 0.4734 once it sub-divides to this.

◆ kTableDefaultValidatedTo

constexpr double DNCDMInvSpecies::kTableDefaultValidatedTo = 1e9
staticconstexpr

Largest Gamma at which kTableMaxDlnaDefault has been measured to hold the table error below the six-moment closure floor. Used only to decide whether to WARN that the key was left unset; nothing scales with it.


The documentation for this class was generated from the following files: