cloudy trunk
Loading...
Searching...
No Matches
Data Structures | Functions | Variables
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[] 
)

◆ 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(), t_save::chConPunEnr, chIonLbl(), CollisionProxy::col_str(), TransitionProxy::Coll(), COLL_CONST, EmissionProxy::damp(), DEBUG_ENTRY, TransitionProxy::Emis(), TransitionProxy::EnergyRyd(), g, EmissionProxy::gf(), TransitionProxy::Hi(), t_save::ipConPun, TransitionProxy::ipCont(), TransitionProxy::Lo(), phycon, PrintEfmt, prt_wl(), save, t_phycon::sqrte, 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(), t_save::chAverageSpeciesLabel, t_save::chAverageType, DEBUG_ENTRY, EXIT_FAILURE, ioQQQ, t_save::ipPnunit, t_save::nAverage2ndPar, t_save::nAverageIonList, t_save::nAverageList, 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, t_radius::depth_mid_zone, EXIT_FAILURE, h2, ioQQQ, ipLine, lgAbort, diatomics::lgEnabled, lgRelativeIntensity, LineSave, MAX2, nLinesEntered, NPUNLM, t_LineSave::nsum, 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, Wind::AccelCont, Wind::AccelGravity, Wind::AccelLine, Wind::AccelTotalOutward, AGN_He1_CS(), AGN_Hemis(), t_opac::albedo, t_rfield::anu, t_rfield::anu2, t_rfield::AnuOrg, AnuUnit(), ASSERT, EmissionProxy::Aul(), t_cpu_i::big_endian(), GrainVar::bin, BOLTZMANN, t_colden::C1Pops, t_colden::C2Pops, called, cdColm(), cdExecTime(), cdEXIT, cdLine(), t_tag_LineSv::chALab, ChargTranPun(), t_rfield::chContLabel, t_elementnames::chElementSym, t_save::chHashString, t_save::chHeader, CHIANTI_Upsilon(), t_species::chLabel, t_rfield::chLineLabel, t_save::chLineListLabel, t_save::chNONSENSE, t_save::chSave, t_save::chSaveArgs, t_Heavy::chShell, t_save::chSpeciesDominantRates, t_tag_LineSv::chSumTyp, colden, t_colden::colden, TransitionProxy::Coll(), colliders, CollisionProxy::ColUL(), t_rfield::comdn, t_rfield::comup, t_rfield::ConEmitLocal, t_rfield::ConEmitOut, t_rfield::ConEmitReflec, t_rfield::ConInterOut, t_rfield::ConRefIncid, t_rfield::ConSourceFcnLocal, continuum, conv, t_radius::Conv2PrtInten, t_dynamics::Cool(), CoolSave(), t_geometry::covgeo, cpu, t_secondaries::csupra, t_thermal::ctot, EmissionProxy::damp(), dBaseSpecies, dBaseTrans, t_thermal::dCooldT, DEBUG_ENTRY, molezone::den, dense, t_radius::depth, t_radius::depth_mid_zone, t_rfield::DiffuseLineEmission, DoppVel, t_radius::drad, t_radius::drad_x_fillfac, GrainVar::dstab, GrainVar::dstsc, Wind::dvdr, dynamics, DynaPunchTimeDep(), DynaSave(), t_dense::eden, t_dense::EdenHCorr, t_dense::EdenTrue, t_rfield::egamry, t_yield::elec_eject_frac(), elementnames, TransitionList::Emis(), TransitionProxy::Emis(), t_save::emisfreq, t_rfield::emm, EN1RYD, t_phycon::EnergyBinding, t_phycon::EnergyExcitation, t_phycon::EnergyIonization, TransitionProxy::EnergyRyd(), t_magnetic::EnthalpyDensity, t_phycon::EnthalpyDensity, EVRYD, EXIT_FAILURE, EXIT_SUCCESS, t_rfield::extin_mag_V_extended, t_rfield::extin_mag_V_point, t_iso_sp::fb, FeII, FeII_Cont, t_FeII::FeIIAul, t_FeII::FeIIColl, t_FeII::FeIINRGs, FeIIPunchColden(), FeIIPunchLevels(), FeIIPunchOpticalDepth(), FeIIPunDepart(), FeIIPunPop(), FeIISaveLines(), t_FeII::FeIISTWT, t_geometry::FillFac, t_mole_local::findrk(), findspecies(), findspecieslocal(), FindStrongestLineLabels(), t_rfield::fine_anu, t_rfield::fine_opac_zone, t_rfield::fine_opt_depth, t_rfield::flux, t_rfield::flux_total_incident, Wind::fmul, fp_equal(), GammaPrt(), t_dense::gas_phase, GrainVar::GasCoolColl, geometry, t_rfield::getCoarseTransCoef(), t_conv::getCounterZone(), GrainVar::GrainEmission, GrainVar::GraphiteEmission, grid, GridGatherInCloudy(), gv, t_colden::H0_21cm_lower, t_colden::H0_21cm_upper, t_colden::H0_ov_Tspin, h2, t_hmi::H2_photodissoc_used_H2g, diatomics::H2_PunchDo(), t_hmi::H2_Solomon_dissoc_rate_used_H2g, t_hmi::H2_total, hcmap, t_dynamics::Heat(), t_hmi::HeatH2Dexc_used, t_hmi::HeatH2Dish_used, t_thermal::heating, Heavy, HFLines, t_conv::hist_pres_current, t_conv::hist_pres_density, t_conv::hist_pres_error, t_conv::hist_temp_cool, t_conv::hist_temp_heat, t_conv::hist_temp_temp, hmi, t_thermal::htot, HydroRecCool(), hyperfine, t_cpu::i(), molecule::index, Singleton< t_ADfA >::Inst(), Singleton< t_yield >::Inst(), t_pressure::IntegRhoGravity, ion_recombAGN(), ionbal, ioQQQ, ipALUMINIUM, ipCARBON, ipCOL_elec, ipCOL_H0, ipCOL_H2g, ipCOL_H2s, ipCOL_H3p, ipCOL_Hp, ipCOL_HTOT, t_save::ipConPun, TransitionProxy::ipCont(), ipELECTRON, t_opac::ipElement, t_save::ipEmisFreq, ipFineCont(), ipH1s, ipH2p, ipH2s, ipH_LIKE, ipHe1s1S, ipHe2p1P, ipHe2p3P0, ipHe2p3P1, ipHe2p3P2, ipHe2s3S, ipHE_LIKE, ipHELIUM, ipHYDROGEN, ipIRON, ipMAGNESIUM, t_rfield::ipMaxBolt, ipoint(), ipOXYGEN, t_save::ipPnunit, ipRecEsc, ipRecNetEsc, ipRecRad, ipSILICON, ipSODIUM, ipSULPHUR, ipT1032, ipT146, ipT157, ipT370, ipT610, ipT63, t_rfield::ipV_filter, is_odd(), iso_sp, iteration, iterations, t_save::lg_separate_iterations, lgAbort, lgCheckMonitors(), t_conv::lgConvPres, t_conv::lgConvTemp, t_save::lgCumulative, t_dense::lgElmtOn, t_save::lgEmergent, diatomics::lgEnabled, lgFirst, t_save::lgFITS, t_save::lgFLUSH, t_grid::lgGrid, t_save::lgHashEndIter, t_iterations::lgLastIt, t_save::lgLineListRatio, t_save::lgLinEvery, t_hcmap::lgMapBeingDone, t_hcmap::lgMapDone, t_cpu_i::lgMPI_talk(), lgMustPrintHeader, t_grid::lgOutputTypeOn, t_save::lgPunHeader, t_save::lgPunLstIter, t_save::lgRealSave, t_save::lgSaveEveryZone, t_geometry::lgSphere, t_dynamics::lgStatic_completed, t_called::lgTalk, t_dynamics::lgTimeDependentStatic, t_DoppVel::lgTurb_pressure, LIMELM, t_rfield::line_count, LineSave, LineSv, t_save::LinEvery, t_mole_global::list, magnetic, map_do(), t_hcmap::MapZone, MAX2, MAX_HEADER_SIZE, mean, t_continuum::mesh_md5sum, MIN2, mole, mole_dominant_rates(), mole_global, mole_punch(), t_iso_sp::nCollapsed_local, t_save::ncSaveSkip, t_yield::nelec_eject(), nFeIIConBins, t_FeII::nFeIILevel_malloc, t_rfield::nfine, t_rfield::nflux, t_save::nLineList, nMatch(), t_optimize::nOptimiz, t_conv::nPres2Ioniz, t_save::nsave, t_save::nSaveEveryZone, nSpecies, t_Heavy::nsShells, t_LineSave::nsum, NTYPES, null_mole, t_mole_global::num_calc, NUM_OUTPUT_TYPES, t_iso_sp::numLevels_local, t_rfield::nupper, nzone, t_colden::O1Pops, OccupationNumberLine(), opac, t_opac::opacity_abs, t_opac::opacity_sct, optimize, t_save::optname, t_rfield::otscon, t_rfield::otslin, t_rfield::outlin, t_rfield::outlin_noplot, t_dense::pden, EmissionProxy::Pdest(), EmissionProxy::Pelec_esc(), EmissionProxy::Pesc(), t_ADfA::ph1(), t_ionbal::PhotoRate_Shell, phycon, t_pressure::pinzon, t_pressure::pinzon_PresIntegElecThin, plankf(), POW2, t_pressure::pres_radiation_lines_curr, t_pressure::PresGasCurr, t_pressure::PresInteg, t_pressure::PresIntegElecThin, t_pressure::PresRamCurr, t_magnetic::pressure, pressure, t_pressure::PresTotlCurr, t_pressure::PresTotlError, t_pressure::PresTotlInit, t_pressure::PresTurbCurr, PrettyTransmission(), prt_LineLabels(), prt_wl(), PrtColumns(), PrtLinePres(), PrtMeanIon(), EmissionProxy::pump(), t_save::punarg, t_radius::r1r0sq, radius, t_radius::Radius, t_radius::Radius_mid_zone, t_iso_sp::RadRec_caseB, t_dynamics::Rate, GrainVar::rate_h2_form_grains_used_total, t_ionbal::RateIonizTot(), t_ionbal::RateRecomTot, t_rfield::reflin, t_save::Resolution, t_continuum::ResolutionScaleFactor, rfield, Energy::Ryd(), 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(), GrainVar::SilicateEmission, SMALLFLOAT, t_timesc::sound_speed_adiabatic, t_dynamics::Source, t_mole_local::species, sprt_wl(), t_iso_sp::st, struc, t_opac::TauAbsFace, t_opac::TauAbsGeo, EmissionProxy::TauCon(), EmissionProxy::TauIn(), TauLines, t_opac::TauScatFace, EmissionProxy::TauTot(), t_phycon::te, t_phycon::te03, t_phycon::te10, t_phycon::te70, t_phycon::TeInit, t_phycon::telogn, TempChange(), t_phycon::TeProp, t_struc::testr, TexcLine(), thermal, t_dynamics::time_elapsed, t_timesc::time_H2_Dest_here, timesc, TorF(), GrainVar::TotalEden, TotalInsanity(), t_rfield::TotDiff2Pht, t_iso_sp::trans(), t_rfield::trans_coef_total, t_hyperfine::Tspin21cm, t_DoppVel::TurbVel, t_hmi::UV_Cont_rel2_Draine_DB96_depth, t_hmi::UV_Cont_rel2_Habing_TH85_depth, VERSION_TRNCON, t_tag_LineSv::wavelength, wavelength, t_save::whichDiatomToPrint, t_rfield::widflx, wind, Wind::windv, TransitionProxy::WLAng(), t_save::wlLineList, t_secondaries::x12tot, t_dense::xIonDense, t_mean::xIonMean, and t_dense::xMassDensity.

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 t_cpu_i::chExitStatus(), t_optimize::chVarFmt, cpu, ES_SUCCESS, ES_WARNINGS, grid, t_cpu::i(), INPUT_LINE_LENGTH, t_grid::interpParameters, t_warnings::lgWarngs, t_grid::nintparm, t_optimize::nOptimiz, t_cpu_i::nRANK(), optimize, t_grid::seqNum, TorF(), and warnings.

Referenced by cdPrepareExit().

Here is the call graph for this function:

◆ SaveHeat()

void SaveHeat ( FILE *  io)

◆ 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 Wind::AccelCont, t_rfield::anu, t_rfield::anu2, DEBUG_ENTRY, dense, t_dense::eden, EN1RYD, Wind::fmul, t_dense::gas_phase, TransitionProxy::ipCont(), ipH1s, ipH2p, ipH2s, ipH_LIKE, ipHYDROGEN, iso_sp, opac, t_opac::opacity_sct, PunFeII(), radius, t_radius::Radius, rfield, RYDLAM, t_iso_sp::st, t_iso_sp::trans(), t_iso_sp::TwoNu, t_rfield::widflx, wind, and t_dense::xMassDensity.

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, t_save::chSaveArgs, t_save::chSaveSpecies, DEBUG_ENTRY, EXIT_FAILURE, findspecies(), findspecieslocal(), molecule::index, ioQQQ, molecule::label, molezone::levels, t_save::lgPunHeader, t_mole_global::list, MAX2, mole, mole_global, null_molezone, save, SaveSpeciesOne(), qList::size(), and t_mole_local::species.

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

t_save save
extern

◆ 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().