GADGET-4
constants.h File Reference

declares global constants and checks plausibility of configuration More...

Go to the source code of this file.

Macros

#define GADGET_VERSION   "4.0" /* code version string */
 
#define FILEFORMAT_LEGACY1   1
 
#define FILEFORMAT_LEGACY2   2
 
#define FILEFORMAT_HDF5   3
 
#define MODE_LOCAL_PARTICLES   0
 
#define MODE_IMPORTED_PARTICLES   1
 
#define MODE_DEFAULT   2
 
#define MODE_LOCAL_NO_EXPORT   3
 
#define FIRST_HALF_STEP   0
 
#define SECOND_HALF_STEP   1
 
#define FLAG_OUTSIDE   0
 
#define FLAG_INSIDE   1
 
#define FLAG_BOUNDARYOVERLAP   2
 
#define LOW_MESH   0 /* low-res mesh selector */
 
#define HIGH_MESH   1 /* high-res mesh selector */
 
#define MAX_THREADS   128
 
#define DIRECT_SUMMATION_THRESHOLD   500
 
#define NUMBER_OF_MEASUREMENTS_TO_RECORD   6
 
#define MAX_FIRST_ELEMENTS_CONSIDERED    5 /* This sets the number of lowest loaded tasks to be considered for assignment of next domain patch */
 
#define COMMBUFFERSIZE   (32 * 1024LL * 1024LL)
 
#define MPI_MESSAGE_SIZELIMIT_IN_MB   200
 
#define MPI_MESSAGE_SIZELIMIT_IN_BYTES   ((MPI_MESSAGE_SIZELIMIT_IN_MB)*1024LL * 1024LL)
 
#define M_PI   3.14159265358979323846
 
#define TO_MBYTE_FAC   (1.0 / (1024.0 * 1024.0))
 
#define LIGHTCONE_ALLOC_FAC   0.1
 
#define LIGHTCONE_MASSMAP_ALLOC_FAC   1.0
 
#define LIGHTCONE_MAX_FILLFACTOR   0.9
 
#define ALLOC_TOLERANCE   0.2
 
#define ALLOC_STARBH_ROOM   0.02
 
#define MAX_FLOAT_NUMBER   1e37
 
#define MIN_FLOAT_NUMBER   1e-37
 
#define MAX_DOUBLE_NUMBER   1e306
 
#define MIN_DOUBLE_NUMBER   1e-306
 
#define SMALLNUM   1e-60
 
#define MAX_REAL_NUMBER   MAX_FLOAT_NUMBER
 
#define MIN_REAL_NUMBER   MIN_FLOAT_NUMBER
 
#define GAMMA   (5.0 / 3)
 
#define GAMMA_MINUS1   (GAMMA - 1)
 
#define HYDROGEN_MASSFRAC   0.76
 
#define METAL_YIELD   0.02
 
#define GRAVITY   6.6738e-8
 
#define SOLAR_MASS   1.989e33
 
#define BOLTZMANN   1.38065e-16
 
#define CLIGHT   2.99792458e10
 
#define PARSEC   3.085678e18
 
#define PROTONMASS   1.67262178e-24
 
#define HUBBLE   3.2407789e-18 /* in h/sec */
 
#define SEC_PER_MEGAYEAR   3.15576e13
 
#define SEC_PER_YEAR   3.15576e7
 
#define FOF_PRIMARY_LINK_TYPES   2
 
#define FOF_SECONDARY_LINK_TYPES   0
 
#define FOF_LINKLENGTH   0.2
 
#define FOF_GROUP_MIN_LEN   32
 
#define MULTIPOLE_ORDER   1
 
#define ASMTH   1.25
 
#define RCUT   7.0
 
#define MAXLEN_OUTPUTLIST   1100
 
#define MAXLEN_PATH   512
 
#define MAXLEN_PATH_EXTRA   2048
 
#define BASENUMBER   100
 
#define MAXITER   10000
 
#define NTYPES   6
 
#define NSOFTCLASSES   NTYPES
 
