Cloudy
Spectral Synthesis Code for Astrophysics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
service.cpp File Reference
#include "cdstd.h"
#include <cstdarg>
#include "cddefines.h"
#include "service.h"
#include "cddrive.h"
#include "called.h"
#include "opacity.h"
#include "rfield.h"
#include "hextra.h"
#include "struc.h"
#include "fudgec.h"
#include "broke.h"
#include "trace.h"
#include "input.h"
#include "save.h"
#include "version.h"
#include "warnings.h"
#include "conv.h"
#include "atmdat.h"
#include "mole.h"
#include "prt.h"
#include "integrate.h"
#include "ran.h"
Include dependency graph for service.cpp:

Functions

bool read_whole_line (string &chLine, FILE *ioIN)
 
void Split (const string &str, const string &sep, vector< string > &lst, split_mode mode)
 
void trimTrailingWhiteSpace (string &str)
 
void trimTrailingWhiteSpace (char *str)
 
void trimWhiteSpace (string &str)
 
void MyAssert (const char *file, int line, const char *comment)
 
double AnuUnit (realnum energy_ryd)
 
void ShowMe ()
 
void cap4 (char *chCAP, const char *chLab)
 
void uncaps (char *chCard)
 
void uncaps (string &chCard)
 
void caps (char *chCard)
 
void caps (string &chCard)
 
double FFmtRead (const char *chCard, long int *ipnt, long int length, bool *lgEOL)
 
char getChar (const string &s, long &p)
 
void FPRead (istringstream &iss, const string &s, double &value)
 
void IntRead (istringstream &iss, const string &s, long long &value)
 
void IntRead (istringstream &iss, const string &s, unsigned long long &value)
 
long nMatch (const char *chKey, const char *chCard)
 
double fudge (long int ipnt)
 
double powi (double x, long int n)
 
double powpq (double x, int p, int q)
 
long ipow (long m, long n)
 
size_t strnlen (const char *s, size_t maxlen)
 
size_t sncatf (char *buf, size_t bufSize, const char *fmt,...)
 
size_t sncatf (ostringstream &str, const char *fmt,...)
 
void PrintE82 (FILE *ioOUT, double value)
 
void PrintE71 (FILE *ioOUT, double value)
 
void PrintE93 (FILE *ioOUT, double value)
 
NORETURN void TotalInsanity (void)
 
NORETURN void BadRead (void)
 
sys_float sexp (sys_float x)
 
double sexp (double x)
 
double dsexp (double x)
 
void TestCode (void)
 
void broken (void)
 
void fixit_base (const char *func, const char *file, int line, const char *reason)
 
void CodeReview (void)
 
int dprintf (FILE *fp, const char *format,...)
 
int fprintf (const Output &stream, const char *format,...)
 
int dprintf (const Output &stream, const char *format,...)
 
int dbg_printf (int debug, const char *fmt,...)
 
double qg32 (double xl, double xu, double(*fct)(double))
 
void spsort (realnum x[], long int n, long int iperm[], int kflag, int *ier)
 
double csphot (long int inu, long int ithr, long int iofset)
 
double plankf (long int ip)
 
void CloudyPrintReference ()
 
void DatabasePrintReference ()
 
istream & SafeGetline (istream &is, string &t)
 

Variables

const double pos_pow10 []
 
const int max_pow10 = int(sizeof(pos_pow10)/sizeof(pos_pow10[0]) - 1)
 
const double neg_pow10 []
 
const int min_pow10 = -int(sizeof(neg_pow10)/sizeof(neg_pow10[0]) - 1)
 

Function Documentation

double AnuUnit ( realnum  energy)

AnuUnit produce continuum energy in arbitrary units, ip is on C scale

References t_save::chConSavEnr, DEBUG_ENTRY, Energy::get(), t_save::ipConPun, and save.

Referenced by AGN_Hemis(), energy(), pseudo_cont::getWl(), Save1Line(), Save1LineData(), save_opacity(), and SaveDo().

Here is the call graph for this function:

NORETURN void BadRead ( void  )

BadRead tried to read internal data and failed

References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), ioQQQ, and ShowMe().

Referenced by diatomics::H2_Read_hminus_distribution().

Here is the call graph for this function:

void broken ( void  )

broken set flag saying that the code is broken

References broke, DEBUG_ENTRY, and t_broke::lgBroke.

Referenced by ion_solver(), and PresTotCurrent().

void cap4 ( char *  chCAP,
const char *  chLab 
)

cap4 convert first 4 char of input line chLab into chCAP all in caps, null termination

