cloudy trunk
Loading...
Searching...
No Matches
save.h File Reference
#include "energy.h"
#include "h2_priv.h"
Include dependency graph for save.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  t_save

Functions

void SaveDo (const char *chTime)
void Save1Line (const TransitionProxy &t, FILE *io, realnum xLimit, long index, realnum DopplerWidth)
NORETURN void SaveLineData (FILE *io)
void save_opacity (FILE *io, long int np)
void SaveSpecial (FILE *io, const char *chTime)
void SaveSpecies (FILE *ioPUN, long int ipPun)
void Save1LineData (const TransitionProxy &t, FILE *io, bool lgCS_2, bool &lgPrint)
void save_line (FILE *ip, const char *chDo, bool lgEmergent)
void save_average (long int ipPun)
void save_colden (FILE *ioPUN)
void Save_Line_RT (FILE *ip)
void saveFITSfile (FILE *io, int option)
void SaveHeat (FILE *io)
void CoolSave (FILE *io, char chJob[])
void SaveGrid (FILE *pnunit, exit_type status)

Variables

static const long LIMPUN = 100L
static const long MAX_HEADER_SIZE = 20000L
static const long VERSION_TRNCON = 20100901L
t_save save

Function Documentation

◆ CoolSave()

void CoolSave ( FILE * io,
char chJob[] )

CoolSave save coolants, called by save_do

Parameters
io

Definition at line 20 of file cool_save.cpp.

References CALLOC, cdEXIT, conv, CoolHeavy, DEBUG_ENTRY, dynamics, EXIT_FAILURE, gv, hmi, ioQQQ, IPRINT, LIMELM, MAX2, MIN2, phycon, radius, save, SDIV(), sign(), spsort(), thermal, and TotalInsanity().

Referenced by ConvInitSolution(), and SaveDo().

Here is the call graph for this function:

◆ Save1Line()

void Save1Line ( const TransitionProxy & t,
FILE * io,
realnum xLimit,
long index,
realnum DopplerWidth )

◆ Save1LineData()

void Save1LineData ( const TransitionProxy & t,
FILE * io,
bool lgCS_2,
bool & lgPrint )

Save1LineData data for save one line

Parameters
t
io
lgCS_2this flag says whether collision strength should be saveed - should be false for multi level atoms since sums are not done properly
lgPrinttrue print header line
Todo
1 define lifetime and collision rate for multi-level species so that the critical density is derived correctly in this routine. For now the flag lgCS_2 being true means to save critical den and is only true for two-level systems all places where this routine is called with lgCS_2 false need to be fixed

Definition at line 278 of file save_linedata.cpp.

References AnuUnit(), EmissionProxy::Aul(), chIonLbl(), col_str, CollisionProxy::col_str(), TransitionProxy::Coll(), COLL_CONST, EmissionProxy::damp(), DEBUG_ENTRY, TransitionProxy::Emis(), TransitionProxy::EnergyRyd(), EmissionProxy::gf(), TransitionProxy::Hi(), TransitionProxy::ipCont(), TransitionProxy::Lo(), phycon, PrintEfmt, prt_wl(), save, and TransitionProxy::WLAng().

Referenced by FeIIPunData(), diatomics::H2_Punch_line_data(), and SaveLineData().

Here is the call graph for this function:

◆ save_average()

void save_average ( long int ipPun)

save_average parse save average command, or actually do the save output

Parameters
ipPun- array index for file for final save output

Definition at line 210 of file save_average.cpp.

References cdColm(), cdEXIT, cdIonFrac(), cdTemp(), DEBUG_ENTRY, EXIT_FAILURE, ioQQQ, save, and TotalInsanity().

Referenced by SaveDo().

Here is the call graph for this function:

◆ save_colden()

void save_colden ( FILE * ioPUN)

save_colden parse save column density command, or actually do the save lines output

Parameters
ipthe file we will write to

Definition at line 92 of file save_colden.cpp.