#define NSOFTCLASSES_HYDRO   0
 
#define TIMEBINS   29
 
#define TIMEBASE   (1 << TIMEBINS)
 
#define STAR_TYPE   4
 
#define NUMDIMS   3
 
#define KERNEL_COEFF_1   2.546479089470
 
#define KERNEL_COEFF_2   15.278874536822
 
#define KERNEL_COEFF_3   45.836623610466
 
#define KERNEL_COEFF_4   30.557749073644
 
#define KERNEL_COEFF_5   5.092958178941
 
#define KERNEL_COEFF_6   (-15.278874536822)
 
#define NORM_COEFF   4.188790204786
 
#define SOFTFAC1   (32.0 / 3)
 
#define SOFTFAC2   32.0
 
#define SOFTFAC3   (-38.4)
 
#define SOFTFAC4   (-2.8)
 
#define SOFTFAC5   (16.0 / 3)
 
#define SOFTFAC6   6.4
 
#define SOFTFAC7   (-9.6)
 
#define SOFTFAC8   (64.0 / 3)
 
#define SOFTFAC9   (-48.0)
 
#define SOFTFAC10   38.4
 
#define SOFTFAC11   (-32.0 / 3)
 
#define SOFTFAC12   (-1.0 / 15)
 
#define SOFTFAC13   (-3.2)
 
#define SOFTFAC14   (1.0 / 15)
 
#define SOFTFAC15   (-16.0)
 
#define SOFTFAC16   9.6
 
#define SOFTFAC17   (-64.0 / 30)
 
#define SOFTFAC18   128.0
 
#define SOFTFAC19   (-115.2)
 
#define SOFTFAC20   (64.0 / 3)
 
#define SOFTFAC21   (-96.0)
 
#define SOFTFAC22   115.2
 
#define SOFTFAC23   (-128.0 / 3)
 
#define SOFTFAC24   (4.0 / 30)
 
#define SOFTFAC30   (32.0 / 3)
 
#define SOFTFAC31   (-576.0 / 5)
 
#define SOFTFAC32   (128.0)
 
#define SOFTFAC33   (-1152.0 / 5)
 
#define SOFTFAC34   (384.0)
 
#define SOFTFAC35   (2.0 * 384.0)
 
#define SOFTFAC40   (64.0 / 3)
 
#define SOFTFAC41   (2.0 / 15)
 
#define SOFTFAC42   (-96.0)
 
#define SOFTFAC43   (576.0 / 5)
 
#define SOFTFAC44   (-128.0 / 3)
 
#define SOFTFAC45   (-96.0)
 
#define SOFTFAC46   (-2.0 / 5)
 
#define SOFTFAC47   (1152.0 / 5)
 
#define SOFTFAC48   (-128.0)
 
#define SOFTFAC49   (8.0 / 5)
 
#define SOFTFAC50   (-256.0)
 
#define SOFTFAC51   (-8.0)
 
#define SQRT_PI   1.772453850906 /* sqrt(M_PI) */
 
#define FACT1   0.366025403785 /* FACT1 = 0.5 * (sqrt(3)-1) */
 
#define FACTSQRT3HALF   0.866025403785 /* sqrt(3)/2 */
 
#define FACTSQRT3   (2.0 * 0.866025403785) /* sqrt(3) */
 

Typedefs

typedef int integertime
 

Detailed Description

declares global constants and checks plausibility of configuration

Definition in file constants.h.

Macro Definition Documentation

◆ ALLOC_STARBH_ROOM

#define ALLOC_STARBH_ROOM   0.02

Definition at line 77 of file constants.h.

◆ ALLOC_TOLERANCE

#define ALLOC_TOLERANCE   0.2

Definition at line 74 of file constants.h.

◆ ASMTH

#define ASMTH   1.25

ASMTH gives the scale of the short-range/long-range force split in units of FFT-mesh cells

Definition at line 287 of file constants.h.

◆ BASENUMBER

#define BASENUMBER   100

Definition at line 303 of file constants.h.

◆ BOLTZMANN

