GADGET-4
|
#include <simparticles.h>
Inherits intposconvert, and setcomm.
Public Types | |
typedef particle_data | pdata |
Public Member Functions | |
simparticles (MPI_Comm comm) | |
void | copy_particle (particle_data *Ptarget, particle_data *Psource) |
int | getTimeBinSynchronized (int bin) |
MyFloat | get_DtHsml (int i) |
MyFloat | get_Csnd (int i) |
MyFloat | get_OldAcc (int i) |
double | get_utherm_from_entropy (int i) |
void | set_entropy_from_utherm (double utherm, int i) |
void | fill_active_gravity_list_with_all_particles (void) |
void | allocate_memory (void) |
void | free_memory (void) |
void | reallocate_memory_maxpart (int maxpartNew) |
void | reallocate_memory_maxpartsph (int maxpartsphNew) |
void | dump_particles (void) |
void | print_particle_info (int i) |
Print information relative to a particle / cell to standard output. More... | |
void | print_particle_info_from_ID (MyIDType ID) |
Print information relative to a particle / cell to standard output given its ID. *. More... | |
int | get_active_index (int idx) |
void | reconstruct_timebins (void) |
integertime | find_next_sync_point (void) |
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). More... | |
void | mark_active_timebins (void) |
void | drift_all_particles (void) |
int | drift_particle (particle_data *P, sph_particle_data *SphP, integertime time1, bool ignore_light_cone=false) |
This function drifts a particle i to time1. More... | |
void | make_list_of_active_particles (void) |
integertime | get_timestep_grav (int p) |
integertime | get_timestep_hydro (int p) |
void | timebins_get_bin_and_do_validity_checks (integertime ti_step, int *bin_new, int bin_old) |
void | assign_hydro_timesteps (void) |
void | timebin_cleanup_list_of_active_particles (void) |
int | test_if_grav_timestep_is_too_large (int p, int bin) |
int | get_timestep_bin (integertime ti_step) |
Public Member Functions inherited from intposconvert | |
void | constrain_intpos (MyIntPosType *pos) |
template<typename T > | |
void | diff_intpos_to_pos (MyIntPosType *a, MyIntPosType *b, T *posdiff, offset_tuple off=0) |
MyIntPosType | nearest_image_intpos_to_intpos_X (const MyIntPosType a, const MyIntPosType b) |
MyIntPosType | nearest_image_intpos_to_intpos_Y (const MyIntPosType a, const MyIntPosType b) |
MyIntPosType | nearest_image_intpos_to_intpos_Z (const MyIntPosType a, const MyIntPosType b) |
template<typename T > | |
void | nearest_image_intpos_to_pos (const MyIntPosType *const a, const MyIntPosType *const b, T *posdiff) |
void | nearest_image_intpos_to_absolute_intdist (const MyIntPosType *a, const MyIntPosType *b, MyIntPosType *delta) |
template<typename T > | |
MySignedIntPosType | pos_to_signedintpos (T posdiff) |
template<typename T > | |
void | pos_to_signedintpos (T *posdiff, MySignedIntPosType *intpos) |
template<typename T > | |
void | signedintpos_to_pos (MySignedIntPosType *intpos, T *pos) |
double | signedintpos_to_distanceorigin (MySignedIntPosType *intpos) |
template<typename T > | |
void | intpos_to_pos (MyIntPosType *intpos, T *posdiff) |
void | intpos_to_intpos (MyIntPosType *intpos, MyIntPosType *xyz) |
template<typename T > | |
T | constrain_pos (T pos) |
template<typename T > | |
void | pos_to_intpos (T *posdiff, MyIntPosType *intpos) |
Public Member Functions inherited from setcomm | |
setcomm (MPI_Comm Comm) | |
setcomm (const char *str) | |
void | initcomm (MPI_Comm Comm) |
void | mpi_printf (const char *fmt,...) |
void | determine_compute_nodes (void) |
Static Public Member Functions | |
static bool | compare_IDs (const MyIDType &a, const MyIDType &b) |
Public Attributes | |
int | NumPart |
int | NumGas |
int | MaxPart |
int | MaxPartSph |
long long | TotNumPart |
long long | TotNumGas |
particle_data * | P |
sph_particle_data * | SphP |
unsigned short int | MarkerValue |
subfind_data * | PS |
int | TimeBinSynchronized [TIMEBINS] |
TimeBinData | TimeBinsHydro |
TimeBinData | TimeBinsGravity |
int | nsource |
int * | indexlist |
Public Attributes inherited from intposconvert | |
MyReal | FacIntToCoord |
MyReal | FacCoordToInt |
MyReal | RegionLen |
MyReal | RegionCorner [3] |
MyReal | RegionCenter [3] |
Public Attributes inherited from setcomm | |
MPI_Comm | Communicator |
int | NTask |
int | ThisTask |
int | PTask |
int | ThisNode |
int | NumNodes = 0 |
int | TasksInThisNode |
int | RankInThisNode |
int | MinTasksPerNode |
int | MaxTasksPerNode |
long long | MemoryOnNode |
long long | SharedMemoryOnNode |
Definition at line 35 of file simparticles.h.
typedef particle_data pdata |
Definition at line 49 of file simparticles.h.
|
inline |
Definition at line 38 of file simparticles.h.
|
inline |
Definition at line 273 of file simparticles.h.
void assign_hydro_timesteps | ( | void | ) |
Definition at line 56 of file timestep.cc.
Definition at line 72 of file simparticles.h.
|
inline |
Definition at line 65 of file simparticles.h.
void drift_all_particles | ( | void | ) |
Definition at line 274 of file predict.cc.
int drift_particle | ( | particle_data * | P, |
sph_particle_data * | SphP, | ||
integertime | time1, | ||
bool | ignore_light_cone = false |
||
) |
This function drifts a particle i to time1.
time_previous | current time |
time1 | time to which particles get drifted |
Definition at line 313 of file predict.cc.
|
inline |
This function dumps some of the basic particle data to a file. In case the tree construction fails, this is called just before the run terminates with an error message. Examination of the generated file may then give clues to what caused the problem.
Definition at line 321 of file simparticles.h.
|
inline |
Definition at line 260 of file simparticles.h.
integertime find_next_sync_point | ( | void | ) |
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).
This function drifts all particles, including inactive particles to the next sync point. This is done by drift_particles(). Afterwards the linked list of active particles is updated to the new sync point by make_list_of_active_particles(). Particles become active/inactive here.
Definition at line 120 of file predict.cc.
|
inline |
Definition at line 283 of file simparticles.h.
|
inline |
Definition at line 382 of file simparticles.h.
|
inline |
Definition at line 233 of file simparticles.h.
|
inline |
Definition at line 231 of file simparticles.h.
|
inline |
Definition at line 235 of file simparticles.h.
int get_timestep_bin | ( | integertime | ti_step | ) |
Definition at line 420 of file timestep.cc.
integertime get_timestep_grav | ( | int | p | ) |
This function normally (for flag==0) returns the maximum allowed timestep of a particle, expressed in terms of the integer mapping that is used to represent the total simulated timespan. The physical acceleration is returned in aphys. The latter is used in conjunction with the PSEUDOSYMMETRIC integration option, which also makes of the second function of get_timestep. When it is called with a finite timestep for flag, it returns the physical acceleration that would lead to this timestep, assuming timestep criterion 0.
p | particle index |
Definition at line 177 of file timestep.cc.
integertime get_timestep_hydro | ( | int | p | ) |
p | particle index |
Definition at line 274 of file timestep.cc.
|
inline |
Definition at line 238 of file simparticles.h.
|
inline |
Definition at line 214 of file simparticles.h.
void make_list_of_active_particles | ( | void | ) |
Definition at line 410 of file predict.cc.
void mark_active_timebins | ( | void | ) |
Definition at line 155 of file predict.cc.
|
inline |
Print information relative to a particle / cell to standard output.
i | particle / cell index |
Definition at line 343 of file simparticles.h.
|
inline |
Print information relative to a particle / cell to standard output given its ID. *.
ID | particle / cell ID |
Definition at line 374 of file simparticles.h.
|
inline |
Definition at line 292 of file simparticles.h.
|
inline |
Definition at line 304 of file simparticles.h.
void reconstruct_timebins | ( | void | ) |
Definition at line 43 of file predict.cc.
|
inline |
Definition at line 249 of file simparticles.h.
int test_if_grav_timestep_is_too_large | ( | int | p, |
int | bin | ||
) |
Definition at line 158 of file timestep.cc.
void timebin_cleanup_list_of_active_particles | ( | void | ) |
Definition at line 637 of file timestep.cc.
void timebins_get_bin_and_do_validity_checks | ( | integertime | ti_step, |
int * | bin_new, | ||
int | bin_old | ||
) |
Definition at line 494 of file timestep.cc.
int* indexlist |
Definition at line 208 of file simparticles.h.
unsigned short int MarkerValue |
Definition at line 61 of file simparticles.h.
int MaxPart |
This gives the maxmimum number of particles that can be stored on one processor.
Definition at line 43 of file simparticles.h.
int MaxPartSph |
This gives the maxmimum number of SPH particles that can be stored on one processor.
Definition at line 44 of file simparticles.h.
int nsource |
Definition at line 207 of file simparticles.h.
int NumGas |
number of gas particles on the LOCAL processor
Definition at line 41 of file simparticles.h.
int NumPart |
number of particles on the LOCAL processor
Definition at line 40 of file simparticles.h.
This structure holds all the information that is stored for each particle of the simulation. holds particle data on local processor
Definition at line 54 of file simparticles.h.
subfind_data* PS |
Definition at line 63 of file simparticles.h.
sph_particle_data* SphP |
holds SPH particle data on local processor
Definition at line 59 of file simparticles.h.
TimeBinData TimeBinsGravity |
Definition at line 205 of file simparticles.h.
TimeBinData TimeBinsHydro |
Definition at line 204 of file simparticles.h.
int TimeBinSynchronized[TIMEBINS] |
Definition at line 203 of file simparticles.h.
long long TotNumGas |
total gas particle number (global value)
Definition at line 47 of file simparticles.h.
long long TotNumPart |
total particle numbers (global value)
Definition at line 46 of file simparticles.h.