Cloudy
Spectral Synthesis Code for Astrophysics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
prt.h File Reference
#include "module.h"
#include "container_classes.h"
#include "lines.h"
Include dependency graph for prt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  t_prt_matrix
 
struct  t_blend
 
struct  t_prt
 
struct  t_line_col
 

Functions

void PrtZone (void)
 
void PrtComment (void)
 
void PrtFinal (void)
 
void SetPrintLineCol ()
 
void prt_wl (FILE *io, realnum wavelength)
 
void sprt_wl (string &chString, realnum wl)
 
void prt_line_err (FILE *ioOUT, const string &label, realnum wvlng)
 
void prt_line_err (FILE *ioOUT, const LineID &lineid)
 
void prt_line_inlist (FILE *ioOUT, const char *label, realnum wvlng)
 
void PrtHeader (void)
 
void prt_LineLabels (FILE *io, bool lgPrintAll, bool lgPrintIndex)
 
void prtmet (void)
 
void PrtMeanIon (char chType, bool lgDensity, FILE *)
 
double PrtLineSum (void)
 
void PrtLinePres (FILE *ioPRESSURE)
 
void PrtColumns (FILE *ioMEAN)
 
void CloudyPrintReference ()
 
void DatabasePrintReference ()
 
void PrtAllTau (void)
 

Variables

const long NCOLMAX =132
 
t_prt prt
 
struct t_line_col prt_linecol
 

Function Documentation

void CloudyPrintReference ( )

CloudyPrintReference print preferred citation to Cloudy

References fprintf(), Singleton< t_version >::Inst(), ioQQQ, mode_r, open_data(), and SafeGetline().

Referenced by PrtHeader().

Here is the call graph for this function:

void DatabasePrintReference ( )

DatabasePrintReference print some database references

References atmdat, t_atmdat::chVersion, fprintf(), ioQQQ, mode_r, open_data(), and SafeGetline().

Referenced by PrtFinal(), and PrtHeader().

Here is the call graph for this function:

void prt_line_err ( FILE *  ioOUT,
const string &  label,
realnum  wvlng 
)
prt_line_err produce an error message containing the line label and wavelength,
            followed, if given, by the wavelength of the closest line of the same label 
Parameters
*ioOUToutput file handle
*labelline label
wvlngline wavelength

References prt_line_err().

Here is the call graph for this function:

void prt_line_err ( FILE *  ioOUT,
const LineID lineid 
)

References LineID::chLabel, fprintf(), prt_wl(), and LineID::wave.

Referenced by t_LineSave::findline(), IterStart(), lgCheckMonitors(), lines_table(), prt_line_err(), PrtLineSum(), and save_line().

Here is the call graph for this function:

void prt_line_inlist ( FILE *  ioOUT,
const char *  label,
realnum  wvlng 
)

References fprintf(), NCHLAB, and prt_wl().

Referenced by SaveDo().

Here is the call graph for this function:

void prt_LineLabels ( FILE *  io,
bool  lgPrintAll,
bool  lgPrintIndex 
)

prt_LineLabels save all labels and wavelengths for emission line array

Parameters
iofile handle to write output
lgPrintAllprint all if true, if false then do not print parts of transferred lines
lgPrintIndexprint the index of the line in the line stack

References t_LineSave::chHoldComments, DEBUG_ENTRY, fprintf(), t_LineSave::lines, LineSave, and t_LineSave::nsum.

Referenced by SaveDo().

Here is the call graph for this function:

void prt_wl ( FILE *  io,
realnum  wavelength 
)
void PrtColumns ( FILE *  ioMEAN)

PrtColumns print column densities of all elements in standard output

Parameters
ioMEANthis is stream used for io, is stdout when called by final, is save unit when save output generated

References ASSERT, cdColm(), t_elementnames::chElementName, t_elementnames::chElementNameShort, column(), DEBUG_ENTRY, dense, elementnames, fprintf(), h2, diatomics::H2_Prt_column_density(), ipHYDROGEN, t_dense::lgElmtOn, LIMELM, matchGeneric(), MAX2, molcol(), NCHLAB, nWindLine, SDIV(), and TotalInsanity().

Referenced by PrtFinal().

