The FARGO_THORIN code developer's guide
 All Data Structures Files Functions Variables Typedefs Macros
Macros | Functions | Variables
Interpret.c File Reference

Contains the functions required to read the parameter file, and functions that provide runtime information. More...

#include "fargo.h"
Include dependency graph for Interpret.c:

Go to the source code of this file.

Macros

#define MAXVARIABLES   500
 

Functions

void var (char *name, char *ptr, int type, int necessary, char *deflt)
 
void ReadVariables (char *filename)
 
void PrintUsage (char *execname)
 
real TellNbOrbits (real time)
 
real TellNbOutputs (real time)
 
void TellEverything ()
 
void GiveTimeInfo (int number)
 
void InitSpecificTime (boolean profiling, TimeProcess *process_name, char *title)
 
void GiveSpecificTime (boolean profiling, TimeProcess process_name)
 

Variables

int begin_i
 
boolean OpenInner
 
boolean Restart
 
static Param VariableSet [MAXVARIABLES]
 
static int VariableIndex = 0
 
static int FirstStep = YES
 
static clock_t First
 
static clock_t Preceeding
 
static clock_t Current
 
static clock_t FirstUser
 
static clock_t CurrentUser
 
static clock_t PreceedingUser
 
static long Ticks
 
boolean FastTransport = YES
 
boolean GuidingCenter = NO
 
boolean IsDisk = YES
 
boolean NonReflecting = NO
 
boolean Corotating = NO
 
boolean OuterSourceMass = NO
 
boolean Write_Density = YES
 
boolean Write_Velocity = YES
 
boolean Indirect_Term = YES
 

Detailed Description

Contains the functions required to read the parameter file, and functions that provide runtime information.

The function var() associates a string to a global variable. The function ReadVariables() reads the content of a parameter file. In addition, this file contains a function that prints the command line usage to the standard output, a function that provides verbose information about the setup (if the -v switch is set on the command line), and functions that act as a chronometer (if the -t switch is set on the command line).

Author
THORIN modifications by Ondřej Chrenko chren.nosp@m.ko@s.nosp@m.irrah.nosp@m..tro.nosp@m.ja.mf.nosp@m.f.cu.nosp@m.ni.cz, Copyright (C) 2017; original code by Frédéric Masset

Definition in file Interpret.c.

Macro Definition Documentation

#define MAXVARIABLES   500

Definition at line 20 of file Interpret.c.

Function Documentation

void GiveSpecificTime ( boolean  profiling,
TimeProcess  process_name 
)

Definition at line 402 of file Interpret.c.

References timeprocess::clicks, timeprocess::name, NO, and Ticks.

Referenced by main().

Here is the caller graph for this function:

void GiveTimeInfo ( int  number)

Definition at line 358 of file Interpret.c.

References begin_i, Current, CurrentUser, First, FirstStep, FirstUser, NINTERM, NO, Preceeding, PreceedingUser, Ticks, and YES.

Referenced by main().

Here is the caller graph for this function:

void InitSpecificTime ( boolean  profiling,
TimeProcess process_name,
char *  title 
)

Definition at line 389 of file Interpret.c.

References timeprocess::clicks, timeprocess::name, NO, and Ticks.

Referenced by main().

Here is the caller graph for this function:

void PrintUsage ( char *  execname)

Definition at line 238 of file Interpret.c.

References mastererr(), and prs_exit().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void ReadVariables ( char *  filename)
void TellEverything ( )

Definition at line 281 of file Interpret.c.

References AdvecteLabel, ASPECTRATIO, CPU_Master, DT, EnergyEq, G, NINTERM, NRAD, NSEC, NTOT, ParametricCooling, PI, RMAX, RMIN, SIGMA0, TellNbOrbits(), TellNbOutputs(), and YES.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

real TellNbOrbits ( real  time)

Definition at line 269 of file Interpret.c.

References G, and PI.

Referenced by TellEverything().

Here is the caller graph for this function:

real TellNbOutputs ( real  time)

Definition at line 275 of file Interpret.c.

References DT, and NINTERM.

Referenced by TellEverything().

Here is the caller graph for this function:

void var ( char *  name,
char *  ptr,
int  type,
int  necessary,
char *  deflt 
)

Definition at line 34 of file Interpret.c.

References INT, param::necessary, NO, param::read, REAL, STRING, param::type, param::variable, and VariableIndex.

Referenced by InitVariables().

Here is the caller graph for this function:

Variable Documentation

int begin_i

Definition at line 15 of file main.c.

Referenced by GiveTimeInfo(), and main().

boolean Corotating = NO

Definition at line 30 of file Interpret.c.

Referenced by AlgoGas(), main(), and ReadVariables().

clock_t Current
static

Definition at line 27 of file Interpret.c.

Referenced by GiveTimeInfo().

clock_t CurrentUser
static

Definition at line 27 of file Interpret.c.

Referenced by GiveTimeInfo().

boolean FastTransport = YES
clock_t First
static

Definition at line 27 of file Interpret.c.

Referenced by GiveTimeInfo().

int FirstStep = YES
static

Definition at line 26 of file Interpret.c.

Referenced by GiveTimeInfo().

clock_t FirstUser
static

Definition at line 27 of file Interpret.c.

Referenced by GiveTimeInfo().

boolean GuidingCenter = NO

Definition at line 29 of file Interpret.c.

Referenced by GetPsysInfo(), GetPsysInfoFromRsim(), and ReadVariables().

boolean Indirect_Term = YES

Definition at line 31 of file Interpret.c.

Referenced by FillForcesArrays(), and ReadVariables().

boolean IsDisk = YES

Definition at line 30 of file Interpret.c.

Referenced by AlgoGas(), ReadVariables(), and SendOutput().

boolean NonReflecting = NO

Definition at line 30 of file Interpret.c.

Referenced by ApplyBoundaryCondition(), and ReadVariables().

boolean OpenInner

Definition at line 14 of file main.c.

Referenced by ReadVariables().

boolean OuterSourceMass = NO

Definition at line 30 of file Interpret.c.

Referenced by ApplyBoundaryCondition(), and ReadVariables().

clock_t Preceeding
static

Definition at line 27 of file Interpret.c.

Referenced by GiveTimeInfo().

clock_t PreceedingUser
static

Definition at line 27 of file Interpret.c.

Referenced by GiveTimeInfo().

boolean Restart

Definition at line 14 of file main.c.

long Ticks
static

Definition at line 28 of file Interpret.c.

Referenced by GiveSpecificTime(), GiveTimeInfo(), and InitSpecificTime().

int VariableIndex = 0
static

Definition at line 25 of file Interpret.c.

Referenced by ReadVariables(), and var().

Param VariableSet[MAXVARIABLES]
static

Definition at line 24 of file Interpret.c.

boolean Write_Density = YES

Definition at line 31 of file Interpret.c.

Referenced by ReadVariables(), and SendOutput().

boolean Write_Velocity = YES

Definition at line 31 of file Interpret.c.

Referenced by ReadVariables(), and SendOutput().