References cdColm(), chElement, colden, DEBUG_ENTRY, ionstage, ioQQQ, MAX2, nColdenEntered, and SMALLFLOAT.

Referenced by SaveDo().

Here is the call graph for this function:

◆ save_line()

void save_line ( FILE * ip,
const char * chDo,
bool lgEmergent )

save_line do the save output

Parameters
ipthe file we will write to
chDo
intrinsicor emergent emission

Definition at line 102 of file save_line.cpp.

References ASSERT, cdEmis(), cdEmis_ip(), cdEXIT, cdLine(), chPLab, DEBUG_ENTRY, EXIT_FAILURE, h2, ioQQQ, ipLine, lgAbort, lgRelativeIntensity, LineSave, MAX2, nLinesEntered, NPUNLM, nzone, radius, SMALLFLOAT, and wavelength.

Referenced by SaveDo().

Here is the call graph for this function:

◆ Save_Line_RT()

void Save_Line_RT ( FILE * ip)

◆ save_opacity()

void save_opacity ( FILE * io,
long int np )

◆ SaveDo()

void SaveDo ( const char * chTime)

SaveDo produce save output during calculation

Parameters
chTimechTime is null terminated 4 char string, either "MIDL" or "LAST"

Definition at line 573 of file save_do.cpp.

References abund, AGN_He1_CS(), AGN_Hemis(), AnuUnit(), ASSERT, BOLTZMANN, called, cdColm(), cdExecTime(), cdEXIT, cdLine(), ChargTranPun(), CHIANTI_Upsilon(), colden, colliders, continuum, conv, CoolSave(), cpu, dBaseSpecies, dBaseTrans, DEBUG_ENTRY, molezone::den, dense, DoppVel, dynamics, DynaPunchTimeDep(), DynaSave(), elementnames, EN1RYD, EVRYD, EXIT_FAILURE, EXIT_SUCCESS, FeII, FeII_Cont, FeIIPunchColden(), FeIIPunchLevels(), FeIIPunchOpticalDepth(), FeIIPunDepart(), FeIIPunPop(), FeIISaveLines(), findspecies(), findspecieslocal(), FindStrongestLineLabels(), fp_equal(), GammaPrt(), geometry, grid, GridGatherInCloudy(), gv, h2, hcmap, Heavy, HFLines, hmi, HydroRecCool(), hyperfine, molecule::index, Singleton< t_ADfA >::Inst(), Singleton< t_yield >::Inst(), ion_recombAGN(), ionbal, ioQQQ, ipALUMINIUM, ipCARBON, ipCOL_elec, ipCOL_H0, ipCOL_H2g, ipCOL_H2s, ipCOL_H3p, ipCOL_Hp, ipCOL_HTOT, ipELECTRON, ipFineCont(), ipH1s, ipH2p, ipH2s, ipH_LIKE, ipHe1s1S, ipHe2p1P, ipHe2p3P0, ipHe2p3P1, ipHe2p3P2, ipHe2s3S, ipHE_LIKE, ipHELIUM, ipHYDROGEN, ipIRON, ipMAGNESIUM, ipoint(), ipOXYGEN, ipRecEsc, ipRecNetEsc, ipRecRad, ipSILICON, ipSODIUM, ipSULPHUR, ipT1032, ipT146, ipT157, ipT370, ipT610, ipT63, is_odd(), iso_sp, iteration, iterations, lgAbort, lgCheckMonitors(), lgFirst, lgMustPrintHeader, LIMELM, LineSave, LineSv, magnetic, map_do(), MAX2, MAX_HEADER_SIZE, mean, MIN2, mole, mole_dominant_rates(), mole_global, mole_punch(), t_yield::nelec_eject(), nFeIIConBins, nMatch(), nSpecies, NTYPES, null_mole, NUM_OUTPUT_TYPES, nzone, OccupationNumberLine(), opac, optimize, t_ADfA::ph1(), phycon, plankf(), POW2, pressure, PrettyTransmission(), prt_LineLabels(), prt_wl(), PrtColumns(), PrtLinePres(), PrtMeanIon(), radius, rfield, RYDLAM, safe_div(), save, save_average(), save_colden(), save_line(), Save_Line_RT(), save_opacity(), SaveFeII_cont(), saveFITSfile(), SaveGaunts(), SaveHeat(), SaveLineData(), SaveLineIntensity(), SaveLineStuff(), SaveNewContinuum(), SaveResults(), SaveSpecial(), SaveSpecies(), SDIV(), secondaries, sexp(), ShowMe(), SMALLFLOAT, sprt_wl(), struc, TauLines, TempChange(), TexcLine(), thermal, timesc, TorF(), TotalInsanity(), VERSION_TRNCON, wavelength, and wind.

