Cloudy
Spectral Synthesis Code for Astrophysics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mole.h File Reference
#include "module.h"
#include "container_classes.h"
Include dependency graph for mole.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  chem_element
 
class  chem_nuclide
 
class  element_pointer_value_less
 
class  molecule
 
class  t_mole_global
 
class  molezone
 
class  t_mole_local
 

Typedefs

typedef map< int, shared_ptr
< chem_nuclide > >::iterator 
isotopes_i
 
typedef vector< shared_ptr
< chem_nuclide > > 
ChemNuclideList
 
typedef vector< shared_ptr
< chem_element > > 
ChemElementList
 
typedef
molecule::nNucsMap::iterator 
nNucs_i
 
typedef
molecule::nNucsMap::reverse_iterator 
nNucs_ri
 
typedef
molecule::nNucsMap::const_reverse_iterator 
nNucs_cri
 

Enumerations

enum  mole_state { MOLE_NULL, MOLE_PASSIVE, MOLE_ACTIVE }
 

Functions

bool operator< (const chem_nuclide &a, const chem_nuclide &b)
 
bool operator> (const chem_nuclide &a, const chem_nuclide &b)
 
bool operator<= (const chem_nuclide &a, const chem_nuclide &b)
 
bool operator>= (const chem_nuclide &a, const chem_nuclide &b)
 
bool operator== (const chem_nuclide &a, const chem_nuclide &b)
 
bool operator!= (const chem_nuclide &a, const chem_nuclide &b)
 
void mole_drive (void)
 
void mole_create_react (void)
 
mole_reactionmole_findrate_s (const char buf[])
 
bool exists (const molecule *m)
 
moleculefindspecies (const char buf[])
 
moleculefindspecies_validate (const char buf[])
 
molezonefindspecieslocal (const char buf[])
 
molezonefindspecieslocal_validate (const char buf[])
 
shared_ptr< chem_nuclidefindnuclide (const char buf[])
 
bool exists (const molezone *m)
 
void total_molecule_elems (realnum total[LIMELM])
 
void total_molecule_deut (realnum &total)
 
realnum total_molecules (void)
 
realnum total_molecules_gasphase (void)
 
realnum species_gasphase_density (const string &chSpecies)
 
void mole_make_list (void)
 
void mole_make_groups (void)
 
void mole_cmp_num_in_out_reactions (void)
 
bool lgDifferByExcitation (const molecule &mol1, const molecule &mol2)
 
void mole_update_species_cache (void)
 
void mole_update_sources (void)
 
void mole_rk_bigchange (void)
 
void create_isotopologues (ChemNuclideList &atoms, vector< int > &numAtoms, string atom_old, string atom_new, string embellishments, vector< string > &newLabels)
 
void create_isotopologues_one_position (unsigned position, ChemNuclideList &atoms, vector< int > &numAtoms, string atom_old, string atom_new, string embellishments, string &newLabel)
 
bool parse_species_label (const char label[], ChemNuclideList &atomsLeftToRight, vector< int > &numAtoms, string &embellishments)
 
bool parse_species_label (const char mylab[], ChemNuclideList &atomsLeftToRight, vector< int > &numAtoms, string &embellishments, bool &lgExcit, int &charge, bool &lgGas_Phase)
 
double hmrate4 (double a, double b, double c, double te)
 
void ParseChemistry (Parser &p)
 
bool isSpecies (const string &chSpecies)
 
bool isMolecule (const string &chSpecies)
 
void test_isMolecule ()
 
void getMolecules (vector< string > &allMolecules)
 

Variables

static const double SMALLABUND = 1e-24
 
ChemNuclideList nuclide_list
 
ChemElementList element_list
 
chem_nuclidenull_nuclide
 
moleculenull_mole
 
t_mole_global mole_global
 
molezonenull_molezone
 
t_mole_local mole
 

Typedef Documentation

typedef vector< shared_ptr<chem_element> > ChemElementList
typedef vector< shared_ptr<chem_nuclide> > ChemNuclideList
typedef map<int, shared_ptr<chem_nuclide> >::iterator isotopes_i
typedef molecule::nNucsMap::const_reverse_iterator nNucs_cri
typedef molecule::nNucsMap::iterator nNucs_i
typedef molecule::nNucsMap::reverse_iterator nNucs_ri

