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

#include <asymptotic_extrapolation.h>

Public Member Functions

 AsymptoticExtrapolation (const double *k, const double *source, int n, int stride, int power)
 
double operator() (double k) const
 

Static Public Attributes

static constexpr double kFitRange = 3.
 

Detailed Description

Continuation of a perturbation source past the last wavenumber of its table.

Deep inside the horizon in matter domination, the density contrast grows as ln k with a 1/k correction, and the potentials follow it through the Poisson equation (k^2 phi ~ delta). So s(k) k^power = A ln k + B + C/k, with power 0 for a density and 2 for a potential. A and C are fitted by least squares to the table points with k in [k_max/3, k_max), and B so that the continuation passes through the last point: it joins the table without a step. Fitted at k_max = 1.8/Mpc, it reproduces solved modes to 0.2% up to 40/Mpc (docs/superpowers/specs/2026-10-21-lensing-source-extrapolation-design.md).

With one point in the fitting range it fits the ln k slope only; with none it is constant.

Constructor & Destructor Documentation

◆ AsymptoticExtrapolation()

AsymptoticExtrapolation::AsymptoticExtrapolation ( const double *  k,
const double *  source,
int  n,
int  stride,
int  power 
)
Parameters
kincreasing wavenumbers of the table, k[0..n-1]
sourcethe source at k[i] is source[i * stride]
nnumber of table points
stridedistance between consecutive k in source
power0 for a density, 2 for a potential

Member Function Documentation

◆ operator()()

double AsymptoticExtrapolation::operator() ( double  k) const

The continued source at k (meant for k >= the last k of the table).

Field Documentation

◆ kFitRange

constexpr double AsymptoticExtrapolation::kFitRange = 3.
staticconstexpr

The fit uses the table points with k in [k_max / kFitRange, k_max).


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