Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

allvars.c File Reference

provides instances of all global variables. More...

#include <stdio.h>
#include <gsl/gsl_rng.h>
#include "tags.h"
#include "allvars.h"

Go to the source code of this file.

Variables

int ThisTask
int NTask
int PTask
int NumPart
int N_gas
long long Ntype [6]
int NtypeLocal [6]
int NumForceUpdate
int NumSphUpdate
double CPUThisRun
int RestartFlag
char * Exportflag
int * Ngblist
int TreeReconstructFlag
int Flag_FullStep
gsl_rng * random_generator
double RndTable [256]
double DomainCorner [3]
double DomainCenter [3]
double DomainLen
double DomainFac
int DomainMyStart
int DomainMyLast
int * DomainStartList
int * DomainEndList
double * DomainWork
int * DomainCount
int * DomainCountSph
int * DomainTask
int * DomainNodeIndex
float * DomainTreeNodeLen
float * DomainHmax
DomainNODEDomainMoment
peanokeyDomainKeyBuf
peanokeyKey
peanokeyKeySorted
int NTopnodes
int NTopleaves
topnode_dataTopNodes
double TimeOfLastTreeConstruction
char ParameterFile [100]
FILE * FdInfo
FILE * FdEnergy
FILE * FdTimings
FILE * FdCPU
FILE * FdForceTest
double DriftTable [1000]
double GravKickTable [1000]
double HydroKickTable [1000]
void * CommBuffer
global_data_all_processes All
particle_dataP
particle_dataDomainPartBuf
sph_particle_dataSphP
sph_particle_dataDomainSphBuf
int MaxNodes
int Numnodestree
NODENodes_base
NODENodes
int * Nextnode
int * Father
extNODEExtnodes_base
extNODEExtnodes
io_header header
char Tab_IO_Labels [11][4]
state_of_system SysState
gravdata_inGravDataIn
gravdata_inGravDataGet
gravdata_inGravDataResult
gravdata_inGravDataOut
gravdata_indexGravDataIndexTable
densdata_inDensDataIn
densdata_inDensDataGet
densdata_outDensDataResult
densdata_outDensDataPartialResult
hydrodata_inHydroDataIn
hydrodata_inHydroDataGet
hydrodata_outHydroDataResult
hydrodata_outHydroDataPartialResult


Detailed Description

provides instances of all global variables.

Definition in file allvars.c.


Variable Documentation

struct global_data_all_processes All
 

This structure contains 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 111 of file allvars.c.

Referenced by advance_and_find_timesteps(), allocate_commbuffers(), allocate_memory(), begrun(), check_omega(), compute_accelerations(), compute_global_quantities_of_system(), compute_potential(), density(), density_evaluate(), do_box_wrapping(), domain_decompose(), domain_Decomposition(), domain_findExchangeNumbers(), drift_integ(), energy_statistics(), every_timestep_stuff(), fill_write_buffer(), find_files(), find_next_outputtime(), find_next_sync_point_and_drift(), force_treebuild(), force_treebuild_single(), force_treeevaluate(), force_treeevaluate_direct(), force_treeevaluate_ewald_correction(), force_treeevaluate_potential(), force_treeevaluate_potential_shortrange(), force_treeevaluate_shortrange(), force_treeupdate_pseudos(), force_update_node_recursive(), free_memory(), get_drift_factor(), get_gravkick_factor(), get_hydrokick_factor(), get_particles_in_block(), gravity_forcetest(), gravity_tree(), gravkick_integ(), growthfactor_integ(), hydro_evaluate(), hydro_force(), hydrokick_integ(), init(), init_drift_table(), long_range_force(), main(), move_particles(), ngb_treeallocate(), ngb_treefind_pairs(), ngb_treefind_variable(), open_outputfiles(), pm_init_periodic(), pmforce_periodic(), pmpotential_periodic(), read_file(), read_ic(), read_outputlist(), read_parameter_file(), readjust_timebase(), restart(), run(), savepositions(), set_softenings(), set_units(), setup_smoothinglengths(), and write_file().

void* CommBuffer
 

points to communication buffer, which is used in the domain decomposition, the parallel tree-force computation, the SPH routines, etc.

