MP-Gadget
5.0.1.dev1-76bc7d4726-dirty
|
Go to the source code of this file.
Classes | |
struct | SyncPoint |
Macros | |
#define | TIMEBINS 20 |
#define | TIMEBASE (1u<<TIMEBINS) |
#define | MAXSNAPSHOTS (1u<<(30-TIMEBINS)) |
Typedefs | |
typedef struct SyncPoint | SyncPoint |
Functions | |
double | loga_from_ti (inttime_t ti) |
inttime_t | ti_from_loga (double loga) |
inttime_t | dti_from_dloga (double loga, const inttime_t Ti_Current) |
double | dloga_from_dti (inttime_t dti, const inttime_t Ti_Current) |
double | get_dloga_for_bin (int timebin, const inttime_t Ti_Current) |
static inttime_t | dti_from_timebin (int bin) |
inttime_t | round_down_power_of_two (inttime_t ti) |
inttime_t | find_next_outputtime (inttime_t ti_curr) |
inttime_t | out_from_ti (inttime_t ti) |
int | OutputListAction (ParameterSet *ps, const char *name, void *data) |
void | set_sync_params (int OutputListLength, double *OutputListTimes) |
void | setup_sync_points (double TimeIC, double TimeMax, double no_snapshot_until_time, int SnapshotWithFOF) |
SyncPoint * | find_next_sync_point (inttime_t ti) |
SyncPoint * | find_current_sync_point (inttime_t ti) |
SyncPoint * | make_unplanned_sync_point (inttime_t ti) |
#define MAXSNAPSHOTS (1u<<(30-TIMEBINS)) |
Definition at line 15 of file timebinmgr.h.
#define TIMEBASE (1u<<TIMEBINS) |
Definition at line 14 of file timebinmgr.h.
#define TIMEBINS 20 |
< The simulated timespan is mapped onto the integer interval [0,TIMEBASE], where TIMEBASE needs to be a power of 2. Note that (1<<28) corresponds to 2^29. We allow some bits at the top of the integer timeline for snapshot outputs. Note that because each snapshot uses TIMEBASE on the integer timeline, the conversion factor between loga and ti is not constant across snapshots.
Definition at line 13 of file timebinmgr.h.
Definition at line 1 of file timebinmgr.h.
Definition at line 256 of file timebinmgr.c.
References Dloga_interval_ti(), endrun(), and TIMEBASE.
Referenced by apply_half_kick(), density(), density_ngbiter(), find_timesteps(), and hydro_ngbiter().
Definition at line 271 of file timebinmgr.c.
References loga_from_ti(), and ti_from_loga().
Referenced by get_PM_timestep_ti(), and get_timestep_ti().
|
inlinestatic |
Definition at line 44 of file timebinmgr.h.
Referenced by apply_half_kick(), cooling_direct(), find_next_kick(), find_timesteps(), and is_timebin_active().
Definition at line 188 of file timebinmgr.c.
References NSyncPoints, and SyncPoints.
Referenced by run(), test_conversions(), and test_skip_first().
this function returns the next output time after ti_curr.
this function returns the next output time that is in the future of ti_curr; if none is find it return NULL, indication the run shall terminate.
Definition at line 174 of file timebinmgr.c.
References NSyncPoints, and SyncPoints.
Referenced by get_PM_timestep_ti(), run(), and test_conversions().
double get_dloga_for_bin | ( | int | timebin, |
const inttime_t | Ti_Current | ||
) |
Definition at line 279 of file timebinmgr.c.
References Dloga_interval_ti().
Referenced by blackhole_accretion_postprocess(), blackhole_feedback_copy(), cooling_direct(), get_helium_neutral_fraction_sfreff(), get_neutral_fraction_sfreff(), get_sfr_eeqos(), get_timestep_dloga(), hydro_copy(), hydro_ngbiter(), print_timebin_statistics(), run(), sfr_wind_copy(), test_dloga(), and winds_evolve().
double loga_from_ti | ( | inttime_t | ti | ) |
Definition at line 223 of file timebinmgr.c.
References Dloga_interval_ti(), endrun(), SyncPoint::loga, NSyncPoints, SyncPoints, TIMEBASE, and TIMEBINS.
Referenced by dti_from_dloga().
int OutputListAction | ( | ParameterSet * | ps, |
const char * | name, | ||
void * | data | ||
) |
This function parses a string containing a comma-separated list of variables, each of which is interpreted as a double. The purpose is to read an array of output times into the code. So specifying the output list now looks like: OutputList 0.1,0.3,0.5,1.0
We sort the input after reading it, so that the initial list need not be sorted. This function could be repurposed for reading generic arrays in future.
Definition at line 31 of file timebinmgr.c.
References endrun(), fastpm_strdup(), MAXSNAPSHOTS, message(), myfree, name, sync_params::OutputListLength, sync_params::OutputListTimes, param_get_string(), and Sync.
Referenced by create_gadget_parameter_set().
Definition at line 286 of file timebinmgr.c.
References TIMEBASE.
Referenced by find_timesteps(), get_PM_timestep_ti(), init_timeline(), and test_dloga().
void set_sync_params | ( | int | OutputListLength, |
double * | OutputListTimes | ||
) |
Definition at line 76 of file timebinmgr.c.
References OutputListLength, sync_params::OutputListLength, sync_params::OutputListTimes, and Sync.
Referenced by setup().
void setup_sync_points | ( | double | TimeIC, |
double | TimeMax, | ||
double | no_snapshot_until_time, | ||
int | SnapshotWithFOF | ||
) |
Definition at line 97 of file timebinmgr.c.
References SyncPoint::a, cmp_double(), SyncPoint::loga, myfree, mymalloc, NSyncPoints, sync_params::OutputListLength, sync_params::OutputListTimes, qsort_openmp, Sync, SyncPoints, SyncPoint::ti, TIMEBINS, SyncPoint::write_fof, and SyncPoint::write_snapshot.
Referenced by init_timeline(), setup_density(), test_conversions(), test_dloga(), and test_skip_first().
inttime_t ti_from_loga | ( | double | loga | ) |
Definition at line 236 of file timebinmgr.c.
References SyncPoint::loga, NSyncPoints, SyncPoints, TIMEBASE, and TIMEBINS.
Referenced by dti_from_dloga(), init_timebins(), init_timeline(), test_conversions(), and test_dloga().