GADGET-4
global_data_all_processes Struct Reference

#include <allvars.h>

Inherits parameters.

Public Member Functions

double get_absolutetime_from_integertime (integertime ti)
 
void set_cosmo_factors_for_current_time (void)
 
void register_parameters (void)
 
void read_outputlist (char *fname)
 This function reads a table with a list of desired output times. More...
 
void some_parameter_checks (void)
 
char * get_data_ptr (void)
 
size_t get_data_size (void)
 
- Public Member Functions inherited from parameters
 parameters ()
 
 parameters (MPI_Comm comm)
 
int read_parameter_file (const char *fname)
 This function parses the parameter file. More...
 
void add_param (const char *name, void *buf, int type, int flag)
 
void write_used_parameters (const char *dirname, const char *fname)
 
- 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)
 

Public Attributes

double TopNodeFactor
 
int ICFormat
 
int SnapFormat
 
int NumFilesPerSnapshot
 
int MaxFilesWithConcurrentIO
 
double TreeAllocFactor
 
double TopNodeAllocFactor
 
double NgbTreeAllocFactor
 
double ForeignNodeAllocFactor
 
double ForeignPointAllocFactor
 
enum restart_options RestartFlag
 
int MaxMemSize
 
int DesNumNgb
 
long long GlobalNSynchronizedHydro
 
long long GlobalNSynchronizedGravity
 
double MaxNumNgbDeviation
 
double ArtBulkViscConst
 
double InitGasTemp
 
double InitGasU
 
double MinEgySpec
 
long long TotNumOfForces
 
long long TotNumDirectForces
 
long long TotNumDensity
 
long long TotNumHydro
 
double cf_atime
 
double cf_atime2
 
double cf_ainv
 
double cf_a2inv
 
double cf_a3inv
 
double cf_afac1
 
double cf_afac2
 
double cf_afac3
 
double cf_hubble_a
 
double cf_atime_hubble_a
 
double cf_atime2_hubble_a
 
double cf_redshift
 
double cf_H
 
double accel_normalize_fac
 
double UnitTime_in_s
 
double UnitMass_in_g
 
double UnitVelocity_in_cm_per_s
 
double UnitLength_in_cm
 
double UnitPressure_in_cgs
 
double UnitDensity_in_cgs
 
double UnitCoolingRate_in_cgs
 
double UnitEnergy_in_cgs
 
double UnitTime_in_Megayears
 
double UnitTime_in_years
 
double GravityConstantInternal
 
double G
 
double Hubble
 
double Omega0
 
double OmegaLambda
 
double OmegaBaryon
 
double HubbleParam
 
double BoxSize
 
int ComovingIntegrationOn
 
int TypeOfOpeningCriterion
 
int OutputListOn
 
int LowestActiveTimeBin
 
int HighestActiveTimeBin
 
int LowestOccupiedTimeBin
 
int HighestOccupiedTimeBin
 
int LowestOccupiedGravTimeBin
 
int HighestOccupiedGravTimeBin
 
int HighestSynchronizedTimeBin
 
int SmallestTimeBinWithDomainDecomposition
 
double ActivePartFracForNewDomainDecomp
 
int SnapshotFileCount
 
double TimeBetSnapshot
 
double TimeOfFirstSnapshot
 
double CpuTimeBetRestartFile
 
double TimeLastRestartFile
 
double TimeBetStatistics
 
double TimeLastStatistics
 
int NumCurrentTiStep
 
double Time
 
double TimeBegin
 
double TimeStep
 
double TimeMax
 
double TimeOld
 
double Timebase_interval
 
integertime Ti_Current
 
integertime Ti_nextoutput
 
integertime Ti_lastoutput
 
char DumpFlag_nextoutput
 
integertime Ti_begstep [TIMEBINS]
 
double TimeLimitCPU
 
double CPUForLastPMExecution
 
double ErrTolTheta
 