Definition at line 101 of file allvars.c.

Referenced by allocate_commbuffers(), read_file(), and write_file().

double CPUThisRun
 

Sums the CPU time for the process (current submission only)

Definition at line 23 of file allvars.c.

Referenced by main(), and run().

struct densdata_in * DensDataGet
 

holds imported particle data for SPH density computation

Definition at line 191 of file allvars.c.

Referenced by allocate_commbuffers(), density(), and density_evaluate().

struct densdata_in* DensDataIn
 

holds particle data for SPH density computation to be exported to other processors

Definition at line 191 of file allvars.c.

Referenced by allocate_commbuffers(), and density().

struct densdata_out * DensDataPartialResult
 

imported partial SPH density results from other processors

Definition at line 195 of file allvars.c.

Referenced by allocate_commbuffers(), and density().

struct densdata_out* DensDataResult
 

stores the locally computed SPH density results for imported particles

Definition at line 195 of file allvars.c.

Referenced by allocate_commbuffers(), density(), and density_evaluate().

double DomainCenter[3]
 

gives the center of simulation volume

Definition at line 47 of file allvars.c.

Referenced by domain_findExtent(), force_treebuild_single(), and restart().

double DomainCorner[3]
 

gives the lower left corner of simulation volume

Definition at line 46 of file allvars.c.

Referenced by domain_determineTopTree(), domain_findExtent(), force_treebuild_single(), and restart().

int* DomainCount
 

a table that gives the total number of particles held by each processor

Definition at line 55 of file allvars.c.

Referenced by allocate_commbuffers(), domain_findSplit(), domain_shiftSplit(), and domain_sumCost().

int* DomainCountSph
 

a table that gives the total number of SPH particles held by each processor

Definition at line 56 of file allvars.c.

Referenced by allocate_commbuffers(), domain_findSplit(), domain_shiftSplit(), and domain_sumCost().

int* DomainEndList
 

a table that lists the last domain mesh cell for all processors

Definition at line 53 of file allvars.c.

Referenced by allocate_commbuffers(), domain_decompose(), domain_findSplit(), domain_shiftSplit(), and restart().

double DomainFac
 

factor used for converting particle coordinates to a Peano-Hilbert mesh covering the simulation volume

Definition at line 49 of file allvars.c.

Referenced by domain_determineTopTree(), domain_findExtent(), force_treebuild_single(), and restart().

float* DomainHmax
 

this table gives for each leaf of the top-level tree the maximum SPH smoothing length among the particles of the corresponding node of the gravitational tree

Definition at line 61 of file allvars.c.

Referenced by allocate_commbuffers(), force_update_hmax(), force_update_node_hmax_toptree(), and restart().

peanokey* DomainKeyBuf
 

this points to a buffer used during the exchange of particle data

Definition at line 66 of file allvars.c.

Referenced by allocate_commbuffers(), and domain_exchangeParticles().

double DomainLen
 

gives the (maximum) side-length of simulation volume

Definition at line 48 of file allvars.c.

Referenced by domain_findExtent(), and restart().

struct DomainNODE* DomainMoment
 

this table stores for each node of the top-level tree corresponding node data from the gravitational tree

Definition at line 63 of file allvars.c.

Referenced by allocate_commbuffers(), force_exchange_pseudodata(), force_insert_pseudo_particles(), force_treeupdate_pseudos(), and restart().

int DomainMyLast
 

last domain mesh cell that resides on the local processor

Definition at line 51 of file allvars.c.

Referenced by domain_decompose(), and restart().

int DomainMyStart
 

first domain mesh cell that resides on the local processor

Definition at line 50 of file allvars.c.

Referenced by domain_decompose(), and restart().

int* DomainNodeIndex
 

this table gives for each leaf of the top-level tree the corresponding node of the gravitational tree

Definition at line 59 of file allvars.c.

Referenced by allocate_commbuffers(), force_create_empty_nodes(), force_exchange_pseudodata(), force_flag_localnodes(), force_insert_pseudo_particles(), force_treebuild_single(), force_treeupdate_pseudos(), force_update_hmax(), force_update_len(), force_update_node_hmax_toptree(), force_update_node_len_toptree(), and restart().

