cloudy
trunk
|
#include "cddefines.h"
#include "cddrive.h"
#include "mean.h"
#include "taulines.h"
#include "struc.h"
#include "iso.h"
#include "hyperfine.h"
#include "rt.h"
#include "magnetic.h"
#include "hydrogenic.h"
#include "secondaries.h"
#include "grainvar.h"
#include "lines.h"
#include "dynamics.h"
#include "colden.h"
#include "ionbal.h"
#include "yield.h"
#include "prt.h"
#include "iterations.h"
#include "heavy.h"
#include "conv.h"
#include "geometry.h"
#include "called.h"
#include "helike.h"
#include "opacity.h"
#include "phycon.h"
#include "timesc.h"
#include "radius.h"
#include "monitor_results.h"
#include "thermal.h"
#include "wind.h"
#include "hmi.h"
#include "pressure.h"
#include "elementnames.h"
#include "ipoint.h"
#include "hcmap.h"
#include "input.h"
#include "save.h"
#include "warnings.h"
#include "grid.h"
#include "atmdat.h"
#include "h2.h"
#include "gammas.h"
#include "mole.h"
#include "rfield.h"
#include "doppvel.h"
#include "freebound.h"
#include "dense.h"
#include "atmdat_gaunt.h"
#include "generic_state.h"
Go to the source code of this file.
Enumerations | |
enum | cont_type { CT_INCI, CT_OUTW_INCI, CT_REFL_INCI, CT_OUTW_DIFF, CT_REFL_DIFF, CT_OUTW_LIN, CT_REFL_LIN, CT_GRN_SIL, CT_GRN_GRA, CT_GRN_TOT } |
Functions | |
double | PrettyTransmission (long j, double transmission) |
double | flxCell (long j, long nEmType, cont_type ct, bool lgForceConserve=false, bool lgPrtIsotropicCont=true, const realnum *trans_coef_total=NULL) |
void | cdSPEC2 (int nOption, realnum ReturnedSpectrum[]) |
STATIC void | FindStrongestLineLabels (void) |
double | PrtLogLin (double value) |
STATIC void | SaveGaunts (FILE *ioPUN) |
STATIC void | SaveResults (FILE *ioPUN) |
STATIC void | SaveLineStuff (FILE *ioPUN, const char *chJob, realnum xLimit) |
STATIC void | AGN_Hemis (FILE *ioPUN) |
STATIC void | SaveLineIntensity (FILE *ioPUN, long int ipPun, realnum Threshold) |
void | SaveDo (const char *chTime) |
void | Save1Line (const TransitionProxy &t, FILE *ioPUN, realnum xLimit, long index, realnum DopplerWidth) |
void | SaveGrid (FILE *pnunit, exit_type status) |
Variables | |
STATIC long int | ipPun |
char * | chDummy |
static bool | lgPopsFirstCall |
static bool | lgSaveOpticalDepths |
enum cont_type |
Enumerator | |
---|---|
CT_INCI | |
CT_OUTW_INCI | |
CT_REFL_INCI | |
CT_OUTW_DIFF | |
CT_REFL_DIFF | |
CT_OUTW_LIN | |
CT_REFL_LIN | |
CT_GRN_SIL | |
CT_GRN_GRA | |
CT_GRN_TOT |
Definition at line 67 of file save_do.cpp.
STATIC void AGN_Hemis | ( | FILE * | ioPUN | ) |
Definition at line 3769 of file save_do.cpp.
References t_mesh::anu(), t_mesh::anu2(), AnuUnit(), cdEXIT, t_rfield::chContLabel, t_rfield::ConEmitLocal, ConvPresTempEdenIoniz(), DEBUG_ENTRY, dense, t_dense::eden, EXIT_SUCCESS, fprintf(), ioQQQ, ipHELIUM, ipHYDROGEN, MALLOC, t_rfield::nflux, nzone, phycon, rfield, RT_diffuse(), t_phycon::te, TempChange(), t_mesh::widflx(), and t_dense::xIonDense.
Referenced by SaveDo().
void cdSPEC2 | ( | int | Option, |
realnum | ReturnedSpectrum[] | ||
) |
this routine returns the spectrum needed for Keith Arnaud's XSPEC X-Ray analysis code. It should be called after cdDrive has successfully computed a model. The calling routine must ensure that the vectors have enough space to store the resulting spectrum, given the bounds and energy resolution
Option | the type of spectrum to be returned (in photons/s/bin) 0 the total continuum, all components outward and reflected 1 the incident continuum 2 the attenuated incident continuum 3 the reflected incident continuum 4 diffuse emission, lines + continuum, outward 5 diffuse emission, lines + continuum, reflected 6 diffuse continuous emission, outward 7 diffuse continuous emission, reflected 8 total transmitted, incident + lines and continuum 9 total reflected, incident + lines and continuum 10 exp(-tau) to the illuminated face |
ReturnedSpectrum[] | the returned spectrum, should have rfield.nflux elements |
Definition at line 148 of file save_do.cpp.
References t_mesh::anu2(), ASSERT, cdEXIT, CT_INCI, CT_OUTW_DIFF, CT_OUTW_INCI, CT_OUTW_LIN, CT_REFL_DIFF, CT_REFL_INCI, CT_REFL_LIN, DEBUG_ENTRY, EXIT_FAILURE, t_opac::ExpmTau, flxCell(), fprintf(), t_rfield::getCoarseTransCoef(), ioQQQ, t_rfield::nflux, opac, t_radius::PI4_rinner_sq, radius, rfield, and t_mesh::widflx().
Referenced by GridRetrieveXSPECData(), and punchFITS_GenericData().
STATIC void FindStrongestLineLabels | ( | void | ) |
Definition at line 273 of file save_do.cpp.
References t_mesh::anumax(), t_mesh::anumin(), ASSERT, t_rfield::chLineLabel, t_LineSave::ipass, ipLine, t_LineSave::lines, LineSave, t_rfield::nflux, t_LineSave::nsum, rfield, and t_LineSave::SortWL.
Referenced by SaveDo().
|
inline |
Definition at line 94 of file save_do.cpp.
References t_mesh::anu(), t_mesh::anu2(), ASSERT, t_rfield::ConEmitOut, t_rfield::ConEmitReflec, t_rfield::ConRefIncid, t_geometry::covgeo, 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, flux_correct_isotropic(), t_rfield::flux_total_incident, geometry, GrainVar::GrainEmission, GrainVar::GraphiteEmission, gv, t_rfield::outlin, t_radius::PI4_Radius_sq, t_radius::PI4_rinner_sq, PrettyTransmission(), radius, t_rfield::reflin, t_save::Resolution, rfield, save, GrainVar::SilicateEmission, TotalInsanity(), and t_mesh::widflx().
Referenced by cdSPEC2(), and SaveDo().
|
inline |
Definition at line 81 of file save_do.cpp.
References t_mesh::anu(), max(), t_save::ResolutionAbs, rfield, save, and t_mesh::widflx().
Referenced by flxCell().
double PrtLogLin | ( | double | value | ) |
SAVE command has option LOG to print log quantities as in <= C13
Definition at line 370 of file save_do.cpp.
References ipPun, t_save::lgPrtOldStyleLogs, 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 |
Definition at line 3711 of file save_do.cpp.
References AnuUnit(), CHARS_SPECIES, t_save::chConSavEnr, chIonLbl(), chLineLbl(), EmissionProxy::dampXvel(), TransitionProxy::Emis(), TransitionProxy::EnergyRyd(), TransitionProxy::EnergyWN(), fprintf(), EmissionProxy::gf(), TransitionProxy::Hi(), t_save::ipConPun, TransitionProxy::Lo(), prt_wl(), save, EmissionProxy::TauIn(), and TransitionProxy::WLAng().
Referenced by diatomics::H2_PunchLineStuff(), and SaveLineStuff().
void SaveDo | ( | const char * | chTime | ) |
SaveDo produce save output during calculation
chTime | chTime is null terminated 4 char string, either "MIDL" or "LAST" |
Definition at line 460 of file save_do.cpp.
References abund, Wind::AccelCont, Wind::AccelGravity, Wind::AccelLine, Wind::AccelTotalOutward, AGN_He1_CS(), AGN_Hemis(), t_opac::albedo, t_mesh::anu(), t_mesh::anu2(), AnuUnit(), ASSERT, EmissionProxy::Aul(), t_cpu_i::big_endian(), GrainVar::bin, called, cdColm(), cdExecTime(), cdEXIT, cdLine(), ChargTranPun(), t_rfield::chContLabel, t_elementnames::chElementSym, t_save::chHashString, CHIANTI_Upsilon(), t_rfield::chLineLabel, t_save::chLineListLabel, t_save::chSave, t_save::chSaveArgs, t_save::chSaveSpecies, t_Heavy::chShell, t_save::chSpeciesDominantRates, colden, t_colden::colden, TransitionProxy::Coll(), colliders, CollisionProxy::ColUL(), column(), t_rfield::comdn, t_rfield::comup, t_rfield::ConEmitLocal, t_rfield::ConEmitOut, t_rfield::ConEmitReflec, t_rfield::ConInterOut, t_rfield::ConRefIncid, t_rfield::ConSourceFcnLocal, conv, t_radius::Conv2PrtInten, t_dynamics::Cool(), CoolSave(), cpu, t_secondaries::csupra, 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, t_thermal::ctot, EmissionProxy::damp(), dBaseSpecies, dBaseTrans, t_thermal::dCooldT, DEBUG_ENTRY, molezone::den, dense, density(), 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_mesh::egamry(), t_yield::elec_eject_frac(), elementnames, TransitionProxy::Emis(), TransitionList::Emis(), t_save::emisfreq, t_mesh::emm(), energy(), t_phycon::EnergyBinding, t_phycon::EnergyExcitation, t_phycon::EnergyIonization, TransitionProxy::EnergyRyd(), t_magnetic::EnthalpyDensity, t_phycon::EnthalpyDensity, EXIT_FAILURE, EXIT_SUCCESS, exp10(), t_rfield::extin_mag_V_extended, t_rfield::extin_mag_V_point, t_iso_sp::fb, 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, flxCell(), Wind::fmul, fp_equal(), fprintf(), GammaPrt(), t_dense::gas_phase, GrainVar::GasCoolColl, geometry, t_rfield::getCoarseTransCoef(), t_conv::getCounterName(), t_conv::getCounterZone(), t_mesh::getResolutionScaleFactor(), grid, 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_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, SaveParams::ipPnunit, ipPun, ipRecEsc, ipRecNetEsc, ipRecRad, ipSILICON, ipSODIUM, ipSULPHUR, 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, 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::lgPrtIsotropicCont, t_save::lgPunLstIter, t_radius::lgRadiusKnown, t_save::lgRealSave, t_save::lgSaveEveryZone, t_save::lgSaveHeader(), t_geometry::lgSphere, t_dynamics::lgStatic_completed, t_called::lgTalk, t_dynamics::lgTimeDependentStatic, t_DoppVel::lgTurb_pressure, LIMELM, t_rfield::line_count, t_LineSave::lines, LineSave, t_save::LinEvery, t_mole_global::list, magnetic, map_do(), t_hcmap::MapZone, matchGeneric(), MAX2, mean, t_mesh::mesh_md5sum(), MIN2, mole, mole_dominant_rates(), mole_global, mole_save(), NCHLAB, t_iso_sp::nCollapsed_local, t_save::ncSaveSkip, t_yield::nelec_eject(), t_rfield::nfine, t_rfield::nflux, t_rfield::nflux_with_check, t_save::nLineList, t_optimize::nOptimiz, t_conv::nPres2Ioniz, t_save::nsave, t_save::nSaveEveryZone, nSpecies, t_Heavy::nsShells, t_LineSave::nsum, t_conv::ntypes(), null_mole, t_mole_global::num_calc, NUM_OUTPUT_TYPES, t_iso_sp::numLevels_local, nzone, t_rfield::OccNumbIncidCont, 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_save::params, t_dense::pden, EmissionProxy::Pdest(), EmissionProxy::Pesc(), t_ADfA::ph1(), t_ionbal::PhotoRate_Shell, phycon, t_radius::PI4_Radius_sq, t_pressure::pinzon, t_pressure::pinzon_PresIntegElecThin, plankf(), EmissionProxy::Ploss(), POW2, t_pressure::pres_radiation_lines_curr, t_pressure::PresGasCurr, t_pressure::PresInteg, t_pressure::PresIntegElecThin, t_pressure::PresRamCurr, pressure, t_magnetic::pressure, t_pressure::PresTotlCurr, t_pressure::PresTotlError, t_pressure::PresTotlInit, t_pressure::PresTurbCurr, prt_line_inlist(), prt_LineLabels(), prt_wl(), PrtLinePres(), PrtLogLin(), PrtMeanIon(), EmissionProxy::pump(), t_save::punarg, 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, rfield, Energy::Ryd(), safe_div(), save, save_average(), save_line(), Save_Line_RT(), save_opacity(), saveFITSfile(), SaveGaunts(), t_save::SaveHeaderDone(), SaveHeat(), SaveLineData(), SaveLineIntensity(), SaveLineStuff(), SaveResults(), SaveSpecial(), SaveSpecies(), SaveSpeciesBands(), SaveSpeciesOptDep(), SaveSpeciesPseudoCont(), SDIV(), secondaries, sexp(), ShowMe(), SMALLFLOAT, t_timesc::sound_speed_adiabatic, t_dynamics::Source, t_mole_local::species, t_save::SpeciesBandFile, sprt_wl(), t_iso_sp::st, struc, t_opac::TauAbsFace, t_opac::TauAbsGeo, EmissionProxy::TauCon(), EmissionProxy::TauIn(), 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_hyperfine::Tspin21cm, t_DoppVel::TurbVel, t_hmi::UV_Cont_rel2_Draine_DB96_depth, t_hmi::UV_Cont_rel2_Habing_TH85_depth, VERSION_TRNCON, t_save::whichDiatomToPrint, t_mesh::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().
STATIC void SaveGaunts | ( | FILE * | ioPUN | ) |
Definition at line 3928 of file save_do.cpp.
References DEBUG_ENTRY, exp10(), fprintf(), t_gaunt::gauntff(), Singleton< t_gaunt >::Inst(), and LIMELM.
Referenced by SaveDo().
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 |
Definition at line 3996 of file save_do.cpp.
References t_cpu_i::chExitStatus(), t_save::chFileName, t_optimize::chVarFmt, cpu, DEBUG_ENTRY, ES_SUCCESS, ES_WARNINGS, fprintf(), grid, GridPointPrefix(), t_cpu::i(), t_grid::interpParameters, t_save::ipSaveGrid, t_warnings::lgWarngs, t_grid::nintparm, t_optimize::nOptimiz, t_cpu_i::nRANK(), open_data(), optimize, save, t_grid::seqNum, TorF(), and warnings.
Referenced by cdPrepareExit().
Definition at line 3545 of file save_do.cpp.
References cdCautions(), cdWarnings(), DEBUG_ENTRY, t_input::echo(), fixit, fprintf(), input, t_save::lgEmergent, t_LineSave::lines, LineSave, t_LineSave::nsum, nzone, t_save::punarg, and save.
Referenced by SaveDo().
Definition at line 3596 of file save_do.cpp.
References t_dense::AtomicWeight, cdEXIT, t_save::chHashString, dBaseSpecies, dBaseTrans, DEBUG_ENTRY, dense, EXIT_FAILURE, ExtraLymanLines, fprintf(), GetDopplerWidth(), h2, diatomics::H2_PunchLineStuff(), ioQQQ, ipExtraLymanLines, ipH_LIKE, iso_ctrl, iso_sp, t_dense::lgElmtOn, LIMELM, NISO, t_isoCTRL::nLyman, nSpecies, t_iso_sp::numLevels_local, nWindLine, save, Save1Line(), TransitionList::size(), t_isoCTRL::SmallA, TauLine2, and UTALines.
Referenced by SaveDo().
STATIC void SaveResults | ( | FILE * | ioPUN | ) |
Definition at line 3838 of file save_do.cpp.
References ASSERT, cdCautions(), cdWarnings(), DEBUG_ENTRY, t_input::echo(), fprintf(), input, LIMELM, t_LineSave::lines, LineSave, mean, t_LineSave::nsum, opac, t_opac::telec, and t_mean::xIonMean.
Referenced by SaveDo().
char* chDummy |
Definition at line 458 of file save_do.cpp.
STATIC long int ipPun |
Definition at line 367 of file save_do.cpp.
Referenced by t_save::lgSaveHeader(), t_save::lgSaveTitle(), parse_save_average(), parse_save_line(), process_output(), PrtLogLin(), save_average(), save_line(), save_opacity(), SaveDo(), t_save::SaveHeaderDone(), SaveSpecies(), and t_save::SaveTitleDone().
|
static |
Definition at line 3593 of file save_do.cpp.
|
static |
Definition at line 3593 of file save_do.cpp.