cloudy trunk
Loading...
Searching...
No Matches
cdinit.cpp File Reference
#include "cddefines.h"
#include "taulines.h"
#include "abund.h"
#include "atmdat.h"
#include "atoms.h"
#include "atomfeii.h"
#include "monitor_results.h"
#include "broke.h"
#include "ca.h"
#include "called.h"
#include "carb.h"
#include "cddrive.h"
#include "co.h"
#include "colden.h"
#include "conv.h"
#include "continuum.h"
#include "coolheavy.h"
#include "cosmology.h"
#include "dark_matter.h"
#include "dense.h"
#include "doppvel.h"
#include "dynamics.h"
#include "elementnames.h"
#include "embesq.h"
#include "fe.h"
#include "fudgec.h"
#include "geometry.h"
#include "grainvar.h"
#include "grid.h"
#include "he.h"
#include "heavy.h"
#include "hextra.h"
#include "hmi.h"
#include "hydrogenic.h"
#include "hyperfine.h"
#include "input.h"
#include "ionbal.h"
#include "iso.h"
#include "iterations.h"
#include "lines.h"
#include "magnetic.h"
#include "hcmap.h"
#include "mean.h"
#include "mewecoef.h"
#include "mpi_utilities.h"
#include "mole.h"
#include "nitro.h"
#include "noexec.h"
#include "numderiv.h"
#include "oxy.h"
#include "parse.h"
#include "peimbt.h"
#include "phycon.h"
#include "plot.h"
#include "sil.h"
#include "version.h"
#include "pressure.h"
#include "prt.h"
#include "save.h"
#include "radius.h"
#include "rfield.h"
#include "opacity.h"
#include "rt.h"
#include "secondaries.h"
#include "state.h"
#include "stopcalc.h"
#include "struc.h"
#include "thermal.h"
#include "timesc.h"
#include "trace.h"
#include "warnings.h"
#include "wind.h"
#include "init.h"

Go to the source code of this file.

Functions

void cdInit (void)
void cdPrepareExit (exit_type exit_status)

Variables

FILE * ioMAP = NULL
const double ZeroNum = 0.
long nWindLine = NWINDDIM
bool lgcdInitCalled =false
bool lgHydroMalloc = false
LinSvLineSv =NULL
LinSvLineSvSortWL =NULL
bool lgFeIIMalloc =false
bool lgRfieldMalloced =false
bool lgOpacMalloced =false

Function Documentation

◆ cdInit()

void cdInit ( )

cdInit This routine must be called before any of the others - it reinitializes many variables, and must be called before any of the other routines. In a large grid of calculations it must be repeatedly called before the start of the new calculation and after all results have been obtained from the previous model

Definition at line 115 of file cdinit.cpp.

References called, cdSetExecTime(), cpu, DEBUG_ENTRY, grid, input, ioQQQ, lgBigBotch, lgcdInitCalled, lgMonitorsOK, lgPrtSciNot, NKRD, NUM_OUTPUT_TYPES, optimize, TotalInsanity(), and zero().

Referenced by cdMain().

Here is the call graph for this function:

◆ cdPrepareExit()

void cdPrepareExit ( exit_type exit_status)

prepare termination of the code, but do not terminate yet

Definition at line 202 of file cdinit.cpp.

References cdInput(), cdOutput(), CloseSaveFiles(), cpu, grid, ioQQQ, and SaveGrid().

Referenced by cdMain().

Here is the call graph for this function:

Variable Documentation

◆ ioMAP

FILE* ioMAP = NULL

Definition at line 9 of file cdinit.cpp.

Referenced by CloseSaveFiles(), iter_end_check(), ParseMap(), ParseSave(), and SaveFilesInit().

◆ lgcdInitCalled

bool lgcdInitCalled =false

this is the value that will be set true when cdInit is called.
Other routines will check that this is true when they are called, to verify that cdInit was called first. Definition is in cdInit.cpp

Definition at line 34 of file cdinit.cpp.

Referenced by cdDrive(), cdGetLineList(), cdInit(), cdRead(), and cdSPEC2().

◆ lgFeIIMalloc

bool lgFeIIMalloc =false

this is set true when space is allocated for the FeII arrays, once this happens the number of levels cannot be changed with the atom feii levels command set false in cddefines

Definition at line 90 of file cdinit.cpp.

Referenced by FeIICreate(), FeIIZero(), and ParseAtomFeII().

◆ lgHydroMalloc

bool lgHydroMalloc = false

this will be set true once space is allocated for the HydroLines array. from then on any HYDROGENIC LEVELS command will be ignored, this is set to false in cddefines.c

Definition at line 61 of file cdinit.cpp.

Referenced by iso_create(), and ParseAtomISO().

◆ lgOpacMalloced

bool lgOpacMalloced =false

set true when malloced, init to false

Definition at line 100 of file cdinit.cpp.

Referenced by OpacityCreateAll(), and tauff().

◆ lgRfieldMalloced

bool lgRfieldMalloced =false

set true when malloced, init to false

Definition at line 98 of file cdinit.cpp.

Referenced by rfield_opac_malloc(), rfield_opac_zero(), and tfidle().

◆ LineSv

◆ LineSvSortWL

LinSv* LineSvSortWL =NULL

Definition at line 71 of file cdinit.cpp.

Referenced by FindStrongestLineLabels(), and LineStackCreate().

◆ nWindLine

◆ ZeroNum

const double ZeroNum = 0.

this is the number zero, used to trick clever compilers when dividing by it to crash program there is a routine called zero - this name cannot overlap definition is in cddefines.cpp

Definition at line 13 of file cdinit.cpp.

Referenced by ParseCrashDo(), and TotalInsanityAsStub().