double ErrTolThetaMax
 
double ErrTolForceAcc
 
char RelOpeningCriterionInUse
 
double ErrTolIntAccuracy
 
double MinSizeTimestep
 
double MaxSizeTimestep
 
double CourantFac
 
int CPU_TimeBinCountMeasurements [TIMEBINS]
 
double CPU_TimeBinMeasurements [TIMEBINS][NUMBER_OF_MEASUREMENTS_TO_RECORD]
 
int SofteningClassOfPartType [NTYPES]
 
double SofteningComoving [NSOFTCLASSES]
 
double SofteningMaxPhys [NSOFTCLASSES]
 
double SofteningTable [NSOFTCLASSES+NSOFTCLASSES_HYDRO]
 
double ForceSoftening [NSOFTCLASSES+NSOFTCLASSES_HYDRO+2]
 
double MassTable [NTYPES]
 
char InitCondFile [MAXLEN_PATH]
 
char OutputDir [MAXLEN_PATH]
 
char SnapshotFileBase [MAXLEN_PATH]
 
char OutputListFilename [MAXLEN_PATH]
 
double OutputListTimes [MAXLEN_OUTPUTLIST]
 
char OutputListFlag [MAXLEN_OUTPUTLIST]
 
int OutputListLength
 
- Public Attributes inherited from parameters
int NParameters = 0
 
char ParametersTag [MAX_PARAMETERS][MAXLEN_PARAM_TAG]
 
void * ParametersValue [MAX_PARAMETERS]
 
char ParametersType [MAX_PARAMETERS]
 
char ParametersChangeable [MAX_PARAMETERS]
 
int ParameterSequence [MAX_PARAMETERS]
 
- 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
 

Detailed Description

Data which is the SAME for all tasks (mostly code parameters read from the parameter file). Holding this data in a structure is convenient for writing/reading the restart file, and it allows the introduction of new global variables in a simple way. The only thing to do is to introduce them into this structure.

Definition at line 32 of file allvars.h.

Member Function Documentation

◆ get_absolutetime_from_integertime()

double get_absolutetime_from_integertime ( integertime  ti)
inline

Definition at line 200 of file allvars.h.

◆ get_data_ptr()

char * get_data_ptr ( void  )
inline

Definition at line 360 of file allvars.h.

◆ get_data_size()

size_t get_data_size ( void  )
inline

Definition at line 362 of file allvars.h.

◆ read_outputlist()

void read_outputlist ( char *  fname)

This function reads a table with a list of desired output times.

The table does not have to be ordered in any way, but may not contain more than MAXLEN_OUTPUTLIST entries.

Parameters
fnameThe file name of the outputlist

Definition at line 211 of file allvars.cc.

◆ register_parameters()

void register_parameters ( void  )

Definition at line 55 of file allvars.cc.

◆ set_cosmo_factors_for_current_time()

void set_cosmo_factors_for_current_time ( void  )

Definition at line 20 of file allvars.cc.

◆ some_parameter_checks()

void some_parameter_checks ( void  )

Definition at line 255 of file allvars.cc.

Member Data Documentation

◆ accel_normalize_fac

double accel_normalize_fac

Definition at line 114 of file allvars.h.

◆ ActivePartFracForNewDomainDecomp

double ActivePartFracForNewDomainDecomp

Definition at line 161 of file allvars.h.

◆ ArtBulkViscConst

double ArtBulkViscConst

Sets the parameter $\alpha$ of the artificial viscosity

Definition at line 95 of file allvars.h.

◆ BoxSize

double BoxSize

Boxsize in case periodic boundary conditions are used

Definition at line 144 of file allvars.h.

◆ cf_a2inv

double cf_a2inv

Definition at line 109 of file allvars.h.

◆ cf_a3inv

double cf_a3inv

Definition at line 109 of file allvars.h.

◆ cf_afac1

double cf_afac1

