cloudy trunk
|
#include "cddefines.h"
#include "physconst.h"
#include "optimize.h"
#include "continuum.h"
#include "called.h"
#include "rfield.h"
#include "thirdparty.h"
#include "stars.h"
Go to the source code of this file.
Data Structures | |
struct | mpp |
struct | stellar_grid |
Macros | |
#define | DEBUGPRT 0 |
#define | FREE_CHECK(PTR) |
#define | FREE_SAFE(PTR) |
Enumerations | |
enum | IntStage { IS_UNDEFINED , IS_FIRST , IS_SECOND } |
Functions | |
STATIC bool | lgCompileAtmosphereCoStar (const char[], const char[], const realnum[], long, process_counter &) |
STATIC void | InterpolateGridCoStar (const stellar_grid *, const double[], double *, double *) |
STATIC void | FindHCoStar (const stellar_grid *, long, double, long, realnum *, long *, long *) |
STATIC void | FindVCoStar (const stellar_grid *, double, realnum *, long[]) |
STATIC void | CoStarListModels (const stellar_grid *) |
STATIC int | RauchInitializeSub (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 bool | lgCompileAtmosphere (const char[], const char[], const realnum[], long, process_counter &) |
STATIC void | InitGrid (stellar_grid *, bool) |
STATIC bool | lgValidBinFile (const char *, process_counter &, access_scheme) |
STATIC bool | lgValidAsciiFile (const char *, access_scheme) |
STATIC void | InitGridCoStar (stellar_grid *) |
STATIC void | CheckVal (const stellar_grid *, double[], long *, long *) |
STATIC void | InterpolateRectGrid (const stellar_grid *, const double[], double *, double *) |
STATIC void | FreeGrid (stellar_grid *) |
STATIC void | InterpolateModel (const stellar_grid *, const double[], double[], const long[], const long[], long[], long, vector< realnum > &, IntStage) |
STATIC void | InterpolateModelCoStar (const stellar_grid *, const double[], double[], const long[], const long[], long[], long, long, vector< realnum > &) |
STATIC void | GetBins (const stellar_grid *, vector< Energy > &) |
STATIC void | GetModel (const stellar_grid *, long, vector< realnum > &, bool, bool) |
STATIC void | SetLimits (const stellar_grid *, double, const long[], const long[], const long[], const realnum[], double *, double *) |
STATIC void | SetLimitsSub (const stellar_grid *, double, const long[], const long[], long[], long, double *, double *) |
STATIC void | InitIndexArrays (stellar_grid *, bool) |
STATIC void | FillJ (const stellar_grid *, long[], double[], long, bool) |
STATIC long | JIndex (const stellar_grid *, const long[]) |
STATIC void | SearchModel (const mpp[], bool, long, const double[], long, long *, long *) |
STATIC void | FindIndex (const double[], long, double, long *, long *, bool *) |
STATIC bool | lgFileReadable (const char *, process_counter &, access_scheme) |
STATIC void | ValidateGrid (const stellar_grid *, double) |
STATIC bool | lgValidModel (const vector< Energy > &, const vector< realnum > &, double, double) |
STATIC void | RebinAtmosphere (long, const realnum[], const realnum[], realnum[], long, const realnum[]) |
STATIC realnum | RebinSingleCell (realnum, realnum, const realnum[], const realnum[], const realnum[], long) |
STATIC long | RebinFind (const realnum[], long, realnum) |
void | AtmospheresAvail (void) |
int | AtlasCompile (process_counter &pc) |
long | AtlasInterpolate (double val[], long *nval, long *ndim, const char *chMetalicity, const char *chODFNew, bool lgList, double *Tlow, double *Thigh) |
int | 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 char *InName) |
long | GridInterpolate (double val[], long *nval, long *ndim, const char *FileName, bool lgList, double *Tlow, double *Thigh) |
int | Kurucz79Compile (process_counter &pc) |
long | Kurucz79Interpolate (double val[], long *nval, long *ndim, bool lgList, double *Tlow, double *Thigh) |
int | MihalasCompile (process_counter &pc) |
long | MihalasInterpolate (double val[], long *nval, long *ndim, bool lgList, double *Tlow, double *Thigh) |
int | 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 char chInName[], const char chOutName[], sb_mode mode) |
bool | StarburstCompile (process_counter &pc) |
int | TlustyCompile (process_counter &pc) |
long | TlustyInterpolate (double val[], long *nval, long *ndim, tl_grid tlg, const char *chMetalicity, bool lgList, double *Tlow, double *Thigh) |
int | WernerCompile (process_counter &pc) |
long | WernerInterpolate (double val[], long *nval, long *ndim, bool lgList, double *Tlow, double *Thigh) |
int | 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 | lgSILENT = false |
static const bool | lgVERBOSE = true |
static const bool | lgLINEAR = false |
static const bool | lgTAKELOG = true |
static const long int | VERSION_ASCII = 20060612L |
static const long int | VERSION_BIN = 201009021L |
static const long int | VERSION_RAUCH_MPP = 20090324 |
#define FREE_CHECK | ( | PTR | ) |
Definition at line 37 of file stars.cpp.
Referenced by FreeGrid(), InitGridCoStar(), InitIndexArrays(), InterpolateGridCoStar(), InterpolateModel(), InterpolateModelCoStar(), InterpolateRectGrid(), lgCompileAtmosphere(), lgCompileAtmosphereCoStar(), RauchInitializeSub(), RebinAtmosphere(), and StarburstInitialize().
#define FREE_SAFE | ( | PTR | ) |
Definition at line 38 of file stars.cpp.
Referenced by FreeGrid(), lgCompileAtmosphere(), lgCompileAtmosphereCoStar(), RebinAtmosphere(), and StarburstInitialize().
int AtlasCompile | ( | process_counter & | pc | ) |
AtlasCompile rebin Kurucz stellar models to match energy grid of code
Definition at line 394 of file stars.cpp.
References AS_LOCAL_ONLY_TRY, DEBUG_ENTRY, ioQQQ, lgCompileAtmosphere(), lgFileReadable(), lgValidBinFile(), and RYDLAM.
Referenced by ParseCompile().
long AtlasInterpolate | ( | double | val[], |
long * | nval, | ||
long * | ndim, | ||
const char * | chMetalicity, | ||
const char * | chODFNew, | ||
bool | lgList, | ||
double * | Tlow, | ||
double * | Thigh ) |
AtlasInterpolate interpolate on atlas model atmospheres, by K Volk
Definition at line 515 of file stars.cpp.
References AS_DATA_OPTIONAL, CheckVal(), DEBUG_ENTRY, FreeGrid(), grid, InitGrid(), InterpolateRectGrid(), and rfield.
Referenced by ParseTable().
void AtmospheresAvail | ( | void | ) |
List all the available TABLE STAR <grid> commands by checking installed *.mod files
Definition at line 202 of file stars.cpp.
References AS_DATA_ONLY_TRY, DEBUG_ENTRY, ioQQQ, and lgValidBinFile().
Referenced by ParseTable().
STATIC void CheckVal | ( | const stellar_grid * | grid, |
double | val[], | ||
long * | nval, | ||
long * | ndim ) |
Definition at line 3354 of file stars.cpp.
References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, grid, ioQQQ, and STATIC.
Referenced by AtlasInterpolate(), CoStarInterpolate(), GridInterpolate(), Kurucz79Interpolate(), MihalasInterpolate(), RauchInterpolateCOWD(), RauchInterpolateHCa(), RauchInterpolateHelium(), RauchInterpolateHNi(), RauchInterpolateHpHe(), RauchInterpolateHydr(), RauchInterpolatePG1159(), TlustyInterpolate(), WernerInterpolate(), and WMBASICInterpolate().
int CoStarCompile | ( | process_counter & | pc | ) |
CoStarCompile rebin costar stellar models to match energy grid of code
Definition at line 586 of file stars.cpp.
References AS_LOCAL_ONLY_TRY, DEBUG_ENTRY, ioQQQ, lgCompileAtmosphereCoStar(), lgFileReadable(), lgValidBinFile(), and RYDLAM.
Referenced by ParseCompile().
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
Definition at line 623 of file stars.cpp.
References AS_DATA_OPTIONAL, cdEXIT, CheckVal(), CoStarListModels(), DEBUG_ENTRY, EXIT_SUCCESS, FreeGrid(), grid, InitGrid(), InitGridCoStar(), InterpolateGridCoStar(), and rfield.
Referenced by ParseTable().
STATIC void CoStarListModels | ( | const stellar_grid * | grid | ) |
Definition at line 2355 of file stars.cpp.
References DEBUG_ENTRY, grid, ioQQQ, JIndex(), MAX2, and STATIC.
Referenced by CoStarInterpolate().
STATIC void FillJ | ( | const stellar_grid * | grid, |
long | index[], | ||
double | val[], | ||
long | nd, | ||
bool | lgList ) |
Definition at line 4093 of file stars.cpp.
References DEBUG_ENTRY, FillJ(), 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, | ||
realnum * | ValTr, | ||
long * | indloTr, | ||
long * | indhiTr ) |
Definition at line 2232 of file stars.cpp.
References DEBUG_ENTRY, grid, JIndex(), and STATIC.
Referenced by InterpolateGridCoStar().
STATIC void FindIndex | ( | const double | xval[], |
long | NVAL, | ||
double | x, | ||
long * | ind1, | ||
long * | ind2, | ||
bool * | lgInvalid ) |
Definition at line 4253 of file stars.cpp.
References ASSERT, cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fp_equal(), ioQQQ, ShowMe(), and STATIC.
Referenced by InitIndexArrays(), and InterpolateRectGrid().
STATIC void FindVCoStar | ( | const stellar_grid * | grid, |
double | par1, | ||
realnum * | ValTr, | ||
long | useTr[] ) |
Definition at line 2290 of file stars.cpp.
References continuum, DEBUG_ENTRY, grid, and STATIC.
Referenced by InterpolateGridCoStar().
STATIC void FreeGrid | ( | stellar_grid * | grid | ) |
Definition at line 3493 of file stars.cpp.
References DEBUG_ENTRY, FREE_CHECK, FREE_SAFE, grid, and STATIC.
Referenced by AtlasInterpolate(), CoStarInterpolate(), GridCompile(), GridInterpolate(), Kurucz79Interpolate(), MihalasInterpolate(), RauchInterpolateCOWD(), RauchInterpolateHCa(), RauchInterpolateHelium(), RauchInterpolateHNi(), RauchInterpolateHpHe(), RauchInterpolateHydr(), RauchInterpolatePG1159(), TlustyInterpolate(), WernerInterpolate(), and WMBASICInterpolate().
STATIC void GetBins | ( | const stellar_grid * | grid, |
vector< Energy > & | ener ) |
Definition at line 3731 of file stars.cpp.
References ASSERT, cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, get_ptr(), grid, ioQQQ, rfield, and STATIC.
Referenced by InterpolateGridCoStar(), InterpolateRectGrid(), and ValidateGrid().
|
inline |
Definition at line 2710 of file stars.cpp.
Referenced by RauchReadMPP().
STATIC void GetModel | ( | const stellar_grid * | grid, |
long | ind, | ||
vector< realnum > & | flux, | ||
bool | lgTalk, | ||
bool | lgTakeLog ) |
Definition at line 3762 of file stars.cpp.
References ASSERT, called, cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, get_ptr(), grid, ioQQQ, PrintEfmt, rfield, and STATIC.
Referenced by InterpolateModel(), InterpolateModelCoStar(), and ValidateGrid().
bool GridCompile | ( | const char * | InName | ) |
GridCompile rebin user supplied stellar models to match energy grid of code
Definition at line 693 of file stars.cpp.
References AS_LOCAL_ONLY, ASSERT, DEBUG_ENTRY, FreeGrid(), grid, InitGrid(), ioQQQ, lgCompileAtmosphere(), and ValidateGrid().
Referenced by ParseCompile().
long GridInterpolate | ( | double | val[], |
long * | nval, | ||
long * | ndim, | ||
const char * | FileName, | ||
bool | lgList, | ||
double * | Tlow, | ||
double * | Thigh ) |
GridInterpolate read in and interpolate on user supplied grid of atmospheres
Definition at line 738 of file stars.cpp.
References AS_DATA_OPTIONAL, CheckVal(), DEBUG_ENTRY, FreeGrid(), grid, InitGrid(), InterpolateRectGrid(), and rfield.
Referenced by ParseTable().
STATIC void InitGrid | ( | stellar_grid * | grid, |
bool | lgList ) |
Definition at line 3059 of file stars.cpp.
References ASSERT, cdEXIT, continuum, DEBUG_ENTRY, EXIT_FAILURE, fp_equal(), grid, IM_RECT_GRID, InitIndexArrays(), ioQQQ, MALLOC, MDIM, MNAM, NMD5, open_data(), rfield, STATIC, and VERSION_BIN.
Referenced by AtlasInterpolate(), CoStarInterpolate(), GridCompile(), GridInterpolate(), Kurucz79Interpolate(), MihalasInterpolate(), RauchInterpolateCOWD(), RauchInterpolateHCa(), RauchInterpolateHelium(), RauchInterpolateHNi(), RauchInterpolateHpHe(), RauchInterpolateHydr(), RauchInterpolatePG1159(), TlustyInterpolate(), WernerInterpolate(), and WMBASICInterpolate().
STATIC void InitGridCoStar | ( | stellar_grid * | grid | ) |
Definition at line 3302 of file stars.cpp.
References ASSERT, CALLOC, DEBUG_ENTRY, FREE_CHECK, grid, JIndex(), and STATIC.
Referenced by CoStarInterpolate().
STATIC void InitIndexArrays | ( | stellar_grid * | grid, |
bool | lgList ) |
Definition at line 4022 of file stars.cpp.
References ASSERT, cdEXIT, DEBUG_ENTRY, EXIT_SUCCESS, FillJ(), FindIndex(), FREE_CHECK, grid, MALLOC, and STATIC.
Referenced by InitGrid().
STATIC void InterpolateGridCoStar | ( | const stellar_grid * | grid, |
const double | val[], | ||
double * | val0_lo, | ||
double * | val0_hi ) |
Definition at line 2070 of file stars.cpp.
References ASSERT, called, cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, FindHCoStar(), FindVCoStar(), FREE_CHECK, GetBins(), grid, IM_COSTAR_AGE_MZAMS, IM_COSTAR_MZAMS_AGE, IM_COSTAR_TEFF_LOGG, IM_COSTAR_TEFF_MODID, InterpolateModelCoStar(), ioQQQ, JIndex(), lgValidModel(), MALLOC, PrintEfmt, rfield, SetLimits(), STATIC, TotalInsanity(), and ValidateGrid().
Referenced by CoStarInterpolate().
STATIC void InterpolateModel | ( | const stellar_grid * | grid, |
const double | val[], | ||
double | aval[], | ||
const long | indlo[], | ||
const long | indhi[], | ||
long | index[], | ||
long | nd, | ||
vector< realnum > & | flux1, | ||
IntStage | stage ) |
Definition at line 3514 of file stars.cpp.
References ASSERT, called, cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fp_equal(), FREE_CHECK, GetModel(), grid, InterpolateModel(), ioQQQ, IS_FIRST, IS_SECOND, JIndex(), lgTAKELOG, lgVERBOSE, MALLOC, MAX2, MIN2, rfield, STATIC, and TotalInsanity().
Referenced by InterpolateModel(), and InterpolateRectGrid().
STATIC void InterpolateModelCoStar | ( | const stellar_grid * | grid, |
const double | val[], | ||
double | aval[], | ||
const long | indlo[], | ||
const long | indhi[], | ||
long | index[], | ||
long | nd, | ||
long | off, | ||
vector< realnum > & | flux1 ) |
Definition at line 3659 of file stars.cpp.
References ASSERT, DEBUG_ENTRY, FREE_CHECK, GetModel(), grid, InterpolateModelCoStar(), ioQQQ, lgTAKELOG, lgVERBOSE, MALLOC, rfield, and STATIC.
Referenced by InterpolateGridCoStar(), and InterpolateModelCoStar().
STATIC void InterpolateRectGrid | ( | const stellar_grid * | grid, |
const double | val[], | ||
double * | Tlow, | ||
double * | Thigh ) |
Definition at line 3383 of file stars.cpp.
References ASSERT, called, cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, FindIndex(), FREE_CHECK, GetBins(), grid, InterpolateModel(), ioQQQ, IS_UNDEFINED, lgValidModel(), MALLOC, PrintEfmt, rfield, SetLimits(), STATIC, TotalInsanity(), and ValidateGrid().
Referenced by AtlasInterpolate(), GridInterpolate(), Kurucz79Interpolate(), MihalasInterpolate(), RauchInterpolateCOWD(), RauchInterpolateHCa(), RauchInterpolateHelium(), RauchInterpolateHNi(), RauchInterpolateHpHe(), RauchInterpolateHydr(), RauchInterpolatePG1159(), TlustyInterpolate(), WernerInterpolate(), and WMBASICInterpolate().
STATIC long JIndex | ( | const stellar_grid * | grid, |
const long | index[] ) |
Definition at line 4167 of file stars.cpp.
References DEBUG_ENTRY, grid, and STATIC.
Referenced by CoStarListModels(), FillJ(), FindHCoStar(), InitGridCoStar(), InterpolateGridCoStar(), InterpolateModel(), SetLimits(), and SetLimitsSub().
int Kurucz79Compile | ( | process_counter & | pc | ) |
Kurucz79Compile rebin Kurucz79 stellar models to match energy grid of code
Definition at line 778 of file stars.cpp.
References AS_LOCAL_ONLY_TRY, DEBUG_ENTRY, ioQQQ, lgCompileAtmosphere(), lgFileReadable(), and lgValidBinFile().
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
Definition at line 799 of file stars.cpp.
References AS_DATA_OPTIONAL, CheckVal(), DEBUG_ENTRY, FreeGrid(), grid, InitGrid(), InterpolateRectGrid(), and rfield.
Referenced by ParseTable().
STATIC bool lgCompileAtmosphere | ( | const char | chFNameIn[], |
const char | chFNameOut[], | ||
const realnum | Edges[], | ||
long | nedges, | ||
process_counter & | pc ) |
Definition at line 2723 of file stars.cpp.
References AS_LOCAL_ONLY, ASSERT, CALLOC, cdEXIT, continuum, DEBUG_ENTRY, EXIT_FAILURE, FR1RYD, FREE_CHECK, FREE_SAFE, get_ptr(), ioQQQ, MALLOC, MDIM, MNAM, process_counter::nFail, NMD5, process_counter::nOK, open_data(), POW2, RebinAtmosphere(), rfield, RYDLAM, SPEEDLIGHT, STATIC, VERSION_ASCII, and VERSION_BIN.
Referenced by AtlasCompile(), GridCompile(), Kurucz79Compile(), MihalasCompile(), RauchCompile(), StarburstCompile(), TlustyCompile(), WernerCompile(), and WMBASICCompile().
STATIC bool lgCompileAtmosphereCoStar | ( | const char | chFNameIn[], |
const char | chFNameOut[], | ||
const realnum | Edges[], | ||
long | nedges, | ||
process_counter & | pc ) |
Definition at line 1819 of file stars.cpp.
References AS_LOCAL_ONLY, ASSERT, CALLOC, mpp::chGrid, continuum, DEBUG_ENTRY, FREE_CHECK, FREE_SAFE, get_ptr(), INPUT_LINE_LENGTH, ioQQQ, MALLOC, MDIM, MNAM, process_counter::nFail, NMD5, process_counter::nOK, open_data(), mpp::par, PI, read_whole_line(), RebinAtmosphere(), rfield, RYDLAM, STATIC, and VERSION_BIN.
Referenced by CoStarCompile().
STATIC bool lgFileReadable | ( | const char * | chFnam, |
process_counter & | pc, | ||
access_scheme | scheme ) |
Definition at line 4329 of file stars.cpp.
References DEBUG_ENTRY, process_counter::nFound, open_data(), and STATIC.
Referenced by AtlasCompile(), CoStarCompile(), Kurucz79Compile(), MihalasCompile(), RauchCompile(), StarburstCompile(), TlustyCompile(), WernerCompile(), and WMBASICCompile().
STATIC bool lgValidAsciiFile | ( | const char * | ascName, |
access_scheme | scheme ) |
Definition at line 3279 of file stars.cpp.
References DEBUG_ENTRY, open_data(), STATIC, and VERSION_ASCII.
Referenced by RauchCompile(), and StarburstCompile().
STATIC bool lgValidBinFile | ( | const char * | binName, |
process_counter & | pc, | ||
access_scheme | scheme ) |
Definition at line 3199 of file stars.cpp.
References continuum, DEBUG_ENTRY, fp_equal(), grid, MDIM, MNAM, NMD5, process_counter::notProcessed, open_data(), rfield, STATIC, and VERSION_BIN.
Referenced by AtlasCompile(), AtmospheresAvail(), CoStarCompile(), Kurucz79Compile(), MihalasCompile(), RauchCompile(), StarburstCompile(), TlustyCompile(), WernerCompile(), and WMBASICCompile().
STATIC bool lgValidModel | ( | const vector< Energy > & | anu, |
const vector< realnum > & | flux, | ||
double | Teff, | ||
double | toler ) |
Definition at line 4394 of file stars.cpp.
References ASSERT, DEBUG_ENTRY, FR1RYD, ioQQQ, rfield, STATIC, and STEFAN_BOLTZ.
Referenced by InterpolateGridCoStar(), InterpolateRectGrid(), and ValidateGrid().
int MihalasCompile | ( | process_counter & | pc | ) |
MihalasCompile rebin Mihalas stellar models to match energy grid of code
Definition at line 829 of file stars.cpp.
References AS_LOCAL_ONLY_TRY, DEBUG_ENTRY, ioQQQ, lgCompileAtmosphere(), lgFileReadable(), and lgValidBinFile().
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
Definition at line 849 of file stars.cpp.
References AS_DATA_OPTIONAL, CheckVal(), DEBUG_ENTRY, FreeGrid(), grid, InitGrid(), InterpolateRectGrid(), and rfield.
Referenced by ParseTable().
int RauchCompile | ( | process_counter & | pc | ) |
RauchCompile create ascii and mod files for Rauch atmospheres return 0 if success, 1 if failure
Definition at line 879 of file stars.cpp.
References AS_LOCAL_ONLY_TRY, DEBUG_ENTRY, ioQQQ, lgCompileAtmosphere(), lgFileReadable(), lgValidAsciiFile(), lgValidBinFile(), NMODS_HCA, NMODS_HELIUM, NMODS_HNI, NMODS_HpHE, NMODS_HYDR, NMODS_PG1159, RauchInitializeSub(), and RauchReadMPP().
Referenced by ParseCompile().
STATIC int RauchInitializeSub | ( | const char | chFName[], |
const char | chSuff[], | ||
const vector< mpp > & | telg, | ||
long | nmods, | ||
long | n, | ||
long | ngrids, | ||
const double | par2[], | ||
int | format ) |
Definition at line 2399 of file stars.cpp.
References AS_LOCAL_ONLY, cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fp_equal(), FREE_CHECK, INPUT_LINE_LENGTH, ioQQQ, MALLOC, NRAUCH, open_data(), PI, read_whole_line(), ShowMe(), STATIC, and VERSION_ASCII.
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
Definition at line 1171 of file stars.cpp.
References AS_DATA_OPTIONAL, CheckVal(), DEBUG_ENTRY, FreeGrid(), 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
Definition at line 1073 of file stars.cpp.
References AS_DATA_OPTIONAL, CheckVal(), DEBUG_ENTRY, FreeGrid(), 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
Definition at line 1231 of file stars.cpp.
References AS_DATA_OPTIONAL, CheckVal(), DEBUG_ENTRY, FreeGrid(), 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
Definition at line 1107 of file stars.cpp.
References AS_DATA_OPTIONAL, CheckVal(), DEBUG_ENTRY, FreeGrid(), 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
Definition at line 1261 of file stars.cpp.
References AS_DATA_OPTIONAL, CheckVal(), DEBUG_ENTRY, FreeGrid(), 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
Definition at line 1201 of file stars.cpp.
References AS_DATA_OPTIONAL, CheckVal(), DEBUG_ENTRY, FreeGrid(), 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
Definition at line 1141 of file stars.cpp.
References AS_DATA_OPTIONAL, CheckVal(), DEBUG_ENTRY, FreeGrid(), 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 ) |
Definition at line 2612 of file stars.cpp.
References ASSERT, cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, getdataline(), ioQQQ, mode_r, open_data(), STATIC, and VERSION_RAUCH_MPP.
Referenced by RauchCompile().
STATIC void RebinAtmosphere | ( | long | nCont, |
const realnum | StarEner[], | ||
const realnum | StarFlux[], | ||
realnum | CloudyFlux[], | ||
long | nEdge, | ||
const realnum | AbsorbEdge[] ) |
Definition at line 4424 of file stars.cpp.
References ASSERT, DEBUG_ENTRY, FREE_CHECK, FREE_SAFE, MALLOC, POW3, RebinFind(), RebinSingleCell(), rfield, and STATIC.
Referenced by lgCompileAtmosphere(), and lgCompileAtmosphereCoStar().
Definition at line 4656 of file stars.cpp.
References ASSERT, DEBUG_ENTRY, sign3(), and STATIC.
Referenced by RebinAtmosphere(), and RebinSingleCell().
STATIC realnum RebinSingleCell | ( | realnum | BinLow, |
realnum | BinHigh, | ||
const realnum | StarEner[], | ||
const realnum | StarFlux[], | ||
const realnum | StarPower[], | ||
long | nCont ) |
Definition at line 4545 of file stars.cpp.
References ASSERT, DEBUG_ENTRY, MIN2, RebinFind(), STATIC, x1, and x2.
Referenced by RebinAtmosphere().
STATIC void SearchModel | ( | const mpp | telg[], |
bool | lgIsTeffLoggGrid, | ||
long | nmods, | ||
const double | val[], | ||
long | ndim, | ||
long * | index_low, | ||
long * | index_high ) |
Definition at line 4184 of file stars.cpp.
References DEBUG_ENTRY, fp_equal(), mpp::par, and STATIC.
Referenced by FillJ().
STATIC void SetLimits | ( | const stellar_grid * | grid, |
double | val, | ||
const long | indlo[], | ||
const long | indhi[], | ||
const long | useTr[], | ||
const realnum | ValTr[], | ||
double * | loLim, | ||
double * | hiLim ) |
Definition at line 3848 of file stars.cpp.
References ASSERT, cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, 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 long | indlo[], | ||
const long | indhi[], | ||
long | index[], | ||
long | nd, | ||
double * | loLim, | ||
double * | hiLim ) |
Definition at line 3944 of file stars.cpp.
References ASSERT, DEBUG_ENTRY, grid, JIndex(), MAX2, MIN2, SetLimitsSub(), and STATIC.
Referenced by SetLimits(), and SetLimitsSub().
bool StarburstCompile | ( | process_counter & | pc | ) |
StarburstCompile, rebin Starburst99 model output to match energy grid of code
Definition at line 1494 of file stars.cpp.
References AS_LOCAL_ONLY_TRY, DEBUG_ENTRY, ioQQQ, lgCompileAtmosphere(), lgFileReadable(), lgValidAsciiFile(), lgValidBinFile(), SB_TOTAL, and StarburstInitialize().
Referenced by ParseCompile().
Create .ascii file out of Starburst99 output
Definition at line 1291 of file stars.cpp.
References AS_LOCAL_ONLY, ASSERT, DEBUG_ENTRY, fp_equal(), FREE_CHECK, FREE_SAFE, INPUT_LINE_LENGTH, ioQQQ, MALLOC, MNTS, NSB99, open_data(), read_whole_line(), REALLOC, SB_NEBULAR, SB_STELLAR, SB_TOTAL, TotalInsanity(), and VERSION_ASCII.
Referenced by ParseCompile(), and StarburstCompile().
int TlustyCompile | ( | process_counter & | pc | ) |
TlustyCompile rebin Tlusty OSTAR2002 stellar models to match energy grid of code
Definition at line 1518 of file stars.cpp.
References AS_LOCAL_ONLY_TRY, DEBUG_ENTRY, ioQQQ, lgCompileAtmosphere(), lgFileReadable(), and lgValidBinFile().
Referenced by ParseCompile().
long TlustyInterpolate | ( | double | val[], |
long * | nval, | ||
long * | ndim, | ||
tl_grid | tlg, | ||
const char * | chMetalicity, | ||
bool | lgList, | ||
double * | Tlow, | ||
double * | Thigh ) |
TlustyInterpolate get one of the Tlusty OSTAR2002 model atmospheres
Definition at line 1590 of file stars.cpp.
References AS_DATA_OPTIONAL, CheckVal(), DEBUG_ENTRY, FreeGrid(), grid, InitGrid(), InterpolateRectGrid(), rfield, TL_BSTAR, TL_OBSTAR, TL_OSTAR, and TotalInsanity().
Referenced by ParseTable().
STATIC void ValidateGrid | ( | const stellar_grid * | grid, |
double | toler ) |
Definition at line 4349 of file stars.cpp.
References DEBUG_ENTRY, GetBins(), GetModel(), grid, ioQQQ, lgLINEAR, lgSILENT, lgValidModel(), rfield, and STATIC.
Referenced by GridCompile(), InterpolateGridCoStar(), and InterpolateRectGrid().
int WernerCompile | ( | process_counter & | pc | ) |
WernerCompile rebin Werner stellar atmospheres to match cloudy energy grid
Definition at line 1653 of file stars.cpp.
References AS_LOCAL_ONLY_TRY, DEBUG_ENTRY, ioQQQ, lgCompileAtmosphere(), lgFileReadable(), and lgValidBinFile().
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
Definition at line 1708 of file stars.cpp.
References AS_DATA_OPTIONAL, CheckVal(), DEBUG_ENTRY, FreeGrid(), grid, InitGrid(), InterpolateRectGrid(), and rfield.
Referenced by ParseTable().
int WMBASICCompile | ( | process_counter & | pc | ) |
WMBASICCompile rebin WMBASIC stellar models to match energy grid of code
Definition at line 1764 of file stars.cpp.
References AS_LOCAL_ONLY_TRY, DEBUG_ENTRY, ioQQQ, lgCompileAtmosphere(), lgFileReadable(), and lgValidBinFile().
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
Definition at line 1788 of file stars.cpp.
References AS_DATA_OPTIONAL, CheckVal(), DEBUG_ENTRY, FreeGrid(), grid, InitGrid(), InterpolateRectGrid(), and rfield.
Referenced by ParseTable().
|
static |
Definition at line 43 of file stars.cpp.
Referenced by ValidateGrid().
|
static |
Definition at line 40 of file stars.cpp.
Referenced by ValidateGrid().
|
static |
Definition at line 44 of file stars.cpp.
Referenced by InterpolateModel(), and InterpolateModelCoStar().
|
static |
Definition at line 41 of file stars.cpp.
Referenced by InterpolateModel(), and InterpolateModelCoStar().
|
static |
maximum number of separate time steps in a Starburst99 model
Definition at line 17 of file stars.cpp.
Referenced by StarburstInitialize().
|
static |
The number of models in the original Rauch H-Ca set (first version May 1998, current May 2001)
Definition at line 22 of file stars.cpp.
Referenced by RauchCompile().
|
static |
The number of models in the Rauch Helium only set, Jun 2004
Definition at line 30 of file stars.cpp.
Referenced by RauchCompile().
|
static |
The number of models in the new Rauch H-Ni set, Nov 2002
Definition at line 24 of file stars.cpp.
Referenced by RauchCompile().
|
static |
The number of models in the Rauch H+He set, Aug 2004
Definition at line 32 of file stars.cpp.
Referenced by RauchCompile().
|
static |
The number of models in the Rauch Hydrogen only set, Feb 2003
Definition at line 28 of file stars.cpp.
Referenced by RauchCompile().
|
static |
The number of models in the new Rauch PG1159 set, Jan 2006
Definition at line 26 of file stars.cpp.
Referenced by RauchCompile().
|
static |
this is the number of points in each of the stellar continua
Definition at line 20 of file stars.cpp.
Referenced by RauchInitializeSub().
|
static |
this is the initial assumed size of the Starburst grid, may be increased during execution if needed
Definition at line 15 of file stars.cpp.
Referenced by StarburstInitialize().
|
static |
Definition at line 192 of file stars.cpp.
Referenced by lgCompileAtmosphere(), lgValidAsciiFile(), RauchInitializeSub(), and StarburstInitialize().
|
static |
Definition at line 197 of file stars.cpp.
Referenced by InitGrid(), lgCompileAtmosphere(), lgCompileAtmosphereCoStar(), and lgValidBinFile().
|
static |
Definition at line 199 of file stars.cpp.
Referenced by RauchReadMPP().