Parameters
chCAPoutput string, cap'd first 4 char of chLab,
chLabwith null terminating input string ending with eol

References DEBUG_ENTRY, and toupper().

Referenced by lgCheckMonitors(), and PrtFinal().

Here is the call graph for this function:

void caps ( char *  chCard)

caps convert input command line (through eol) to ALL CAPS

Parameters
chCard- line image as string of characters

References DEBUG_ENTRY, and toupper().

Referenced by cdColm(), cdIonFrac(), cdTemp(), LinSv::chALabSet(), t_LineSave::findline(), Parser::getElement(), GetJenkins09(), DataParser::getKeywordOptional(), GetMetalsDeplete(), lgCheckMonitors(), LinSv::makeBlend(), Parser::newlineProcess(), ParseAbundances(), ParseNorm(), Parser::peekNextCommand(), and set_weighting().

Here is the call graph for this function:

void caps ( string &  chCard)

References DEBUG_ENTRY, and toupper().

Here is the call graph for this function:

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 CodeReview ( void  )

CodeReview - placed next to code that needs to be checked

References broke, DEBUG_ENTRY, and t_broke::lgCheckit.

double csphot ( long int  inu,
long int  ithr,
long int  iofset 
)

csphot returns photoionization cross section from opacity stage using std pointers

Parameters
inuINU is array index pointing to frequency where opacity is to be evaluated on f not c scale
ithrITHR is pointer to threshold
iofsetIOFSET is offset as defined in opac0

References DEBUG_ENTRY, opac, and t_opac::OpacStack.

Referenced by OpacityAddTotal().

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:

int dbg_printf ( int  debug,
const char *  fmt,
  ... 
)

dbg_printf is a debug print routine that was provided by Peter Teuben, as a component from his NEMO package. It offers run-time specification of the level of debugging

References DEBUG_ENTRY, t_trace::debug_level, ioQQQ, and trace.

int dprintf ( FILE *  fp,
const char *  format,
  ... 
)

dprintf – version of fprintf which prepends DEBUG

References DEBUG_ENTRY, and fprintf().

Referenced by DumpCoolStack(), DumpHeatStack(), iso_radiative_recomb_effective(), iter_track::print_status(), qheat_init(), read_UTA_lines(), and Recomb_Seaton59().

Here is the call graph for this function:

int dprintf ( const Output stream,
const char *  format,
  ... 
)

References DEBUG_ENTRY, fprintf(), and Output::fptr().

Here is the call graph for this function:

double FFmtRead ( const char *  chCard,
long int *  ipnt,
long int  last,
bool *  lgEOL 
)

FFmtRead - the free-format number reader

Parameters
*chCardstring giving the line image
*ipntthe index for the character in the string where we shall start
lastthe number of characters in the string - do not search beyond it
*lgEOLtrue if hit end of line with no number

References DEBUG_ENTRY, fprintf(), ioQQQ, max_pow10, min(), min_pow10, pos_pow10, sign(), tolower(), and TotalInsanity().

Referenced by atmdat_LAMDA_readin(), Badnell_rec_init(), ContBandsCreate(), diatomics::GetIndices(), GetJenkins09(), GetMetalsDeplete(), diatomics::H2_Read_hminus_distribution(), diatomics::H2_ReadDissocEnergies(), diatomics::H2_ReadDissprob(), diatomics::H2_ReadEnergies(), diatomics::H2_ReadTransprob(), HyperfineCreate(), iso_recomb_setup(), bands_file::load(), LoadIsotopes(), FunctLAMDA::operator()(), t_mesh::p_ReadResolution(), ParseAbundances(), read_Helike_cross_sections(), read_SH98_He1_cross_sections(), and ReadCollisionRateTable().

Here is the call graph for this function:

void fixit_base ( const char *  func,
const char *  file,
int  line,
const char *  reason 
)

fixit set flag saying that this code needs attention, but is not broken, code is in service.cpp

References broke, DEBUG_ENTRY, Singleton< FixitList >::Inst(), t_broke::lgFixit, and FixitList::list.

Referenced by Fixit::Fixit().

Here is the call graph for this function:

void FPRead ( istringstream &  iss,
const string &  s,
double &  value 
)

References DEBUG_ENTRY, getChar(), max_pow10, min_pow10, pos_pow10, sign(), and UNLIKELY.

Referenced by FPRead(), and getTokenOptionalImpl().

Here is the call graph for this function:

int fprintf ( const Output stream,
const char *  format,
  ... 
)

overloads to allow interception of output

References Output::fptr().