Definition at line 109 of file allvars.h.

◆ cf_afac2

double cf_afac2

Definition at line 109 of file allvars.h.

◆ cf_afac3

double cf_afac3

Definition at line 109 of file allvars.h.

◆ cf_ainv

double cf_ainv

Definition at line 109 of file allvars.h.

◆ cf_atime

double cf_atime

Definition at line 109 of file allvars.h.

◆ cf_atime2

double cf_atime2

Definition at line 109 of file allvars.h.

◆ cf_atime2_hubble_a

double cf_atime2_hubble_a

Definition at line 110 of file allvars.h.

◆ cf_atime_hubble_a

double cf_atime_hubble_a

Definition at line 109 of file allvars.h.

◆ cf_H

double cf_H

Definition at line 112 of file allvars.h.

◆ cf_hubble_a

double cf_hubble_a

Definition at line 109 of file allvars.h.

◆ cf_redshift

double cf_redshift

Definition at line 110 of file allvars.h.

◆ ComovingIntegrationOn

int ComovingIntegrationOn

flags that comoving integration is enabled

Definition at line 148 of file allvars.h.

◆ CourantFac

double CourantFac

SPH-Courant factor

Definition at line 239 of file allvars.h.

◆ CPU_TimeBinCountMeasurements

int CPU_TimeBinCountMeasurements[TIMEBINS]

Definition at line 241 of file allvars.h.

◆ CPU_TimeBinMeasurements

double CPU_TimeBinMeasurements[TIMEBINS][NUMBER_OF_MEASUREMENTS_TO_RECORD]

Definition at line 242 of file allvars.h.

◆ CPUForLastPMExecution

double CPUForLastPMExecution

Definition at line 220 of file allvars.h.

◆ CpuTimeBetRestartFile

double CpuTimeBetRestartFile

cpu-time between regularly generated restart files

Definition at line 171 of file allvars.h.

◆ DesNumNgb

int DesNumNgb

Desired number of SPH neighbours

Definition at line 76 of file allvars.h.

◆ DumpFlag_nextoutput

char DumpFlag_nextoutput

Definition at line 208 of file allvars.h.

◆ ErrTolForceAcc

double ErrTolForceAcc

parameter for relative opening criterion in tree walk

Definition at line 226 of file allvars.h.

◆ ErrTolIntAccuracy

double ErrTolIntAccuracy

accuracy tolerance parameter $ \eta $ for timestep criterion. The timesteps is $ \Delta t = \sqrt{\frac{2 \eta eps}{a}} $

Definition at line 232 of file allvars.h.

◆ ErrTolTheta

double ErrTolTheta

BH tree opening angle

Definition at line 224 of file allvars.h.

◆ ErrTolThetaMax

double ErrTolThetaMax

maximum BH tree opening angle when relative criterion is in use

Definition at line 225 of file allvars.h.

◆ ForceSoftening

double ForceSoftening[NSOFTCLASSES+NSOFTCLASSES_HYDRO+ 2]

the same, but multiplied by a factor 2.8 - at that scale the force is Newtonian

Definition at line 257 of file allvars.h.

◆ ForeignNodeAllocFactor

double ForeignNodeAllocFactor

Definition at line 64 of file allvars.h.

◆ ForeignPointAllocFactor

double ForeignPointAllocFactor

Definition at line 66 of file allvars.h.

◆ G

double G

Gravity-constant in internal units

Definition at line 132 of file allvars.h.

◆ GlobalNSynchronizedGravity

long long GlobalNSynchronizedGravity

Definition at line 91 of file allvars.h.

◆ GlobalNSynchronizedHydro

long long GlobalNSynchronizedHydro

Definition at line 90 of file allvars.h.

◆ GravityConstantInternal

double GravityConstantInternal

If set to zero in the parameterfile, the internal value of the gravitational constant is set to the Newtonian value based on the system of units specified. Otherwise the value provided is taken as internal gravity constant G.

