MP-Gadget
5.0.1.dev1-76bc7d4726-dirty
|
Go to the source code of this file.
Classes | |
struct | ActiveParticles |
struct | DriftKickTimes |
Typedefs | |
typedef struct ActiveParticles | ActiveParticles |
Functions | |
int | rebuild_activelist (ActiveParticles *act, const DriftKickTimes *const times, int NumCurrentTiStep, const double Time) |
void | free_activelist (ActiveParticles *act) |
double | get_atime (const inttime_t Ti_Current) |
int | find_timesteps (const ActiveParticles *act, DriftKickTimes *times, const double atime, int FastParticleType, const Cosmology *CP, const double asmth, const int isFirstTimeStep) |
void | apply_half_kick (const ActiveParticles *act, Cosmology *CP, DriftKickTimes *times, const double atime, const double MinEgySpec) |
void | apply_PM_half_kick (Cosmology *CP, DriftKickTimes *times) |
int | is_timebin_active (int i, inttime_t current) |
inttime_t | find_next_kick (inttime_t Ti_Current, int minTimeBin) |
inttime_t | init_timebins (double TimeInit) |
void | update_lastactive_drift (DriftKickTimes *times) |
DriftKickTimes | init_driftkicktime (inttime_t Ti_Current) |
int | is_PM_timestep (const DriftKickTimes *const times) |
void | set_timestep_params (ParameterSet *ps) |
typedef struct ActiveParticles ActiveParticles |
void apply_half_kick | ( | const ActiveParticles * | act, |
Cosmology * | CP, | ||
DriftKickTimes * | times, | ||
const double | atime, | ||
const double | MinEgySpec | ||
) |
Definition at line 323 of file timestep.c.
References CP, dloga_from_dti(), do_the_short_range_kick(), dti_from_timebin(), endrun(), get_active_particle(), get_exact_gravkick_factor(), get_exact_hydrokick_factor(), is_timebin_active(), DriftKickTimes::maxtimebin, DriftKickTimes::mintimebin, ActiveParticles::NumActiveParticle, P, DriftKickTimes::Ti_Current, DriftKickTimes::Ti_kick, TIMEBINS, and walltime_measure.
Referenced by run().
void apply_PM_half_kick | ( | Cosmology * | CP, |
DriftKickTimes * | times | ||
) |
Definition at line 373 of file timestep.c.
References CP, get_exact_gravkick_factor(), GravPM, part_manager_type::NumPart, P, PartManager, DriftKickTimes::PM_kick, DriftKickTimes::PM_length, and walltime_measure.
Referenced by run().
This function finds the next synchronization point of the system (i.e. the earliest point of time any of the particles needs a force computation), and drifts the system to this point of time. If the system drifts over the desired time of a snapshot file, the function will drift to this moment, generate an output, and then resume the drift.
Definition at line 712 of file timestep.c.
References dti_from_timebin().
Referenced by run().
int find_timesteps | ( | const ActiveParticles * | act, |
DriftKickTimes * | times, | ||
const double | atime, | ||
int | FastParticleType, | ||
const Cosmology * | CP, | ||
const double | asmth, | ||
const int | isFirstTimeStep | ||
) |
Definition at line 176 of file timestep.c.
References CP, dloga_from_dti(), dti_from_timebin(), timestep_params::ForceEqualTimesteps, get_active_particle(), get_PM_timestep_ti(), get_timestep_bin(), get_timestep_ti(), hubble_function(), is_PM_timestep(), is_timebin_active(), timestep_params::MaxSizeTimestep, DriftKickTimes::maxtimebin, message(), DriftKickTimes::mintimebin, MPI_INT64, ActiveParticles::NumActiveParticle, part_manager_type::NumPart, P, PartManager, DriftKickTimes::PM_kick, DriftKickTimes::PM_length, DriftKickTimes::PM_start, round_down_power_of_two(), TI_ACCEL, TI_ACCRETE, TI_COURANT, DriftKickTimes::Ti_Current, TI_HSML, TI_NEIGH, TIMEBASE, TIMEBINS, TimestepParams, and walltime_measure.
Referenced by run().
void free_activelist | ( | ActiveParticles * | act | ) |
Definition at line 795 of file timestep.c.
References ActiveParticles::ActiveParticle, event_unlisten(), EventSlotsFork, myfree, and timestep_eh_slots_fork().
Referenced by run().
double get_atime | ( | const inttime_t | Ti_Current | ) |
Definition at line 168 of file timestep.c.
References loga_from_ti().
Referenced by run().
DriftKickTimes init_driftkicktime | ( | inttime_t | Ti_Current | ) |
Definition at line 133 of file timestep.c.
References DriftKickTimes::PM_kick, DriftKickTimes::PM_length, DriftKickTimes::PM_start, DriftKickTimes::Ti_Current, DriftKickTimes::Ti_kick, DriftKickTimes::Ti_lastactivedrift, and TIMEBINS.
Referenced by run(), run_gravity_test(), runfof(), setup_density_indep_entropy(), and setup_smoothinglengths().
inttime_t init_timebins | ( | double | TimeInit | ) |
Definition at line 123 of file timestep.c.
References message(), and ti_from_loga().
Referenced by init().
int is_PM_timestep | ( | const DriftKickTimes *const | times | ) |
Definition at line 160 of file timestep.c.
References endrun(), DriftKickTimes::PM_length, DriftKickTimes::PM_start, and DriftKickTimes::Ti_Current.
Referenced by find_timesteps(), print_timebin_statistics(), rebuild_activelist(), and run().
int is_timebin_active | ( | int | i, |
inttime_t | current | ||
) |
Definition at line 149 of file timestep.c.
References dti_from_timebin().
Referenced by apply_half_kick(), find_timesteps(), hydro_force(), print_timebin_statistics(), rebuild_activelist(), run(), timestep_eh_slots_fork(), and update_lastactive_drift().
int rebuild_activelist | ( | ActiveParticles * | act, |
const DriftKickTimes *const | times, | ||
int | NumCurrentTiStep, | ||
const double | Time | ||
) |
Definition at line 721 of file timestep.c.
References ActiveParticles::ActiveParticle, endrun(), event_listen(), EventSlotsFork, gadget_compact_thread_arrays(), gadget_setup_thread_arrays(), is_PM_timestep(), is_timebin_active(), ActiveParticles::MaxActiveParticle, part_manager_type::MaxPart, myfree, mymalloc, myrealloc, ActiveParticles::NumActiveParticle, part_manager_type::NumPart, P, PartManager, print_timebin_statistics(), ta_free, ta_malloc, DriftKickTimes::Ti_Current, TIMEBINS, timestep_eh_slots_fork(), and walltime_measure.
Referenced by run(), and run_gravity_test().
void set_timestep_params | ( | ParameterSet * | ps | ) |
Definition at line 51 of file timestep.c.
References timestep_params::CourantFac, timestep_params::ErrTolIntAccuracy, timestep_params::ForceEqualTimesteps, timestep_params::MaxGasVel, timestep_params::MaxRMSDisplacementFac, timestep_params::MaxSizeTimestep, timestep_params::MinSizeTimestep, param_get_double(), param_get_int(), ThisTask, and TimestepParams.
Referenced by read_parameter_file().
void update_lastactive_drift | ( | DriftKickTimes * | times | ) |
Definition at line 309 of file timestep.c.
References is_timebin_active(), DriftKickTimes::Ti_Current, DriftKickTimes::Ti_lastactivedrift, and TIMEBINS.
Referenced by run().