cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Typedefs | Enumerations | Functions | Variables
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:

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 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[])
 
count_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)
 
void mole_make_groups (void)
 

Variables

map< string, size_t > nuclidetab
 
moleculenull_mole
 
molezonenull_molezone
 
chem_elementnull_element
 
chem_nuclidenull_nuclide
 
ChemElementList element_list
 
ChemNuclideList nuclide_list
 
vector< molecule * > groupspecies
 

Typedef Documentation

typedef map<string,size_t >::iterator chem_nuclide_i

Definition at line 48 of file mole_species.cpp.

Enumeration Type Documentation

enum spectype
Enumerator
MOLECULE 
OTHER 

Definition at line 24 of file mole_species.cpp.

Function Documentation

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

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 
)

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[])
molecule* findspecies ( const char  buf[])
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().

Here is the call graph for this function:

molezone* findspecieslocal ( const char  buf[])
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().

Here is the call graph for this function:

STATIC bool isactive ( const molecule mol)

Definition at line 767 of file mole_species.cpp.

References DEBUG_ENTRY, MOLE_ACTIVE, and molecule::state.

Referenced by mole_make_list().

STATIC bool ispassive ( const molecule mol)

Definition at line 772 of file mole_species.cpp.

References DEBUG_ENTRY, MOLE_PASSIVE, and molecule::state.

Referenced by mole_make_list().

bool lgDifferByExcitation ( const molecule mol1,
const molecule mol2 
)

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

Here is the call graph for this function:

void mole_make_groups ( void  )
void mole_make_list ( void  )
realnum mole_return_cached_species ( const GroupMap )
void mole_update_species_cache ( void  )
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().

Here is the call graph for this function:

STATIC void newisotope ( const count_ptr< chem_element > &  el,
int  massNumberA,
realnum  mass_amu,
double  frac 
)
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 
)
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().

Here is the call graph for this function:

bool parse_species_label ( const char  label[],
ChemNuclideList nuclidesLeftToRight,
vector< int > &  numNuclides,
string &  embellishments,
bool &  lgExcit,
int &  charge,
bool &  lgGas_Phase 
)
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().

Here is the call graph for this function:

STATIC void SetIsotopeFractions ( const vector< bool > &  lgResolveNelem)
void total_molecule_deut ( realnum total_f)
void total_molecule_elems ( realnum  total[LIMELM])
realnum total_molecules ( void  )
realnum total_molecules_gasphase ( void  )

Variable Documentation

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
ChemNuclideList nuclide_list
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
molezone* null_molezone
chem_nuclide* null_nuclide