Referenced by abund_starburst(), AbundancesPrt(), AbundancesSet(), AbundancesTable(), t_PredCont::add(), addComment(), LinSv::addComponent(), LinSv::addComponentID(), addKeyword_dbl(), addKeyword_num(), addKeyword_txt(), AGN_He1_CS(), AGN_Hemis(), AtlasCompile(), atmdat_3body(), atmdat_CHIANTI_readin(), atmdat_dielrec_fe(), atmdat_LAMDA_readin(), atmdat_outer_shell(), atmdat_readin(), atmdat_STOUT_readin(), AtmospheresAvail(), Badnell_rec_init(), badprt(), BadRead(), bessel_y0(), bessel_y1(), bessel_yn(), C6cs123(), Ca20cs123(), cdCautions(), cdClock(), cdColm(), cdDrive(), cdErrors(), cdExecTime(), cdGetLineList(), cdH2_colden(), cdInit(), cdInput(), cdIonFrac(), cdLine_ip(), cdMain(), cdMemory(), cdNotes(), cdPrepareExit(), cdPrintCommands(), cdRead(), cdReasonGeo(), cdSPEC2(), cdSurprises(), cdTemp(), cdWarnings(), ChargTranPun(), ChargTranSumHeat(), check_data(), pseudo_cont::check_index_fatal(), band_emission::check_index_fatal(), check_LAMDA_comment(), check_mult_path(), t_mesh::CheckMesh(), CheckVal(), t_mole_local::chem_heat(), ChemImportance(), chi2_func(), CHIANTI_Upsilon(), chkCaHeps(), chMolBranch(), CloseSaveFiles(), cloudy(), CloudyPrintReference(), cnewton(), t_ADfA::coll_ion_wrapper(), collision_strength_VF01(), CollisSuppres(), Parser::CommandError(), conorm(), ConserveEnergy(), ContBandsCreate(), ContCreateMesh(), ContCreatePointers(), ContNegative(), ContRate(), ContSetIntensity(), ConvBase(), ConvCrossSect2CollStr(), ConvEdenIoniz(), ConvFail(), ConvInitSolution(), ConvIoniz(), ConvIterCheck(), ConvPresTempEdenIoniz(), ConvTempEdenIoniz(), CoolEvaluate(), CoolHeatError(), CoolHyperfine(), coolpr(), CoolSave(), CoolSum(), CoStarCompile(), CoStarInitialize(), CoStarListModels(), save_img_matrix::createImage_PPM(), CS_l_mixing(), database_readin(), DatabasePrintReference(), dBase_solve(), dBaseAbund(), dmpary(), doData(), doHeader(), doop(), Parser::doSetVar(), dprintf(), DumpAtmosphere(), DumpLine(), DynaEndZone(), DynaIonize(), DynaIterEnd(), DynaIterStart(), DynaNewStep(), DynaPrtZone(), DynaPunchTimeDep(), DynaSave(), DynaStartZone(), e1(), e1_scaled(), e2(), t_input::echo(), Parser::echo(), EchoModel(), eden_sum(), EdenError(), ElectronFractions(), ellpk(), t_debug::enter(), Parser::Error(), DataParser::errorAbort(), ErrorMessage(), esc_2side_base(), esc_CRDwing(), escmase(), expn(), extractLevels(), factorial(), fc2_scl(), Fe26cs123(), Parser::FFmtRead(), FFmtRead(), ffun(), ffun1(), FillExtraLymanLine(), FillJ(), find_arr(), find_solution(), t_LineSave::findline(), findspecies_validate(), fndneg(), fndstr(), fudge(), funjac(), GammaPrt(), GammaPrtRate(), GammaPrtShells(), gauss_legendre(), Energy::get(), get_total_abundance_ions(), Parser::getElement(), Parser::getFirstChunk(), Parser::getFirstChunkRaw(), GetFracPop(), GetHelikeCollisionStrength(), GetHlikeCollisionStrength(), band_cont::getInten(), GetJenkins09(), getLevelsGeneric(), Parser::getLineID(), GetLineRec(), GetMetalsDeplete(), Parser::getNumberCheckAlwaysLogLim(), GetOptColDen(), GetOptLineInt(), GetOptTemp(), Parser::getPairs(), t_cpu_i::getPathList(), GetPotValues(), GetProbDistr_HighLimit(), GetProbDistr_LowLimit(), getSpeciesGeneric(), Parser::getSymbol(), getTransition(), diatomics::GetXColden(), GrainCharge(), GrainChargeTemp(), GrainCollHeating(), GrainDrift(), GrainDrive(), GrainsInit(), GrainTemperature(), GravitationalPressure(), grid_do(), GridCompile(), GridRetrieveXSPECData(), gridXspec(), GrnStdDpth(), GrnVryDpth(), H21_cm_pops(), diatomics::H2_Colden(), diatomics::H2_CollidRateEvalAll(), diatomics::H2_CollidRateRead(), diatomics::H2_Cooling(), diatomics::H2_Level_low_matrix(), diatomics::H2_LevelPops(), diatomics::H2_ParseSave(), diatomics::H2_Prt_column_density(), diatomics::H2_Prt_Zone(), diatomics::H2_PrtDepartCoef(), diatomics::H2_Punch_line_data(), diatomics::H2_PunchDo(), diatomics::H2_RadPress(), diatomics::H2_Read_hminus_distribution(), diatomics::H2_Read_LTE_cooling_per_H2(), diatomics::H2_ReadDissocEnergies(), diatomics::H2_ReadDissprob(), diatomics::H2_ReadEnergies(), diatomics::H2_ReadTransprob(), diatomics::H2_Reset(), diatomics::H2_X_coll_rate_evaluate(), H_Einstein_A_log10(), H_photo_cs_log10(), HaardtMadauCompile(), HCSAR_interp(), HCTIon(), HCTRecom(), He2cs123(), he_1trans(), HeatSum(), helike_energy(), Parser::help(), highen(), HomogeneousSource(), t_ADfA::hpfit(), Hydcs123(), hydro_energy(), HydroEinstA(), HydroLevel(), HydroRecCool(), HyperfineCreate(), hypho(), IncidentContinuumHere(), load_balance::init(), diatomics::init(), t_mole_global::init(), t_yield::init_yield(), InitEmissivities(), InitGrid(), InitIndexArrays(), InitSimPostparse(), InterpolateGridCoStar(), InterpolateModel(), InterpolateModelCoStar(), InterpolateRectGrid(), inv_ufunct(), ion_photo(), ion_recom_calculate(), ion_recomb(), ion_recombAGN(), ion_trim(), ion_trim2(), ion_wrapper(), IonHelium(), IonHydro(), IonNelem(), ipContEnergy(), ipLineEnergy(), ipoint(), ipShells(), iso_cascade(), iso_collide(), iso_continuum_lower(), iso_cool(), iso_create(), iso_get_collision_strength(), iso_ionize_recombine(), iso_level(), iso_photo(), iso_prt_pops(), iso_radiative_recomb(), iso_radiative_recomb_effective(), iso_recomb_setup(), iso_renorm(), iso_set_ion_rates(), iso_solve(), iso_update_num_levels(), iter_end_check(), IterEnd(), IterRestart(), IterStart(), KhaireSrianandCompile(), Kurucz79Compile(), t_debug::leave(), lfactorial(), lgCheckMonitors(), lgCompileAtmosphere(), lgConvTemp(), lgCoolNetConverge(), lgElemsConserved(), lgNetEdenSrcSmall(), lgNucleiConserved(), lgReactBalance(), lgReadAtmosphereHead(), lgReadAtmosphereTail(), lgStatesConserved(), lgValidModel(), LimitSh(), lindst(), lines(), lines_continuum(), lines_general(), lines_helium(), lines_hydro(), lines_iron_Ka(), lines_table(), LineStackCreate(), bands_file::load(), LoadIsotopes(), main(), LinSv::makeBlend(), MakeInputLine(), map_do(), maybeNumber(), mc_escape(), t_mean::MeanIon(), mie_auxiliary(), mie_cs(), mie_find_slope(), mie_next_line(), mie_read_double(), mie_read_long(), mie_read_mix(), mie_read_ocn(), mie_read_opc(), mie_read_realnum(), mie_read_rfi(), mie_read_szd(), mie_repair(), mie_step(), mie_write_opc(), MihalasCompile(), molcol(), mole_check_reverse_reactions(), mole_cmp_num_in_out_reactions(), mole_create_react(), mole_dominant_rates(), mole_eval_balance(), mole_generate_isotopologue_reactions(), mole_h2_grain_form(), diatomics::mole_H2_LTE(), mole_h_rate_diagnostics(), mole_h_reactions(), mole_print_species_reactions(), mole_rk_bigchange(), mole_save(), mole_solve(), mole_system_error(), mole_update_rks(), mole_update_species_cache(), my_Integrand_VF01_E< P >::my_Integrand_VF01_E(), MyAssert(), Ne10cs123(), newreact(), newspecies(), newton_step(), Parser::NoNumb(), OpacityAddTotal(), OpacityCreate1Element(), OpacityCreateAll(), OpacityCreateReilMan(), setCollRate::operator()(), Atom_LevelN::operator()(), FunctLAMDA::operator()(), optimize_do(), optimize_func(), optimize_phymir(), t_cpu_i::p_assertValidPath(), phymir_state< X, Y, NP, NSTR >::p_execute_job(), Flux::p_InternalFluxUnit(), t_gaunt::p_read_table(), t_mesh::p_ReadResolution(), EnergyEntry::p_set_ip(), t_mesh::p_SetupMesh(), DataParser::p_showLocation(), parse_chemical(), parse_reaction(), parse_save_average(), Parse_Save_Line_RT(), parse_species_label(), parse_udfa(), ParseAbsMag(), ParseAbundances(), ParseAge(), ParseAgn(), ParseAperture(), ParseBackgrd(), ParseBlackbody(), ParseBremsstrahlung(), ParseChemistry(), ParseCMB(), ParseCommands(), ParseCompile(), ParseConstant(), ParseCoronal(), ParseCosmicRays(), ParseCosmology(), ParseCovering(), ParseCrashDo(), ParseDarkMatter(), ParseDatabase(), ParseDatabaseH2(), ParseDatabaseISO(), ParseDielectronic(), ParseDiffuse(), ParseDLaw(), ParseDont(), ParseDynaTime(), ParseDynaWind(), ParseElement(), ParseEnergy(), ParseExtinguish(), ParseF_nu(), ParseFail(), ParseFill(), ParseFluc(), ParseForceTemperature(), ParseGlobule(), ParseGrain(), ParseGravity(), ParseGrid(), ParseHDEN(), ParseHeLike(), ParseHExtra(), ParseHydrogen(), ParseIlluminate(), ParseInit(), ParseIntensity(), ParseInterp(), ParseIonPar(), ParseLaser(), ParseLineList(), ParseLuminosity(), ParseMagnet(), ParseMap(), ParseMetal(), ParseMonitorResults(), ParseNorm(), ParseNumber(), ParseOptimize(), ParsePGrains(), ParsePhi(), ParsePowerlawContinuum(), ParsePrint(), ParseQH(), ParseRadius(), ParseRangeOption(), ParseRatio(), ParseSave(), ParseSet(), ParseSpecies(), ParseSphere(), ParseStop(), ParseTable(), ParseTLaw(), ParseTolerance(), ParseTrace(), ParseTurbulence(), PlanckIntegral(), plot_sparsity(), pnegopc(), PntForLine(), PressureChange(), PresTotCurrent(), bad_assert::print(), print_delimiter(), print_emline_fine(), iter_track::print_history(), t_cpu_i::PrintBacktrace(), PrintCenterLine(), t_cpu_i::printDataPath(), PrintE71(), PrintE82(), PrintE93(), Parser::PrintLine(), PrintLineDataHeader(), PrintRates(), PrintRatio(), PrintShortZero(), PrintSpectrum(), prme(), process_output(), LinSv::prt(), t_physconst::prt_constants(), prt_constants(), prt_header_cols(), prt_line_err(), prt_line_inlist(), prt_LineLabels(), prt_smooth_predictions(), prt_trans_opc_debug(), prt_wl(), PrtAllTau(), PrtColumns(), PrtComment(), PrtElem(), PrtFinal(), PrtHeader(), PrtHydroTrace1(), PrtHydroTrace1a(), isotope::prtIso(), isotope::prtIsoPairs(), PrtLinePres(), PrtLineSum(), prtLineType(), PrtMacros(), PrtMeanIon(), prtmet(), PrtOneMonitor(), prtPunOpacSummary(), t_prt_matrix::prtRates(), PrtTwoPhotonEmissCoef(), PrtZone(), punchFITS_EnergyHeader(), punchFITS_GenericHeader(), punchFITS_ParamData(), punchFITS_ParamHeader(), punchFITS_PrimaryHeader(), punchFITS_SpectraData(), punchFITS_SpectraHeader(), punchFITSimg_ExtensionHeader(), punchFITSimg_PrimaryHeader(), qheat(), qintr(), r1mach(), t_ADfA::rad_rec(), radius_first(), radius_increment(), radius_next(), RauchCompile(), RauchInitialize(), RauchReadMPP(), read_data(), read_Helike_cross_sections(), read_Hummer_Storey(), read_level2_lines(), read_mewe_gbar(), read_SH98_He1_cross_sections(), read_UTA_lines(), t_input::readarray(), ReadBadnellAIData(), Parser::readLaw(), Parser::readList(), ReadTable(), RebinQHeatResults(), rec6j(), t_conv::register_(), renorm_solution(), RT_continuum(), RT_continuum_shield_fcn(), RT_DestProb(), RT_diffuse(), RT_line_all(), RT_line_all_escape(), RT_line_driving(), RT_line_escape(), RT_line_one_fine(), RT_line_one_tau_reset(), RT_line_one_tauinc(), RT_line_pumping(), RT_OTS(), RT_OTS_AddLine(), RT_OTS_ChkSum(), RT_OTS_PrtRate(), RT_recom_effic(), RT_tau_inc(), RT_tau_init(), RT_tau_reset(), RTesc_lya_1side(), S2Aul(), SanityCheck(), SanityCheckBegin(), SanityCheckGaunt(), Save1Line(), Save1LineData(), save_average(), save_DT(), save_line(), Save_Line_RT(), save_opacity(), SaveAllSpeciesLabelsLevels(), SaveDo(), saveFITSfile(), SaveGaunts(), SaveGrid(), SaveHeat(), SaveLineData(), SaveLineIntensity(), SaveLineStuff(), SaveResults(), SaveSpecial(), SaveSpecies(), SaveSpeciesBands(), SaveSpeciesHeader(), SaveSpeciesLines(), SaveSpeciesOne(), SaveSpeciesOptDep(), SaveSpeciesPseudoCont(), ScaleAllDensities(), ScanProbDistr(), search_limit(), SecIoniz(), Energy::set(), set_weighting(), set_xIntensity(), setIsoNelemFlag(), SetLimits(), setProperties(), t_prt_matrix::setSpecies(), GroupMap::setup(), setXtraRatesO1(), Parser::showLocation(), ShowMe(), size_distr(), solve_system(), diatomics::SolveExcitedElectronicLevels(), solveions(), speciesCheck(), speciesOff(), spectral_to_chemical(), spline_cubic_set(), Split(), StandardEnergyUnit(), StandardFluxUnit(), StarburstCompile(), StarburstInitialize(), states_nelemfill(), stepDensity(), StoutCollRate(), StuffCommand(), StuffComment(), pseudo_cont::sumBand(), band_emission::sumBand(), SumDensities(), t_ADfA::t_ADfA(), t_physconst::t_physconst(), DepthTable::tabval(), TempChange(), TempInterp(), test_cdTemp_molecules(), test_expn(), test_isMolecule(), tfidle(), timestep_next(), TlustyCompile(), TotalInsanity(), totlin(), trim_levels(), uderiv(), ufunct(), UpdatePot(), UpdateUTAs(), validate_magic_number_1arg(), validate_magic_number_3arg(), t_mesh::ValidateEdges(), vary_input(), DataParser::warning(), WernerCompile(), WMBASICCompile(), WriteASCIIData(), WriteASCIIHead(), XERBLA(), xerror_(), y0b01(), Yfunc(), zero(), zoneDensity(), and ZoneStart().