#define BOLTZMANN   1.38065e-16

Definition at line 120 of file constants.h.

◆ CLIGHT

#define CLIGHT   2.99792458e10

Definition at line 121 of file constants.h.

◆ COMMBUFFERSIZE

#define COMMBUFFERSIZE   (32 * 1024LL * 1024LL)

Definition at line 47 of file constants.h.

◆ DIRECT_SUMMATION_THRESHOLD

#define DIRECT_SUMMATION_THRESHOLD   500

Definition at line 39 of file constants.h.

◆ FACT1

#define FACT1   0.366025403785 /* FACT1 = 0.5 * (sqrt(3)-1) */

Definition at line 435 of file constants.h.

◆ FACTSQRT3

#define FACTSQRT3   (2.0 * 0.866025403785) /* sqrt(3) */

Definition at line 437 of file constants.h.

◆ FACTSQRT3HALF

#define FACTSQRT3HALF   0.866025403785 /* sqrt(3)/2 */

Definition at line 436 of file constants.h.

◆ FILEFORMAT_HDF5

#define FILEFORMAT_HDF5   3

Definition at line 19 of file constants.h.

◆ FILEFORMAT_LEGACY1

#define FILEFORMAT_LEGACY1   1

Definition at line 17 of file constants.h.

◆ FILEFORMAT_LEGACY2

#define FILEFORMAT_LEGACY2   2

Definition at line 18 of file constants.h.

◆ FIRST_HALF_STEP

#define FIRST_HALF_STEP   0

Definition at line 26 of file constants.h.

◆ FLAG_BOUNDARYOVERLAP

#define FLAG_BOUNDARYOVERLAP   2

Definition at line 31 of file constants.h.

◆ FLAG_INSIDE

#define FLAG_INSIDE   1

Definition at line 30 of file constants.h.

◆ FLAG_OUTSIDE

#define FLAG_OUTSIDE   0

Definition at line 29 of file constants.h.

◆ FOF_GROUP_MIN_LEN

#define FOF_GROUP_MIN_LEN   32

Definition at line 143 of file constants.h.

◆ FOF_LINKLENGTH

#define FOF_LINKLENGTH   0.2

Definition at line 139 of file constants.h.

◆ FOF_PRIMARY_LINK_TYPES

#define FOF_PRIMARY_LINK_TYPES   2

Definition at line 131 of file constants.h.

◆ FOF_SECONDARY_LINK_TYPES

#define FOF_SECONDARY_LINK_TYPES   0

Definition at line 135 of file constants.h.

◆ GADGET_VERSION

#define GADGET_VERSION   "4.0" /* code version string */

Definition at line 15 of file constants.h.

◆ GAMMA

#define GAMMA   (5.0 / 3)

adiabatic index of simulated gas

Definition at line 99 of file constants.h.

◆ GAMMA_MINUS1

#define GAMMA_MINUS1   (GAMMA - 1)

Definition at line 110 of file constants.h.

◆ GRAVITY

#define GRAVITY   6.6738e-8

Definition at line 118 of file constants.h.

◆ HIGH_MESH

#define HIGH_MESH   1 /* high-res mesh selector */

Definition at line 34 of file constants.h.

◆ HUBBLE

#define HUBBLE   3.2407789e-18 /* in h/sec */

Definition at line 125 of file constants.h.

◆ HYDROGEN_MASSFRAC

#define HYDROGEN_MASSFRAC   0.76

mass fraction of hydrogen, relevant only for radiative cooling

Definition at line 112 of file constants.h.

◆ KERNEL_COEFF_1

#define KERNEL_COEFF_1   2.546479089470

Coefficients for SPH spline kernel and its derivative

Definition at line 370 of file constants.h.

◆ KERNEL_COEFF_2

#define KERNEL_COEFF_2   15.278874536822

Definition at line 371 of file constants.h.

◆ KERNEL_COEFF_3

#define KERNEL_COEFF_3   45.836623610466

Definition at line 372 of file constants.h.

◆ KERNEL_COEFF_4

