cloudy
trunk
|
#include "cdstd.h"
#include "cddefines.h"
#include "deuterium.h"
#include "elementnames.h"
#include "h2.h"
#include "hmi.h"
#include "dense.h"
#include "grainvar.h"
#include "trace.h"
#include "abund.h"
#include "mole_priv.h"
#include "mole.h"
#include "parse_species.h"
Go to the source code of this file.
Namespaces | |
mole_priv | |
Typedefs | |
typedef map< string, size_t > ::iterator | chem_nuclide_i |
Enumerations | |
enum | spectype { MOLECULE, OTHER } |
Functions | |
STATIC void | read_species_file (string filename, bool lgCreateIsotopologues=true) |
STATIC void | newelement (const char label[], int ipion) |
STATIC void | newisotope (const count_ptr< chem_element > &el, int massNumberA, realnum mass_amu, double frac) |
STATIC realnum | MeanMassOfElement (const count_ptr< chem_element > &el) |
STATIC molecule * | newspecies (const char label[], enum spectype type, enum mole_state state, realnum form_enthalpy) |
STATIC molecule * | newspecies (const char label[], enum spectype type, enum mole_state state, realnum form_enthalpy, bool lgCreateIsotopologues) |
STATIC bool | isactive (const molecule &mol) |
STATIC bool | ispassive (const molecule &mol) |
STATIC void | SetIsotopeFractions (const vector< bool > &lgResolveNelem) |
void | mole_make_list () |
void | create_isotopologues (ChemNuclideList &atoms, vector< int > &numNuclides, string atom_old, string atom_new, string embellishments, vector< string > &newLabels) |
void | create_isotopologues_one_position (unsigned position, ChemNuclideList &atoms, vector< int > &numNuclides, string atom_old, string atom_new, string embellishments, string &newLabel) |
bool | parse_species_label (const char label[], ChemNuclideList &nuclidesLeftToRight, vector< int > &numNuclides, string &embellishments) |
bool | parse_species_label (const char label[], ChemNuclideList &nuclidesLeftToRight, vector< int > &numNuclides, string &embellishments, bool &lgExcit, int &charge, bool &lgGas_Phase) |
bool | lgDifferByExcitation (const molecule &mol1, const molecule &mol2) |
molecule * | findspecies (const char buf[]) |
molecule * | findspecies_validate (const char buf[]) |
molezone * | findspecieslocal (const char buf[]) |
molezone * | findspecieslocal_validate (const char buf[]) |
count_ptr< chem_nuclide > | findnuclide (const char buf[]) |
void | mole_update_species_cache (void) |
realnum | mole_return_cached_species (const GroupMap &) |
void | total_molecule_deut (realnum &total_f) |
void | total_molecule_elems (realnum total[LIMELM]) |
realnum | total_molecules (void) |
realnum | total_molecules_gasphase (void) |
void | mole_make_groups (void) |
Variables | |
map< string, size_t > | nuclidetab |
molecule * | null_mole |
molezone * | null_molezone |
chem_element * | null_element |
chem_nuclide * | null_nuclide |
ChemElementList | element_list |
ChemNuclideList | nuclide_list |
vector< molecule * > | groupspecies |
typedef map<string,size_t >::iterator chem_nuclide_i |
Definition at line 48 of file mole_species.cpp.
enum spectype |
Enumerator | |
---|---|
MOLECULE | |
OTHER |
Definition at line 24 of file mole_species.cpp.
void create_isotopologues | ( | ChemNuclideList & | atoms, |
vector< int > & | numNuclides, | ||
string | atom_old, | ||
string | atom_new, | ||
string | embellishments, | ||
vector< string > & | newLabels | ||
) |
Definition at line 339 of file mole_species.cpp.
References create_isotopologues_one_position(), DEBUG_ENTRY, and fixit.
Referenced by mole_generate_isotopologue_reactions(), and newspecies().
void create_isotopologues_one_position | ( | unsigned | position, |
ChemNuclideList & | atoms, | ||
vector< int > & | numNuclides, | ||
string | atom_old, | ||
string | atom_new, | ||
string | embellishments, | ||
string & | newLabel | ||
) |
Definition at line 364 of file mole_species.cpp.
References ASSERT, and DEBUG_ENTRY.
Referenced by create_isotopologues(), and mole_generate_isotopologue_reactions().
count_ptr<chem_nuclide> findnuclide | ( | const char | buf[] | ) |
Definition at line 852 of file mole_species.cpp.
References DEBUG_ENTRY, nuclide_list, and nuclidetab.
Referenced by mole_effects(), mole_generate_isotopologue_reactions(), mole_h_rate_diagnostics(), parse_species_label(), and PrtZone().
molecule* findspecies | ( | const char | buf[] | ) |
version for species we know are valid, but may not be present in calculation
Definition at line 789 of file mole_species.cpp.
References DEBUG_ENTRY, null_mole, and mole_priv::spectab.
Referenced by t_mole_local::chem_heat(), ConvBase(), CoolHeatError(), database_readin(), t_mole_local::dissoc_rate(), findspecieslocal(), diatomics::init(), iso_allocate(), lgElemsConserved(), lgNetEdenSrcSmall(), t_mole_global::make_species(), mole_make_list(), mole_save(), parse_reaction(), parse_udfa(), prt_smooth_predictions(), radius_increment(), SaveDo(), t_mole_local::sink_rate_tot(), t_mole_local::source_rate_tot(), and states_nelemfill().
molecule* findspecies_validate | ( | const char | buf[] | ) |
version for user-supplied species which may not be valid
Definition at line 808 of file mole_species.cpp.
References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), ioQQQ, and mole_priv::spectab.
Referenced by findspecieslocal_validate().
molezone* findspecieslocal | ( | const char | buf[] | ) |
version for species we know are valid, but may not be present in calculation
Definition at line 831 of file mole_species.cpp.
References DEBUG_ENTRY, findspecies(), molecule::index, mole, null_molezone, and t_mole_local::species.
Referenced by AgeCheck(), t_gaunt::brems_sum_ions(), cdColm(), check_co_ion_converge(), ConvBase(), CoolEvaluate(), dBaseAbund(), DynaPunchTimeDep(), getLevelsGeneric(), GrainCollHeating(), diatomics::H2_PunchDo(), diatomics::H2_X_coll_rate_evaluate(), HeatSum(), InitSimPostparse(), IonHydro(), iso_level(), iter_end_check(), IterRestart(), lines_molecules(), mole_effects(), diatomics::mole_H2_form(), mole_h_fixup(), mole_h_rate_diagnostics(), mole_h_reactions(), OpacityAddTotal(), PrtAllTau(), PrtComment(), PrtZone(), radius_increment(), radius_next(), RT_continuum(), RT_OTS(), RT_tau_inc(), SaveDo(), SaveLineData(), SecIoniz(), t_mole_local::set_ion_locations(), and ShowMe().
molezone* findspecieslocal_validate | ( | const char | buf[] | ) |
version for user-supplied species which may not be valid
Definition at line 843 of file mole_species.cpp.
References DEBUG_ENTRY, findspecies_validate(), molecule::index, mole, and t_mole_local::species.
Referenced by iter_end_check(), radius_first(), and radius_next().
Definition at line 767 of file mole_species.cpp.
References DEBUG_ENTRY, MOLE_ACTIVE, and molecule::state.
Referenced by mole_make_list().
Definition at line 772 of file mole_species.cpp.
References DEBUG_ENTRY, MOLE_PASSIVE, and molecule::state.
Referenced by mole_make_list().
Definition at line 779 of file mole_species.cpp.
References molecule::label.
Referenced by register_reaction_vectors().
STATIC realnum MeanMassOfElement | ( | const count_ptr< chem_element > & | el | ) |
Definition at line 485 of file mole_species.cpp.
References ASSERT, t_dense::AtomicWeight, DEBUG_ENTRY, dense, fp_equal(), chem_element::isotopes, and chem_element::Z.
Referenced by t_mole_global::make_species().
void mole_make_groups | ( | void | ) |
Definition at line 1137 of file mole_species.cpp.
References ASSERT, DEBUG_ENTRY, groupspecies, LIMELM, t_mole_global::list, mole_global, t_mole_global::num_calc, and t_mole_global::num_compacted.
Referenced by t_mole_global::init().
void mole_make_list | ( | void | ) |
Definition at line 248 of file mole_species.cpp.
References ASSERT, molecule::charge, DEBUG_ENTRY, findspecies(), isactive(), molecule::isMonatomic(), ispassive(), molecule::lgGas_Phase, t_mole_global::list, mole_global, molecule::nNuclide, t_mole_global::num_calc, t_mole_global::num_total, t_mole_global::sort(), and mole_priv::spectab.
Referenced by t_mole_global::init().
Definition at line 935 of file mole_species.cpp.
References ASSERT, dense, deut, t_mole_local::elec, frac(), t_dense::gas_phase, lgElemsConserved(), t_mole_global::list, mole, MOLE_ACTIVE, mole_global, t_mole_global::num_calc, t_mole_global::num_total, SDIV(), t_mole_local::species, t_deuterium::updateXMolecules(), and t_dense::updateXMolecules().
Referenced by mole_solve().
void mole_update_species_cache | ( | void | ) |
Definition at line 866 of file mole_species.cpp.
References ASSERT, GrainVar::bin, DEBUG_ENTRY, fprintf(), t_mole_local::grain_area, t_mole_local::grain_density, t_mole_local::grain_saturation, gv, ioQQQ, GrainVar::lgDustOn(), t_mole_global::list, mole, mole_global, t_mole_global::num_total, t_mole_local::set_isotope_abundances(), and t_mole_local::species.
Referenced by diatomics::H2_LevelPops(), mole_drive(), and mole_update_sources().
STATIC void newelement | ( | const char | label[], |
int | ipion | ||
) |
Definition at line 433 of file mole_species.cpp.
References auto_vec< T >::data(), DEBUG_ENTRY, element_list, mole_priv::elemtab, exists(), and chem_element::label.
Referenced by t_mole_global::make_species().
STATIC void newisotope | ( | const count_ptr< chem_element > & | el, |
int | massNumberA, | ||
realnum | mass_amu, | ||
double | frac | ||
) |
Definition at line 459 of file mole_species.cpp.
References chem_nuclide::A, ASSERT, DEBUG_ENTRY, chem_nuclide::el, chem_nuclide::frac, frac(), count_ptr< T >::get_ptr(), chem_nuclide::ipMl, chem_element::isotopes, chem_nuclide::label(), LIMELM, chem_nuclide::mass_amu, nuclide_list, nuclidetab, and chem_element::Z.
Referenced by t_mole_global::make_species(), and SetIsotopeFractions().
STATIC molecule * newspecies | ( | const char | label[], |
enum spectype | type, | ||
enum mole_state | state, | ||
realnum | form_enthalpy | ||
) |
Definition at line 504 of file mole_species.cpp.
Referenced by t_mole_global::make_species(), newspecies(), and read_species_file().
STATIC molecule * newspecies | ( | const char | label[], |
enum spectype | type, | ||
enum mole_state | state, | ||
realnum | form_enthalpy, | ||
bool | lgCreateIsotopologues | ||
) |
Definition at line 514 of file mole_species.cpp.
References ASSERT, molecule::charge, create_isotopologues(), auto_vec< T >::data(), DEBUG_ENTRY, exists(), molecule::form_enthalpy, fprintf(), molecule::groupnum, ioQQQ, ipHYDROGEN, molecule::isEnabled, molecule::isMonatomic(), molecule::label, molecule::lgExcit, molecule::lgGas_Phase, t_mole_global::lgNoHeavyMole, t_mole_global::lgNoMole, t_trace::lgTraceMole, t_mole_global::lgTreatIsotopes, MOLE_ACTIVE, mole_global, molecule::mole_mass, MOLE_NULL, MOLECULE, molecule::n_nuclei(), molecule::n_react, newspecies(), molecule::nNuclide, t_mole_global::num_calc, t_mole_global::num_total, molecule::parentLabel, parse_species_label(), speciesOff(), mole_priv::spectab, state, molecule::state, and trace.
bool parse_species_label | ( | const char | label[], |
ChemNuclideList & | nuclidesLeftToRight, | ||
vector< int > & | numNuclides, | ||
string & | embellishments | ||
) |
Definition at line 655 of file mole_species.cpp.
References parse_species_label().
Referenced by mole_generate_isotopologue_reactions(), newspecies(), and parse_species_label().
bool parse_species_label | ( | const char | label[], |
ChemNuclideList & | nuclidesLeftToRight, | ||
vector< int > & | numNuclides, | ||
string & | embellishments, | ||
bool & | lgExcit, | ||
int & | charge, | ||
bool & | lgGas_Phase | ||
) |
Definition at line 662 of file mole_species.cpp.
References ASSERT, CHARS_ISOTOPE_SYM, dense, chem_nuclide::el, findnuclide(), fprintf(), count_ptr< T >::get_ptr(), ioQQQ, chem_element::label, t_dense::lgElmtOn, t_trace::lgTraceMole, trace, and chem_element::Z.
STATIC void read_species_file | ( | string | filename, |
bool | lgCreateIsotopologues = true |
||
) |
Definition at line 311 of file mole_species.cpp.
References ASSERT, DEBUG_ENTRY, mode_r, MOLE_ACTIVE, MOLECULE, newspecies(), and open_data().
Referenced by t_mole_global::make_species().
STATIC void SetIsotopeFractions | ( | const vector< bool > & | lgResolveNelem | ) |
Definition at line 87 of file mole_species.cpp.
References abund, DEBUG_ENTRY, element_list, frac(), isotope::getAbn(), isotope::getAiso(), isotope::getMass(), isotope::getNiso(), ipCARBON, t_abund::IsoAbn, LIMELM, and newisotope().
Referenced by t_mole_global::make_species().
void total_molecule_deut | ( | realnum & | total_f | ) |
Definition at line 1051 of file mole_species.cpp.
References DEBUG_ENTRY, deut, t_deuterium::lgElmtOn, t_mole_global::list, mole, mole_global, t_mole_global::num_calc, and t_mole_local::species.
Referenced by t_deuterium::updateXMolecules().
void total_molecule_elems | ( | realnum | total[LIMELM] | ) |
Definition at line 1080 of file mole_species.cpp.
References ASSERT, DEBUG_ENTRY, ipHYDROGEN, LIMELM, t_mole_global::list, mole, mole_global, t_mole_global::num_calc, and t_mole_local::species.
Referenced by t_dense::updateXMolecules().
realnum total_molecules | ( | void | ) |
Definition at line 1104 of file mole_species.cpp.
References DEBUG_ENTRY, t_mole_global::list, mole, mole_global, t_mole_global::num_calc, and t_mole_local::species.
realnum total_molecules_gasphase | ( | void | ) |
Definition at line 1119 of file mole_species.cpp.
References DEBUG_ENTRY, t_mole_global::list, mole, mole_global, t_mole_global::num_calc, and t_mole_local::species.
Referenced by SumDensities().
ChemElementList element_list |
Definition at line 54 of file mole_species.cpp.
Referenced by t_mole_global::make_species(), newelement(), and SetIsotopeFractions().
vector<molecule *> groupspecies |
Definition at line 56 of file mole_species.cpp.
Referenced by funjac(), grouped_elems(), mole_make_groups(), mole_solve(), mole_system_error(), newton_step(), GroupMap::setup(), and GroupMap::updateMolecules().
ChemNuclideList nuclide_list |
Definition at line 55 of file mole_species.cpp.
Referenced by findnuclide(), funjac(), grouped_elems(), lgElemsConserved(), lgNucleiConserved(), t_mole_global::make_species(), mole_create_react(), mole_eval_sources(), mole_h_rate_diagnostics(), mole_ion_trim(), mole_solve(), newisotope(), t_mole_local::set_ion_locations(), t_mole_local::set_isotope_abundances(), GroupMap::setup(), and GroupMap::updateMolecules().
map<string,size_t > nuclidetab |
Definition at line 47 of file mole_species.cpp.
Referenced by findnuclide(), and newisotope().
chem_element* null_element |
Definition at line 52 of file mole_species.cpp.
molecule* null_mole |
Definition at line 50 of file mole_species.cpp.
Referenced by database_readin(), t_mole_local::dissoc_rate(), exists(), findspecies(), molezone::global(), diatomics::init(), iso_allocate(), t_mole_global::make_species(), mole_save(), parse_reaction(), parse_udfa(), SaveDo(), and states_nelemfill().
molezone* null_molezone |
Definition at line 51 of file mole_species.cpp.
Referenced by genericState::associated(), genericState::database(), exists(), findspecieslocal(), getLevelsGeneric(), genericState::label(), lgCheckMonitors(), molecule::local(), matchGeneric(), SaveAllSpeciesLabelsLevels(), SaveSpecies(), and SaveSpeciesLines().
chem_nuclide* null_nuclide |
Definition at line 53 of file mole_species.cpp.
Referenced by molecule::heavyAtom(), IterRestart(), molcol(), mole_update_limiting_reactants(), and molezone::zero().