Here is the call graph for this function:

double fudge ( long int  ipnt)

fudge enter fudge factors, or some arbitrary number, with fudge command return value is the fudge factor fudge(-1) queries the routine for the number of fudge parameters that were entered, zero returned if none

Parameters
ipntinteger saying which of the possible numbers on the fudge command to use - 0 would be the first

References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), t_fudgec::fudgea, fudgec, ioQQQ, t_fudgec::lgFudgeUsed, and t_fudgec::nfudge.

Referenced by GrainChargeTemp(), InitEmissivities(), and PresTotCurrent().

Here is the call graph for this function:

char getChar ( const string &  s,
long &  p 
)
inline

References LIKELY.

Referenced by FPRead(), and IntRead().

void IntRead ( istringstream &  iss,
const string &  s,
long long &  value 
)

References DEBUG_ENTRY, getChar(), and sign().

Referenced by getTokenOptionalImpl(), and IntRead().

Here is the call graph for this function:

void IntRead ( istringstream &  iss,
const string &  s,
unsigned long long &  value 
)

References DEBUG_ENTRY, and getChar().

Here is the call graph for this function:

long ipow ( long  ,
long   
)
ipow
Returns
m^n

References DEBUG_ENTRY, and is_odd().

Here is the call graph for this function:

void MyAssert ( const char *  file,
int  line,
const char *  comment 
)
MyAssert a version of assert that fails gracefully
Parameters
*file
line