#define KERNEL_COEFF_4   30.557749073644

Definition at line 373 of file constants.h.

◆ KERNEL_COEFF_5

#define KERNEL_COEFF_5   5.092958178941

Definition at line 374 of file constants.h.

◆ KERNEL_COEFF_6

#define KERNEL_COEFF_6   (-15.278874536822)

Definition at line 375 of file constants.h.

◆ LIGHTCONE_ALLOC_FAC

#define LIGHTCONE_ALLOC_FAC   0.1

Definition at line 62 of file constants.h.

◆ LIGHTCONE_MASSMAP_ALLOC_FAC

#define LIGHTCONE_MASSMAP_ALLOC_FAC   1.0

Definition at line 66 of file constants.h.

◆ LIGHTCONE_MAX_FILLFACTOR

#define LIGHTCONE_MAX_FILLFACTOR   0.9

Definition at line 70 of file constants.h.

◆ LOW_MESH

#define LOW_MESH   0 /* low-res mesh selector */

Definition at line 33 of file constants.h.

◆ M_PI

#define M_PI   3.14159265358979323846

Definition at line 56 of file constants.h.

◆ MAX_DOUBLE_NUMBER

#define MAX_DOUBLE_NUMBER   1e306

Definition at line 81 of file constants.h.

◆ MAX_FIRST_ELEMENTS_CONSIDERED

#define MAX_FIRST_ELEMENTS_CONSIDERED    5 /* This sets the number of lowest loaded tasks to be considered for assignment of next domain patch */

Definition at line 44 of file constants.h.

◆ MAX_FLOAT_NUMBER

#define MAX_FLOAT_NUMBER   1e37

Definition at line 79 of file constants.h.

◆ MAX_REAL_NUMBER

#define MAX_REAL_NUMBER   MAX_FLOAT_NUMBER

Definition at line 94 of file constants.h.

◆ MAX_THREADS

#define MAX_THREADS   128

Definition at line 36 of file constants.h.

◆ MAXITER

#define MAXITER   10000

Definition at line 305 of file constants.h.

◆ MAXLEN_OUTPUTLIST

#define MAXLEN_OUTPUTLIST   1100

maxmimum number of entries in output list

Definition at line 297 of file constants.h.

◆ MAXLEN_PATH

#define MAXLEN_PATH   512

maximum length of various filenames (full path)

Definition at line 300 of file constants.h.

◆ MAXLEN_PATH_EXTRA

#define MAXLEN_PATH_EXTRA   2048

maximum length of various filenames, plus extra space

Definition at line 301 of file constants.h.

◆ METAL_YIELD

#define METAL_YIELD   0.02

effective metal yield for star formation

Definition at line 114 of file constants.h.

◆ MIN_DOUBLE_NUMBER

#define MIN_DOUBLE_NUMBER   1e-306

Definition at line 82 of file constants.h.

◆ MIN_FLOAT_NUMBER

#define MIN_FLOAT_NUMBER   1e-37

Definition at line 80 of file constants.h.

◆ MIN_REAL_NUMBER

#define MIN_REAL_NUMBER   MIN_FLOAT_NUMBER

Definition at line 95 of file constants.h.

◆ MODE_DEFAULT

#define MODE_DEFAULT   2

Definition at line 23 of file constants.h.

◆ MODE_IMPORTED_PARTICLES

#define MODE_IMPORTED_PARTICLES   1

Definition at line 22 of file constants.h.

◆ MODE_LOCAL_NO_EXPORT

#define MODE_LOCAL_NO_EXPORT   3

Definition at line 24 of file constants.h.

◆ MODE_LOCAL_PARTICLES

#define MODE_LOCAL_PARTICLES   0

Definition at line 21 of file constants.h.

◆ MPI_MESSAGE_SIZELIMIT_IN_BYTES

#define MPI_MESSAGE_SIZELIMIT_IN_BYTES   ((MPI_MESSAGE_SIZELIMIT_IN_MB)*1024LL * 1024LL)

Definition at line 53 of file constants.h.

