cloudy trunk
|
Go to the source code of this file.
Functions | |
void | GrainDrive (void) |
void | GrainDrift (void) |
void | GrainZero (void) |
void | GrainStartIter (void) |
void | GrainRestartIter (void) |
void | SetNChrgStates (long) |
void | GrainsInit (void) |
void | GrainMakeDiffuse (void) |
void | qheat (vector< double > &, vector< double > &, long *, size_t) |
void | InitEnthalpy (void) |
void | mie_write_opc (const char *, const char *, long int) |
void | mie_read_opc (const char *, const GrainPar &) |
void | gauss_init (long int, double, double, const vector< double > &, const vector< double > &, vector< double > &, vector< double > &) |
void | gauss_legendre (long int, vector< double > &, vector< double > &) |
void | find_arr (double, const vector< double > &, long int, long int *, bool *) |
void find_arr | ( | double | x, |
const vector< double > & | xa, | ||
long int | n, | ||
long int * | ind, | ||
bool * | lgOutOfBounds ) |
find index ind such that min(xa[ind],xa[ind+1]) <= x <= max(xa[ind],xa[ind+1]). xa is assumed to be strictly monotically increasing or decreasing. if x is outside the range spanned by xa, lgOutOfBounds is raised and ind is set to -1 n is the number of elements in xa.
x | ||
xa[] | ||
n | ||
[out] | *ind | |
[out] | *lgOutOfBounds |
Definition at line 4563 of file grains_mie.cpp.
References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, ioQQQ, max(), min(), and sign3().
Referenced by init_eps(), mie_calc_ial(), mie_cs(), size_distr(), and tbl_fun().
void gauss_init | ( | long int | nn, |
double | xbot, | ||
double | xtop, | ||
const vector< double > & | x, | ||
const vector< double > & | a, | ||
vector< double > & | rr, | ||
vector< double > & | ww ) |
set up Gaussian quadrature for arbitrary interval
nn | |
xbot | |
xtop | |
x[] | |
a[] | |
rr[] | |
ww[] |
Definition at line 4425 of file grains_mie.cpp.
References DEBUG_ENTRY.
Referenced by DebyeDeriv(), and mie_integrate().
void gauss_legendre | ( | long int | nn, |
vector< double > & | x, | ||
vector< double > & | a ) |
set up abscissas and weights for Gauss-Legendre intergration of arbitrary even order
nn | |
x[] | |
a[] |
Definition at line 4453 of file grains_mie.cpp.
References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, ioQQQ, pow2(), and SAFETY.
Referenced by DebyeDeriv(), and mie_integrate().
void GrainDrift | ( | void | ) |
GrainDrift computes grains drift velocity
Definition at line 4884 of file grains.cpp.
References ASSERT, BOLTZMANN, DEBUG_ENTRY, dense, EN1RYD, gv, ioQQQ, ipHELIUM, ipHYDROGEN, phycon, POW2, POW3, rfield, SPEEDLIGHT, TE1RYD, and trace.
Referenced by ConvPresTempEdenIoniz().
void GrainDrive | ( | void | ) |
GrainDrive main routine to converge grains thermal solution
Definition at line 1591 of file grains.cpp.
References chrg2pot(), conv, DEBUG_ENTRY, dense, EVRYD, fp_equal(), GrainChargeTemp(), GrainUpdateRadius1(), GrainUpdateRadius2(), gv, hmi, ioQQQ, ipHYDROGEN, LIMELM, nCalledGrainDrive, nzone, phycon, SDIV(), thermal, and trace.
Referenced by ConvBase(), and mole_h2_grain_form().
void GrainMakeDiffuse | ( | void | ) |
main routine for generating the grain diffuse emission
Definition at line 170 of file grains_qheat.cpp.
References ASSERT, CONSERV_TOL, DEBUG_ENTRY, dense, EN1RYD, FR1RYD, gv, hmi, ipHYDROGEN, lgAbort, MAX2, NQGRID, PI4, POW2, qheat(), rfield, SPEEDLIGHT, STRG_CAR, STRG_SIL, TE1RYD, thermal, and TotalInsanity().
Referenced by RT_diffuse().
void GrainRestartIter | ( | void | ) |
this routine is called by IterRestart()
Definition at line 551 of file grains.cpp.
References DEBUG_ENTRY, and gv.
Referenced by IterRestart().
void GrainsInit | ( | void | ) |
startup routine for grains, called before first calculations, but after parsecommands
Definition at line 583 of file grains.cpp.
References flex_arr< T, lgBC >::alloc(), ASSERT, ATOMIC_MASS_UNIT, atoms, ShellData::AvNr, cdEXIT, chrg2pot(), CHRG_TOLER, conv, DEBUG_ENTRY, dense, DF_STANDARD, elec_esc_length(), elementnames, ShellData::Ener, EVRYD, EXIT_FAILURE, GetPotValues(), GrnStdDpth(), gv, HEAT_TOLER, HEAT_TOLER_BIN, hunt_bisect(), INCL_TUNNEL, InitBinAugerData(), InitEmissivities(), InitEnthalpy(), ioQQQ, ipHYDROGEN, ipLITHIUM, ShellData::ipLo, LIMELM, MAT_PAH, MAT_PAH2, MAX2, NCHS, NCHU, ShellData::nData, ShellData::nelem, nint(), ShellData::ns, ShellData::p, pot2chrg(), POW2, ReadAugerData(), flex_arr< T, lgBC >::reserve(), rfield, STICK_ELEC, thermal, TorF(), trace, ShellData::y01, ShellData::y01A, ZMIN_CAR, and ZMIN_SIL.
Referenced by OpacityCreateAll().
void GrainStartIter | ( | void | ) |
this routine is called by IterStart()
Definition at line 513 of file grains.cpp.
References DEBUG_ENTRY, and gv.
Referenced by IterStart().
void GrainZero | ( | void | ) |
this routine is called by zero(), so it should contain initializations that need to be done every time before the input lines get parsed
Definition at line 500 of file grains.cpp.
References DEBUG_ENTRY, and gv.
Referenced by zero().
void InitEnthalpy | ( | void | ) |
initialize interpolation arrays for grain enthalpy
Definition at line 2482 of file grains_qheat.cpp.
References DEBUG_ENTRY, GRAIN_TMIN, gv, log_integral(), NDEMS, spline(), tlim, and uderiv().
Referenced by GrainsInit().
void mie_read_opc | ( | const char * | chFile, |
const GrainPar & | gp ) |
read in the *.opc file with opacities and other relevant information
*chFile | |
gp |
Definition at line 1011 of file grains_mie.cpp.
References AS_DATA_LOCAL, ASSERT, called, cdEXIT, continuum, cpu, DEBUG_ENTRY, dense, GrainPar::dep, ELECTRIC_CONST, EXIT_FAILURE, FILENAME_PATH_LENGTH_2, fp_equal(), gv, ioQQQ, LABELSIZE, GrainPar::lgForbidQHeating, GrainPar::lgGreyGrain, GrainPar::lgRequestQHeating, LIMELM, MAGIC_OPC, mie_next_data(), mie_next_line(), mie_read_double(), mie_read_long(), mie_read_realnum(), mie_read_word(), min(), GrainPar::nDustFunc, NMD5, open_data(), PI4, pow2(), rfield, and strstr_s().
Referenced by ParseAbundances(), and ParseGrain().
void mie_write_opc | ( | const char * | rfi_file, |
const char * | szd_file, | ||
long int | nbin ) |
mie_write_opc
[in] | *rfi_file | |
[in] | *szd_file |
Definition at line 272 of file grains_mie.cpp.
References grain_data::abun, sd_data::area, AS_LOCAL_ONLY, grain_data::atom_weight, ATOMIC_MASS_UNIT, grain_data::bandgap, car1_fun(), car2_fun(), car3_fun(), grain_data::cAxis, cdEXIT, grain_data::charge, grain_data::clear(), sd_data::clim, multi_arr< T, d, ALLOC, lgBC >::clone(), continuum, sd_data::cPart, cpu, DEBUG_ENTRY, grain_data::depl, elementnames, grain_data::elmAbun, EXIT_FAILURE, FILENAME_PATH_LENGTH_2, gv, IAL_CAR, IAL_SIL, Singleton< t_version >::Inst(), ioQQQ, ipBHi, ipBLo, LABELSIZE, LABELSUB1, LABELSUB2, sd_data::lgLogScale, sd_data::lim, LIMELM, grain_data::magic, sd_data::magic, MAGIC_OPC, grain_data::matType, max(), mie_auxiliary(), mie_auxiliary2(), mie_calc_ial(), mie_cs(), mie_cs_size_distr(), mie_read_mix(), mie_read_rfi(), mie_read_szd(), mie_repair(), min(), grain_data::mol_weight, grain_data::nAxes, grain_data::norm, sd_data::nPart, OPC_GREY, OPC_PAH1, OPC_PAH2C, OPC_PAH2N, OPC_PAH3C, OPC_PAH3N, OPC_TABLE, open_data(), POW4, radius, sd_data::radius, RFI_TABLE, rfield, grain_data::rfiType, grain_data::rho, SD_NR_CARBON, SD_SINGLE_SIZE, sd_data::sdCase, ShowMe(), size_distr(), strstr_s(), grain_data::subl_temp, tbl_fun(), grain_data::therm_eff, sd_data::unity, sd_data::unity_bin, sd_data::vol, WAVNRYD, grain_data::work, and grain_data::wt.
Referenced by ParseCompile().
void qheat | ( | vector< double > & | , |
vector< double > & | , | ||
long * | , | ||
size_t | ) |
main routine for quantum heating
Referenced by mole_h2_grain_form().
void SetNChrgStates | ( | long | nChrg | ) |
this routine is called by ParseSet()
Definition at line 570 of file grains.cpp.
References ASSERT, DEBUG_ENTRY, gv, and NCHU.
Referenced by ParseSet().