Here is the call graph for this function:

void PrtComment ( void  )

PrtComment analyze model, generating comments on its features

Todo:
2 extend to all iso and elem

References abund, AgeCheck(), t_colden::ajmmin, t_mesh::anu(), ASSERT, atmdat, atoms, bangin(), t_conv::BigEdenError, GrainVar::bin, ca, t_ca::Ca2RmLya, called, caunin(), cdCautions(), cdEXIT, cdLine(), cdNotes(), cdReasonGeo(), cdSurprises(), cdWarnings(), t_thermal::chCoolHeatMax, t_dense::chDenseLaw, t_elementnames::chElementName, t_elementnames::chElementNameShort, t_elementnames::chElementSym, chkCaHeps(), chLineLbl(), t_pressure::chLineRadPres, t_conv::chNotConverged, t_StopCalc::chReasonStop, t_input::chTitle, t_rfield::cinrat, t_hydro::cintot, co, t_co::codfrc, t_co::codtot, colden, t_colden::colden, t_colden::colden_old, column(), t_rfield::comtot, t_rfield::ConInterOut, ConserveEnergy(), t_thermal::ConstTemp, continuum, conv, t_hmi::CoolH2DexcMax, t_thermal::CoolHeatMax, t_hyperfine::cooling_max, t_dynamics::CoolMax, t_geometry::covaper, t_geometry::covrt, cpu, t_hextra::cryden, GrainVar::dclmax, DEBUG_ENTRY, dense, t_abund::DepletionScaleFactor, t_radius::depth, DEPTH_OFFSET, DF_SUBLIMATION, DoppVel, t_rt::DoubleTau, GrainVar::dphmax, dynamics, t_conv::EdenErrorAllowed, t_dense::EdenMax, t_struc::ednstr, elementnames, Wind::emdot, TransitionProxy::Emis(), t_rfield::EnergyBremsThin, EXIT_FAILURE, exp10(), t_conv::failmx, t_iso_sp::fb, t_hydro::fbul, t_geometry::FillFac, t_geometry::filpow, findspecieslocal(), FndLineHt(), t_cpu_i::foundCSMismatch(), fprintf(), t_he::frac_he0dest_23S, t_he::frac_he0dest_23S_photo, t_hydro::FracInd, t_thermal::FreeFreeTotHeat, fudgec, t_dense::gas_phase, t_thermal::GBarMax, geometry, GrainVar::GrnElecDonateMax, GrainVar::GrnElecHoldMax, gv, h2, t_hmi::h2dfrc, t_hmi::h2dtot, t_hmi::h2line_cool_frac, t_hmi::h2pmax, Hbeta_WavLen, t_atmdat::HCharCoolMax, t_atmdat::HCharHeatMax, hcmap, t_hydro::HCollIonMax, he, t_hmi::HeatH2DexcMax, t_thermal::HeatLineMax, t_dynamics::HeatMax, hextra, HFLines, t_atmdat::HIonFracMax, hmi, t_hmi::hmitot, hydro, hyperfine, t_cpu::i(), t_geometry::iEmissPower, t_conv::ifailz, two_photon::induc_dn_max, input, INPUT_LINE_LENGTH, Singleton< module_list >::Inst(), Singleton< t_version >::Inst(), ioPrnErr, ioQQQ, ipCARBON, ipCOL_HTOT, ipH1s, ipH2p, ipH2s, ipH3p, ipH_LIKE, ipHE_LIKE, ipHELIUM, ipHYDROGEN, t_thermal::ipMaxExtra, ipOXYGEN, t_pressure::ipPradMax_line, t_pressure::ipPradMax_nzone, iso_ctrl, iso_sp, iteration, iterations, t_iterations::itermx, t_abund::lgAbnReference, t_conv::lgAutoIt, t_magnetic::lgB, t_conv::lgBadStop, Wind::lgBallistic(), t_input::lgBracketFound, t_opac::lgCaseB, t_rfield::lgCMB_set, t_rfield::lgComUndr, t_continuum::lgCon0, t_continuum::lgCoStarInterpolationCaution, t_isoCTRL::lgCritDensLMix, t_radius::lgCylnOn, t_abund::lgDepln, t_radius::lgDR2Big, t_radius::lgdR2Small, t_radius::lgDrMinUsed, GrainVar::lgDustOn(), t_dense::lgEdenBad, t_thermal::lgEdnGTcm, t_dense::lgElmtOn, t_fudgec::lgFudgeUsed, t_rfield::lgGamrOK, t_mole_global::lgH2Ozer, t_rfield::lgHabing, t_atmdat::lgHCaseBOK, t_rfield::lgHionRad, t_hydro::lgHiPop2, t_rfield::lgHPhtOK, t_iterations::lgIterAgain, t_iterations::lgLastIt, t_hcmap::lgMapDone, t_hcmap::lgMapOK, t_rt::lgMaserCapHit, t_rt::lgMaserSetDR, t_rfield::lgMMok, GrainVar::lgNegGrnDrg, t_rfield::lgOcc1Hi, t_opac::lgOpacNeg, t_iterations::lgOpticalDepthonverged, t_phycon::lgPhysOK, t_rfield::lgPlasNu, t_pressure::lgPradCap, t_pressure::lgPradDen, t_pressure::lgPres_radiation_ON, lgPrnErr, t_save::lgPunContinuum, t_dynamics::lgRecom, t_dense::lgSetIoniz, t_input::lgSetNoBuffering, t_geometry::lgSphere, Wind::lgStatic(), t_geometry::lgStatic, t_geometry::lgStaticNoIt, t_called::lgTalk, t_thermal::lgTemperatureConstant, lgTestCodeCalled, t_dynamics::lgTimeDependentStatic, t_trace::lgTrace, t_input::lgUnderscoreFound, Wind::lgWindOK, t_rfield::lgXRayOK, t_geometry::lgZoneSet, t_geometry::lgZoneTrp, LIMELM, t_LineSave::lines, LineSave, t_mole_global::list, module_list::m_l, magnetic, MIN2, mole, mole_global, t_iso_sp::n_HighestResolved_local, t_hydro::nbul, t_iso_sp::nCollapsed_local, t_hydro::ndclev, t_rfield::nflux, t_fudgec::nfudge, NISO, t_hydro::nLyaHot, notein(), t_conv::nTeFail, NULL, t_mole_global::num_calc, t_iso_sp::numLevels_local, t_thermal::nUnstable, nWindLine, t_dense::nzEdenBad, t_struc::nzlim, nzone, t_he::nzone, t_hydro::nZTLaMax, t_rfield::occ1nu, t_rfield::occmax, t_rfield::occmnu, opac, oxy, phycon, t_rfield::plsfrqmax, t_oxy::poiii2Max, t_oxy::poiii3Max, t_oxy::poimax, t_hydro::pop2mx, t_thermal::power, powi(), pressure, prt_smooth_predictions(), t_radius::r1r0sq, t_oxy::r4363Max, t_oxy::r5007Max, t_pressure::RadBetaMax, radius, t_radius::Radius, diatomics::renorm_max, diatomics::renorm_min, rfield, rgcin(), t_radius::rinner, t_colden::rjnmin, rt, save, SDIV(), t_secondaries::SecHIonMax, secondaries, ShowMe(), t_isoCTRL::SmallA, SMALLFLOAT, t_mole_local::species, t_opac::stimax, StopCalc, struc, t_opac::TauAbsGeo, EmissionProxy::TauIn(), TauLine2, EmissionProxy::TauTot(), t_rfield::tbr4nu, t_rfield::tbrmax, t_rfield::tbrmnu, t_timesc::tcmptn, t_phycon::te, t_opac::telec, t_hydro::TeLyaMax, t_phycon::TEMP_STOP_DEFAULT, t_StopCalc::TempLoStopZone, t_phycon::TEnerDen, t_struc::testr, thermal, t_thermal::thist, t_opac::thmin, t_timesc::time_therm_long, t_timesc::TimeErode, timesc, t_hydro::TLyaMax, GrainVar::TotalDustHeat, TotalInsanity(), t_thermal::totcol, trace, t_iso_sp::trans(), t_DoppVel::TurbVel, t_iso_sp::TwoNu, t_rfield::uh, warnin(), warnings, wind, Wind::windv, wlAirVac(), t_thermal::wlCoolHeatMax, and t_atoms::xMg2Max.