References conv, DEBUG_ENTRY, fnzone, fprintf(), ioQQQ, iteration, t_conv::lgSearch, nzone, ShowMe(), and TorF().

Referenced by cdMain().

Here is the call graph for this function:

long nMatch ( const char *  chKey,
const char *  chCard 
)

nMatch determine whether match to a keyword occurs on command line, return value is 0 if no match, and position of match within string if hit

Parameters
*chKey
*chCard

References ASSERT, DEBUG_ENTRY, NULL, and strstr_s().

Referenced by Parser::nMatch1(), ParseGrain(), StandardEnergyUnitNoAbort(), StandardFluxUnit(), and vary_input().

Here is the call graph for this function:

double plankf ( long int  ip)

plankf evaluate Planck function for any cell at current electron temperature

Parameters
ip

References t_mesh::anu(), t_rfield::ContBoltz, DEBUG_ENTRY, POW2, and rfield.

Referenced by SaveDo().

Here is the call graph for this function:

void PrintE71 ( FILE *  ,
double   
)

print with 1p,e8.1 format onto stream FILE

References DEBUG_ENTRY, exp10(), fprintf(), and frac().

Referenced by PrtFinal().

Here is the call graph for this function:

void PrintE82 ( FILE *  ,
double   
)

print with 1p,e8.2 format onto stream FILE all are located in printe82.c