◆ MPI_MESSAGE_SIZELIMIT_IN_MB

#define MPI_MESSAGE_SIZELIMIT_IN_MB   200

Definition at line 50 of file constants.h.

◆ MULTIPOLE_ORDER

#define MULTIPOLE_ORDER   1

Definition at line 171 of file constants.h.

◆ NORM_COEFF

#define NORM_COEFF   4.188790204786

Coefficient for kernel normalization. Note: 4.0/3 * PI = 4.188790204786

Definition at line 376 of file constants.h.

◆ NSOFTCLASSES

#define NSOFTCLASSES   NTYPES

Definition at line 312 of file constants.h.

◆ NSOFTCLASSES_HYDRO

#define NSOFTCLASSES_HYDRO   0

Definition at line 321 of file constants.h.

◆ NTYPES

#define NTYPES   6

Definition at line 308 of file constants.h.

◆ NUMBER_OF_MEASUREMENTS_TO_RECORD

#define NUMBER_OF_MEASUREMENTS_TO_RECORD   6

Definition at line 42 of file constants.h.

◆ NUMDIMS

#define NUMDIMS   3

For 3D-normalized kernel

Definition at line 369 of file constants.h.

◆ PARSEC

#define PARSEC   3.085678e18

Definition at line 123 of file constants.h.

◆ PROTONMASS

#define PROTONMASS   1.67262178e-24

Definition at line 124 of file constants.h.

◆ RCUT

#define RCUT   7.0

RCUT gives the maximum distance (in units of the scale used for the force split) out to which short-range forces are evaluated in the short-range tree walk.

Definition at line 293 of file constants.h.

◆ SEC_PER_MEGAYEAR

#define SEC_PER_MEGAYEAR   3.15576e13

Definition at line 127 of file constants.h.

◆ SEC_PER_YEAR

#define SEC_PER_YEAR   3.15576e7

Definition at line 128 of file constants.h.

◆ SECOND_HALF_STEP

#define SECOND_HALF_STEP   1

Definition at line 27 of file constants.h.

◆ SMALLNUM

#define SMALLNUM   1e-60

Definition at line 83 of file constants.h.

◆ SOFTFAC1

#define SOFTFAC1   (32.0 / 3)

Coefficients for gravitational softening

Definition at line 389 of file constants.h.

◆ SOFTFAC10

#define SOFTFAC10   38.4

Definition at line 398 of file constants.h.

◆ SOFTFAC11

#define SOFTFAC11   (-32.0 / 3)

Definition at line 399 of file constants.h.

◆ SOFTFAC12

#define SOFTFAC12   (-1.0 / 15)

Definition at line 400 of file constants.h.

◆ SOFTFAC13

#define SOFTFAC13   (-3.2)

Definition at line 401 of file constants.h.

◆ SOFTFAC14

#define SOFTFAC14   (1.0 / 15)

Definition at line 402 of file constants.h.

◆ SOFTFAC15

#define SOFTFAC15   (-16.0)

Definition at line 403 of file constants.h.

◆ SOFTFAC16

#define SOFTFAC16   9.6

Definition at line 404 of file constants.h.

◆ SOFTFAC17

#define SOFTFAC17   (-64.0 / 30)

Definition at line 405 of file constants.h.

◆ SOFTFAC18

#define SOFTFAC18   128.0

Definition at line 406 of file constants.h.

◆ SOFTFAC19

#define SOFTFAC19   (-115.2)

Definition at line 407 of file constants.h.

◆ SOFTFAC2

#define SOFTFAC2   32.0

Definition at line 390 of file constants.h.

◆ SOFTFAC20

#define SOFTFAC20   (64.0 / 3)

Definition at line 408 of file constants.h.

◆ SOFTFAC21

#define SOFTFAC21   (-96.0)

Definition at line 409 of file constants.h.

◆ SOFTFAC22

#define SOFTFAC22   115.2

Definition at line 410 of file constants.h.

◆ SOFTFAC23

#define SOFTFAC23   (-128.0 / 3)