Referenced by cloudy().

Here is the call graph for this function:

void PrtFinal ( void  )

PrtFinal create final pages of printout, emission line intensities, etc

References Wind::AccelAver, Wind::acldr, t_colden::ajmmin, t_mesh::anu(), ASSERT, atmdat, t_conv::AverEdenError, t_conv::AverHeatCoolError, t_conv::AverPressError, t_conv::BigEdenError, t_conv::BigHeatCoolError, t_phycon::BigJumpCO, t_phycon::BigJumpH2, t_phycon::BigJumpne, t_phycon::BigJumpTe, t_conv::BigPressError, GrainVar::bin, called, cap4(), cdB21cm(), cdExecTime(), cdEXIT, cdLine(), cdTemp(), t_dense::chDenseLaw, t_hydro::chHTopType, t_input::chTitle, t_version::chVersion, colden, t_colden::colden, t_rfield::ConInterOut, conv, t_radius::Conv2PrtInten, t_geometry::covaper, t_geometry::covgeo, t_input::crd, DatabasePrintReference(), DEBUG_ENTRY, dense, t_radius::depth_x_fillfac, t_radius::distance, t_colden::dlnenCp, t_colden::dlnenHep, t_colden::dlnenHepp, t_colden::dlnenp, t_rfield::EnergyBremsThin, EXIT_FAILURE, exp10(), t_rfield::extin_mag_B_point, t_rfield::extin_mag_V_extended, t_rfield::extin_mag_V_point, t_iso_sp::fb, t_geometry::FillFac, t_rfield::fine_opac_velocity_width, t_rfield::flux, fp_equal(), fprintf(), t_thermal::FreeFreeTotHeat, t_dense::gas_phase, geometry, gett2(), gett2o3(), gv, t_colden::H0_ov_Tspin, h2, diatomics::H2_itrzn(), Hbeta_WavLen, HFLines, hmi, hydro, t_geometry::iEmissPower, input, Singleton< t_version >::Inst(), ioQQQ, ipCOL_HTOT, ipH1s, ipH_LIKE, ipHE_LIKE, ipHELIUM, ipHYDROGEN, ipoint(), ipOXYGEN, t_rt::ipxry, iso_sp, iteration, iterations, t_iterations::itermx, t_conv::lgBadStop, t_warnings::lgCautns, t_radius::lgCylnOn, t_atmdat::lgdBaseSourceExists, GrainVar::lgDustOn(), t_dense::lgElmtOn, t_geometry::lgGeoPP, GrainVar::lgGrainPhysicsOn, t_atmdat::lgHCaseBOK, t_hydro::lgHInducImp, t_iterations::lgIterAgain, t_iterations::lgLastIt, t_radius::lgPredLumin, t_prt::lgPrintBlock, t_prt::lgPrintColumns, t_prt::lgPrintFluxEarth, t_prt::lgPrintTime, t_prt::lgPrtCitations, t_prt::lgPrtShort, t_radius::lgRadiusKnown, t_geometry::lgSizeSet, t_geometry::lgSphere, t_prt::lgSurfaceBrightness, t_prt::lgSurfaceBrightness_SR, t_called::lgTalk, t_rfield::lgUSphON, t_warnings::lgWarngs, t_LineSave::lines, LineSave, mean, min(), t_rfield::nflux, t_LineSave::nsum, t_conv::nTotalIoniz, t_conv::nTotalIoniz_start, t_iso_sp::numLevels_local, nzone, t_colden::OH_ov_Tspin, opac, t_rfield::outlin, t_rfield::outlin_noplot, peimbt, phycon, t_radius::pirsq, POW2, t_thermal::power, pressure, PrintCenterLine(), PrintE71(), PrintE82(), PrintE93(), PrintEfmt, PrintRatio(), PrintSpectrum(), prt, PrtAllTau(), PrtColumns(), PrtMeanIon(), t_rfield::qhtot, t_radius::r1r0sq, t_pressure::RadBetaMax, radius, t_radius::Radius, rfield, t_radius::rinner, t_colden::rjnmin, t_rfield::rstrom, rt, safe_div(), SDIV(), sexp(), t_LineSave::sig_figs, SMALLFLOAT, t_timesc::sound, t_peimbt::t2hstr, t_peimbt::t2hyox, t_peimbt::t2o3str, t_opac::TauAbsGeo, t_rt::tauxry, t_peimbt::tbac, t_peimbt::tbcthn, t_timesc::tcmptn, t_mean::TempEdenMean, t_mean::TempIonEdenMean, t_mean::TempIonMean, t_mean::TempMean, test_cdTemp_molecules(), thermal, t_thermal::thist, t_timesc::time_therm_long, t_timesc::TimeErode, timesc, t_thermal::tlowst, t_colden::tmas, t_peimbt::tohyox, t_peimbt::toiiir, TorF(), TotalInsanity(), t_thermal::totcol, totlin(), t_colden::TotMassColl, t_peimbt::tsqden, t_rfield::uh, t_rfield::uheii, t_hmi::UV_Cont_rel2_Draine_DB96_face, t_hmi::UV_Cont_rel2_Habing_TH85_face, warnings, WavlenErrorGet(), t_mesh::widflx(), wind, wlAirVac(), t_colden::wmas, t_dense::wmole, t_mean::xIonMean, t_dense::xMassDensity, and t_dense::xMassTotal.