References DEBUG_ENTRY, exp10(), fprintf(), and frac().

Referenced by AbundancesSet(), IonHydro(), PrtAllTau(), PrtFinal(), and PrtHeader().

Here is the call graph for this function:

void PrintE93 ( FILE *  ,
double   
)

print with 1p,e9.3 format onto stream FILE

References DEBUG_ENTRY, exp10(), fprintf(), and frac().

Referenced by HydroLevel(), PrtAllTau(), PrtFinal(), PrtHeader(), PrtHydroTrace1a(), PrtZone(), and save_opacity().

Here is the call graph for this function:

double qg32 ( double  ,
double  ,
double(*)(double)   
)

32 point gaussian quadrature integration

Parameters
xllower limit to integration
xu- upper limit to integration
(*fct)- pointer to routine to be integrated, arg is x val

References DEBUG_ENTRY.

Referenced by AngerJ(), CS_ThermAve_PR78(), iso_radrecomb_from_cross_section(), Recomb_Seaton59(), and SanityCheckBegin().

istream& SafeGetline ( istream &  is,
string &  t 
)
double sexp ( double  x)

References DEBUG_ENTRY, and SEXP_LIMIT.

size_t sncatf ( char *  buf,
size_t  bufSize,
const char *  fmt,
  ... 
)