struct particle_data * DomainPartBuf
 

buffer for particle data used in domain decomposition

Definition at line 119 of file allvars.c.

Referenced by allocate_commbuffers(), and domain_exchangeParticles().

struct sph_particle_data * DomainSphBuf
 

buffer for SPH particle data in domain decomposition

Definition at line 127 of file allvars.c.

Referenced by allocate_commbuffers(), and domain_exchangeParticles().

int* DomainStartList
 

a table that lists the first domain mesh cell for all processors

Definition at line 52 of file allvars.c.

Referenced by allocate_commbuffers(), domain_decompose(), domain_findSplit(), domain_shiftSplit(), and restart().

int* DomainTask
 

this table gives for each leaf of the top-level tree the processor it was assigned to

Definition at line 58 of file allvars.c.

Referenced by allocate_commbuffers(), domain_countToGo(), domain_exchangeParticles(), domain_findSplit(), domain_shiftSplit(), force_treeevaluate_ewald_correction(), ngb_treefind_pairs(), ngb_treefind_variable(), and restart().

float* DomainTreeNodeLen
 

this table gives for each leaf of the top-level tree the side-length of the corresponding node of the gravitational tree

Definition at line 60 of file allvars.c.

Referenced by allocate_commbuffers(), force_update_len(), force_update_node_len_toptree(), and restart().

double* DomainWork
 

a table that gives the total "work" due to the particles stored by each processor

Definition at line 54 of file allvars.c.

Referenced by allocate_commbuffers(), domain_shiftSplit(), and domain_sumCost().

double DriftTable[1000]
 

table for the cosmological drift factors

Definition at line 97 of file allvars.c.

Referenced by get_drift_factor(), and init_drift_table().

char* Exportflag
 

Buffer used for flagging whether a particle needs to be exported to another process

Definition at line 30 of file allvars.c.

Referenced by allocate_commbuffers(), compute_potential(), density(), force_treeevaluate_ewald_correction(), gravity_forcetest(), gravity_tree(), hydro_force(), ngb_treefind_pairs(), and ngb_treefind_variable().

struct extNODE * Extnodes
 

provides shifted access to extended node information, parallel to Nodes/Nodes_base

Definition at line 151 of file allvars.c.

Referenced by advance_and_find_timesteps(), force_exchange_pseudodata(), force_treeupdate_pseudos(), force_update_hmax(), force_update_node_hmax_local(), force_update_node_hmax_toptree(), force_update_node_recursive(), move_particles(), and ngb_treefind_pairs().

struct extNODE* Extnodes_base
 

points to the actual memory allocted for the extended node information

Definition at line 151 of file allvars.c.

Referenced by restart().

int* Father
 

gives parent node in tree

Definition at line 148 of file allvars.c.

Referenced by advance_and_find_timesteps(), force_update_node_hmax_local(), force_update_node_len_local(), restart(), and setup_smoothinglengths().

FILE* FdCPU
 

file handle for cpu.txt log-file.

Definition at line 90 of file allvars.c.

Referenced by close_outputfiles(), every_timestep_stuff(), and open_outputfiles().

FILE* FdEnergy
 

file handle for energy.txt log-file.

Definition at line 88 of file allvars.c.

Referenced by close_outputfiles(), energy_statistics(), and open_outputfiles().

FILE* FdForceTest
 

file handle for forcetest.txt log-file.

Definition at line 93 of file allvars.c.

Referenced by close_outputfiles(), gravity_forcetest(), and open_outputfiles().

FILE* FdInfo
 

file handle for info.txt log-file.

Definition at line 87 of file allvars.c.

Referenced by close_outputfiles(), every_timestep_stuff(), and open_outputfiles().

FILE* FdTimings
 

file handle for timings.txt log-file.

Definition at line 89 of file allvars.c.

Referenced by close_outputfiles(), gravity_forcetest(), gravity_tree(), and open_outputfiles().

int Flag_FullStep
 

This flag signals that the current step involves all particles

Definition at line 36 of file allvars.c.

Referenced by advance_and_find_timesteps(), find_next_sync_point_and_drift(), and init().