Referenced by cloudy().

Here is the call graph for this function:

void PrtLinePres ( FILE *  ioPRESSURE)

PrtLinePres print line radiation pressures for current conditions output goes top openned file handle

Todo:
1 make this and eval rad pressure same routine, with flag saying to print contributors - copy code from other routine - this code has been left behind

References ASSERT, t_dense::AtomicWeight, chIonLbl(), dBaseSpecies, dBaseTrans, DEBUG_ENTRY, dense, diatoms, fprintf(), frac(), GetDopplerWidth(), HFLines, t_dense::IonHigh, iso_ctrl, iso_sp, LIMELM, MIN2, t_iso_sp::nCollapsed_local, NISO, nLine, nSpecies, t_iso_sp::numLevels_local, nWindLine, t_pressure::pres_radiation_lines_curr, pressure, PressureRadiationLine(), prt_wl(), TransitionList::size(), t_isoCTRL::SmallA, SMALLFLOAT, spsort(), TauLine2, THRESH, t_iso_sp::trans(), and TransitionProxy::WLAng().

Referenced by iter_end_check(), PrtZone(), and SaveDo().

Here is the call graph for this function:

double PrtLineSum ( void  )

PrtLineSum parse print line sum command to enter set of lines into sum

Parameters
chDothe job to do, either " SUM" or "READ"