Enumeration Type Documentation

enum mole_state
Enumerator
MOLE_NULL 
MOLE_PASSIVE 
MOLE_ACTIVE 

Function Documentation

void create_isotopologues ( ChemNuclideList atoms,
vector< int > &  numAtoms,
string  atom_old,
string  atom_new,
string  embellishments,
vector< string > &  newLabels 
)

References create_isotopologues_one_position(), DEBUG_ENTRY, and fixit.

Referenced by mole_generate_isotopologue_reactions(), and newspecies().

Here is the call graph for this function:

void create_isotopologues_one_position ( unsigned  position,
ChemNuclideList atoms,
vector< int > &  numAtoms,
string  atom_old,
string  atom_new,
string  embellishments,
string &  newLabel 
)
bool exists ( const molecule m)
inline
bool exists ( const molezone m)
inline

References null_molezone.

molecule* findspecies_validate ( const char  buf[])

version for user-supplied species which may not be valid

References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), ioQQQ, and mole_priv::spectab.

Referenced by findspecieslocal_validate().

Here is the call graph for this function:

molezone* findspecieslocal_validate ( const char  buf[])

version for user-supplied species which may not be valid

References DEBUG_ENTRY, findspecies_validate(), molecule::index, mole, and t_mole_local::species.

Referenced by iter_end_check(), radius_first(), and radius_next().

Here is the call graph for this function:

void getMolecules ( vector< string > &  allMolecules)

getMolecules - Get a list of all active molecules.

Parameters
allMolecules[in,out] List of molecule strings.

References DEBUG_ENTRY, isMolecule(), t_mole_global::list, and mole_global.

Referenced by t_mean::setup_molecules(), and test_cdTemp_molecules().

Here is the call graph for this function:

double hmrate4 ( double  a,
double  b,
double  c,
double  te 
)
inline

References min(), pow(), and sexp().

Referenced by ChargTranEval(), and ion_photo().

Here is the call graph for this function:

bool isMolecule ( const string &  chSpecies)

isMolecule - Tell if the input string corresponds to a valid & active molecule.

Parameters
chSpecies[in] Species string
Returns
bool value: true, if a valid molecule; false, otherwise

References DEBUG_ENTRY, findspecies(), molecule::isMolecule(), and molecule::label.

Referenced by cdTemp(), getMolecules(), and test_isMolecule().

Here is the call graph for this function:

bool isSpecies ( const string &  chSpecies)

isSpecies - Tell if the input string corresponds to a valid & active species.

Parameters
chSpecies[in] Species string
Returns
bool value: true, if a valid species; false, otherwise

References DEBUG_ENTRY, findspecies(), molecule::isMolecule(), molecule::isMonatomic(), and molecule::label.

Referenced by cdTemp().

Here is the call graph for this function:

bool lgDifferByExcitation ( const molecule mol1,
const molecule mol2 
)

References molecule::label.

Referenced by register_reaction_vectors().

void mole_cmp_num_in_out_reactions ( void  )

References CHARS_SPECIES, DEBUG_ENTRY, fprintf(), ioQQQ, t_mole_global::list, mole_global, t_mole_global::num_total, and mole_priv::reactab.

Here is the call graph for this function:

void mole_drive ( void  )

mole_drive main driver for chemical equilibrium routines

References DEBUG_ENTRY, mole_effects(), mole_ion_trim(), mole_solve(), mole_update_limiting_reactants(), mole_update_rks(), mole_update_species_cache(), and MOLETOLER.

Referenced by ConvBase().

Here is the call graph for this function:

mole_reaction* mole_findrate_s ( const char  buf[])
void mole_rk_bigchange ( void  )
void mole_update_sources ( void  )

References DEBUG_ENTRY, mole_eval_sources(), mole_global, mole_update_species_cache(), and t_mole_global::num_total.

Referenced by ConvBase().

Here is the call graph for this function:

bool operator!= ( const chem_nuclide a,
const chem_nuclide b 
)
inline
bool operator< ( const chem_nuclide a,
const chem_nuclide b 
)
inline

References chem_nuclide::compare().

Here is the call graph for this function:

bool operator<= ( const chem_nuclide a,
const chem_nuclide b 
)
inline

References chem_nuclide::compare().

Here is the call graph for this function:

bool operator== ( const chem_nuclide a,
const chem_nuclide b 
)
inline

References chem_nuclide::compare().

Here is the call graph for this function:

bool operator> ( const chem_nuclide a,
const chem_nuclide b 
)
inline

References chem_nuclide::compare().

Here is the call graph for this function:

bool operator>= ( const chem_nuclide a,
const chem_nuclide b 
)
inline

References chem_nuclide::compare().

Here is the call graph for this function:

bool parse_species_label ( const char  label[],
ChemNuclideList atomsLeftToRight,
vector< int > &  numAtoms,
string &  embellishments 
)
bool parse_species_label ( const char  mylab[],
ChemNuclideList atomsLeftToRight,
vector< int > &  numAtoms,
string &  embellishments,
bool &  lgExcit,
int &  charge,
bool &  lgGas_Phase 
)

References ASSERT, CHARS_ISOTOPE_SYM, dense, findnuclide(), fprintf(), ioQQQ, t_dense::lgElmtOn, t_trace::lgTraceMole, NULL, and trace.

Here is the call graph for this function:

realnum species_gasphase_density ( const string &  chSpecies)

species_gasphase_density - Report gas phase density of requested species

Parameters
chSpecies[in] species to process
Returns
density of species in the current zone

References DEBUG_ENTRY, findspecies(), molecule::index, mole, and t_mole_local::species.

Referenced by t_mean::MeanInc().

Here is the call graph for this function:

void test_isMolecule ( )

test_isMolecule() - Test function isMolecule()

References cdEXIT, DEBUG_ENTRY, EXIT_SUCCESS, fprintf(), ioQQQ, isMolecule(), t_mole_global::list, and mole_global.

Here is the call graph for this function:

realnum total_molecules_gasphase ( void  )

Variable Documentation

t_mole_global mole_global

Referenced by AbundChange(), atmdat_readin(), t_gaunt::brems_sum_ions(), ChargTranEval(), ChemImportance(), diatomics::Cont_Diss_Heat_Rate(), ConvBase(), ConvInitSolution(), ConvIterCheck(), CoolEvaluate(), DynaCreateArrays(), DynaIonize(), DynaNewStep(), DynaSaveLast(), DynaStartZone(), eden_sum(), ElectronFractions(), funjac(), getMolecules(), grouped_elems(), diatomics::H2_X_sink_and_source(), diatomics::init(), init_struc(), InitSimPostparse(), ion_photo(), ion_trim(), ion_trim2(), isSpeciesActive(), iter_end_check(), IterRestart(), IterStart(), lgNucleiConserved(), t_mole_global::make_species(), matchGeneric(), diatomics::Mol_Photo_Diss_Rates(), molcol(), mole_cmp_num_in_out_reactions(), mole_create_react(), mole_effects(), mole_eval_balance(), mole_eval_dynamic_balance(), mole_h_fixup(), mole_h_rate_diagnostics(), mole_h_reactions(), mole_make_groups(), mole_make_list(), mole_return_cached_species(), mole_solve(), mole_update_limiting_reactants(), mole_update_sources(), mole_update_species_cache(), newreact(), newspecies(), OpacityAddTotal(), OpacityCreateAll(), ParseCommands(), ParseDont(), ParseElement(), ParseSet(), ParseSpecies(), plot_sparsity(), PrtComment(), PrtZone(), radius_increment(), radius_next(), RT_tau_reset(), SaveDo(), SaveSpecies(), ScaleAllDensities(), t_mole_local::set_ion_locations(), setProperties(), GroupMap::setup(), speciesCheck(), speciesOff(), test_isMolecule(), total_molecule_deut(), total_molecule_elems(), total_molecules(), total_molecules_gasphase(), and GroupMap::updateMolecules().

const double SMALLABUND = 1e-24
static