struct gravdata_in * GravDataGet
 

holds particle data imported from other processors

Definition at line 180 of file allvars.c.

Referenced by allocate_commbuffers(), compute_potential(), gravity_forcetest(), and gravity_tree().

struct gravdata_in* GravDataIn
 

holds particle data to be exported to other processors

Definition at line 180 of file allvars.c.

Referenced by allocate_commbuffers(), compute_potential(), gravity_forcetest(), and gravity_tree().

struct gravdata_index* GravDataIndexTable
 

the particles to be exported are grouped by task-number. This table allows the results to be disentangled again and to be assigned to the correct particle

Definition at line 186 of file allvars.c.

Referenced by allocate_commbuffers(), compute_potential(), gravity_forcetest(), and gravity_tree().

struct gravdata_in * GravDataOut
 

holds partial results received from other processors. This will overwrite the GravDataIn array

Definition at line 180 of file allvars.c.

Referenced by allocate_commbuffers(), compute_potential(), gravity_forcetest(), and gravity_tree().

struct gravdata_in * GravDataResult
 

holds the partial results computed for imported particles. Note: We use GravDataResult = GravDataGet, such that the result replaces the imported data

Definition at line 180 of file allvars.c.

Referenced by allocate_commbuffers(), compute_potential(), force_treeevaluate_ewald_correction(), gravity_forcetest(), and gravity_tree().

double GravKickTable[1000]
 

table for the cosmological kick factor for gravitational forces

Definition at line 98 of file allvars.c.

Referenced by get_gravkick_factor(), and init_drift_table().

struct io_header header
 

holds header for snapshot files

Definition at line 161 of file allvars.c.

Referenced by find_files(), get_particles_in_block(), init(), read_file(), read_header_attributes_in_hdf5(), and write_file().

struct hydrodata_in * HydroDataGet
 

holds imported particle data for SPH hydro-force computation

Definition at line 201 of file allvars.c.

Referenced by allocate_commbuffers(), hydro_evaluate(), and hydro_force().

struct hydrodata_in* HydroDataIn
 

holds particle data for SPH hydro-force computation to be exported to other processors

Definition at line 201 of file allvars.c.

Referenced by allocate_commbuffers(), and hydro_force().

struct hydrodata_out * HydroDataPartialResult
 

imported partial SPH hydro-force results from other processors

Definition at line 205 of file allvars.c.

Referenced by allocate_commbuffers(), and hydro_force().

struct hydrodata_out* HydroDataResult
 

stores the locally computed SPH hydro results for imported particles

Definition at line 205 of file allvars.c.

Referenced by allocate_commbuffers(), hydro_evaluate(), and hydro_force().

double HydroKickTable[1000]
 

table for the cosmological kick factor for hydrodynmical forces

Definition at line 99 of file allvars.c.

Referenced by get_hydrokick_factor(), and init_drift_table().

peanokey* Key
 

a table used for storing Peano-Hilbert keys for particles

Definition at line 68 of file allvars.c.

Referenced by domain_countToGo(), domain_Decomposition(), domain_determineTopTree(), domain_exchangeParticles(), domain_sumCost(), and peano_hilbert_order().

peanokey* KeySorted
 

holds a sorted table of Peano-Hilbert keys for all particles, used to construct top-level tree

Definition at line 69 of file allvars.c.

Referenced by domain_Decomposition(), and domain_determineTopTree().

int MaxNodes
 

maximum allowed number of internal nodes

Definition at line 138 of file allvars.c.

Referenced by force_create_empty_nodes(), force_treeallocate(), force_treebuild_single(), and restart().

int N_gas
 

number of gas particles on the LOCAL processor

Definition at line 16 of file allvars.c.

Referenced by density(), domain_Decomposition(), domain_exchangeParticles(), hydro_force(), ngb_treebuild(), peano_hilbert_order(), read_file(), read_ic(), and restart().

int* Nextnode
 

gives next node in tree walk

Definition at line 147 of file allvars.c.

Referenced by force_treebuild_single(), force_treeevaluate_ewald_correction(), force_update_node_recursive(), ngb_treefind_pairs(), ngb_treefind_variable(), and restart().