Referenced by BadStart(), and cloudy().

◆ saveFITSfile()

void saveFITSfile ( FILE * io,
int option )

◆ SaveGrid()

void SaveGrid ( FILE * pnunit,
exit_type status )

SaveGrid implements the SAVE GRID command

Parameters
pnunit: file descriptor to write to
status: exit status of the grid point

Definition at line 4846 of file save_do.cpp.

References cpu, ES_SUCCESS, ES_WARNINGS, grid, INPUT_LINE_LENGTH, optimize, TorF(), and warnings.

Referenced by cdPrepareExit().

Here is the call graph for this function:

◆ SaveHeat()

void SaveHeat ( FILE * io)

SaveHeat save contributors to local heating, with save heat command, called by save_do

Parameters
io

Definition at line 22 of file heat_save.cpp.

References ASSERT, TransitionProxy::associated(), CALLOC, chLineLbl(), CollisionProxy::col_str(), TransitionProxy::Coll(), conv, DEBUG_ENTRY, dense, dynamics, elementnames, TransitionProxy::Emis(), FndLineHt(), CollisionProxy::heat(), ioQQQ, IPRINT, LIMELM, MIN2, EmissionProxy::Pesc(), phycon, EmissionProxy::pump(), radius, save, SDIV(), SMALLFLOAT, spsort(), EmissionProxy::TauIn(), and thermal.

Referenced by SaveDo().

Here is the call graph for this function:

◆ SaveLineData()

NORETURN void SaveLineData ( FILE * io)

◆ SaveSpecial()

void SaveSpecial ( FILE * io,
const char * chTime )

SaveSpecial generate output for the save special command

Parameters
io
chTime

Definition at line 14 of file save_special.cpp.

References DEBUG_ENTRY, dense, EN1RYD, ipH1s, ipH2p, ipH2s, ipH_LIKE, ipHYDROGEN, iso_sp, opac, PunFeII(), radius, rfield, RYDLAM, and wind.

Referenced by SaveDo().

Here is the call graph for this function:

◆ SaveSpecies()

void SaveSpecies ( FILE * ioPUN,
long int ipPun )

SaveSpecies generate output for the save species command

Parameters
ioPUNio unit for save
ipPunarrayin save array

Definition at line 17 of file save_species.cpp.

References ASSERT, cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, findspecies(), findspecieslocal(), molecule::index, ioQQQ, molecule::label, molezone::levels, MAX2, mole, mole_global, null_molezone, save, SaveSpeciesOne(), and qList::size().

Referenced by SaveDo().

Here is the call graph for this function:

Variable Documentation

◆ LIMPUN

const long LIMPUN = 100L
static

◆ MAX_HEADER_SIZE

const long MAX_HEADER_SIZE = 20000L
static

Definition at line 12 of file save.h.

Referenced by ParseSave(), and SaveDo().

◆ save

◆ VERSION_TRNCON

const long VERSION_TRNCON = 20100901L
static

magic version number for the transmitted continuum output file

Definition at line 15 of file save.h.

Referenced by ReadTable(), and SaveDo().