Cloudy
Spectral Synthesis Code for Astrophysics
|
#include "cddefines.h"
#include "optimize.h"
#include "continuum.h"
#include "called.h"
#include "rfield.h"
#include "parser.h"
#include "container_classes.h"
#include "stars.h"
Classes | |
struct | mpp |
struct | stellar_grid |
Enumerations | |
enum | IntStageBits { ISB_COLLECT , ISB_EXECUTE , ISB_FIRST , ISB_SECOND } |
Functions | |
STATIC bool | CoStarInitialize (const char[], const char[]) |
STATIC void | InterpolateGridCoStar (stellar_grid *, const double[], double *, double *) |
STATIC void | FindHCoStar (const stellar_grid *, long, double, long, vector< realnum > &, vector< long > &, vector< long > &) |
STATIC void | FindVCoStar (const stellar_grid *, double, vector< realnum > &, long[]) |
STATIC void | CoStarListModels (const stellar_grid *) |
STATIC bool | RauchInitialize (const char[], const char[], const vector< mpp > &, long, long, long, const double[], int) |
STATIC void | RauchReadMPP (vector< mpp > &, vector< mpp > &, vector< mpp > &, vector< mpp > &, vector< mpp > &, vector< mpp > &) |
void | getdataline (fstream &, string &) |
STATIC void | WriteASCIIHead (FILE *, long, long, const vector< string > &, long, long, const string &, double, const string &, double, const vector< mpp > &, const char *, int) |
STATIC void | WriteASCIIData (FILE *, const vector< double > &, long, const char *, int) |
STATIC bool | lgReadAtmosphereHead (stellar_grid *) |
STATIC bool | lgReadAtmosphereTail (stellar_grid *, const realnum[], long, const vector< long > &, FILE *, bool) |
STATIC bool | lgCompileAtmosphere (const string &, process_counter &) |
STATIC void | InitGrid (stellar_grid *, bool) |
STATIC bool | lgValidIdxFile (const string &, process_counter &) |
STATIC bool | lgValidASCIIFile (const string &) |
STATIC void | InitGridCoStar (stellar_grid *) |
STATIC void | CheckVal (const stellar_grid *, double[], long *, long *) |
STATIC void | InterpolateRectGrid (stellar_grid *, const double[], double *, double *, const realnum[]=NULL, long=0L, bool=lgTAKELOG) |
STATIC void | InterpolateModel (stellar_grid *, const double[], vector< double > &, const vector< long > &, const vector< long > &, vector< long > &, long, vector< realnum > &, bool, const realnum[]=NULL, long=0L) |
STATIC void | InterpolateModel (stellar_grid *, const double[], vector< double > &, const vector< long > &, const vector< long > &, vector< long > &, long, vector< realnum > &, int) |
STATIC void | InterpolateModelCoStar (const stellar_grid *, const double[], vector< double > &, const long[], const long[], vector< long > &, long, long, vector< realnum > &) |
template<class T> | |
void | SortUnique (vector< T > &, vector< T > &) |
STATIC void | EchoModel (const stellar_grid *, long) |
STATIC void | SetLimits (const stellar_grid *, double, const vector< long > &, const vector< long > &, const long[], const vector< realnum > &, double *, double *) |
STATIC void | SetLimitsSub (const stellar_grid *, double, const vector< long > &, const vector< long > &, vector< long > &, long, double *, double *) |
STATIC void | InitIndexArrays (stellar_grid *, bool) |
STATIC void | FillJ (stellar_grid *, vector< long > &, vector< double > &, long, bool) |
STATIC long | JIndex (const stellar_grid *, const vector< long > &) |
STATIC void | SearchModel (const vector< mpp > &, bool, long, const vector< double > &, long, long *, long *) |
STATIC void | FindIndex (const multi_arr< double, 2 > &, long, long, double, long *, long *, bool *) |
STATIC bool | lgFileReadable (const string &, process_counter &) |
STATIC bool | lgValidModel (const vector< Energy > &, const vector< realnum > &, double, double) |
STATIC void | RebinAtmosphere (const vector< realnum > &, const vector< realnum > &, long, const realnum[], long, realnum[]) |
STATIC realnum | RebinSingleCell (long, const realnum[], const realnum[], const vector< realnum > &, long) |
long | RebinFind (const realnum[], long, realnum) |
template<class T> | |
void | DumpAtmosphere (const string &, long, long, char[MDIM][MNAM+1], const vector< mpp > &, long, const T[], const realnum[]) |
void | AtmospheresAvail () |
bool | AtlasCompile (process_counter &pc) |
long | AtlasInterpolate (double val[], long *nval, long *ndim, const string &chMetalicity, const string &chODFNew, bool lgList, double *Tlow, double *Thigh) |
bool | CoStarCompile (process_counter &pc) |
long | CoStarInterpolate (double val[], long *nval, long *ndim, IntMode imode, bool lgHalo, bool lgList, double *val0_lo, double *val0_hi) |
bool | GridCompile (const string &InName) |
long | GridInterpolate (double val[], long *nval, long *ndim, const string &InName, bool lgList, double *Tlow, double *Thigh) |
bool | HaardtMadauCompile (process_counter &pc) |
long | HaardtMadauInterpolate (double val, int version, bool lgQuasar, double *zlow, double *zhigh) |
bool | KhaireSrianandCompile (process_counter &pc) |
long | KhaireSrianandInterpolate (double val, int Q, double *zlow, double *zhigh) |
bool | Kurucz79Compile (process_counter &pc) |
long | Kurucz79Interpolate (double val[], long *nval, long *ndim, bool lgList, double *Tlow, double *Thigh) |
bool | MihalasCompile (process_counter &pc) |
long | MihalasInterpolate (double val[], long *nval, long *ndim, bool lgList, double *Tlow, double *Thigh) |
bool | RauchCompile (process_counter &pc) |
long | RauchInterpolateHCa (double val[], long *nval, long *ndim, bool lgHalo, bool lgList, double *Tlow, double *Thigh) |
long | RauchInterpolateHNi (double val[], long *nval, long *ndim, bool lgHalo, bool lgList, double *Tlow, double *Thigh) |
long | RauchInterpolatePG1159 (double val[], long *nval, long *ndim, bool lgList, double *Tlow, double *Thigh) |
long | RauchInterpolateCOWD (double val[], long *nval, long *ndim, bool lgList, double *Tlow, double *Thigh) |
long | RauchInterpolateHydr (double val[], long *nval, long *ndim, bool lgList, double *Tlow, double *Thigh) |
long | RauchInterpolateHelium (double val[], long *nval, long *ndim, bool lgList, double *Tlow, double *Thigh) |
long | RauchInterpolateHpHe (double val[], long *nval, long *ndim, bool lgList, double *Tlow, double *Thigh) |
bool | StarburstInitialize (const string &chInName, const string &chOutName, sb_mode mode) |
bool | StarburstCompile (process_counter &pc) |
bool | TlustyCompile (process_counter &pc) |
long | TlustyInterpolate (double val[], long *nval, long *ndim, tl_grid tlg, const string &chMetalicity, bool lgList, double *Tlow, double *Thigh) |
bool | WernerCompile (process_counter &pc) |
long | WernerInterpolate (double val[], long *nval, long *ndim, bool lgList, double *Tlow, double *Thigh) |
bool | WMBASICCompile (process_counter &pc) |
long | WMBASICInterpolate (double val[], long *nval, long *ndim, bool lgList, double *Tlow, double *Thigh) |
Variables | |
static const int | NSB99 = 1250 |
static const int | MNTS = 200 |
static const int | NRAUCH = 19951 |
static const int | NMODS_HCA = 66 |
static const int | NMODS_HNI = 51 |
static const int | NMODS_PG1159 = 71 |
static const int | NMODS_HYDR = 100 |
static const int | NMODS_HELIUM = 81 |
static const int | NMODS_HpHE = 117 |
static const bool | DEBUGPRT = false |
static const bool | lgLINEAR = false |
static const bool | lgTAKELOG = true |
static const int | IS_COLLECT = 2<<ISB_COLLECT |
static const int | IS_EXECUTE = 2<<ISB_EXECUTE |
static const int | IS_FIRST = 2<<ISB_FIRST |
static const int | IS_SECOND = 2<<ISB_SECOND |
static const long int | VERSION_ASCII = 20060612L |
static const long int | VERSION_COSTAR = 20160614L |
static const long int | VERSION_RAUCH_MPP = 20090324L |
static const long int | VERSION_INDEX = 20180201L |
enum IntStageBits |
bool AtlasCompile | ( | process_counter & | pc | ) |
AtlasCompile rebin Kurucz stellar models to match energy grid of code
References DEBUG_ENTRY, fprintf(), ioQQQ, lgCompileAtmosphere(), lgFileReadable(), and lgValidIdxFile().
Referenced by ParseCompile().
long AtlasInterpolate | ( | double | val[], |
long * | nval, | ||
long * | ndim, | ||
const string & | chMetalicity, | ||
const string & | chODFNew, | ||
bool | lgList, | ||
double * | Tlow, | ||
double * | Thigh ) |
AtlasInterpolate interpolate on atlas model atmospheres, by K Volk
References CheckVal(), DEBUG_ENTRY, grid, InitGrid(), InterpolateRectGrid(), and rfield.
Referenced by ParseTable().
void AtmospheresAvail | ( | ) |
List all the available TABLE STAR <grid> commands by checking installed *.ascii files
References DEBUG_ENTRY, fprintf(), ioQQQ, and lgValidASCIIFile().
Referenced by ParseTable().
STATIC void CheckVal | ( | const stellar_grid * | grid, |
double | val[], | ||
long * | nval, | ||
long * | ndim ) |
References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), grid, ioQQQ, and STATIC.
Referenced by AtlasInterpolate(), CoStarInterpolate(), GridInterpolate(), HaardtMadauInterpolate(), KhaireSrianandInterpolate(), Kurucz79Interpolate(), MihalasInterpolate(), RauchInterpolateCOWD(), RauchInterpolateHCa(), RauchInterpolateHelium(), RauchInterpolateHNi(), RauchInterpolateHpHe(), RauchInterpolateHydr(), RauchInterpolatePG1159(), TlustyInterpolate(), WernerInterpolate(), and WMBASICInterpolate().
bool CoStarCompile | ( | process_counter & | pc | ) |
CoStarCompile rebin costar stellar models to match energy grid of code
References CoStarInitialize(), DEBUG_ENTRY, fprintf(), ioQQQ, lgCompileAtmosphere(), lgFileReadable(), lgValidASCIIFile(), and lgValidIdxFile().
Referenced by ParseCompile().
STATIC bool CoStarInitialize | ( | const char | chFNameIn[], |
const char | chFNameOut[] ) |
References AS_OPTIONAL, AS_TRY, ASSERT, DEBUG_ENTRY, exp10(), fp_equal(), fprintf(), ioQQQ, NULL, open_data(), read_whole_line(), STATIC, VERSION_COSTAR, WriteASCIIData(), and WriteASCIIHead().
Referenced by CoStarCompile().
long CoStarInterpolate | ( | double | val[], |
long * | nval, | ||
long * | ndim, | ||
IntMode | imode, | ||
bool | lgHalo, | ||
bool | lgList, | ||
double * | val0_lo, | ||
double * | val0_hi ) |
CoStarInterpolate read in and interpolate on Werner grid of PN atmospheres, by K Volk
References cdEXIT, CheckVal(), CoStarListModels(), DEBUG_ENTRY, EXIT_SUCCESS, grid, InitGrid(), InitGridCoStar(), InterpolateGridCoStar(), and rfield.
Referenced by ParseTable().
STATIC void CoStarListModels | ( | const stellar_grid * | grid | ) |
References DEBUG_ENTRY, exp10(), fprintf(), grid, ioQQQ, JIndex(), MAX2, and STATIC.
Referenced by CoStarInterpolate().
void DumpAtmosphere | ( | const string & | fnam, |
long | imod, | ||
long | npar, | ||
char | names[MDIM][MNAM+1], | ||
const vector< mpp > & | telg, | ||
long | nflux, | ||
const T | anu[], | ||
const realnum | flux[] ) |
References DEBUG_ENTRY, fprintf(), MDIM, MNAM, and open_data().
Referenced by lgReadAtmosphereTail().
STATIC void EchoModel | ( | const stellar_grid * | grid, |
long | ind ) |
References ASSERT, called, DEBUG_ENTRY, fprintf(), grid, ioQQQ, PrintEfmt, and STATIC.
Referenced by lgReadAtmosphereTail().
STATIC void FillJ | ( | stellar_grid * | grid, |
vector< long > & | index, | ||
vector< double > & | val, | ||
long | nd, | ||
bool | lgList ) |
References DEBUG_ENTRY, FillJ(), fprintf(), grid, ioQQQ, JIndex(), MIN2, SearchModel(), and STATIC.
Referenced by FillJ(), and InitIndexArrays().
STATIC void FindHCoStar | ( | const stellar_grid * | grid, |
long | track, | ||
double | par2, | ||
long | off, | ||
vector< realnum > & | ValTr, | ||
vector< long > & | indloTr, | ||
vector< long > & | indhiTr ) |
References DEBUG_ENTRY, frac(), grid, JIndex(), and STATIC.
Referenced by InterpolateGridCoStar().
STATIC void FindIndex | ( | const multi_arr< double, 2 > & | xval, |
long | nd, | ||
long | NVAL, | ||
double | x, | ||
long * | ind1, | ||
long * | ind2, | ||
bool * | lgInvalid ) |
References ASSERT, DEBUG_ENTRY, fp_equal(), STATIC, and TotalInsanity().
Referenced by InitIndexArrays(), and InterpolateRectGrid().
STATIC void FindVCoStar | ( | const stellar_grid * | grid, |
double | par1, | ||
vector< realnum > & | ValTr, | ||
long | useTr[] ) |
References continuum, DEBUG_ENTRY, grid, and STATIC.
Referenced by InterpolateGridCoStar().
|
inline |
Referenced by RauchReadMPP().
bool GridCompile | ( | const string & | InName | ) |
GridCompile rebin user supplied stellar models to match energy grid of code
References ASSERT, DEBUG_ENTRY, fprintf(), ioQQQ, and lgCompileAtmosphere().
Referenced by ParseCompile().
long GridInterpolate | ( | double | val[], |
long * | nval, | ||
long * | ndim, | ||
const string & | InName, | ||
bool | lgList, | ||
double * | Tlow, | ||
double * | Thigh ) |
GridInterpolate read in and interpolate on user supplied grid of atmospheres
References CheckVal(), DEBUG_ENTRY, grid, InitGrid(), InterpolateRectGrid(), and rfield.
Referenced by ParseTable().
bool HaardtMadauCompile | ( | process_counter & | pc | ) |
HaardtMadauCompile compile Haardt & Madau SEDs
References DEBUG_ENTRY, fprintf(), ioQQQ, lgCompileAtmosphere(), lgFileReadable(), and lgValidIdxFile().
Referenced by ParseCompile().
long HaardtMadauInterpolate | ( | double | val, |
int | version, | ||
bool | lgQuasar, | ||
double * | zlow, | ||
double * | zhigh ) |
HaardtMadauInterpolate read in and interpolate on Haardt & Madau SEDs
References AS_DEFAULT, CheckVal(), DEBUG_ENTRY, get_ptr(), grid, InitGrid(), InterpolateRectGrid(), lgLINEAR, rfield, and TotalInsanity().
Referenced by ParseTable().
STATIC void InitGrid | ( | stellar_grid * | grid, |
bool | lgList ) |
References cdEXIT, DataParser::checkMagic(), DEBUG_ENTRY, ES_NONE, EXIT_FAILURE, fprintf(), DataParser::getline(), DataParser::getToken(), grid, IM_RECT_GRID, InitIndexArrays(), ioQQQ, lgReadAtmosphereHead(), lgValidIdxFile(), NULL, open_data(), STATIC, and VERSION_INDEX.
Referenced by AtlasInterpolate(), CoStarInterpolate(), GridInterpolate(), HaardtMadauInterpolate(), KhaireSrianandInterpolate(), Kurucz79Interpolate(), MihalasInterpolate(), RauchInterpolateCOWD(), RauchInterpolateHCa(), RauchInterpolateHelium(), RauchInterpolateHNi(), RauchInterpolateHpHe(), RauchInterpolateHydr(), RauchInterpolatePG1159(), TlustyInterpolate(), WernerInterpolate(), and WMBASICInterpolate().
STATIC void InitGridCoStar | ( | stellar_grid * | grid | ) |
References ASSERT, DEBUG_ENTRY, get_ptr(), grid, invalidate_array(), JIndex(), and STATIC.
Referenced by CoStarInterpolate().
STATIC void InitIndexArrays | ( | stellar_grid * | grid, |
bool | lgList ) |
References ASSERT, cdEXIT, DEBUG_ENTRY, DEBUGPRT, EXIT_SUCCESS, FillJ(), FindIndex(), fprintf(), grid, ioQQQ, and STATIC.
Referenced by InitGrid().
STATIC void InterpolateGridCoStar | ( | stellar_grid * | grid, |
const double | val[], | ||
double * | val0_lo, | ||
double * | val0_hi ) |
References ASSERT, called, cdEXIT, DEBUG_ENTRY, DEBUGPRT, EXIT_FAILURE, exp10(), FindHCoStar(), FindVCoStar(), fprintf(), grid, IM_COSTAR_AGE_MZAMS, IM_COSTAR_MZAMS_AGE, IM_COSTAR_TEFF_LOGG, IM_COSTAR_TEFF_MODID, InterpolateModelCoStar(), ioQQQ, JIndex(), lgReadAtmosphereTail(), lgTAKELOG, lgValidModel(), NULL, open_data(), PrintEfmt, rfield, SetLimits(), SortUnique(), STATIC, and TotalInsanity().
Referenced by CoStarInterpolate().
STATIC void InterpolateModel | ( | stellar_grid * | grid, |
const double | val[], | ||
vector< double > & | aval, | ||
const vector< long > & | indlo, | ||
const vector< long > & | indhi, | ||
vector< long > & | index, | ||
long | nd, | ||
vector< realnum > & | flux1, | ||
bool | lgTakeLog, | ||
const realnum | Edges[] = NULL, | ||
long | nEdges = 0L ) |
References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), grid, InterpolateModel(), ioQQQ, IS_COLLECT, IS_EXECUTE, lgReadAtmosphereTail(), NULL, SortUnique(), and STATIC.
Referenced by InterpolateModel(), InterpolateModel(), and InterpolateRectGrid().
STATIC void InterpolateModel | ( | stellar_grid * | grid, |
const double | val[], | ||
vector< double > & | aval, | ||
const vector< long > & | indlo, | ||
const vector< long > & | indhi, | ||
vector< long > & | index, | ||
long | nd, | ||
vector< realnum > & | flux1, | ||
int | stage ) |
References ASSERT, called, cdEXIT, DEBUG_ENTRY, DEBUGPRT, EXIT_FAILURE, fc2(), fp_equal(), fprintf(), grid, InterpolateModel(), ioQQQ, IS_COLLECT, IS_EXECUTE, IS_FIRST, IS_SECOND, JIndex(), MAX2, MIN2, rfield, STATIC, and TotalInsanity().
STATIC void InterpolateModelCoStar | ( | const stellar_grid * | grid, |
const double | val[], | ||
vector< double > & | aval, | ||
const long | indlo[], | ||
const long | indhi[], | ||
vector< long > & | index, | ||
long | nd, | ||
long | off, | ||
vector< realnum > & | flux1 ) |
References ASSERT, DEBUG_ENTRY, DEBUGPRT, fprintf(), grid, InterpolateModelCoStar(), ioQQQ, rfield, and STATIC.
Referenced by InterpolateGridCoStar(), and InterpolateModelCoStar().
STATIC void InterpolateRectGrid | ( | stellar_grid * | grid, |
const double | val[], | ||
double * | Tlow, | ||
double * | Thigh, | ||
const realnum | Edges[] = NULL, | ||
long | nEdges = 0L, | ||
bool | lgTakeLog = lgTAKELOG ) |
References called, cdEXIT, DEBUG_ENTRY, DEBUGPRT, EXIT_FAILURE, exp10(), FindIndex(), fprintf(), grid, InterpolateModel(), ioQQQ, lgValidModel(), NULL, open_data(), PrintEfmt, rfield, SetLimits(), STATIC, and TotalInsanity().
Referenced by AtlasInterpolate(), GridInterpolate(), HaardtMadauInterpolate(), KhaireSrianandInterpolate(), Kurucz79Interpolate(), MihalasInterpolate(), RauchInterpolateCOWD(), RauchInterpolateHCa(), RauchInterpolateHelium(), RauchInterpolateHNi(), RauchInterpolateHpHe(), RauchInterpolateHydr(), RauchInterpolatePG1159(), TlustyInterpolate(), WernerInterpolate(), and WMBASICInterpolate().
STATIC long JIndex | ( | const stellar_grid * | grid, |
const vector< long > & | index ) |
References DEBUG_ENTRY, grid, and STATIC.
Referenced by CoStarListModels(), FillJ(), FindHCoStar(), InitGridCoStar(), InterpolateGridCoStar(), InterpolateModel(), SetLimits(), and SetLimitsSub().
bool KhaireSrianandCompile | ( | process_counter & | pc | ) |
KhaireSrianandCompile compile Khaire & Srianand SEDs
References DEBUG_ENTRY, fprintf(), ioQQQ, lgCompileAtmosphere(), lgFileReadable(), and lgValidIdxFile().
Referenced by ParseCompile().
long KhaireSrianandInterpolate | ( | double | val, |
int | Q, | ||
double * | zlow, | ||
double * | zhigh ) |
KhaireSrianandInterpolate read in and interpolate on Khaire & Srianand SEDs
References AS_DEFAULT, CheckVal(), DEBUG_ENTRY, grid, InitGrid(), InterpolateRectGrid(), lgLINEAR, NULL, and rfield.
Referenced by ParseTable().
bool Kurucz79Compile | ( | process_counter & | pc | ) |
Kurucz79Compile rebin Kurucz79 stellar models to match energy grid of code
References DEBUG_ENTRY, fprintf(), ioQQQ, lgCompileAtmosphere(), lgFileReadable(), and lgValidIdxFile().
Referenced by ParseCompile().
long Kurucz79Interpolate | ( | double | val[], |
long * | nval, | ||
long * | ndim, | ||
bool | lgList, | ||
double * | Tlow, | ||
double * | Thigh ) |
Kurucz79Interpolate read in and interpolate on Kurucz 1979 grid of atmospheres
References CheckVal(), DEBUG_ENTRY, grid, InitGrid(), InterpolateRectGrid(), and rfield.
Referenced by ParseTable().
STATIC bool lgCompileAtmosphere | ( | const string & | Name, |
process_counter & | pc ) |
References AS_OPTIONAL, AS_TRY, DEBUG_ENTRY, fprintf(), grid, ioQQQ, lgLINEAR, lgReadAtmosphereHead(), lgReadAtmosphereTail(), process_counter::nFail, process_counter::nOK, NULL, open_data(), and STATIC.
Referenced by AtlasCompile(), CoStarCompile(), GridCompile(), HaardtMadauCompile(), KhaireSrianandCompile(), Kurucz79Compile(), MihalasCompile(), RauchCompile(), StarburstCompile(), TlustyCompile(), WernerCompile(), and WMBASICCompile().
STATIC bool lgFileReadable | ( | const string & | chFnam, |
process_counter & | pc ) |
References AS_TRY, DEBUG_ENTRY, max(), process_counter::nFound, NULL, open_data(), and STATIC.
Referenced by AtlasCompile(), CoStarCompile(), HaardtMadauCompile(), KhaireSrianandCompile(), Kurucz79Compile(), MihalasCompile(), RauchCompile(), StarburstCompile(), TlustyCompile(), WernerCompile(), and WMBASICCompile().
STATIC bool lgReadAtmosphereHead | ( | stellar_grid * | grid | ) |
References DEBUG_ENTRY, fprintf(), grid, ioQQQ, MDIM, read_whole_line(), STATIC, VERSION_ASCII, and VERSION_COSTAR.
Referenced by InitGrid(), and lgCompileAtmosphere().
STATIC bool lgReadAtmosphereTail | ( | stellar_grid * | grid, |
const realnum | Edges[], | ||
long | nEdges, | ||
const vector< long > & | index_list, | ||
FILE * | ioOUT, | ||
bool | lgTakeLog ) |
References ASSERT, cdEXIT, DEBUG_ENTRY, DEBUGPRT, DumpAtmosphere(), EchoModel(), EXIT_FAILURE, fprintf(), get_ptr(), grid, ioQQQ, lgValidModel(), NULL, POW2, RebinAtmosphere(), rfield, STATIC, TotalInsanity(), and VERSION_INDEX.
Referenced by InterpolateGridCoStar(), InterpolateModel(), and lgCompileAtmosphere().
STATIC bool lgValidASCIIFile | ( | const string & | ascName | ) |
References AS_TRY, DEBUG_ENTRY, mode_r, open_data(), STATIC, VERSION_ASCII, and VERSION_COSTAR.
Referenced by AtmospheresAvail(), CoStarCompile(), RauchCompile(), and StarburstCompile().
STATIC bool lgValidIdxFile | ( | const string & | binName, |
process_counter & | pc ) |
References AS_TRY, DEBUG_ENTRY, process_counter::notProcessed, NULL, open_data(), STATIC, and VERSION_INDEX.
Referenced by AtlasCompile(), CoStarCompile(), HaardtMadauCompile(), InitGrid(), KhaireSrianandCompile(), Kurucz79Compile(), MihalasCompile(), RauchCompile(), StarburstCompile(), TlustyCompile(), WernerCompile(), and WMBASICCompile().
STATIC bool lgValidModel | ( | const vector< Energy > & | anu, |
const vector< realnum > & | flux, | ||
double | Teff, | ||
double | toler ) |
References ASSERT, DEBUG_ENTRY, fprintf(), ioQQQ, powpq(), rfield, and STATIC.
Referenced by InterpolateGridCoStar(), InterpolateRectGrid(), and lgReadAtmosphereTail().
bool MihalasCompile | ( | process_counter & | pc | ) |
MihalasCompile rebin Mihalas stellar models to match energy grid of code
References DEBUG_ENTRY, fprintf(), ioQQQ, lgCompileAtmosphere(), lgFileReadable(), and lgValidIdxFile().
Referenced by ParseCompile().
long MihalasInterpolate | ( | double | val[], |
long * | nval, | ||
long * | ndim, | ||
bool | lgList, | ||
double * | Tlow, | ||
double * | Thigh ) |
MihalasInterpolate read in and interpolate on Mihalas grid of atmospheres
References CheckVal(), DEBUG_ENTRY, grid, InitGrid(), InterpolateRectGrid(), and rfield.
Referenced by ParseTable().
bool RauchCompile | ( | process_counter & | pc | ) |
RauchCompile create ascii and mod files for Rauch atmospheres return 0 if success, 1 if failure
References DEBUG_ENTRY, fprintf(), ioQQQ, lgCompileAtmosphere(), lgFileReadable(), lgValidASCIIFile(), lgValidIdxFile(), NMODS_HCA, NMODS_HELIUM, NMODS_HNI, NMODS_HpHE, NMODS_HYDR, NMODS_PG1159, RauchInitialize(), and RauchReadMPP().
Referenced by ParseCompile().
STATIC bool RauchInitialize | ( | const char | chFName[], |
const char | chSuff[], | ||
const vector< mpp > & | telg, | ||
long | nmods, | ||
long | n, | ||
long | ngrids, | ||
const double | par2[], | ||
int | format ) |
References AS_OPTIONAL, AS_TRY, DEBUG_ENTRY, fp_equal(), fprintf(), ioQQQ, NRAUCH, NULL, open_data(), read_whole_line(), STATIC, TotalInsanity(), VERSION_ASCII, WriteASCIIData(), and WriteASCIIHead().
Referenced by RauchCompile().
long RauchInterpolateCOWD | ( | double | val[], |
long * | nval, | ||
long * | ndim, | ||
bool | lgList, | ||
double * | Tlow, | ||
double * | Thigh ) |
RauchInterpolateCOWD get one of the Rauch C/O white dwarf model atmospheres
References CheckVal(), DEBUG_ENTRY, grid, InitGrid(), InterpolateRectGrid(), and rfield.
Referenced by ParseTable().
long RauchInterpolateHCa | ( | double | val[], |
long * | nval, | ||
long * | ndim, | ||
bool | lgHalo, | ||
bool | lgList, | ||
double * | Tlow, | ||
double * | Thigh ) |
RauchInterpolateHCa get one of the Rauch H-Ca model atmospheres, originally by K. Volk
References CheckVal(), DEBUG_ENTRY, grid, InitGrid(), InterpolateRectGrid(), and rfield.
Referenced by ParseTable().
long RauchInterpolateHelium | ( | double | val[], |
long * | nval, | ||
long * | ndim, | ||
bool | lgList, | ||
double * | Tlow, | ||
double * | Thigh ) |
RauchInterpolateHelium get one of the Rauch pure helium model atmospheres
References CheckVal(), DEBUG_ENTRY, grid, InitGrid(), InterpolateRectGrid(), and rfield.
Referenced by ParseTable().
long RauchInterpolateHNi | ( | double | val[], |
long * | nval, | ||
long * | ndim, | ||
bool | lgHalo, | ||
bool | lgList, | ||
double * | Tlow, | ||
double * | Thigh ) |
RauchInterpolateHNi get one of the Rauch H-Ni model atmospheres
References CheckVal(), DEBUG_ENTRY, grid, InitGrid(), InterpolateRectGrid(), and rfield.
Referenced by ParseTable().
long RauchInterpolateHpHe | ( | double | val[], |
long * | nval, | ||
long * | ndim, | ||
bool | lgList, | ||
double * | Tlow, | ||
double * | Thigh ) |
RauchInterpolateHpHe get one of the Rauch hydrogen plus helium model atmospheres
References CheckVal(), DEBUG_ENTRY, grid, InitGrid(), InterpolateRectGrid(), and rfield.
Referenced by ParseTable().
long RauchInterpolateHydr | ( | double | val[], |
long * | nval, | ||
long * | ndim, | ||
bool | lgList, | ||
double * | Tlow, | ||
double * | Thigh ) |
RauchInterpolateHydr get one of the Rauch pure hydrogen model atmospheres
References CheckVal(), DEBUG_ENTRY, grid, InitGrid(), InterpolateRectGrid(), and rfield.
Referenced by ParseTable().
long RauchInterpolatePG1159 | ( | double | val[], |
long * | nval, | ||
long * | ndim, | ||
bool | lgList, | ||
double * | Tlow, | ||
double * | Thigh ) |
RauchInterpolatePG1159 get one of the Rauch PG1159 model atmospheres
References CheckVal(), DEBUG_ENTRY, grid, InitGrid(), InterpolateRectGrid(), and rfield.
Referenced by ParseTable().
STATIC void RauchReadMPP | ( | vector< mpp > & | telg1, |
vector< mpp > & | telg2, | ||
vector< mpp > & | telg3, | ||
vector< mpp > & | telg4, | ||
vector< mpp > & | telg5, | ||
vector< mpp > & | telg6 ) |
References ASSERT, cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), getdataline(), ioQQQ, mode_r, open_data(), STATIC, and VERSION_RAUCH_MPP.
Referenced by RauchCompile().
STATIC void RebinAtmosphere | ( | const vector< realnum > & | StarEner, |
const vector< realnum > & | StarFlux, | ||
long | nCont, | ||
const realnum | Edges[], | ||
long | nEdges, | ||
realnum | CloudyFlux[] ) |
References ASSERT, DEBUG_ENTRY, get_ptr(), pow(), RebinFind(), RebinSingleCell(), rfield, and STATIC.
Referenced by lgReadAtmosphereTail().
References ASSERT, and hunt_bisect().
Referenced by RebinAtmosphere(), and RebinSingleCell().
STATIC realnum RebinSingleCell | ( | long | j, |
const realnum | StarEner[], | ||
const realnum | StarFlux[], | ||
const vector< realnum > & | StarPower, | ||
long | nCont ) |
References ASSERT, DEBUG_ENTRY, max(), min(), MIN2, pow(), pow2, RebinFind(), rfield, STATIC, x1, and x2.
Referenced by RebinAtmosphere().
STATIC void SearchModel | ( | const vector< mpp > & | telg, |
bool | lgIsTeffLoggGrid, | ||
long | nmods, | ||
const vector< double > & | val, | ||
long | ndim, | ||
long * | index_low, | ||
long * | index_high ) |
References DEBUG_ENTRY, fp_equal(), and STATIC.
Referenced by FillJ().
STATIC void SetLimits | ( | const stellar_grid * | grid, |
double | val, | ||
const vector< long > & | indlo, | ||
const vector< long > & | indhi, | ||
const long | useTr[], | ||
const vector< realnum > & | ValTr, | ||
double * | loLim, | ||
double * | hiLim ) |
References ASSERT, cdEXIT, DEBUG_ENTRY, DEBUGPRT, EXIT_FAILURE, exp10(), fprintf(), grid, IM_COSTAR_AGE_MZAMS, IM_COSTAR_MZAMS_AGE, IM_COSTAR_TEFF_LOGG, IM_COSTAR_TEFF_MODID, IM_RECT_GRID, ioQQQ, JIndex(), MAX2, MDIM, MIN2, optimize, SetLimitsSub(), and STATIC.
Referenced by InterpolateGridCoStar(), and InterpolateRectGrid().
STATIC void SetLimitsSub | ( | const stellar_grid * | grid, |
double | val, | ||
const vector< long > & | indlo, | ||
const vector< long > & | indhi, | ||
vector< long > & | index, | ||
long | nd, | ||
double * | loLim, | ||
double * | hiLim ) |
References ASSERT, DEBUG_ENTRY, grid, JIndex(), MAX2, MIN2, SetLimitsSub(), and STATIC.
Referenced by SetLimits(), and SetLimitsSub().
void SortUnique | ( | vector< T > & | in, |
vector< T > & | out ) |
References DEBUG_ENTRY.
Referenced by InterpolateGridCoStar(), and InterpolateModel().
bool StarburstCompile | ( | process_counter & | pc | ) |
StarburstCompile, rebin Starburst99 model output to match energy grid of code
References DEBUG_ENTRY, fprintf(), ioQQQ, lgCompileAtmosphere(), lgFileReadable(), lgValidASCIIFile(), lgValidIdxFile(), SB_TOTAL, and StarburstInitialize().
Referenced by ParseCompile().
bool StarburstInitialize | ( | const string & | chInName, |
const string & | chOutName, | ||
sb_mode | mode ) |
Create .ascii file out of Starburst99 output
References DEBUG_ENTRY, exp10(), fp_equal(), fprintf(), ioQQQ, MNTS, NSB99, open_data(), read_whole_line(), SB_NEBULAR, SB_STELLAR, SB_TOTAL, TotalInsanity(), VERSION_ASCII, WriteASCIIData(), and WriteASCIIHead().
Referenced by ParseCompile(), and StarburstCompile().
bool TlustyCompile | ( | process_counter & | pc | ) |
TlustyCompile rebin Tlusty OSTAR2002 stellar models to match energy grid of code
References DEBUG_ENTRY, fprintf(), ioQQQ, lgCompileAtmosphere(), lgFileReadable(), and lgValidIdxFile().
Referenced by ParseCompile().
long TlustyInterpolate | ( | double | val[], |
long * | nval, | ||
long * | ndim, | ||
tl_grid | tlg, | ||
const string & | chMetalicity, | ||
bool | lgList, | ||
double * | Tlow, | ||
double * | Thigh ) |
TlustyInterpolate get one of the Tlusty OSTAR2002 model atmospheres
References CheckVal(), DEBUG_ENTRY, grid, InitGrid(), InterpolateRectGrid(), rfield, TL_BSTAR, TL_OBSTAR, TL_OSTAR, and TotalInsanity().
Referenced by ParseTable().
bool WernerCompile | ( | process_counter & | pc | ) |
WernerCompile rebin Werner stellar atmospheres to match cloudy energy grid
References DEBUG_ENTRY, fprintf(), ioQQQ, lgCompileAtmosphere(), lgFileReadable(), and lgValidIdxFile().
Referenced by ParseCompile().
long WernerInterpolate | ( | double | val[], |
long * | nval, | ||
long * | ndim, | ||
bool | lgList, | ||
double * | Tlow, | ||
double * | Thigh ) |
WernerInterpolate read in and interpolate on Werner grid of PN atmospheres, by K Volk
References CheckVal(), DEBUG_ENTRY, grid, InitGrid(), InterpolateRectGrid(), and rfield.
Referenced by ParseTable().
bool WMBASICCompile | ( | process_counter & | pc | ) |
WMBASICCompile rebin WMBASIC stellar models to match energy grid of code
References DEBUG_ENTRY, fprintf(), ioQQQ, lgCompileAtmosphere(), lgFileReadable(), and lgValidIdxFile().
Referenced by ParseCompile().
long WMBASICInterpolate | ( | double | val[], |
long * | nval, | ||
long * | ndim, | ||
bool | lgList, | ||
double * | Tlow, | ||
double * | Thigh ) |
WMBASICInterpolate read in and interpolate on WMBASIC grid of hot star atmospheres
References CheckVal(), DEBUG_ENTRY, grid, InitGrid(), InterpolateRectGrid(), and rfield.
Referenced by ParseTable().
STATIC void WriteASCIIData | ( | FILE * | ioOut, |
const vector< double > & | data, | ||
long | ngrid, | ||
const char * | format, | ||
int | nmult ) |
References DEBUG_ENTRY, fprintf(), and STATIC.
Referenced by CoStarInitialize(), RauchInitialize(), and StarburstInitialize().
STATIC void WriteASCIIHead | ( | FILE * | ioOut, |
long | version, | ||
long | ndim, | ||
const vector< string > & | names, | ||
long | nmods, | ||
long | ngrid, | ||
const string & | wtype, | ||
double | wfac, | ||
const string & | ftype, | ||
double | ffac, | ||
const vector< mpp > & | telg, | ||
const char * | format, | ||
int | nmult ) |
References ASSERT, DEBUG_ENTRY, fprintf(), MDIM, STATIC, VERSION_ASCII, and VERSION_COSTAR.
Referenced by CoStarInitialize(), RauchInitialize(), and StarburstInitialize().
|
static |
|
static |
Referenced by InterpolateModel(), and InterpolateModel().
|
static |
Referenced by InterpolateModel(), and InterpolateModel().
|
static |
Referenced by InterpolateModel().
|
static |
Referenced by InterpolateModel().
|
static |
Referenced by HaardtMadauInterpolate(), KhaireSrianandInterpolate(), and lgCompileAtmosphere().
|
static |
Referenced by InterpolateGridCoStar().
|
static |
maximum number of separate time steps in a Starburst99 model
Referenced by StarburstInitialize().
|
static |
The number of models in the original Rauch H-Ca set (first version May 1998, current May 2001)
Referenced by RauchCompile().
|
static |
The number of models in the Rauch Helium only set, Jun 2004
Referenced by RauchCompile().
|
static |
The number of models in the new Rauch H-Ni set, Nov 2002
Referenced by RauchCompile().
|
static |
The number of models in the Rauch H+He set, Aug 2004
Referenced by RauchCompile().
|
static |
The number of models in the Rauch Hydrogen only set, Feb 2003
Referenced by RauchCompile().
|
static |
The number of models in the new Rauch PG1159 set, Jan 2006
Referenced by RauchCompile().
|
static |
this is the number of points in each of the stellar continua
Referenced by RauchInitialize().
|
static |
this is the initial assumed size of the Starburst grid, may be increased during execution if needed
Referenced by StarburstInitialize().
|
static |
Referenced by lgReadAtmosphereHead(), lgValidASCIIFile(), RauchInitialize(), StarburstInitialize(), and WriteASCIIHead().
|
static |
Referenced by CoStarInitialize(), lgReadAtmosphereHead(), lgValidASCIIFile(), and WriteASCIIHead().
|
static |
Referenced by InitGrid(), lgReadAtmosphereTail(), and lgValidIdxFile().
|
static |
Referenced by RauchReadMPP().