Definition at line 128 of file allvars.h.

◆ HighestActiveTimeBin

int HighestActiveTimeBin

Definition at line 154 of file allvars.h.

◆ HighestOccupiedGravTimeBin

int HighestOccupiedGravTimeBin

Definition at line 158 of file allvars.h.

◆ HighestOccupiedTimeBin

int HighestOccupiedTimeBin

Definition at line 156 of file allvars.h.

◆ HighestSynchronizedTimeBin

int HighestSynchronizedTimeBin

Definition at line 159 of file allvars.h.

◆ Hubble

double Hubble

Hubble-constant in internal units

Definition at line 136 of file allvars.h.

◆ HubbleParam

double HubbleParam

little ‘h’, i.e. can be used to scale unit system to absorb uncertain value of Hubble constant. Only needed to get absolute physical values for cooling physics

Definition at line 140 of file allvars.h.

◆ ICFormat

int ICFormat

selects different versions of IC file-format

Definition at line 44 of file allvars.h.

◆ InitCondFile

char InitCondFile[MAXLEN_PATH]

Definition at line 272 of file allvars.h.

◆ InitGasTemp

double InitGasTemp

may be used to set the temperature in the IC's

Definition at line 96 of file allvars.h.

◆ InitGasU

double InitGasU

the same, but converted to thermal energy per unit mass

Definition at line 97 of file allvars.h.

◆ LowestActiveTimeBin

int LowestActiveTimeBin

Definition at line 153 of file allvars.h.

◆ LowestOccupiedGravTimeBin

int LowestOccupiedGravTimeBin

Definition at line 157 of file allvars.h.

◆ LowestOccupiedTimeBin

int LowestOccupiedTimeBin

Definition at line 155 of file allvars.h.

◆ MassTable

double MassTable[NTYPES]

If particle masses are all equal for one type, the corresponding entry in MassTable is set to this value, * allowing the size of the snapshot files to be reduced

Definition at line 269 of file allvars.h.

◆ MaxFilesWithConcurrentIO

int MaxFilesWithConcurrentIO

maximum number of files that may be written simultaneously when writing/reading restart-files, or when writing snapshot files

Definition at line 49 of file allvars.h.

◆ MaxMemSize

int MaxMemSize

size of maximum memory consumption in MB

Definition at line 72 of file allvars.h.

◆ MaxNumNgbDeviation

double MaxNumNgbDeviation

Maximum allowed deviation neighbour number

Definition at line 93 of file allvars.h.

◆ MaxSizeTimestep

double MaxSizeTimestep

maximum allowed timestep

Definition at line 237 of file allvars.h.

◆ MinEgySpec

double MinEgySpec

the minimum allowed temperature expressed as energy per unit mass

Definition at line 98 of file allvars.h.

◆ MinSizeTimestep

double MinSizeTimestep

minimum allowed timestep. Normally, the simulation terminates if the timestep determined by the timestep criteria falls below this limit.

Definition at line 235 of file allvars.h.

◆ NgbTreeAllocFactor

double NgbTreeAllocFactor

Each processor allocates a number of nodes for the neighbor search which is NgbTreeAllocFactor times the maximum(!) number of gas particles. Note: A typical local tree for N particles needs usually about ~0.65*N nodes.

Definition at line 60 of file allvars.h.

◆ NumCurrentTiStep

int NumCurrentTiStep

counts the number of system steps taken up to this point

Definition at line 175 of file allvars.h.

◆ NumFilesPerSnapshot

int NumFilesPerSnapshot

number of files in multi-file snapshot dumps

Definition at line 48 of file allvars.h.

◆ Omega0

double Omega0

matter density in units of the critical density (at z=0)

Definition at line 137 of file allvars.h.

◆ OmegaBaryon

double OmegaBaryon

baryon density in units of the critical density (at z=0)

Definition at line 139 of file allvars.h.

