MP-Gadget
5.0.1.dev1-76bc7d4726-dirty
|
Go to the source code of this file.
Functions | |
inttime_t | init (int RestartSnapNum, const char *OutputDir, struct header_data *header, Cosmology *CP) |
void | setup_smoothinglengths (int RestartSnapNum, DomainDecomp *ddecomp, Cosmology *CP, int BlackHoleOn, double MinEgySpec, double uu_in_cgs, const inttime_t Ti_Current, const double atime, const int64_t NTotGasInit) |
void | check_density_entropy (Cosmology *CP, const double MinEgySpec, const double atime) |
void | set_init_params (ParameterSet *ps) |
void | init_timeline (int RestartSnapNum, double TimeMax, const struct header_data *header, const int SnapshotWithFOF) |
void check_density_entropy | ( | Cosmology * | CP, |
const double | MinEgySpec, | ||
const double | atime | ||
) |
Definition at line 344 of file init.c.
References CP, GAMMA_MINUS1, GRAVITY, HUBBLE, Cosmology::HubbleParam, slots_manager_type::info, message(), Cosmology::OmegaBaryon, slot_info::size, SlotsManager, and SphP.
Referenced by begrun().
inttime_t init | ( | int | RestartSnapNum, |
const char * | OutputDir, | ||
struct header_data * | header, | ||
Cosmology * | CP | ||
) |
This function reads the initial conditions, allocates storage for the particle data, validates and initialises the particle data.
Definition at line 86 of file init.c.
References BHP, part_manager_type::BoxSize, check_omega(), check_positions(), check_smoothing_length(), CP, domain_test_id_uniqueness(), endrun(), fof_init(), get_generations(), get_mean_separation(), Cosmology::GravInternal, gravshort_set_softenings(), HYDROGEN_MASSFRAC, init_alloc_particle_slot_memory(), init_timebins(), InitParams, header_data::MassTable, MPIU_Barrier, NMETALS, header_data::NTotalInit, part_manager_type::NumPart, P, init_params::PartAllocFactor, PartManager, PEANO(), petaio_read_snapshot(), SlotsManager, SPHP, header_data::TimeSnapshot, and walltime_measure.
Referenced by begrun().
void init_timeline | ( | int | RestartSnapNum, |
double | TimeMax, | ||
const struct header_data * | header, | ||
const int | SnapshotWithFOF | ||
) |
Definition at line 56 of file init.c.
References message(), round_down_power_of_two(), setup_sync_points(), ti_from_loga(), TIMEBASE, header_data::TimeIC, and header_data::TimeSnapshot.
Referenced by begrun().
void set_init_params | ( | ParameterSet * | ps | ) |
Definition at line 45 of file init.c.
References init_params::InitGasTemp, InitParams, param_get_double(), init_params::PartAllocFactor, and ThisTask.
Referenced by read_parameter_file().
void setup_smoothinglengths | ( | int | RestartSnapNum, |
DomainDecomp * | ddecomp, | ||
Cosmology * | CP, | ||
int | BlackHoleOn, | ||
double | MinEgySpec, | ||
double | uu_in_cgs, | ||
const inttime_t | Ti_Current, | ||
const double | atime, | ||
const int64_t | NTotGasInit | ||
) |
This function is used to find an initial smoothing length and initial entropy for each SPH particle. Entropies are set using the initial gas temperature. It guarantees that the number of neighbours will be between desired_ngb-MAXDEV and desired_ngb+MAXDEV. For simplicity, a first guess of the smoothing length is provided to the function density(), which will then iterate if needed to find the right smoothing length.
Definition at line 439 of file init.c.
References ActiveParticles::ActiveParticle, BOLTZMANN, part_manager_type::BoxSize, Cosmology::CMBTemperature, CP, density(), DensityIndependentSphOn(), endrun(), force_get_father(), force_tree_free(), force_tree_rebuild(), GAMMA_MINUS1, GetDensityKernelType(), GetNumNgb(), HYDROGEN_MASSFRAC, slots_manager_type::info, init_driftkicktime(), init_params::InitGasTemp, InitParams, NODE::len, NODE::mass, NODE::mom, MPI_INT64, ForceTree::Nodes, ActiveParticles::NumActiveParticle, part_manager_type::NumPart, Cosmology::Omega0, Cosmology::OmegaBaryon, P, PartManager, PROTONMASS, setup_density_indep_entropy(), slot_info::size, slots_allocate_sph_pred_data(), slots_free_sph_pred_data(), SlotsManager, and SphP.
Referenced by begrun().