MP-Gadget
5.0.1.dev1-76bc7d4726-dirty
|
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stddef.h>
#include <mpi.h>
#include <gsl/gsl_integration.h>
#include <gsl/gsl_interp.h>
#include <bigfile-mpi.h>
#include <libgadget/cosmology.h>
#include <libgadget/utils.h>
#include <libgadget/physconst.h>
#include "power.h"
#include "proto.h"
Go to the source code of this file.
Classes | |
struct | table |
Macros | |
#define | NUGGET 1e-30 |
#define | MAXCOLS 9 |
Typedefs | |
typedef void(* | _parse_fn) (int i, double k, char *line, struct table *, int *InputInLog10, const double InitTime, int NumCol) |
Functions | |
static double | Delta_EH (double k) |
static double | Delta_Tabulated (double k, enum TransferType Type) |
static double | sigma2_int (double k, void *params) |
static double | TopHatSigma2 (double R) |
static double | tk_eh (double k) |
double | DeltaSpec (double k, enum TransferType Type) |
static double | get_Tabulated (double k, enum TransferType Type, double oobval) |
double | dlogGrowth (double kmag, enum TransferType Type) |
static void | save_transfer (BigFile *bf, int ncol, struct table *ttable, const char *bname, int ThisTask, const char *colnames[]) |
void | save_all_transfer_tables (BigFile *bf, int ThisTask) |
void | parse_power (int i, double k, char *line, struct table *out_tab, int *InputInLog10, const double InitTime, int NumCol) |
void | parse_transfer (int i, double k, char *line, struct table *out_tab, int *InputInLog10, const double InitTime, int NumCol) |
void | read_power_table (int ThisTask, const char *inputfile, const int ncols, struct table *out_tab, const double InitTime, _parse_fn parse_line) |
int | init_transfer_table (int ThisTask, double InitTime, const struct power_params *const ppar) |
int | init_powerspectrum (int ThisTask, double InitTime, double UnitLength_in_cm_in, Cosmology *CPin, struct power_params *ppar) |
Variables | |
static double | Norm |
static int | WhichSpectrum |
static double | PrimordialIndex |
static double | UnitLength_in_cm |
static Cosmology * | CP |
static struct table | power_table |
static struct table | transfer_table |
static const char * | tnames [MAXCOLS] = {"DELTA_BAR", "DELTA_CDM", "DELTA_NU", "DELTA_CB", "VEL_BAR", "VEL_CDM", "VEL_NU", "VEL_CB", "VEL_TOT"} |
typedef void(* _parse_fn) (int i, double k, char *line, struct table *, int *InputInLog10, const double InitTime, int NumCol) |
|
static |
Definition at line 432 of file power.c.
References PrimordialIndex, and tk_eh().
Referenced by DeltaSpec().
|
static |
Definition at line 93 of file power.c.
References endrun(), get_Tabulated(), VEL_BAR, and VEL_TOT.
Referenced by DeltaSpec().
double DeltaSpec | ( | double | k, |
enum TransferType | Type | ||
) |
Definition at line 52 of file power.c.
References Delta_EH(), Delta_Tabulated(), Norm, and WhichSpectrum.
Referenced by density_transfer(), disp_transfer(), print_spec(), sigma2_int(), test_growth_numerical(), test_read_no_rescale(), and test_read_rescale_sigma8().
double dlogGrowth | ( | double | kmag, |
enum TransferType | Type | ||
) |
Definition at line 101 of file power.c.
References DELTA_BAR, DELTA_CB, get_Tabulated(), VEL_BAR, and VEL_TOT.
Referenced by disp_transfer(), and test_growth_numerical().
|
static |
Definition at line 69 of file power.c.
References CM_PER_MPC, DELTA_BAR, DELTA_TOT, endrun(), table::logD, table::logk, table::mat_intp, table::Nentry, NUGGET, power_table, transfer_table, and UnitLength_in_cm.
Referenced by Delta_Tabulated(), and dlogGrowth().
int init_powerspectrum | ( | int | ThisTask, |
double | InitTime, | ||
double | UnitLength_in_cm_in, | ||
Cosmology * | CPin, | ||
struct power_params * | ppar | ||
) |
Definition at line 394 of file power.c.
References CM_PER_MPC, CP, power_params::DifferentTransferFunctions, endrun(), power_params::FileWithInputSpectrum, GrowthFactor(), init_transfer_table(), power_params::InputPowerRedshift, table::logD, table::logk, table::mat_intp, message(), table::Nentry, Norm, parse_power(), power_table, PrimordialIndex, power_params::PrimordialIndex, read_power_table(), power_params::ScaleDepVelocity, power_params::Sigma8, ThisTask, TopHatSigma2(), transfer_table, UnitLength_in_cm, WhichSpectrum, and power_params::WhichSpectrum.
Referenced by main(), test_growth_numerical(), test_read_no_rescale(), and test_read_rescale_sigma8().
int init_transfer_table | ( | int | ThisTask, |
double | InitTime, | ||
const struct power_params *const | ppar | ||
) |
Definition at line 322 of file power.c.
References CP, DELTA_BAR, DELTA_CB, DELTA_CDM, DELTA_NU, endrun(), power_params::FileWithTransferFunction, get_omega_nu(), Cosmology::Hubble, hubble_function(), Cosmology::HubbleParam, LIGHTCGS, table::logD, table::logk, table::mat_intp, MAXCOLS, message(), Cosmology::MNu, table::Nentry, Cosmology::OmegaBaryon, Cosmology::OmegaCDM, Cosmology::ONu, parse_transfer(), power_table, read_power_table(), ThisTask, transfer_table, VEL_BAR, VEL_CB, VEL_CDM, VEL_NU, and VEL_TOT.
Referenced by init_powerspectrum().
void parse_power | ( | int | i, |
double | k, | ||
char * | line, | ||
struct table * | out_tab, | ||
int * | InputInLog10, | ||
const double | InitTime, | ||
int | NumCol | ||
) |
Definition at line 158 of file power.c.
References endrun(), table::logD, table::logk, message(), and NUGGET.
Referenced by init_powerspectrum().
void parse_transfer | ( | int | i, |
double | k, | ||
char * | line, | ||
struct table * | out_tab, | ||
int * | InputInLog10, | ||
const double | InitTime, | ||
int | NumCol | ||
) |
Definition at line 180 of file power.c.
References CP, DELTA_BAR, DELTA_CDM, DELTA_NU, endrun(), get_omega_nu(), table::logD, table::logk, myfree, mymalloc, omega_nu_single(), Cosmology::ONu, VEL_BAR, VEL_CDM, and VEL_NU.
Referenced by init_transfer_table().
void read_power_table | ( | int | ThisTask, |
const char * | inputfile, | ||
const int | ncols, | ||
struct table * | out_tab, | ||
const double | InitTime, | ||
_parse_fn | parse_line | ||
) |
Definition at line 238 of file power.c.
References endrun(), table::logD, table::logk, table::mat_intp, message(), mymalloc, table::Nentry, and ThisTask.
Referenced by init_powerspectrum(), and init_transfer_table().
void save_all_transfer_tables | ( | BigFile * | bf, |
int | ThisTask | ||
) |
Definition at line 150 of file power.c.
References MAXCOLS, power_table, save_transfer(), ThisTask, tnames, and transfer_table.
Referenced by main().
|
static |
Definition at line 113 of file power.c.
References _bigfile_utils_create_block_from_c_array(), endrun(), table::logD, table::logk, table::Nentry, and ThisTask.
Referenced by save_all_transfer_tables().
|
static |
Definition at line 486 of file power.c.
References DELTA_TOT, and DeltaSpec().
Referenced by TopHatSigma2().
|
static |
Definition at line 438 of file power.c.
References CM_PER_MPC, CP, Cosmology::HubbleParam, Cosmology::Omega0, Cosmology::OmegaBaryon, and UnitLength_in_cm.
Referenced by Delta_EH().
|
static |
Definition at line 470 of file power.c.
References sigma2_int().
Referenced by init_powerspectrum().
|
static |
Definition at line 27 of file power.c.
Referenced by apply_half_kick(), apply_PM_half_kick(), atime_integ(), atime_to_myr(), blackhole(), blackhole_accretion_postprocess(), check_density_entropy(), check_omega(), check_units(), compute_mass(), cooling_and_starformation(), delta_nu_from_power(), density(), displacement_fields(), do_density_test(), do_force_test(), do_heiii_reionization(), drift_all_particles(), drift_integ(), dump_snapshot(), exact_drift_factor(), F_Omega(), find_timesteps(), fof_save_groups(), fof_save_particles(), fof_write_header(), force_tree_build(), fslength(), fslength_int(), get_delta_nu(), get_delta_nu_combined(), get_exact_drift_factor(), get_exact_factor(), get_exact_gravkick_factor(), get_exact_hydrokick_factor(), get_long_range_timestep_dloga(), get_PM_timestep_ti(), gravkick_integ(), gravpm_force(), growth(), growth_ode(), GrowthFactor(), hubble_function(), hybrid_nu_tracer(), hydro_force(), hydrokick_integ(), init(), init_cooling(), init_cooling_and_star_formation(), init_cooling_rates(), init_cosmology(), init_powerspectrum(), init_transfer_table(), kernel(), lightcone_compute(), lightcone_init(), lightcone_init_entry(), main(), metal_return(), metal_return_init(), OmegaFLD(), parse_transfer(), petaio_read_header_internal(), petaio_read_snapshot(), petaio_save_snapshot(), petaio_write_header(), print_spec(), read_parameterfile(), run_gravity_test(), saveheader(), setup_cosmology(), setup_density_indep_entropy(), setup_smoothinglengths(), test_cosmology(), test_DoCooling(), test_drift_factor(), test_fslength(), test_growth_numerical(), test_heatingcooling_rate(), test_rate_network(), test_read_no_rescale(), test_read_rescale_sigma8(), test_recomb_rates(), test_uvbg_loader(), tk_eh(), turn_on_quasars(), and write_checkpoint().
|
static |
Definition at line 22 of file power.c.
Referenced by DeltaSpec(), and init_powerspectrum().
|
static |
Definition at line 43 of file power.c.
Referenced by get_Tabulated(), init_powerspectrum(), init_transfer_table(), and save_all_transfer_tables().
|
static |
Definition at line 25 of file power.c.
Referenced by Delta_EH(), and init_powerspectrum().
|
static |
Definition at line 50 of file power.c.
Referenced by save_all_transfer_tables().
|
static |
Definition at line 43 of file power.c.
Referenced by get_Tabulated(), init_powerspectrum(), init_transfer_table(), and save_all_transfer_tables().
|
static |
Definition at line 26 of file power.c.
Referenced by get_local_UVBG(), get_Tabulated(), glass_evolve(), gravpm_force(), init_neutrinos_lra(), init_powerspectrum(), lightcone_init(), lightcone_init_entry(), setup_glass(), test_DoCooling(), test_heatingcooling_rate(), and tk_eh().
|
static |
Definition at line 23 of file power.c.
Referenced by DeltaSpec(), and init_powerspectrum().