cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Data Fields | Private Attributes
t_save Struct Reference

#include <save.h>

Collaboration diagram for t_save:
Collaboration graph
[legend]

Public Member Functions

 t_save ()
 
 ~t_save ()
 
void SaveLineListFree (long i)
 
void SaveAverageFree (long i)
 
void SetSaveHeaderNeeded (bool lgVal)
 
bool lgSaveTitle (int ipPun) const
 
void SaveTitleDone (int ipPun)
 
bool lgSaveHeader (int ipPun) const
 
void SaveHeaderDone (int ipPun)
 

Data Fields

long nLineList [LIMPUN]
 
vector< string > chLineListLabel [LIMPUN]
 
vector< realnumwlLineList [LIMPUN]
 
bool lgLineListRatio [LIMPUN]
 
long nAverageList [LIMPUN]
 
vector< string > chAverageType [LIMPUN]
 
vector< int > nAverageIonList [LIMPUN]
 
vector< int > nAverage2ndPar [LIMPUN]
 
SaveParams params [LIMPUN]
 
vector< string > chFileName
 
long ipSaveGrid
 
bool lgNoClobber [LIMPUN]
 
bool lgPrtOldStyleLogs [LIMPUN]
 
bool lgPunConv_noclobber
 
bool lgDROn_noclobber
 
bool lgPunPoint_noclobber
 
bool lgioRecom_noclobber
 
bool lgQHSaveFile_noclobber
 
bool lgTraceConvergeBase_noclobber
 
bool lgSaveGrid_noclobber
 
bool lgRealSave [LIMPUN]
 
bool lgEmergent [LIMPUN]
 
bool lgCumulative [LIMPUN]
 
bool lgSubtrCont
 
bool lgPrtIsotropicCont [LIMPUN]
 
long int nsave
 
char chSave [LIMPUN][5]
 
diatomicswhichDiatomToPrint [LIMPUN]
 
char chOpcTyp [LIMPUN][5]
 
bool lgSaveToSeparateFiles [LIMPUN]
 
bool lg_separate_iterations [LIMPUN]
 
bool lgPunContinuum
 
realnum punarg [LIMPUN][3]
 
string optname [LIMPUN]
 
bool lgSaveEveryZone [LIMPUN]
 
long int nSaveEveryZone [LIMPUN]
 
char chSaveArgs [LIMPUN][5]
 
vector< string > chSaveSpecies [LIMPUN]
 
bool lgPunLstIter [LIMPUN]
 
bool lgFITS [LIMPUN]
 
bool lgXSPEC [LIMPUN]
 
int FITStype [LIMPUN]
 
bool lgPunchFits
 
const char * chConSavEnr [LIMPUN]
 
long int ipConPun
 
bool lgHashEndIter [LIMPUN]
 
char chHashString [INPUT_LINE_LENGTH]
 
bool lgFLUSH
 
bool lgLuminosityOld
 
string chGridPrefix
 
string chFilenamePrefix
 
string chRedirectPrefix
 
string chOutputFile
 
char chPunRltType [7]
 
FILE * ipPoint
 
bool lgPunPoint
 
bool lgPunConv
 
FILE * ipPunConv
 
bool lgSDSOn
 
FILE * ipSDSFile
 
FILE * ipDRout
 
bool lgDROn
 
bool lgDRPLst
 
bool lgDRHash
 
bool lgTraceConvergeBase
 
bool lgTraceConvergeBaseHash
 
FILE * ipTraceConvergeBase
 
FILE * ioRecom
 
bool lgioRecom
 
long int LinEvery
 
bool lgLinEvery
 
long int ncSaveSkip
 
realnum WeakHeatCool
 
realnum Resolution
 
realnum ResolutionAbs
 
string chSpeciesDominantRates [LIMPUN]
 
Energy emisfreq [LIMPUN]
 
long ipEmisFreq [LIMPUN]
 
bool lgSaveDataWn
 
bool lgSaveDataGf
 
bool lgSaveDataRates
 
vector< string > contSaveSpeciesLabel
 
vector< adjPseudoContsetPseudoCont
 
string SpeciesBandFile [LIMPUN]
 
vector< save_species_bandsspecBands
 

Private Attributes

bool p_lgSaveTitleDone [LIMPUN]
 
bool p_lgSaveHeaderDone [LIMPUN]
 
bool p_lgSaveHeaderNeeded
 

Detailed Description

Definition at line 214 of file save.h.

Constructor & Destructor Documentation

t_save::t_save ( )
inline
t_save::~t_save ( )
inline

Definition at line 232 of file save.h.

References LIMPUN, SaveAverageFree(), and SaveLineListFree().

Here is the call graph for this function:

Member Function Documentation

bool t_save::lgSaveHeader ( int  ipPun) const
inline

is it OK to save header now?

Definition at line 360 of file save.h.

References ipPun, p_lgSaveHeaderDone, and p_lgSaveHeaderNeeded.

Referenced by SaveDo(), SaveSpecies(), SaveSpeciesBands(), SaveSpeciesOptDep(), and SaveSpeciesPseudoCont().

bool t_save::lgSaveTitle ( int  ipPun) const
inline

is it OK to save title now?

Definition at line 353 of file save.h.

References ipPun, p_lgSaveHeaderNeeded, and p_lgSaveTitleDone.

void t_save::SaveAverageFree ( long  i)
inline

Definition at line 246 of file save.h.

References chAverageType, chSaveSpecies, nAverage2ndPar, nAverageIonList, and nAverageList.

Referenced by parse_save_average(), and ~t_save().

void t_save::SaveHeaderDone ( int  ipPun)
inline

Definition at line 364 of file save.h.

References ipPun, and p_lgSaveHeaderDone.

Referenced by SaveDo(), SaveSpecies(), SaveSpeciesBands(), SaveSpeciesOptDep(), and SaveSpeciesPseudoCont().

void t_save::SaveLineListFree ( long  i)
inline

Definition at line 241 of file save.h.

References chLineListLabel, and wlLineList.

Referenced by ParseSave(), and ~t_save().

void t_save::SaveTitleDone ( int  ipPun)
inline

Definition at line 357 of file save.h.

References ipPun, and p_lgSaveTitleDone.

void t_save::SetSaveHeaderNeeded ( bool  lgVal)
inline

Definition at line 350 of file save.h.

References p_lgSaveHeaderNeeded.

Referenced by main().

Field Documentation

vector<string> t_save::chAverageType[LIMPUN]

chAverageType is label for type of average

Definition at line 271 of file save.h.

Referenced by parse_save_average(), save_average(), and SaveAverageFree().

const char* t_save::chConSavEnr[LIMPUN]

chConPunEnr - units of continuum in save output

Definition at line 405 of file save.h.

Referenced by AnuUnit(), ParseSave(), Save1Line(), and Save1LineData().

vector<string> t_save::chFileName

the filename is needed during the file gathering phase in grid runs

Definition at line 281 of file save.h.

Referenced by ParseSave(), process_output(), and SaveGrid().

string t_save::chFilenamePrefix

this is a prefix that will be set at the start of all save file names normally an empty string, set with PUNCH PREFIX command or -p flag

Definition at line 431 of file save.h.

Referenced by cdMain(), ParseSave(), ParseSet(), and process_output().

string t_save::chGridPrefix

this is a prefix that will be used at the start of all file names when doing an MPI grid run, normally an empty string, set with -g flag

Definition at line 427 of file save.h.

Referenced by cdMain(), and ParseSave().

char t_save::chHashString[INPUT_LINE_LENGTH]

this is the hash string, normally a set of hash marks, can be reset with set save hash command

Definition at line 416 of file save.h.

Referenced by check_grid_file(), ConvBase(), InitDefaultsPreparse(), ParseSet(), radius_first(), SaveDo(), and SaveLineStuff().

vector<string> t_save::chLineListLabel[LIMPUN]

chLineListLabel is label for line list

Definition at line 261 of file save.h.

Referenced by ParseSave(), SaveDo(), and SaveLineListFree().

char t_save::chOpcTyp[LIMPUN][5]

which opacity to save out

Definition at line 325 of file save.h.

Referenced by ParseSave(), and save_opacity().

string t_save::chOutputFile

this is the name of the main output file we are writing to it is set by calling cdOutput()

Definition at line 439 of file save.h.

Referenced by cdOutput(), cdRead(), and ParseDont().

char t_save::chPunRltType[7]

set with save line intensities and save results commands, says whether results arrays produced by routine PunResults1Line should be column or array

Definition at line 444 of file save.h.

Referenced by ParseSave().

string t_save::chRedirectPrefix

this is the prefix that will be set at the start of the input and output file normally an empty string, set with -p or -r flag

Definition at line 435 of file save.h.

Referenced by cdMain(), main(), process_output(), and vary_input().

char t_save::chSave[LIMPUN][5]

chSave - what is it we want to save? set in GetPunch, used in DoPunch

Definition at line 321 of file save.h.

Referenced by diatomics::H2_ParseSave(), ParseSave(), SaveDo(), and saveXSPEC().

char t_save::chSaveArgs[LIMPUN][5]

set of optional arguments for save command, but as a string

Definition at line 383 of file save.h.

Referenced by ParseSave(), SaveDo(), SaveSpecies(), and SaveSpeciesPseudoCont().

vector<string> t_save::chSaveSpecies[LIMPUN]
string t_save::chSpeciesDominantRates[LIMPUN]

Definition at line 498 of file save.h.

Referenced by InitDefaultsPreparse(), ParseSave(), and SaveDo().

vector<string> t_save::contSaveSpeciesLabel

Parameters for saving the pseudocontinuum

Definition at line 509 of file save.h.

Referenced by ParseSave(), PseudoContCreate(), and SpeciesPseudoContCreate().

Energy t_save::emisfreq[LIMPUN]

Definition at line 501 of file save.h.

Referenced by InitDefaultsPreparse(), ParseSave(), and SaveDo().

int t_save::FITStype[LIMPUN]

which FITS type is in this file

Definition at line 398 of file save.h.

Referenced by ParseSave(), process_output(), saveXSPEC(), and t_save().

FILE* t_save::ioRecom

option to save recombination coefficients to external file

Definition at line 475 of file save.h.

Referenced by atmdat_3body(), CloseSaveFiles(), ion_recomb(), iso_radiative_recomb(), and SaveFilesInit().

long int t_save::ipConPun

this global variable is index of save command loop in dopunch

Definition at line 408 of file save.h.

Referenced by AnuUnit(), Save1Line(), Save1LineData(), and SaveDo().

FILE* t_save::ipDRout

these control saving choice of dr - this is not really a save command ipDRout is io unit, lgDROn says saving dr logic has been set, and lgDRPLst says to save the last iteration

Definition at line 464 of file save.h.

Referenced by CloseSaveFiles(), radius_first(), radius_next(), and SaveFilesInit().

long t_save::ipEmisFreq[LIMPUN]

Definition at line 502 of file save.h.

Referenced by InitDefaultsPreparse(), and SaveDo().

FILE* t_save::ipPoint

option to save out pointers with save pointers command ipPoint is save file handle, lgPunPoint says whether we will do it

Definition at line 449 of file save.h.

Referenced by CloseSaveFiles(), OpacityCreate1Element(), and SaveFilesInit().

FILE* t_save::ipPunConv

Definition at line 454 of file save.h.

Referenced by CloseSaveFiles(), ConvIterCheck(), and SaveFilesInit().

long t_save::ipSaveGrid

pointer into chFileName for the name of the SAVE GRID file

Definition at line 284 of file save.h.

Referenced by cdPrepareExit(), ParseSave(), SaveGrid(), and t_save().

FILE* t_save::ipSDSFile

Definition at line 459 of file save.h.

Referenced by database_readin(), ion_recom_calculate(), and read_UTA_lines().

FILE* t_save::ipTraceConvergeBase

Definition at line 472 of file save.h.

Referenced by CloseSaveFiles(), ConvBase(), and SaveFilesInit().

bool t_save::lg_separate_iterations[LIMPUN]

option to not insert end-of-iteration separator - used for save files that create one line per iteration

Definition at line 334 of file save.h.

Referenced by check_grid_file(), InitDefaultsPreparse(), and SaveDo().

bool t_save::lgCumulative[LIMPUN]

cumulative line intensities for time dependent sim

Definition at line 309 of file save.h.

Referenced by ParseSave(), and SaveDo().

bool t_save::lgDRHash

Definition at line 465 of file save.h.

Referenced by InitDefaultsPreparse(), and radius_first().

bool t_save::lgDROn

Definition at line 465 of file save.h.

Referenced by CloseSaveFiles(), radius_first(), radius_next(), and SaveFilesInit().

bool t_save::lgDROn_noclobber

Definition at line 294 of file save.h.

Referenced by CloseSaveFiles(), and SaveFilesInit().

bool t_save::lgDRPLst

Definition at line 465 of file save.h.

Referenced by InitDefaultsPreparse(), and radius_next().

bool t_save::lgEmergent[LIMPUN]

emergent or intrinsic line intensities

Definition at line 306 of file save.h.

Referenced by ParseSave(), SaveDo(), and SaveLineIntensity().

bool t_save::lgFITS[LIMPUN]

flag saying that this save file is in FITS format

Definition at line 392 of file save.h.

Referenced by check_grid_file(), CloseSaveFiles(), ParseSave(), SaveDo(), and t_save().

bool t_save::lgFLUSH

flush file after every iteration

Definition at line 419 of file save.h.

Referenced by InitDefaultsPreparse(), ParseSet(), and SaveDo().

bool t_save::lgHashEndIter[LIMPUN]

should hash marks be printed after every iteration? default is yes, set no with no hash option on save command

Definition at line 412 of file save.h.

Referenced by check_grid_file(), InitDefaultsPreparse(), ParseSave(), and SaveDo().

bool t_save::lgioRecom

Definition at line 476 of file save.h.

Referenced by atmdat_3body(), CloseSaveFiles(), ion_recomb(), iso_radiative_recomb(), and SaveFilesInit().

bool t_save::lgioRecom_noclobber

Definition at line 296 of file save.h.

Referenced by CloseSaveFiles(), and SaveFilesInit().

bool t_save::lgLineListRatio[LIMPUN]

flag saying whether to take ratio (true) of pairs

Definition at line 265 of file save.h.

Referenced by ParseSave(), and SaveDo().

bool t_save::lgLinEvery

Definition at line 481 of file save.h.

Referenced by ParseSave(), and SaveDo().

bool t_save::lgLuminosityOld

in save continuum output, in the luminosity case, use old style of luminosity per inner cloud area rather than true luminosity

Definition at line 423 of file save.h.

Referenced by InitDefaultsPreparse(), ParseSet(), and ZoneStart().

bool t_save::lgNoClobber[LIMPUN]

option to append instead of overwrite

Definition at line 287 of file save.h.

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

bool t_save::lgPrtIsotropicCont[LIMPUN]

option to remove isotropic continua from the output of 'save continuum'

Definition at line 315 of file save.h.

Referenced by ParseSave(), and SaveDo().

bool t_save::lgPrtOldStyleLogs[LIMPUN]

print old style logs

Definition at line 290 of file save.h.

Referenced by ParseSave(), and PrtLogLin().

bool t_save::lgPunchFits

option to say whether any FITS output should be punched, initialized to false, but turned to true after last grid exec.

Definition at line 402 of file save.h.

bool t_save::lgPunContinuum

flag saying whether any save continuum commands were entered set true in parsecontinuum when save continuum entered, used in PrtComment to warn if continuum punched with no iterations

Definition at line 369 of file save.h.

Referenced by InitDefaultsPreparse(), ParseSave(), and PrtComment().

bool t_save::lgPunConv

unit number, and flag, for saving reason for continued iterations

Definition at line 453 of file save.h.

Referenced by CloseSaveFiles(), ConvIterCheck(), and SaveFilesInit().

bool t_save::lgPunConv_noclobber

these are for some special cases, same purpose as previous no clobber

Definition at line 293 of file save.h.

Referenced by CloseSaveFiles(), and SaveFilesInit().

bool t_save::lgPunLstIter[LIMPUN]

lg flag lgPunLstIter for this save option, do we only want to save on last iteration?

Definition at line 389 of file save.h.

Referenced by ParseSave(), and SaveDo().

bool t_save::lgPunPoint

Definition at line 450 of file save.h.

Referenced by CloseSaveFiles(), OpacityCreate1Element(), and SaveFilesInit().

bool t_save::lgPunPoint_noclobber

Definition at line 295 of file save.h.

Referenced by CloseSaveFiles(), and SaveFilesInit().

bool t_save::lgQHSaveFile_noclobber

Definition at line 297 of file save.h.

Referenced by CloseSaveFiles(), and SaveFilesInit().

bool t_save::lgRealSave[LIMPUN]

is this a real save command, or one of the similar options like save dr, which is not done in save files

Definition at line 303 of file save.h.

Referenced by SaveDo(), and SaveFilesInit().

bool t_save::lgSaveDataGf

Definition at line 506 of file save.h.

Referenced by InitDefaultsPreparse(), and SaveSpeciesLines().

bool t_save::lgSaveDataRates

Definition at line 506 of file save.h.

Referenced by InitDefaultsPreparse(), and SaveSpeciesLines().

bool t_save::lgSaveDataWn

Definition at line 506 of file save.h.

Referenced by InitDefaultsPreparse(), and SaveSpeciesLines().

bool t_save::lgSaveEveryZone[LIMPUN]

implement save every option - lgSaveEveryZone true if want to save every zone, nSaveEveryZone is number of zones to save

Definition at line 379 of file save.h.

Referenced by InitDefaultsPreparse(), ParseSave(), and SaveDo().

bool t_save::lgSaveGrid_noclobber

Definition at line 299 of file save.h.

Referenced by CloseSaveFiles(), and SaveFilesInit().

bool t_save::lgSaveToSeparateFiles[LIMPUN]

this flag tells us whether to save results of a grid to separate files for each grid point or all to the same file. Different for different save commands

Definition at line 330 of file save.h.

Referenced by ParseSave(), and process_output().

bool t_save::lgSDSOn

Identify whether Save Data Sources is on

Definition at line 458 of file save.h.

Referenced by database_readin(), ion_recom_calculate(), and read_UTA_lines().

bool t_save::lgSubtrCont

user-defined option to subtract continuum in reported line flux

Definition at line 312 of file save.h.

Referenced by InitDefaultsPreparse(), ParseDont(), and set_xIntensity().

bool t_save::lgTraceConvergeBase

Definition at line 470 of file save.h.

Referenced by CloseSaveFiles(), ConvBase(), and SaveFilesInit().

bool t_save::lgTraceConvergeBase_noclobber

Definition at line 298 of file save.h.

Referenced by CloseSaveFiles(), and SaveFilesInit().

bool t_save::lgTraceConvergeBaseHash

Definition at line 470 of file save.h.

Referenced by ConvBase(), and InitDefaultsPreparse().

bool t_save::lgXSPEC[LIMPUN]

flag saying that this save file is in XSPEC format

Definition at line 395 of file save.h.

Referenced by CloseSaveFiles(), process_output(), and t_save().

long int t_save::LinEvery

option to save line intensities every for every zone logical variable says whether LinEvery was set

Definition at line 480 of file save.h.

Referenced by ParseSave(), and SaveDo().

vector<int> t_save::nAverage2ndPar[LIMPUN]

nAverage2ndPar is set of second parameters for averages

Definition at line 275 of file save.h.

Referenced by parse_save_average(), save_average(), and SaveAverageFree().

vector<int> t_save::nAverageIonList[LIMPUN]

nAverageIonList is set of ions for averages

Definition at line 273 of file save.h.

Referenced by parse_save_average(), save_average(), and SaveAverageFree().

long t_save::nAverageList[LIMPUN]

following are for save averages option nAverageList is number of averages, -1 if not defined

Definition at line 269 of file save.h.

Referenced by parse_save_average(), save_average(), SaveAverageFree(), and t_save().

long int t_save::ncSaveSkip

set skip sets this variable, which says how many cells to skip in save

Definition at line 484 of file save.h.

Referenced by InitDefaultsPreparse(), ParseSet(), and SaveDo().

long t_save::nLineList[LIMPUN]

following are for save LineList option nLineList is number of em lines, -1 if not defined

Definition at line 259 of file save.h.

Referenced by ParseSave(), SaveDo(), and t_save().

long int t_save::nsave

number of save commands entered

Definition at line 318 of file save.h.

Referenced by CloseSaveFiles(), diatomics::H2_ParseSave(), InitDefaultsPreparse(), ParseSave(), ParseSet(), process_output(), SaveDo(), and saveXSPEC().

long int t_save::nSaveEveryZone[LIMPUN]

Definition at line 380 of file save.h.

Referenced by InitDefaultsPreparse(), ParseSave(), and SaveDo().

string t_save::optname[LIMPUN]

punarg is set of optional arguments for the save command

Definition at line 375 of file save.h.

Referenced by ParseSave(), and SaveDo().

bool t_save::p_lgSaveHeaderDone[LIMPUN]
private

flag saying whether the header has been saved already. Used in grid runs so that the header only gets saved once.

Definition at line 343 of file save.h.

Referenced by lgSaveHeader(), SaveHeaderDone(), and t_save().

bool t_save::p_lgSaveHeaderNeeded
private

flag saying whether a header is needed at all Used in grid runs so that the header only gets saved once.

Definition at line 347 of file save.h.

Referenced by lgSaveHeader(), lgSaveTitle(), SetSaveHeaderNeeded(), and t_save().

bool t_save::p_lgSaveTitleDone[LIMPUN]
private

flag saying whether the title has been saved already. Used in grid runs so that the title only gets saved once.

Definition at line 339 of file save.h.

Referenced by lgSaveTitle(), SaveTitleDone(), and t_save().

SaveParams t_save::params[LIMPUN]

this is the file where we will direct the output

Definition at line 278 of file save.h.

Referenced by CloseSaveFiles(), ParseSave(), save_average(), SaveDo(), SaveFilesInit(), SaveSpeciesBands(), SaveSpeciesOptDep(), and SaveSpeciesPseudoCont().

realnum t_save::punarg[LIMPUN][3]

punarg is set of optional arguments for the save command

Definition at line 372 of file save.h.

Referenced by diatomics::H2_ParseSave(), diatomics::H2_PunchDo(), ParseSave(), process_output(), save_opacity(), SaveDo(), SaveLineIntensity(), and SaveSpeciesPseudoCont().

realnum t_save::Resolution

contrast factor for lines to continuum in save output default is 1 (gives correct line intensities) and changed with set width command (enters width in km/sec)

Definition at line 493 of file save.h.

Referenced by flxCell(), InitDefaultsPreparse(), ParseSet(), and SaveDo().

realnum t_save::ResolutionAbs

Definition at line 496 of file save.h.

Referenced by InitDefaultsPreparse(), ParseSet(), and PrettyTransmission().

vector<adjPseudoCont> t_save::setPseudoCont

Definition at line 510 of file save.h.

Referenced by getAdjPseudoIndex(), getPseudoWlRange(), and ParseSet().

vector<save_species_bands> t_save::specBands

Definition at line 514 of file save.h.

Referenced by ParseSave(), specBandsExists(), and SpeciesBandsCreate().

string t_save::SpeciesBandFile[LIMPUN]

Parameters for species bands

Definition at line 513 of file save.h.

Referenced by ParseSave(), and SaveDo().

realnum t_save::WeakHeatCool

threshold for faintest cooling or heating to be punched default is set to 0.05 in scalar, can be reset with 'set weakheatcool'

Definition at line 488 of file save.h.

Referenced by CoolSave(), InitDefaultsPreparse(), ParseSet(), and SaveHeat().

diatomics* t_save::whichDiatomToPrint[LIMPUN]

Definition at line 322 of file save.h.

Referenced by diatomics::H2_ParseSave(), and SaveDo().

vector<realnum> t_save::wlLineList[LIMPUN]

wlLineList is set of emission lines for LineList

Definition at line 263 of file save.h.

Referenced by ParseSave(), SaveDo(), and SaveLineListFree().


The documentation for this struct was generated from the following file: