|
MP-Gadget
5.0.1.dev1-76bc7d4726-dirty
|
#include <math.h>#include <stdlib.h>#include <stdio.h>#include <stddef.h>#include <string.h>#include <mpi.h>#include "allvars.h"#include "proto.h"#include <bigfile-mpi.h>#include <libgadget/types.h>#include <libgadget/physconst.h>#include <libgadget/utils.h>#include <libgadget/cosmology.h>#include <libgadget/walltime.h>#include <libgadget/utils/mymalloc.h>Go to the source code of this file.
Functions | |
| 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) |
| static void | saveblock (BigFile *bf, void *baseptr, int ptype, const char *bname, const char *dtype, int items_per_particle, const int NumPart, ptrdiff_t elsize, int NumFiles, int NumWriters) |
| 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 | 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 | 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 _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().
|
static |
Definition at line 49 of file save.c.
References _bigfile_utils_create_block_from_c_array(), name, and ptype.
Referenced by write_particle_data().
| 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().
| 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().