Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
Extrap_Pk_Nl< T, N > Class Template Reference

: creates Extrapolate object (linear power spectrum) from data and store non-linear parameters call 'operator()(k)' based on k_split (upper range of the linear) More...

#include <core_power.h>

Inheritance diagram for Extrap_Pk_Nl< T, N >:
Collaboration diagram for Extrap_Pk_Nl< T, N >:

Public Member Functions

 Extrap_Pk_Nl (const Data_Vec< T, N > &data, const Sim_Param &sim, T A_nl, T a_eff)
 
double operator() (double k) const
 
- Public Member Functions inherited from Extrap_Pk< T, N >
 Extrap_Pk (const Data_Vec< T, N > &data, const Sim_Param &sim)
 
 Extrap_Pk (const Data_Vec< T, N > &data, const Sim_Param &sim, const size_t m_l, const size_t n_u)
 
 Extrap_Pk (const Data_Vec< T, N > &data, const Sim_Param &sim, const size_t m_l, const size_t n_l, const size_t m_u, const size_t n_u)
 
double operator() (double k) const
 
void fit_lin (const Data_Vec< T, N > &data, const size_t m, const size_t n, double &A)
 
void fit_power_law (const Data_Vec< T, N > &data, const size_t m, const size_t n, double &A, double &n_s)
 
- Public Member Functions inherited from Interp_obj
 Interp_obj ()
 
 ~Interp_obj ()
 
double operator() (double x) const
 
template<typename T , size_t N>
void init (const Data_Vec< T, N > &data)
 

Public Attributes

const T A_nl
 
const T a_eff
 
const T k_split
 
- Public Attributes inherited from Extrap_Pk< T, N >
double A_low
 amplitude of linear power in lower range More...
 
const Cosmo_Paramcosmo
 
double A_up
 
double n_s
 scale-free power spectrum in upper range More...
 
k_min
 
k_max
 interpolation range More...
 
- Public Attributes inherited from Interp_obj
double x_min
 
double x_max
 

Detailed Description

template<typename T, size_t N>
class Extrap_Pk_Nl< T, N >

: creates Extrapolate object (linear power spectrum) from data and store non-linear parameters call 'operator()(k)' based on k_split (upper range of the linear)

Definition at line 146 of file core_power.h.

Constructor & Destructor Documentation

template<typename T , size_t N>
Extrap_Pk_Nl< T, N >::Extrap_Pk_Nl ( const Data_Vec< T, N > &  data,
const Sim_Param sim,
A_nl,
a_eff 
)

Definition at line 646 of file core_power.cpp.

646  :
647  Extrap_Pk<T, N>(data, sim), A_nl(A_nl), a_eff(a_eff), k_split(this->k_max) {}
const T k_split
Definition: core_power.h:150
const T A_nl
Definition: core_power.h:150
T k_max
interpolation range
Definition: core_power.h:137
: linear interpolation of data [k, P(k)] within &#39;useful&#39; range fit to primordial P_i(k) below the &#39;us...
Definition: core_power.h:122
const T a_eff
Definition: core_power.h:150

Member Function Documentation

template<typename T , size_t N>
double Extrap_Pk_Nl< T, N >::operator() ( double  k) const

Definition at line 650 of file core_power.cpp.

References Extrap_Pk_Nl< T, N >::a_eff, Extrap_Pk_Nl< T, N >::A_nl, Extrap_Pk< T, N >::cosmo, Extrap_Pk_Nl< T, N >::k_split, lin_pow_spec(), non_lin_pow_spec(), and Extrap_Pk< T, N >::operator()().

650  {
651  if (k < k_split) return Extrap_Pk<T, N>::operator()(k);
652  else return (1-A_nl)*lin_pow_spec(a_eff, k, this->cosmo) + A_nl*non_lin_pow_spec(a_eff, k, this->cosmo);
653 }
const T k_split
Definition: core_power.h:150
double lin_pow_spec(double a, double k, const Cosmo_Param &cosmo)
Definition: core_power.cpp:474
const T A_nl
Definition: core_power.h:150
double non_lin_pow_spec(double a, double k, const Cosmo_Param &cosmo)
Definition: core_power.cpp:486
double operator()(double k) const
Definition: core_power.cpp:635
const Cosmo_Param & cosmo
Definition: core_power.h:135
const T a_eff
Definition: core_power.h:150

Member Data Documentation

template<typename T , size_t N>
const T Extrap_Pk_Nl< T, N >::a_eff

Definition at line 150 of file core_power.h.

Referenced by Extrap_Pk_Nl< T, N >::operator()().

template<typename T , size_t N>
const T Extrap_Pk_Nl< T, N >::A_nl

Definition at line 150 of file core_power.h.

Referenced by Extrap_Pk_Nl< T, N >::operator()().

template<typename T , size_t N>
const T Extrap_Pk_Nl< T, N >::k_split

Definition at line 150 of file core_power.h.

Referenced by Extrap_Pk_Nl< T, N >::operator()().


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