References strnlen().

Referenced by diatomics::H2_ParseSave(), parse_save_average(), and ParseSave().

Here is the call graph for this function:

size_t sncatf ( ostringstream &  str,
const char *  fmt,
  ... 
)

References DEBUG_ENTRY.

void Split ( const string &  str,
const string &  sep,
vector< string > &  lst,
split_mode  mode 
)

Split: split a string into substrings using "sep" as separator

References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), ioQQQ, SPM_KEEP_EMPTY, and SPM_STRICT.

Referenced by cdMain(), HyperfineCreate(), t_cpu_i::initPath(), and t_version::t_version().

Here is the call graph for this function:

void spsort ( realnum  x[],
long int  n,
long int  iperm[],
int  kflag,
int *  ier 
)

spsort netlib routine to sort array returning sorted indices

Parameters
x[]input array to be sorted
nnumber of values in x
iperm[]permutation output array
kflagflag saying what to do - 1 sorts into increasing order, not changing
kflagthe original routine
*iererror condition, should be 0

References DEBUG_ENTRY.

Referenced by CoolSave(), diatomics::H2_PunchDo(), PrintSpectrum(), PrtLinePres(), SanityCheckBegin(), and SaveHeat().

size_t strnlen ( const char *  s,
size_t  maxlen 
)

Referenced by sncatf().

void TestCode ( void  )

TestCode set flag saying that test code is in place

References DEBUG_ENTRY, and lgTestCodeCalled.

NORETURN void TotalInsanity ( void  )

TotalInsanity general error handler for something that cannot happen, exits

References cdEXIT, cpu, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), t_cpu_i::GenerateBacktrace(), t_cpu::i(), ioQQQ, NULL, and ShowMe().

Referenced by AbundancesPrt(), multi_arr< StoutColls, 2 >::alloc(), atmdat_CHIANTI_readin(), atmdat_LAMDA_readin(), atmdat_readin(), avg_shield(), Badnell_rec_init(), t_gaunt::brems_cool(), t_gaunt::brems_opac(), t_gaunt::brems_rt(), cdInit(), cdMain(), CHIANTI_Upsilon(), t_ADfA::coll_ion_wrapper(), CollisSuppres(), conorm(), ContSetIntensity(), ConvInitSolution(), ConvIterCheck(), ConvTempEdenIoniz(), CoolEvaluate(), CoolSave(), cross_section(), t_hydro_tbl::cs(), CSresolver(), database_readin(), dBase_solve(), dBaseUpdateCollCoeffs(), DebyeDeriv(), DynaPunchTimeDep(), DynaSave(), EdenChange(), F21_mx(), fc2(), FFmtRead(), multi_geom< d, MEM_LAYOUT_VAL >::finalize(), FindIndex(), t_LineSave::findline(), flxCell(), ForbiddenAuls(), ForcePass(), get_iso_statw(), GetHelikeCollisionStrength(), GetHlikeCollisionStrength(), getIntenTypeStr(), GrainChargeTemp(), GrainMakeDiffuse(), GravitationalPressure(), GrnStdDpth(), H21_cm_pops(), diatomics::H2_LevelPops(), diatomics::H2_Read_LTE_cooling_per_H2(), HaardtMadauInterpolate(), he_1trans(), helike_quantum_defect(), diatomics::init(), init_seed(), t_yield::init_yield(), InterpolateGridCoStar(), InterpolateModel(), InterpolateRectGrid(), irsl2ind(), iso_assign_quantum_numbers(), iso_create(), iso_cross_section(), iso_get_collision_strength(), iso_get_total_num_levels(), iso_radrecomb_from_cross_section(), iter_end_check(), IterEnd(), lgCheckMonitors(), DataParser::lgEODMarker(), lgReadAtmosphereTail(), lines(), t_mole_global::make_species(), t_mean::MeanIon(), mie_auxiliary(), mie_auxiliary2(), mie_cs_size_distr(), mie_read_mix(), mie_repair(), mie_write_opc(), mole_effects(), mole_generate_isotopologue_reactions(), mole_h_reactions(), my_Integrand_VF01_E< P >::my_Integrand_VF01_E(), Opacity_iso_photo_cs(), Atom_LevelN::operator()(), optimize_do(), phymir_state< X, Y, NP, NSTR >::p_barrier(), phymir_state< X, Y, NP, NSTR >::p_execute_job(), DataParser::p_isComment(), t_gaunt::p_setup_brems(), t_ran::p_u64(), pah2_fun(), pah3_fun(), ParseBlackbody(), ParseCosmology(), ParseCrashDo(), ParseDatabaseH2(), ParseDatabaseISO(), ParseGrain(), ParseTable(), PrintSpectrum(), PrtColumns(), PrtComment(), PrtFinal(), PrtMeanIon(), radius_first(), radius_next(), RauchInitialize(), read_SH98_He1_cross_sections(), read_UTA_lines(), ReadBadnellAIData(), rfield_opac_alloc(), RT_continuum(), RT_continuum_shield_fcn_point(), RT_OTS_ChkSum(), save_average(), save_DT(), SaveDo(), SaveFilesInit(), SaveSpecies(), SaveSpeciesPseudoCont(), sg(), size_distr(), StarburstInitialize(), states_nelemfill(), Integrator< Integrand, Method >::sum(), VecIntegrator< Integrand, Method >::sum(), SumDensities(), t_ran::t_ran(), tbl_fun(), tfidle(), timestep_next(), TlustyInterpolate(), TotalInsanityAsStub(), vary_input(), zoneDensity(), and ZoneStart().

Here is the call graph for this function:

void trimTrailingWhiteSpace ( char *  str)
void trimWhiteSpace ( string &  str)

Referenced by cdMain().

void uncaps ( char *  chCard)

uncaps convert input command line (through eol) to all lowercase

Parameters
chCard- line image as string of characters

References DEBUG_ENTRY, and tolower().

Referenced by atmdat_CHIANTI_readin(), atmdat_STOUT_readin(), and db_basename_to_spectral().

Here is the call graph for this function:

void uncaps ( string &  chCard)

References DEBUG_ENTRY, and tolower().

Here is the call graph for this function:

Variable Documentation

const int max_pow10 = int(sizeof(pos_pow10)/sizeof(pos_pow10[0]) - 1)

Referenced by exp10i(), FFmtRead(), and FPRead().

const int min_pow10 = -int(sizeof(neg_pow10)/sizeof(neg_pow10[0]) - 1)

Referenced by exp10i(), FFmtRead(), and FPRead().

const double neg_pow10[]

Referenced by exp10i().

const double pos_pow10[]

Referenced by exp10i(), FFmtRead(), and FPRead().