References cdEXIT, cdLine_ip(), t_radius::Conv2PrtInten, DEBUG_ENTRY, EXIT_FAILURE, t_LineSave::findline(), fprintf(), ioQQQ, t_LineSave::ipass, ipLine, lineids, LineSave, prt_line_err(), and radius.

Referenced by lines().

Here is the call graph for this function:

void PrtMeanIon ( char  chType,
bool  lgDensity,
FILE *   
)

PrtMeanIon print mean ionization fractions for all elements, output will go to stream pointed to by argument chTyp is either 'i' or 't' for mean ionization or temperature

Parameters
chType
lgDensitytrue include density, false do not

References t_elementnames::chElementName, DEBUG_ENTRY, dense, elementnames, fprintf(), geometry, ioQQQ, ipHELIUM, ipHYDROGEN, t_dense::lgElmtOn, t_geometry::lgGeoPP, LIMELM, mean, t_mean::MeanIon(), MIN2, and TotalInsanity().

Referenced by PrtFinal(), and SaveDo().

Here is the call graph for this function:

void prtmet ( void  )

prtmet print all line optical depths at end of iteration

References dBaseTrans, DEBUG_ENTRY, dense, diatoms, fprintf(), HFLines, ioQQQ, ipH_LIKE, iso_sp, t_dense::lgElmtOn, t_trace::lgOptcBug, t_prt::lgPrtTau, t_trace::lgTrace, LIMELM, NISO, nSpecies, t_iso_sp::numLevels_local, nWindLine, prme(), prt, prt_header_cols(), TransitionList::size(), TauLine2, trace, and UTALines.

Referenced by PrtAllTau(), and RT_tau_inc().

Here is the call graph for this function:

void PrtZone ( void  )

PrtZone print out individual zone results

References abund, Wind::AccelCont, Wind::AccelGravity, Wind::AccelLine, Wind::AccelTotalOutward, ASSERT, GrainVar::bin, called, t_elementnames::chElementName, t_elementnames::chElementSym, t_rfield::cmcool, t_rfield::cmheat, column(), t_ionbal::CompRecoilHeatLocal, conv, t_secondaries::csupra, DEBUG_ENTRY, dense, t_radius::depth_mid_zone, deut, diatoms, t_radius::drad, dynamics, DynaPrtZone(), t_dense::eden, elementnames, t_rfield::EnergyDiffCont, t_rfield::EnergyIncidCont, t_iso_sp::fb, t_geometry::FillFac, findnuclide(), findspecieslocal(), fixit, Wind::fmul, fprintf(), t_deuterium::gas_phase, t_dense::gas_phase, geometry, gv, t_hmi::H2_total, t_hmi::h2dep, t_hmi::h2pdep, t_hmi::h3pdep, t_hydro::H_ion_frac_photo, t_hmi::HD_total, t_thermal::heating(), hmi, t_hmi::hmidep, t_thermal::htot, hydro, ionbal, t_dense::IonHigh, ioQQQ, ipALUMINIUM, ipBERYLLIUM, ipBORON, ipCARBON, ipH1s, ipH_LIKE, ipHe1s1S, ipHe2p1P, ipHe2p3P0, ipHe2p3P1, ipHe2p3P2, ipHe2s1S, ipHe2s3S, ipHe3d1D, ipHe3d3D, ipHe3p1P, ipHe3p3P, ipHe3s1S, ipHe3s3S, ipHE_LIKE, ipHELIUM, ipHYDROGEN, ipLITHIUM, ipNITROGEN, ipOXYGEN, iso_ctrl, iso_prt_pops(), iso_sp, t_abund::lgAbTaON, t_dynamics::lgAdvection, t_isoCTRL::lgColl_l_mixing, t_dense::lgDenFlucOn, t_deuterium::lgElmtOn, t_dense::lgElmtOn, GrainVar::lgGrainPhysicsOn, t_prt::lgPrintHeating, Wind::lgStatic(), t_called::lgTalk, t_dynamics::lgTimeDependentStatic, t_thermal::lgUnstable, LIMELM, t_mole_global::list, magnetic, MAX2, mole, mole_global, t_iso_sp::n_HighestResolved_max, NISO, t_conv::nPres2Ioniz, t_trace::nTrConvg, t_mole_global::num_calc, nzone, opac, t_pressure::pbeta, phycon, powpq(), t_pressure::pres_radiation_lines_curr, t_pressure::PresGasCurr, pressure, t_magnetic::pressure, t_pressure::PresTotlCurr, PrintE93(), PrintEfmt, prt, PrtLinePres(), t_iso_sp::QN2Index(), radius, t_radius::Radius_mid_zone, rfield, SDIV(), secondaries, t_mole_local::species, t_opac::TauAbsGeo, t_phycon::te, t_hydro::TexcLya, thermal, trace, wind, Wind::windv, t_deuterium::xIonDense, and t_dense::xIonDense.

Referenced by ConvFail(), and iter_end_check().

Here is the call graph for this function:

void SetPrintLineCol ( )
void sprt_wl ( string &  chString,
realnum  wl 
)

sprt_wl write wavelength to string - must be kept parallel with prt_wl

Parameters
*chString
wl

References DEBUG_ENTRY, LineSave, t_LineSave::sig_figs, and t_LineSave::wl_length.

Referenced by TransitionProxy::chLabel(), t_LineSave::findline(), LinSv::label(), lines_continuum(), parse_save_line(), PrintSpectrum(), prt_wl(), and SaveDo().

Variable Documentation

const long NCOLMAX =132

Referenced by molcol(), prme(), and prt_header_cols().

struct t_line_col prt_linecol