|
MP-Gadget
5.0.1.dev1-76bc7d4726-dirty
|
#include <bigfile.h>#include <stdint.h>#include "power.h"#include "allvars.h"#include "libgadget/petapm.h"Go to the source code of this file.
Classes | |
| struct | IDGenerator |
Typedefs | |
| typedef struct IDGenerator | IDGenerator |
Functions | |
| void | idgen_init (IDGenerator *idgen, PetaPM *pm, int Ngrid, double BoxSize) |
| uint64_t | idgen_create_id_from_index (IDGenerator *idgen, int index) |
| void | idgen_create_pos_from_index (IDGenerator *idgen, int index, double pos[3]) |
| void | displacement_fields (PetaPM *pm, enum TransferType Type, struct ic_part_data *dispICP, const int NumPart, Cosmology *CP, const struct genic_config GenicConfig) |
| int | setup_grid (IDGenerator *idgen, double shift, double mass, struct ic_part_data *ICP) |
| int | setup_glass (IDGenerator *idgen, PetaPM *pm, double shift, int seed, double mass, struct ic_part_data *ICP, const double UnitLength_in_cm, const char *OutputDir) |
| void | glass_evolve (PetaPM *pm, int nsteps, const char *pkoutname, struct ic_part_data *ICP, const int NumPart, const double UnitLength_in_cm, const char *OutputDir) |
| void | saveheader (BigFile *bf, int64_t TotNumPartCDM, int64_t TotNumPartGas, int64_t TotNuPart, double nufrac, const double BoxSize, Cosmology *CP, const struct genic_config GenicConfig) |
| void | compute_mass (double *mass, int64_t TotNumPartCDM, int64_t TotNumPartGas, int64_t TotNuPart, double nufrac, const double BoxSize, Cosmology *CP, const struct genic_config GenicConfig) |
| void | write_particle_data (IDGenerator *idgen, const int Type, BigFile *bf, const uint64_t FirstID, const int SavePrePos, int NumFiles, int NumWriters, struct ic_part_data *curICP) |
| void | read_parameterfile (char *fname, struct genic_config *GenicConfig, int *ShowBacktrace, double *MaxMemSizePerNode, Cosmology *CP) |
| void | _bigfile_utils_create_block_from_c_array (BigFile *bf, void *baseptr, const char *name, const char *dtype, size_t dims[], ptrdiff_t elsize, int NumFiles, int NumWriters, MPI_Comm comm) |
| typedef struct IDGenerator IDGenerator |
| void _bigfile_utils_create_block_from_c_array | ( | BigFile * | bf, |
| void * | baseptr, | ||
| const char * | name, | ||
| const char * | dtype, | ||
| size_t | dims[], | ||
| ptrdiff_t | elsize, | ||
| int | NumFiles, | ||
| int | NumWriters, | ||
| MPI_Comm | comm | ||
| ) |
Definition at line 18 of file save.c.
References endrun(), MPI_INT64, name, and TotNumPart.
Referenced by save_transfer(), and saveblock().
| void compute_mass | ( | double * | mass, |
| int64_t | TotNumPartCDM, | ||
| int64_t | TotNumPartGas, | ||
| int64_t | TotNuPart, | ||
| double | nufrac, | ||
| const double | BoxSize, | ||
| Cosmology * | CP, | ||
| const struct genic_config | GenicConfig | ||
| ) |
Definition at line 90 of file save.c.
References CP, get_omega_nu(), GRAVITY, Cosmology::Hubble, Cosmology::MNu, Cosmology::Omega0, Cosmology::OmegaBaryon, Cosmology::ONu, UnitSystem::UnitLength_in_cm, UnitSystem::UnitMass_in_g, genic_config::units, and UnitSystem::UnitVelocity_in_cm_per_s.
Referenced by main(), and saveheader().
| void displacement_fields | ( | PetaPM * | pm, |
| enum TransferType | Type, | ||
| struct ic_part_data * | dispICP, | ||
| const int | NumPart, | ||
| Cosmology * | CP, | ||
| const struct genic_config | GenicConfig | ||
| ) |
Definition at line 150 of file zeldovich.c.
References PetaPM::BoxSize, CP, curICP, ic_part_data::Density, density_transfer(), ic_part_data::Disp, disp_x_transfer(), disp_y_transfer(), disp_z_transfer(), F_Omega(), functions, gaussian_fill(), hubble_function(), genic_config::InvertPhase, makeregion(), ic_part_data::Mass, message(), MPIU_Barrier, myfree, PetaPMFunctions::name, PetaPM::Nmesh, ic_prep_data::NumPart, periodic_wrap(), petapm_alloc_rhok(), petapm_force_c2r(), petapm_force_finish(), petapm_force_init(), petapm_get_fourier_region(), ic_part_data::Pos, genic_config::PowerP, ptype, readout_density(), readout_disp_x(), readout_disp_y(), readout_disp_z(), readout_vel_x(), readout_vel_y(), readout_vel_z(), power_params::ScaleDepVelocity, genic_config::Seed, genic_config::TimeIC, genic_config::UnitaryAmplitude, genic_config::UsePeculiarVelocity, ic_part_data::Vel, vel_x_transfer(), vel_y_transfer(), vel_z_transfer(), and walltime_measure.
Referenced by main().
| void glass_evolve | ( | PetaPM * | pm, |
| int | nsteps, | ||
| const char * | pkoutname, | ||
| struct ic_part_data * | ICP, | ||
| const int | NumPart, | ||
| const double | UnitLength_in_cm, | ||
| const char * | OutputDir | ||
| ) |
Definition at line 73 of file glass.c.
References PetaPM::BoxSize, ic_part_data::Disp, glass_force(), glass_stats(), message(), PetaPM::Nmesh, ic_part_data::Pos, powerspectrum_alloc(), powerspectrum_free(), powerspectrum_save(), PetaPM::ps, UnitLength_in_cm, and ic_part_data::Vel.
Referenced by main(), and setup_glass().
| uint64_t idgen_create_id_from_index | ( | IDGenerator * | idgen, |
| int | index | ||
| ) |
Definition at line 69 of file zeldovich.c.
References IDGenerator::Ngrid, IDGenerator::offset, and IDGenerator::size.
Referenced by main(), and write_particle_data().
| void idgen_create_pos_from_index | ( | IDGenerator * | idgen, |
| int | index, | ||
| double | pos[3] | ||
| ) |
Definition at line 79 of file zeldovich.c.
References IDGenerator::BoxSize, IDGenerator::Ngrid, IDGenerator::offset, and IDGenerator::size.
Referenced by setup_glass(), and setup_grid().
| void idgen_init | ( | IDGenerator * | idgen, |
| PetaPM * | pm, | ||
| int | Ngrid, | ||
| double | BoxSize | ||
| ) |
Definition at line 48 of file zeldovich.c.
References IDGenerator::BoxSize, IDGenerator::Ngrid, IDGenerator::NumPart, IDGenerator::offset, petapm_get_ntask2d(), petapm_get_thistask2d(), and IDGenerator::size.
Referenced by main().
| void read_parameterfile | ( | char * | fname, |
| struct genic_config * | GenicConfig, | ||
| int * | ShowBacktrace, | ||
| double * | MaxMemSizePerNode, | ||
| Cosmology * | CP | ||
| ) |
Definition at line 75 of file params.c.
References genic_config::BoxSize, Cosmology::CMBTemperature, CP, create_parameters(), power_params::DifferentTransferFunctions, endrun(), power_params::FileWithInputSpectrum, power_params::FileWithTransferFunction, get_physmem_bytes(), Cosmology::Hubble, HUBBLE, Cosmology::HubbleParam, genic_config::InitCondFile, power_params::InputPowerRedshift, genic_config::InvertPhase, genic_config::MakeGlassCDM, genic_config::MakeGlassGas, genic_config::Max_nuvel, message(), Cosmology::MNu, genic_config::Ngrid, genic_config::NgridGas, genic_config::NGridNu, genic_config::Nmesh, genic_config::NumFiles, genic_config::NumWriters, Cosmology::Omega0, Cosmology::Omega_fld, Cosmology::Omega_ur, Cosmology::OmegaBaryon, Cosmology::OmegaLambda, genic_config::OutputDir, param_dump(), param_get_double(), param_get_int(), param_get_string(), param_get_string2(), param_parse_file(), param_validate(), genic_config::PowerP, genic_config::PrePosGridCenter, power_params::PrimordialIndex, power_params::PrimordialRunning, genic_config::ProduceGas, Cosmology::RadiationOn, genic_config::SavePrePos, power_params::ScaleDepVelocity, genic_config::Seed, ShowBacktrace, power_params::Sigma8, ThisTask, genic_config::TimeIC, genic_config::UnitaryAmplitude, UnitSystem::UnitLength_in_cm, UnitSystem::UnitMass_in_g, genic_config::units, UnitSystem::UnitVelocity_in_cm_per_s, genic_config::UsePeculiarVelocity, Cosmology::w0_fld, Cosmology::wa_fld, genic_config::WDM_therm_mass, and power_params::WhichSpectrum.
Referenced by main().
| void saveheader | ( | BigFile * | bf, |
| int64_t | TotNumPartCDM, | ||
| int64_t | TotNumPartGas, | ||
| int64_t | TotNuPart, | ||
| double | nufrac, | ||
| const double | BoxSize, | ||
| Cosmology * | CP, | ||
| const struct genic_config | GenicConfig | ||
| ) |
Definition at line 112 of file save.c.
References compute_mass(), CP, endrun(), Cosmology::HubbleParam, genic_config::InvertPhase, Cosmology::Omega0, Cosmology::OmegaBaryon, Cosmology::OmegaLambda, genic_config::Seed, genic_config::TimeIC, genic_config::UnitaryAmplitude, UnitSystem::UnitLength_in_cm, UnitSystem::UnitMass_in_g, genic_config::units, UnitSystem::UnitVelocity_in_cm_per_s, and genic_config::UsePeculiarVelocity.
Referenced by main().
| int setup_glass | ( | IDGenerator * | idgen, |
| PetaPM * | pm, | ||
| double | shift, | ||
| int | seed, | ||
| double | mass, | ||
| struct ic_part_data * | ICP, | ||
| const double | UnitLength_in_cm, | ||
| const char * | OutputDir | ||
| ) |
Definition at line 41 of file glass.c.
References IDGenerator::BoxSize, fastpm_strdup_printf(), glass_evolve(), idgen_create_pos_from_index(), ic_part_data::Mass, myfree, IDGenerator::Ngrid, IDGenerator::NumPart, ic_part_data::Pos, ThisTask, and UnitLength_in_cm.
Referenced by main().
| int setup_grid | ( | IDGenerator * | idgen, |
| double | shift, | ||
| double | mass, | ||
| struct ic_part_data * | ICP | ||
| ) |
Definition at line 91 of file zeldovich.c.
References idgen_create_pos_from_index(), ic_part_data::Mass, IDGenerator::NumPart, and ic_part_data::Pos.
Referenced by main().
| void write_particle_data | ( | IDGenerator * | idgen, |
| const int | Type, | ||
| BigFile * | bf, | ||
| const uint64_t | FirstID, | ||
| const int | SavePrePos, | ||
| int | NumFiles, | ||
| int | NumWriters, | ||
| struct ic_part_data * | curICP | ||
| ) |
Definition at line 61 of file save.c.
References curICP, idgen_create_id_from_index(), myfree, mymalloc, IDGenerator::NumPart, saveblock(), and walltime_measure.
Referenced by main().