CLASSpp Manual
Cosmology reference and developer manual
Loading...
Searching...
No Matches
ncdm_interacting_species.h
1
#ifndef NCDM_INTERACTING_SPECIES_H
2
#define NCDM_INTERACTING_SPECIES_H
3
4
#include <string_view>
5
6
#include "ncdm_species.h"
7
#include "species/species_build_context.h"
8
9
class
NCDMInteractingSpecies :
public
NCDMSpecies {
10
public
:
18
bool
SupportsExplicitPerturbationEvolver()
const override
{
19
return
G_eff_ <= 0. && NCDMSpecies::SupportsExplicitPerturbationEvolver();
20
}
21
29
bool
PrefersExponentialPerturbationEvolver()
const override
{
30
return
G_eff_ > 0.;
31
}
32
static
constexpr
std::string_view kTypeName =
"ncdm_self_interacting"
;
33
34
// New input path: parameters read from PFC under <instance_name>.<field>
35
NCDMInteractingSpecies(
FileContent
* pfc,
36
const
std::string& instance_name,
37
const
NcdmSettings& settings,
38
const
background* pba,
39
const
BackgroundModule* bgm);
40
41
// Factory method to read N_ncdm_interacting and create instances
42
static
std::vector<Named> CreateAll(
const
SpeciesBuildContext
& ctx);
43
44
double
FitIntegralOfl(
double
z)
const
;
45
46
// Layout-based PerturbDerivs: runs NCDMSpecies hierarchy + collision terms.
47
void
PerturbDerivs(
const
BaseSpecies::PerturbLayout
& layout,
48
double
tau,
49
const
double
* y,
50
double
* dy,
51
const
perturb_parameters_and_workspace
& ppaw)
const override
;
52
55
void
PerturbDerivsDiagonal(
const
BaseSpecies::PerturbLayout
& layout,
56
double
tau,
57
const
double
* y,
58
double
* diag,
59
const
perturb_parameters_and_workspace
& ppaw)
const override
;
60
63
double
CollisionRate(
double
a,
double
a_prime_over_a)
const
;
65
double
AlphaHierarchy(
int
l)
const
;
67
double
AlphaFluid()
const
;
68
69
private
:
70
double
G_eff_ = 0.0;
71
bool
use_alpha_correction_ =
false
;
72
};
73
74
#endif
// NCDM_INTERACTING_SPECIES_H
FileContent
Definition
parser.h:23
BaseSpecies::PerturbLayout
Definition
base_species.h:106
SpeciesBuildContext
Definition
species_build_context.h:58
perturb_parameters_and_workspace
Definition
perturbations_module.h:380
species
ncdm_interacting_species.h
Generated by
1.9.8