Definition at line 411 of file constants.h.

◆ SOFTFAC24

#define SOFTFAC24   (4.0 / 30)

Definition at line 412 of file constants.h.

◆ SOFTFAC3

#define SOFTFAC3   (-38.4)

Definition at line 391 of file constants.h.

◆ SOFTFAC30

#define SOFTFAC30   (32.0 / 3)

Definition at line 414 of file constants.h.

◆ SOFTFAC31

#define SOFTFAC31   (-576.0 / 5)

Definition at line 415 of file constants.h.

◆ SOFTFAC32

#define SOFTFAC32   (128.0)

Definition at line 416 of file constants.h.

◆ SOFTFAC33

#define SOFTFAC33   (-1152.0 / 5)

Definition at line 417 of file constants.h.

◆ SOFTFAC34

#define SOFTFAC34   (384.0)

Definition at line 418 of file constants.h.

◆ SOFTFAC35

#define SOFTFAC35   (2.0 * 384.0)

Definition at line 419 of file constants.h.

◆ SOFTFAC4

#define SOFTFAC4   (-2.8)

Definition at line 392 of file constants.h.

◆ SOFTFAC40

#define SOFTFAC40   (64.0 / 3)

Definition at line 421 of file constants.h.

◆ SOFTFAC41

#define SOFTFAC41   (2.0 / 15)

Definition at line 422 of file constants.h.

◆ SOFTFAC42

#define SOFTFAC42   (-96.0)

Definition at line 423 of file constants.h.

◆ SOFTFAC43

#define SOFTFAC43   (576.0 / 5)

Definition at line 424 of file constants.h.

◆ SOFTFAC44

#define SOFTFAC44   (-128.0 / 3)

Definition at line 425 of file constants.h.

◆ SOFTFAC45

#define SOFTFAC45   (-96.0)

Definition at line 426 of file constants.h.

◆ SOFTFAC46

#define SOFTFAC46   (-2.0 / 5)

Definition at line 427 of file constants.h.

◆ SOFTFAC47

#define SOFTFAC47   (1152.0 / 5)

Definition at line 428 of file constants.h.

◆ SOFTFAC48

#define SOFTFAC48   (-128.0)

Definition at line 429 of file constants.h.

◆ SOFTFAC49

#define SOFTFAC49   (8.0 / 5)

Definition at line 430 of file constants.h.

◆ SOFTFAC5

#define SOFTFAC5   (16.0 / 3)

Definition at line 393 of file constants.h.

◆ SOFTFAC50

#define SOFTFAC50   (-256.0)

Definition at line 431 of file constants.h.

◆ SOFTFAC51

#define SOFTFAC51   (-8.0)

Definition at line 432 of file constants.h.

◆ SOFTFAC6

#define SOFTFAC6   6.4

Definition at line 394 of file constants.h.

◆ SOFTFAC7

#define SOFTFAC7   (-9.6)

Definition at line 395 of file constants.h.

◆ SOFTFAC8

#define SOFTFAC8   (64.0 / 3)

Definition at line 396 of file constants.h.

◆ SOFTFAC9

#define SOFTFAC9   (-48.0)

Definition at line 397 of file constants.h.

◆ SOLAR_MASS

#define SOLAR_MASS   1.989e33

Definition at line 119 of file constants.h.

◆ SQRT_PI

#define SQRT_PI   1.772453850906 /* sqrt(M_PI) */

Definition at line 434 of file constants.h.

◆ STAR_TYPE

#define STAR_TYPE   4

Definition at line 351 of file constants.h.

◆ TIMEBASE

#define TIMEBASE   (1 << TIMEBINS)

Definition at line 333 of file constants.h.

◆ TIMEBINS

#define TIMEBINS   29

Definition at line 332 of file constants.h.

◆ TO_MBYTE_FAC

#define TO_MBYTE_FAC   (1.0 / (1024.0 * 1024.0))

Definition at line 59 of file constants.h.

Typedef Documentation

◆ integertime

typedef int integertime

Definition at line 331 of file constants.h.