◆ OmegaLambda

double OmegaLambda

vaccum energy density relative to crictical density (at z=0)

Definition at line 138 of file allvars.h.

◆ OutputDir

char OutputDir[MAXLEN_PATH]

Definition at line 272 of file allvars.h.

◆ OutputListFilename

char OutputListFilename[MAXLEN_PATH]

Definition at line 272 of file allvars.h.

◆ OutputListFlag

char OutputListFlag[MAXLEN_OUTPUTLIST]

Definition at line 276 of file allvars.h.

◆ OutputListLength

int OutputListLength

number of times stored in table of desired output times

Definition at line 277 of file allvars.h.

◆ OutputListOn

int OutputListOn

flags that output times are listed in a specified file

Definition at line 151 of file allvars.h.

◆ OutputListTimes

double OutputListTimes[MAXLEN_OUTPUTLIST]

table with desired output times

Definition at line 275 of file allvars.h.

◆ RelOpeningCriterionInUse

char RelOpeningCriterionInUse

flags that we now an old acceleration and the relative opening criterion can be used

Definition at line 228 of file allvars.h.

◆ RestartFlag

enum restart_options RestartFlag

taken from command line used to start code. 0 is normal start-up from initial conditions, 1 is resuming a run from a set of restart files, while 2 marks a restart from a snapshot file.

Definition at line 68 of file allvars.h.

◆ SmallestTimeBinWithDomainDecomposition

int SmallestTimeBinWithDomainDecomposition

Definition at line 160 of file allvars.h.

◆ SnapFormat

int SnapFormat

selects different versions of snapshot file-formats

Definition at line 46 of file allvars.h.

◆ SnapshotFileBase

char SnapshotFileBase[MAXLEN_PATH]

Definition at line 272 of file allvars.h.

◆ SnapshotFileCount

int SnapshotFileCount

number of snapshot that is written next

Definition at line 168 of file allvars.h.

◆ SofteningClassOfPartType

int SofteningClassOfPartType[NTYPES]

Definition at line 250 of file allvars.h.

◆ SofteningComoving

double SofteningComoving[NSOFTCLASSES]

comoving gravitational softening lengths for each softeniung type

Definition at line 252 of file allvars.h.

◆ SofteningMaxPhys

double SofteningMaxPhys[NSOFTCLASSES]

maximum physical gravitational softening lengths for each softening type

Definition at line 253 of file allvars.h.

◆ SofteningTable

double SofteningTable[NSOFTCLASSES+ NSOFTCLASSES_HYDRO]

current (comoving) gravitational softening lengths for each softening type

Definition at line 255 of file allvars.h.

◆ Ti_begstep

integertime Ti_begstep[TIMEBINS]

marks start of current step of each timebin on integer timeline

Definition at line 210 of file allvars.h.

◆ Ti_Current

integertime Ti_Current

current time on integer timeline

Definition at line 188 of file allvars.h.

◆ Ti_lastoutput

integertime Ti_lastoutput

Definition at line 190 of file allvars.h.

◆ Ti_nextoutput

integertime Ti_nextoutput

next output time on integer timeline

Definition at line 189 of file allvars.h.

◆ Time

double Time

current time of the simulation

Definition at line 179 of file allvars.h.

◆ Timebase_interval

double Timebase_interval

factor to convert from floating point time interval to integer timeline

Definition at line 187 of file allvars.h.

◆ TimeBegin

double TimeBegin

time of initial conditions of the simulation

Definition at line 180 of file allvars.h.

◆ TimeBetSnapshot

double TimeBetSnapshot

simulation time interval between snapshot files

Definition at line 169 of file allvars.h.

◆ TimeBetStatistics

double TimeBetStatistics

simulation time interval between computations of energy statistics

Definition at line 173 of file allvars.h.

◆ TimeLastRestartFile

double TimeLastRestartFile

cpu-time when last restart-file was written

