Cloudy
Spectral Synthesis Code for Astrophysics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mole_species.cpp File Reference
#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"
Include dependency graph for mole_species.cpp:

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 shared_ptr< chem_element > &el, int massNumberA, realnum mass_amu, double frac)
 
STATIC realnum MeanMassOfElement (const shared_ptr< chem_element > &el)
 
STATIC moleculenewspecies (const char label[], enum spectype type, enum mole_state state, realnum form_enthalpy)
 
STATIC moleculenewspecies (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)
 
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[])
 
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)
 
realnum species_gasphase_density (const string &chSpecies)
 
void mole_make_groups (void)
 
bool isSpecies (const string &chSpecies)
 
bool isMolecule (const string &chSpecies)
 
void test_isMolecule ()
 
void getMolecules (vector< string > &allMolecules)
 

Variables

map< string, size_t > nuclidetab
 
moleculenull_mole
 
molezonenull_molezone
 
molezone null_molezone_impl
 
chem_nuclidenull_nuclide
 
chem_nuclide null_nuclide_impl
 
ChemElementList element_list
 
ChemNuclideList nuclide_list
 
vector< molecule * > groupspecies
 

Typedef Documentation

typedef map<string,size_t >::iterator chem_nuclide_i

Enumeration Type Documentation

enum spectype
Enumerator
MOLECULE 
OTHER 

Function Documentation

void create_isotopologues ( ChemNuclideList atoms,
vector< int > &  numNuclides,
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 > &  numNuclides,
string  atom_old,
string  atom_new,
string  embellishments,
string &  newLabel 
)
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:

STATIC bool isactive ( const molecule mol)

References DEBUG_ENTRY, MOLE_ACTIVE, and molecule::state.

Referenced by mole_make_list().

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:

STATIC bool ispassive ( const molecule mol)

References DEBUG_ENTRY, MOLE_PASSIVE, and molecule::state.

Referenced by mole_make_list().

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().

STATIC realnum MeanMassOfElement ( const shared_ptr< chem_element > &  el)

References ASSERT, t_dense::AtomicWeight, DEBUG_ENTRY, dense, and fp_equal().

Referenced by t_mole_global::make_species().

Here is the call graph for this function:

STATIC void newelement ( const char  label[],
int  ipion 
)

References DEBUG_ENTRY, element_list, mole_priv::elemtab, and exists().

Referenced by t_mole_global::make_species().

Here is the call graph for this function:

STATIC void newisotope ( const shared_ptr< chem_element > &  el,
int  massNumberA,
realnum  mass_amu,
double  frac 
)

References ASSERT, DEBUG_ENTRY, frac(), LIMELM, nuclide_list, and nuclidetab.

Referenced by t_mole_global::make_species(), and SetIsotopeFractions().

Here is the call graph for this function:

STATIC molecule * newspecies ( const char  label[],
enum spectype  type,
enum mole_state  state,
realnum  form_enthalpy 
)
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 
)

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:

STATIC void read_species_file ( string  filename,
bool  lgCreateIsotopologues = true 
)

References ASSERT, DEBUG_ENTRY, mode_r, MOLE_ACTIVE, MOLECULE, newspecies(), and open_data().

Referenced by t_mole_global::make_species().

Here is the call graph for this function:

STATIC void SetIsotopeFractions ( const vector< bool > &  lgResolveNelem)
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

map<string,size_t > nuclidetab

Referenced by findnuclide(), and newisotope().

molezone null_molezone_impl
chem_nuclide null_nuclide_impl