int* Ngblist
 

Buffer to hold indices of neighbours retrieved by the neighbour search routines

Definition at line 32 of file allvars.c.

Referenced by density_evaluate(), hydro_evaluate(), ngb_clear_buf(), ngb_treeallocate(), ngb_treefind_pairs(), ngb_treefind_variable(), and ngb_treefree().

struct NODE * Nodes
 

this is a pointer used to access the nodes which is shifted such that Nodes[All.MaxPart] gives the first allocated node

Definition at line 141 of file allvars.c.

Referenced by advance_and_find_timesteps(), force_create_empty_nodes(), force_exchange_pseudodata(), force_flag_localnodes(), force_insert_pseudo_particles(), force_treebuild_single(), force_treeevaluate_ewald_correction(), force_treeupdate_pseudos(), force_update_len(), force_update_node_hmax_local(), force_update_node_hmax_toptree(), force_update_node_len_local(), force_update_node_len_toptree(), force_update_node_recursive(), move_particles(), ngb_treefind_pairs(), ngb_treefind_variable(), and setup_smoothinglengths().

struct NODE* Nodes_base
 

points to the actual memory allocted for the nodes

Definition at line 141 of file allvars.c.

Referenced by force_treeallocate(), and restart().

int NTask
 

number of processors

Definition at line 12 of file allvars.c.

Referenced by allocate_commbuffers(), begrun(), compute_potential(), density(), domain_countToGo(), domain_decompose(), domain_Decomposition(), domain_findExchangeNumbers(), domain_shiftSplit(), every_timestep_stuff(), gravity_forcetest(), gravity_tree(), hydro_force(), main(), pm_init_periodic(), read_ic(), restart(), and savepositions().

int NTopleaves
 

number of leaves in top-level tree. Each leaf can be assigned to a different processor

Definition at line 73 of file allvars.c.

Referenced by domain_decompose(), domain_sumCost(), and domain_walktoptree().

int NTopnodes
 

total number of nodes in top-level tree

Definition at line 72 of file allvars.c.

Referenced by domain_sumCost(), domain_topsplit(), and domain_topsplit_local().

long long Ntype[6]
 

total number of particles of each type

Definition at line 17 of file allvars.c.

Referenced by domain_decompose().

int NtypeLocal[6]
 

local number of particles of each type

Definition at line 18 of file allvars.c.

Referenced by domain_decompose().

int NumForceUpdate
 

number of active particles on local processor in current timestep

Definition at line 20 of file allvars.c.

Referenced by gravity_forcetest(), and gravity_tree().

int Numnodestree
 

number of (internal) nodes in each tree

Definition at line 139 of file allvars.c.

Referenced by force_treebuild(), and restart().

int NumPart
 

number of particles on the LOCAL processor

Definition at line 15 of file allvars.c.

Referenced by compute_potential(), domain_Decomposition(), domain_exchangeParticles(), gravity_forcetest(), gravity_tree(), peano_hilbert_order(), read_file(), read_ic(), and restart().

int NumSphUpdate
 

number of active SPH particles on local processor in current timestep

Definition at line 21 of file allvars.c.

Referenced by density(), and hydro_force().

struct particle_data* P
 

holds particle data on local processor

Definition at line 119 of file allvars.c.

Referenced by advance_and_find_timesteps(), allocate_memory(), check_omega(), compute_global_quantities_of_system(), compute_potential(), density(), density_evaluate(), do_box_wrapping(), domain_countToGo(), domain_decompose(), domain_determineTopTree(), domain_exchangeParticles(), domain_findExtent(), domain_sumCost(), empty_read_buffer(), fill_write_buffer(), find_next_sync_point_and_drift(), force_treebuild_single(), force_treeevaluate(), force_treeevaluate_direct(), force_treeevaluate_ewald_correction(), force_treeevaluate_potential(), force_treeevaluate_potential_shortrange(), force_treeevaluate_shortrange(), force_update_node_len_local(), force_update_node_recursive(), free_memory(), get_timestep(), gravity_forcetest(), gravity_tree(), hydro_evaluate(), hydro_force(), init(), long_range_force(), move_particles(), ngb_clear_buf(), ngb_treefind_pairs(), ngb_treefind_variable(), pmforce_periodic(), pmpotential_periodic(), read_file(), read_ic(), readjust_timebase(), reorder_gas(), reorder_particles(), restart(), savepositions(), and setup_smoothinglengths().

char ParameterFile[100]
 

file name of parameterfile used for starting the simulation

Definition at line 85 of file allvars.c.

Referenced by begrun(), and main().

int PTask
 

smallest integer such that NTask <= 2^PTask

Definition at line 13 of file allvars.c.

Referenced by main().

gsl_rng* random_generator
 

the employed random number generator of the GSL library

Definition at line 39 of file allvars.c.

Referenced by begrun(), and restart().

int 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 26 of file allvars.c.

Referenced by begrun(), init(), long_range_init_regionsize(), main(), open_outputfiles(), read_file(), read_ic(), and setup_smoothinglengths().

double RndTable[256]
 

Hold a table with random numbers, refreshed every timestep

Definition at line 43 of file allvars.c.

Referenced by get_random_number(), and set_random_numbers().

struct sph_particle_data* SphP
 

holds SPH particle data on local processor

Definition at line 127 of file allvars.c.

Referenced by advance_and_find_timesteps(), allocate_memory(), compute_global_quantities_of_system(), compute_potential(), density(), density_evaluate(), domain_exchangeParticles(), empty_read_buffer(), fill_write_buffer(), force_treeevaluate(), force_treeevaluate_potential(), force_treeevaluate_potential_shortrange(), force_treeevaluate_shortrange(), force_update_node_hmax_local(), force_update_node_recursive(), free_memory(), get_timestep(), gravity_tree(), hydro_evaluate(), hydro_force(), init(), move_particles(), ngb_treefind_pairs(), read_ic(), reorder_gas(), restart(), and setup_smoothinglengths().

struct state_of_system SysState
 

Definition at line 173 of file allvars.c.

Referenced by compute_global_quantities_of_system(), and energy_statistics().

char Tab_IO_Labels[11][4]
 

Definition at line 167 of file allvars.c.

Referenced by fill_Tab_IO_Labels(), read_file(), and write_file().

int ThisTask
 

the rank of the local processor

Definition at line 11 of file allvars.c.

Referenced by advance_and_find_timesteps(), allocate_commbuffers(), allocate_memory(), begrun(), check_omega(), close_outputfiles(), compute_accelerations(), compute_global_quantities_of_system(), compute_potential(), density(), distribute_file(), domain_decompose(), domain_Decomposition(), domain_exchangeParticles(), domain_sumCost(), domain_topsplit(), domain_topsplit_local(), endrun(), energy_statistics(), every_timestep_stuff(), ewald_init(), find_files(), force_create_empty_nodes(), force_treebuild_single(), gravity_forcetest(), gravity_tree(), hydro_force(), init(), main(), my_fread(), my_fwrite(), ngb_treeallocate(), ngb_treebuild(), ngb_treefind_variable(), open_outputfiles(), peano_hilbert_order(), pm_init_periodic(), pm_init_periodic_allocate(), pmforce_periodic(), pmpotential_periodic(), read_file(), read_ic(), read_parameter_file(), readjust_timebase(), restart(), run(), savepositions(), set_units(), and write_file().

double TimeOfLastTreeConstruction
 

holds what it says, only used in connection with FORCETEST

Definition at line 79 of file allvars.c.

Referenced by force_treebuild(), and gravity_forcetest().

struct topnode_data* TopNodes
 

points to the root node of the top-level tree

Definition at line 75 of file allvars.c.

Referenced by allocate_commbuffers(), domain_countToGo(), domain_exchangeParticles(), domain_sumCost(), domain_topsplit(), domain_topsplit_local(), domain_walktoptree(), force_create_empty_nodes(), and force_treebuild_single().

int TreeReconstructFlag
 

Signals that a new tree needs to be constructed

Definition at line 34 of file allvars.c.

Referenced by compute_potential(), domain_Decomposition(), gravity_tree(), and init().


Generated on Sun May 22 17:33:29 2005 for GADGET-2 by  doxygen 1.3.9.1