Definition at line 172 of file allvars.h.

◆ TimeLastStatistics

double TimeLastStatistics

simulation time when the energy statistics was computed the last time

Definition at line 174 of file allvars.h.

◆ TimeLimitCPU

double TimeLimitCPU

Definition at line 218 of file allvars.h.

◆ TimeMax

double TimeMax

marks the point of time until the simulation is to be evolved

Definition at line 182 of file allvars.h.

◆ TimeOfFirstSnapshot

double TimeOfFirstSnapshot

simulation time of first snapshot files

Definition at line 170 of file allvars.h.

◆ TimeOld

double TimeOld

time of previous synchronization point, needed only for logging purposes

Definition at line 183 of file allvars.h.

◆ TimeStep

double TimeStep

difference between current times of previous and current timestep

Definition at line 181 of file allvars.h.

◆ TopNodeAllocFactor

double TopNodeAllocFactor

Each processor allocates a number of nodes which is TreeAllocFactor times the maximum(!) number of particles. Note: A typical local tree for N particles needs usually about ~0.65*N nodes.

Definition at line 56 of file allvars.h.

◆ TopNodeFactor

double TopNodeFactor

Definition at line 42 of file allvars.h.

◆ TotNumDensity

long long TotNumDensity

counts total number of SPH density calculations

Definition at line 105 of file allvars.h.

◆ TotNumDirectForces

long long TotNumDirectForces

counts total number of direct force computations

Definition at line 104 of file allvars.h.

◆ TotNumHydro

long long TotNumHydro

counts total number of SPH hydro force calculations

Definition at line 106 of file allvars.h.

◆ TotNumOfForces

long long TotNumOfForces

counts total number of force computations

Definition at line 103 of file allvars.h.

◆ TreeAllocFactor

double TreeAllocFactor

Each processor allocates a number of nodes which is TreeAllocFactor times the maximum(!) number of particles. Note: A typical local tree for N particles needs usually about ~0.65*N nodes.

Definition at line 52 of file allvars.h.

◆ TypeOfOpeningCriterion

int TypeOfOpeningCriterion

determines tree cell-opening criterion: 0 for Barnes-Hut, 1 for relative criterion

Definition at line 149 of file allvars.h.

◆ UnitCoolingRate_in_cgs

double UnitCoolingRate_in_cgs

factor to convert internal cooling rate to cgs units

Definition at line 124 of file allvars.h.

◆ UnitDensity_in_cgs

double UnitDensity_in_cgs

factor to convert internal length unit to g/cm^3*h^2

Definition at line 123 of file allvars.h.

◆ UnitEnergy_in_cgs

double UnitEnergy_in_cgs

factor to convert internal energy to cgs units

Definition at line 125 of file allvars.h.

◆ UnitLength_in_cm

double UnitLength_in_cm

factor to convert internal length unit to cm/h

Definition at line 120 of file allvars.h.

◆ UnitMass_in_g

double UnitMass_in_g

factor to convert internal mass unit to grams/h

Definition at line 118 of file allvars.h.

◆ UnitPressure_in_cgs

double UnitPressure_in_cgs

factor to convert internal pressure unit to cgs units (little 'h' still around!)

Definition at line 121 of file allvars.h.

◆ UnitTime_in_Megayears

double UnitTime_in_Megayears

factor to convert internal time to megayears/h

Definition at line 126 of file allvars.h.

◆ UnitTime_in_s

double UnitTime_in_s

factor to convert internal time unit to seconds/h

Definition at line 117 of file allvars.h.

◆ UnitTime_in_years

double UnitTime_in_years

factor to convert internal time to years/h

Definition at line 127 of file allvars.h.

◆ UnitVelocity_in_cm_per_s

double UnitVelocity_in_cm_per_s

factor to convert internal velocity unit to cm/sec

Definition at line 119 of file allvars.h.


The documentation for this struct was generated from the following files: