Cloudy
Spectral Synthesis Code for Astrophysics
|
Go to the source code of this file.
Classes | |
class | SaveParams |
class | adjPseudoCont |
class | save_img_matrix |
struct | t_save |
Functions | |
void | SaveDo (const char *chTime) |
double | PrtLogLin (double value) |
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 | SaveAllSpeciesLabelsLevels (FILE *ioPUN) |
void | SaveSpecies (FILE *ioPUN, long int ipPun) |
void | SaveSpeciesPseudoCont (const long ipPun, const string &speciesLabel) |
void | SaveSpeciesBands (const long ipPun, const string &speciesLabel, const string &fileBands, const bool lgEmergent) |
void | SaveSpeciesOptDep (const long int ipPun, const string &speciesLabel) |
void | mole_save (FILE *punit, const char speciesname[], const char args[], bool lgHeader, bool lgData, bool lgCoef, double depth) |
void | mole_dominant_rates (const vector< const molecule * > &debug_list, FILE *ioOut, bool lgPrintReagents, size_t NPRINT, double fprint) |
void | mole_print_species_reactions (molecule *speciesToPrint) |
void | PrintLineDataHeader (FILE *ioPUN) |
void | Save1LineData (const TransitionProxy &t, FILE *io, bool lgCS_2) |
void | save_line (FILE *ip, const char *chDo, bool lgEmergent, long ipPun) |
void | save_average (long int ipPun) |
void | Save_Line_RT (FILE *ip) |
void | saveFITSfile (FILE *io, int option, realnum Elo=0.f, realnum Ehi=0.f, realnum Enorm=0.f) |
void | saveFITSimg (FILE *io, const string &extName, const string &units, const long nPixels, const multi_arr< double, 2, C_TYPE > &image) |
void | saveFITSimg (FILE *io, const string &extName, const string &units, const long nCols, const valarray< double > &vec) |
void | SaveHeat (FILE *io) |
void | CoolSave (FILE *io, const char chJob[]) |
void | SaveGrid (FILE *pnunit, exit_type status) |
Variables | |
static const long | LIMPUN = 100L |
static const long | VERSION_TRNCON = 20190210L |
t_save | save |
void CoolSave | ( | FILE * | io, |
const char | chJob[] ) |
CoolSave save coolants, called by save_do
io | the file we will write to |
*chJob |
References cdEXIT, conv, CoolHeavy, DEBUG_ENTRY, dynamics, EXIT_FAILURE, fprintf(), gv, hmi, ioQQQ, LIMELM, MAX2, phycon, radius, safe_div(), save, sign(), SMALLFLOAT, spsort(), thermal, TotalInsanity(), and zero().
Referenced by ConvBase(), ConvInitSolution(), and SaveDo().
|
extern |
References fprintf(), mole_reaction::index, molecule::index, mole, mole_reaction::nproducts, mole_reaction::nreactants, NULL, mole_reaction::products, mole_reaction::pvector, mole_priv::reactab, mole_reaction::reactants, and mole_reaction::rvector.
Referenced by ConvBase(), and SaveDo().
|
extern |
References fprintf(), mole_reaction::index, molecule::index, ioQQQ, mole_reaction::label, molecule::label, mole, mole_reaction::nproducts, mole_reaction::nreactants, NULL, mole_reaction::products, mole_reaction::pvector, mole_priv::reactab, mole_reaction::reactants, and mole_reaction::rvector.
Referenced by lgElemsConserved(), and mole_system_error().
|
extern |
References DEBUG_ENTRY, doData(), doHeader(), findspecies(), fprintf(), mole_reaction::index, molecule::index, isCatalystProduct(), isCatalystReactant(), isCreated(), isDestroyed(), mole_reaction::label, mole, mole_reaction::nproducts, mole_reaction::nreactants, null_mole, mole_reaction::products, mole_priv::reactab, and mole_reaction::reactants.
Referenced by ConvBase(), and SaveDo().
void PrintLineDataHeader | ( | FILE * | ioPUN | ) |
double PrtLogLin | ( | double | value | ) |
SAVE command has option LOG to print log quantities as in <= C13
References ipPun, save, and SDIV().
Referenced by save_average(), and SaveDo().
void Save1Line | ( | const TransitionProxy & | t, |
FILE * | io, | ||
realnum | xLimit, | ||
long | index, | ||
realnum | DopplerWidth ) |
save one line, called by SaveLineStuff
t | |
io | |
xLimit | |
index | |
DopplerWidth |
References AnuUnit(), CHARS_SPECIES, chIonLbl(), chLineLbl(), EmissionProxy::dampXvel(), TransitionProxy::Emis(), TransitionProxy::EnergyRyd(), TransitionProxy::EnergyWN(), fprintf(), EmissionProxy::gf(), TransitionProxy::Hi(), lgPopsFirstCall, lgSaveOpticalDepths, TransitionProxy::Lo(), t_wavl::prt_wl(), save, EmissionProxy::TauIn(), EmissionProxy::TauInSpecific(), and TransitionProxy::twav().
Referenced by diatomics::H2_PunchLineStuff(), and SaveLineStuff().
void Save1LineData | ( | const TransitionProxy & | t, |
FILE * | io, | ||
bool | lgCS_2 ) |
Save1LineData data for save one line
t | |
io | |
lgCS_2 | this flag says whether collision strength should be saveed - should be false for multi level atoms since sums are not done properly |
References AnuUnit(), EmissionProxy::Aul(), chIonLbl(), CollisionProxy::col_str(), TransitionProxy::Coll(), EmissionProxy::damp(), DEBUG_ENTRY, TransitionProxy::Emis(), TransitionProxy::EnergyRyd(), fprintf(), EmissionProxy::gf(), TransitionProxy::Hi(), TransitionProxy::ipCont(), TransitionProxy::Lo(), phycon, PrintEfmt, t_wavl::prt_wl(), save, and TransitionProxy::twav().
Referenced by diatomics::H2_Punch_line_data(), and SaveLineData().
void save_average | ( | long int | ipPun | ) |
save_average parse save average command, or actually do the save output
ipPun | - array index for file for final save output |
References cdColm(), cdEXIT, cdIonFrac(), cdTemp(), DEBUG_ENTRY, EXIT_FAILURE, fprintf(), ioQQQ, ipPun, PrtLogLin(), save, and TotalInsanity().
Referenced by SaveDo().
void save_line | ( | FILE * | ip, |
const char * | chDo, | ||
bool | lgEmergent, | ||
long | ipPun ) |
save_line do the save output
ip | the file we will write to |
chDo | |
lgEmergent | intrinsic or emergent emission |
ipPun |
References TransitionProxy::associated(), cdEmis_ip(), cdEXIT, cdLine_ip(), DEBUG_ENTRY, TransitionProxy::Emis(), EXIT_FAILURE, fprintf(), h2, ioQQQ, ipLine, ipPun, lineids, linelist, LineSave, nzone, prt_line_err(), radius, and EmissionProxy::TauIn().
Referenced by SaveDo().
void Save_Line_RT | ( | FILE * | ip | ) |
Save_Line_RT parse the save line rt command - read in a set of lines
ip | the file we will write to |
References EmissionProxy::Aul(), cdEXIT, chLineLbl(), TransitionProxy::Coll(), colliders, CollisionProxy::ColUL(), DEBUG_ENTRY, dense, TransitionProxy::Emis(), EXIT_FAILURE, fprintf(), TransitionProxy::Hi(), ioQQQ, TransitionProxy::ipCont(), iso_sp, lgMustPrintHeader, LIMLINE, line_RT_ipHi, line_RT_ipISO, line_RT_ipLo, line_RT_nelem, line_RT_type, TransitionProxy::Lo(), nLine, opac, phycon, EmissionProxy::PopOpc(), EmissionProxy::pump(), radius, and EmissionProxy::TauIn().
Referenced by SaveDo().
void save_opacity | ( | FILE * | io, |
long int | np ) |
save_opacity save total opacity in any element, save opacity command
io | |
np |
References abund, AnuUnit(), ASSERT, cdEXIT, continuum, DEBUG_ENTRY, dense, elementnames, EXIT_FAILURE, EXIT_SUCCESS, FILENAME_PATH_LENGTH_2, fprintf(), Heavy, Singleton< t_ADfA >::Inst(), Singleton< t_yield >::Inst(), ioQQQ, ipFineCont(), ipH1s, ipH_LIKE, ipHE_LIKE, ipHELIUM, ipHYDROGEN, ipLITHIUM, ipPun, iso_sp, LIMELM, makeChemical(), MAX2, MIN2, t_yield::nelec_eject(), opac, OpacityAdd1Element(), OpacityAdd1SubshellInduc(), OpacityZero(), open_data(), pow2, POW3, PrintE93(), prtPunOpacSummary(), rfield, and save.
Referenced by SaveDo().
void SaveAllSpeciesLabelsLevels | ( | FILE * | ioPUN | ) |
SaveAllSpeciesLabelsLevels – generate output of all species labels & levels
ioPUN | io unit for save |
References ipPun.
void SaveDo | ( | const char * | chTime | ) |
SaveDo produce save output during calculation
chTime | chTime is null terminated 4 char string, either "MIDL" or "LAST" |
lgLastOnly true, print after iteration is complete, false, evey zone
References abund, AGN_He1_CS(), AGN_Hemis(), AnuUnit(), ASSERT, TransitionProxy::associated(), called, cdColm(), cdExecTime(), cdEXIT, cdLine(), ChargTranPun(), CHIANTI_Upsilon(), TransitionProxy::chLabel(), colden, colliders, column(), conv, CoolSave(), cpu, CT_GRN_GRA, CT_GRN_SIL, CT_GRN_TOT, CT_INCI, CT_OUTW_DIFF, CT_OUTW_INCI, CT_OUTW_LIN, CT_REFL_DIFF, CT_REFL_INCI, CT_REFL_LIN, dBaseSpecies, dBaseTrans, DEBUG_ENTRY, molezone::den, dense, density(), DoppVel, dynamics, DynaPunchTimeDep(), DynaSave(), elementnames, TransitionProxy::Emis(), energy(), EXIT_FAILURE, EXIT_SUCCESS, exp10(), findspecies(), findspecieslocal(), FindStrongestLineLabels(), flxCell(), fp_equal(), fprintf(), qStateProxy::g(), GammaPrt(), geometry, t_ADfA::getEthresh(), grid, gv, h2, hcmap, Heavy, HFLines, TransitionProxy::Hi(), hmi, hyperfine, molecule::index, Singleton< t_ADfA >::Inst(), Singleton< t_yield >::Inst(), ion_recombAGN(), ionbal, ioQQQ, ipALUMINIUM, ipCARBON, ipCOL_elec, ipCOL_HTOT, ipELECTRON, ipFineCont(), ipH1s, ipH2p, ipH2s, ipH_LIKE, ipHe1s1S, ipHe2p1P, ipHe2p3P0, ipHe2p3P1, ipHe2p3P2, ipHe2s3S, ipHE_LIKE, ipHELIUM, ipHYDROGEN, ipIRON, ipMAGNESIUM, ipoint(), ipOXYGEN, ipPun, ipRecEsc, ipRecNetEsc, ipRecRad, ipSILICON, ipSODIUM, ipSULPHUR, is_odd(), iso_Max_Emitting_Level(), iso_RRCoef_Te(), iso_sp, iteration, iterations, lgCheckMonitors(), lgMustPrintHeader, LIMELM, LineSave, TransitionProxy::Lo(), magnetic, map_do(), matchGeneric(), MAX2, mean, MIN2, mole, mole_dominant_rates(), mole_global, mole_save(), NCHLAB, t_yield::nelec_eject(), nSpecies, null_mole, NUM_OUTPUT_TYPES, nzone, OccupationNumberLine(), opac, optimize, phycon, plankf(), qStateProxy::Pop(), POW2, pressure, prt, prt_line_inlist(), prt_LineLabels(), PrtLinePres(), PrtLogLin(), PrtMeanIon(), radius, rfield, safe_div(), save, save_average(), save_line(), Save_Line_RT(), save_opacity(), saveFITSfile(), SaveGaunts(), SaveHeat(), SaveLineData(), SaveLineIntensity(), SaveLineStuff(), SaveResults(), SaveSpecial(), SaveSpecies(), SaveSpeciesBands(), SaveSpeciesOptDep(), SaveSpeciesPseudoCont(), SDIV(), secondaries, sexp(), ShowMe(), SMALLFLOAT, struc, EmissionProxy::TauInSpecific(), TempChange(), TexcLine(), thermal, timesc, TorF(), TotalInsanity(), VERSION_TRNCON, and wind.
Referenced by cloudy().
void saveFITSfile | ( | FILE * | io, |
int | option, | ||
realnum | Elo = 0.f, | ||
realnum | Ehi = 0.f, | ||
realnum | Enorm = 0.f ) |
Save spectra to a FITS compatible file.
io | the file we will write to |
option | choose type of spectrum to save |
Elo | if set, lower bound of spectrum to save |
Ehi | if set, upper bound of spectrum to save |
Enorm | if set, normalize spectrum to 1 at this frequency |
References ASSERT, DEBUG_ENTRY, fprintf(), grid, GridRetrieveXSPECData(), ioFITS_OUTPUT, MAX2, maxParamValues, NUM_OUTPUT_TYPES, open_data(), optimize, punchFITS_EnergyData(), punchFITS_EnergyHeader(), punchFITS_GenericData(), punchFITS_GenericHeader(), punchFITS_ParamData(), punchFITS_ParamHeader(), punchFITS_PrimaryHeader(), punchFITS_SpectraData(), punchFITS_SpectraHeader(), rfield, and wr_block().
Referenced by process_output(), and SaveDo().
void saveFITSimg | ( | FILE * | io, |
const string & | extName, | ||
const string & | units, | ||
const long | nCols, | ||
const valarray< double > & | vec ) |
Save rate matrix to a FITS file. Mainly a debugging aid.
io | [in] the file we will write to |
extName | [in] extension name |
units | [in] vector units |
nCols | [in] length of vector |
vector | [in] vector to write in FITS extension |
References DEBUG_ENTRY, get_data_minmax(), ioFITS_OUTPUT, punchFITSimg_ExtensionData_vector(), and punchFITSimg_ExtensionHeader().
void saveFITSimg | ( | FILE * | io, |
const string & | extName, | ||
const string & | units, | ||
const long | nPixels, | ||
const multi_arr< double, 2, C_TYPE > & | image ) |
Save rate matrix to a FITS file. Mainly a debugging aid.
io | [in] the file we will write to |
extName | [in] extension name |
units | [in] vector units |
nPixels | [in] dimension of (square) image |
image | [in] image to write in FITS extension |
References DEBUG_ENTRY, get_data_minmax(), ioFITS_OUTPUT, punchFITSimg_ExtensionData_matrix(), punchFITSimg_ExtensionHeader(), and punchFITSimg_PrimaryHeader().
Referenced by save_img_matrix::addImagePop_FITS(), and save_img_matrix::createImage_FITS().
void SaveGrid | ( | FILE * | pnunit, |
exit_type | status ) |
SaveGrid implements the SAVE GRID command
pnunit | : file descriptor to write to |
status | : exit status of the grid point |
References cpu, DEBUG_ENTRY, ES_SUCCESS, ES_WARNINGS, fprintf(), grid, GridPointPrefix(), NULL, open_data(), optimize, save, TorF(), and warnings.
Referenced by cdPrepareExit().
void SaveHeat | ( | FILE * | io | ) |
SaveHeat save contributors to local heating, with save heat command, called by save_do
io | the file we will write to |
References ASSERT, TransitionProxy::associated(), chLineLbl(), CollisionProxy::col_str(), TransitionProxy::Coll(), conv, DEBUG_ENTRY, dense, dynamics, elementnames, TransitionProxy::Emis(), FndLineHt(), fprintf(), CollisionProxy::heat(), ioQQQ, LIMELM, EmissionProxy::Pesc(), phycon, EmissionProxy::pump(), radius, safe_div(), save, SMALLFLOAT, spsort(), EmissionProxy::TauIn(), thermal, and UNUSED.
Referenced by ConvBase(), and SaveDo().
NORETURN void SaveLineData | ( | FILE * | io | ) |
SaveLineData punches selected line data for all lines transferred in code
io |
References cdEXIT, chIonLbl(), CoolEvaluate(), dBaseTrans, DEBUG_ENTRY, molezone::den, dense, diatoms, EdenChange(), elementnames, EXIT_FAILURE, EXIT_SUCCESS, findspecieslocal(), fprintf(), HFLines, Singleton< t_ADfA >::Inst(), ioQQQ, ipH1s, ipH_LIKE, ipHe1s1S, ipHE_LIKE, ipHYDROGEN, ipSatelliteLines, iso_collide(), iso_ctrl, iso_sp, LIMELM, LineSave, MIN2, NISO, NORETURN, NRECCOEFCNO, nSpecies, nWindLine, phycon, PrintLineDataHeader(), t_ADfA::rec_lines(), SatelliteLines, Save1LineData(), SDIV(), TauLine2, TempChange(), thermal, and UTALines.
Referenced by SaveDo().
void SaveSpecial | ( | FILE * | io, |
const char * | chTime ) |
void SaveSpecies | ( | FILE * | ioPUN, |
long int | ipPun ) |
SaveSpecies generate output for the save species command
ioPUN | io unit for save |
ipPun | arrayin save array |
References ASSERT, cdEXIT, column(), DEBUG_ENTRY, density(), depart(), energy(), EXIT_FAILURE, fprintf(), ioQQQ, ipPun, levels(), molezone::levels, matchGeneric(), MAX2, mole, mole_global, NULL, null_molezone, save, SaveSpeciesHeader(), SaveSpeciesLines(), SaveSpeciesOne(), qList::size(), and TotalInsanity().
Referenced by SaveDo().
void SaveSpeciesBands | ( | const long | ipPun, |
const string & | speciesLabel, | ||
const string & | fileBands, | ||
const bool | lgEmergent ) |
SaveSpeciesBands - save species bands emission
ipPun | [in] save file index |
speciesLabel | [in] species emission to be stored |
fileBands | [in] file that holds the bands' definitions |
lgEmergent | [in] report emergent emission; intrinsic by default |
References ASSERT, cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, findSpecBand(), fprintf(), ioQQQ, ipPun, LineSave, radius, save, and SpecBands.
Referenced by SaveDo().
void SaveSpeciesOptDep | ( | const long int | ipPun, |
const string & | speciesLabel ) |
SaveSpeciesOptDep – generate output for 'save species optical depth'
ipPun | array index in save array |
speciesLabel | label to acquire species |
References DEBUG_ENTRY, fprintf(), getSpeciesGeneric(), ioQQQ, ipPun, iterations, NULL, and save.
Referenced by SaveDo().
void SaveSpeciesPseudoCont | ( | const long | ipPun, |
const string & | speciesLabel ) |
SaveSpeciesPseudoCont - save species pseudo-continuum
ipPun | save file index |
speciesLabel | species emission to be stored |
References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), getIntenTypeStr(), getPseudoIndex(), INWARD, ioQQQ, ipPun, OUTWARD, PseudoCont, resolveSpecType(), save, TOTAL, and TotalInsanity().
Referenced by SaveDo().
|
static |
Referenced by InitDefaultsPreparse(), ParseSave(), SaveFilesInit(), t_save::t_save(), and t_save::~t_save().
|
extern |
Referenced by AnuUnit(), atmdat_3body(), cdMain(), cdOutput(), cdOutput(), cdPrepareExit(), cdRead(), check_grid_file(), CloseSaveFiles(), ConvBase(), ConvIterCheck(), CoolHyperfine(), CoolSave(), database_readin(), fix_grid_file(), flxCell(), getAdjPseudoIndex(), getPseudoWlRange(), GrainIonColl(), diatomics::H2_ParseSave(), diatomics::H2_PunchDo(), HeatSum(), InitDefaultsPreparse(), ion_recom_calculate(), ion_recomb(), iso_allocate(), iso_level(), iso_radiative_recomb(), main(), OpacityCreate1Element(), Atom_LevelN::operator()(), parse_save_average(), ParseDont(), ParseSave(), ParseSet(), PrettyTransmission(), process_output(), PrtComment(), PrtLogLin(), PseudoContCreate(), radius_first(), radius_next(), read_UTA_lines(), Save1Line(), Save1LineData(), save_average(), save_DT(), save_opacity(), SaveDo(), SaveFilesInit(), SaveGrid(), SaveHeat(), SaveLineIntensity(), SaveLineStuff(), SaveSpecies(), SaveSpeciesBands(), SaveSpeciesLines(), SaveSpeciesOptDep(), SaveSpeciesPseudoCont(), saveXSPEC(), set_xIntensity(), SpeciesPseudoContCreate(), states_nelemfill(), vary_input(), and ZoneStart().
|
static |
magic version number for the transmitted continuum output file
Referenced by ReadTable(), and SaveDo().