#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <mpi.h>
#include <sys/types.h>
#include <unistd.h>
#include <gsl/gsl_rng.h>
#include "allvars.h"
#include "proto.h"
Go to the source code of this file.
Defines | |
#define | DOUBLE 1 |
#define | STRING 2 |
#define | INT 3 |
#define | MAXTAGS 300 |
Functions | |
void | begrun (void) |
void | set_units (void) |
void | open_outputfiles (void) |
void | close_outputfiles (void) |
void | read_parameter_file (char *fname) |
int | read_outputlist (char *fname) |
void | readjust_timebase (double TimeMax_old, double TimeMax_new) |
This file contains various functions to initialize a simulation run. In particular, the parameterfile is read in and parsed, the initial conditions or restart files are read, and global variables are initialized to their proper values.
Definition in file begrun.c.
|
Referenced by read_parameter_file(). |
|
Referenced by read_parameter_file(). |
|
|
|
Referenced by read_parameter_file(). |
|
|
This function closes the global log-files. Definition at line 257 of file begrun.c. References FdCPU, FdEnergy, FdForceTest, FdInfo, FdTimings, and ThisTask. Referenced by run(). |
|
This function opens various log-files that report on the status and performance of the simulstion. On restart from restart-files (start-option 1), the code will append to these files. Definition at line 199 of file begrun.c. References All, global_data_all_processes::CpuFile, endrun(), global_data_all_processes::EnergyFile, FdCPU, FdEnergy, FdForceTest, FdInfo, FdTimings, global_data_all_processes::InfoFile, global_data_all_processes::OutputDir, RestartFlag, ThisTask, and global_data_all_processes::TimingsFile. Referenced by begrun(). |
|
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. < maxmimum number of entries in list of snapshot output times Definition at line 759 of file begrun.c. References All, global_data_all_processes::OutputListLength, and global_data_all_processes::OutputListTimes. Referenced by read_parameter_file(). |
|
|
If a restart from restart-files is carried out where the TimeMax variable is increased, then the integer timeline needs to be adjusted. The approach taken here is to reduce the resolution of the integer timeline by factors of 2 until the new final time can be reached within TIMEBASE. < The simulated timespan is mapped onto the integer interval [0,TIMESPAN], where TIMESPAN needs to be a power of 2. Note that (1<<28) corresponds to 2^29 Definition at line 793 of file begrun.c. References All, global_data_all_processes::ComovingIntegrationOn, endrun(), P, global_data_all_processes::PM_Ti_begstep, global_data_all_processes::PM_Ti_endstep, ThisTask, particle_data::Ti_begstep, global_data_all_processes::Ti_Current, particle_data::Ti_endstep, global_data_all_processes::Timebase_interval, global_data_all_processes::TimeBegin, and global_data_all_processes::TimeMax. Referenced by begrun(). |
|
Computes conversion factors between internal code units and the cgs-system. < Gravitational constant (in cgs units) < mass fraction of hydrogen, relevant only for radiative cooling < adiabatic index of simulated gas Definition at line 149 of file begrun.c. References All, BOLTZMANN, global_data_all_processes::G, GRAVITY, global_data_all_processes::GravityConstantInternal, global_data_all_processes::Hubble, HUBBLE, global_data_all_processes::MinEgySpec, global_data_all_processes::MinGasTemp, pow(), ThisTask, global_data_all_processes::UnitCoolingRate_in_cgs, global_data_all_processes::UnitDensity_in_cgs, global_data_all_processes::UnitEnergy_in_cgs, global_data_all_processes::UnitLength_in_cm, global_data_all_processes::UnitMass_in_g, global_data_all_processes::UnitPressure_in_cgs, global_data_all_processes::UnitTime_in_Megayears, global_data_all_processes::UnitTime_in_s, and global_data_all_processes::UnitVelocity_in_cm_per_s. Referenced by begrun(). |