cloudy trunk
Loading...
Searching...
No Matches
mole_species.cpp File Reference
#include "cdstd.h"
#include <cctype>
#include <string.h>
#include <algorithm>
#include <stdlib.h>
#include "cddefines.h"
#include "co.h"
#include "colden.h"
#include "conv.h"
#include "deuterium.h"
#include "doppvel.h"
#include "elementnames.h"
#include "h2.h"
#include "iso.h"
#include "phycon.h"
#include "physconst.h"
#include "mole.h"
#include "mole_priv.h"
#include "hmi.h"
#include "radius.h"
#include "rfield.h"
#include "rt.h"
#include "secondaries.h"
#include "dense.h"
#include "ionbal.h"
#include "grainvar.h"
#include "timesc.h"
#include "taulines.h"
#include "trace.h"
#include <functional>
Include dependency graph for mole_species.cpp:

Go to the source code of this file.

Namespaces

namespace  mole_priv

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 count_ptr< chem_atomfindatom (const char buf[])
STATIC bool isactive (const molecule &mol)
STATIC bool ispassive (const molecule &mol)
STATIC void ReadIsotopeFractions (const vector< bool > &lgResolveNelem)
void mole_make_list ()
void create_isotopologues_one (ChemAtomList &atoms, vector< int > &numAtoms, string atom_old, string atom_new, string embellishments, vector< string > &newLabels)
bool parse_species_label (const char label[], ChemAtomList &atomsLeftToRight, vector< int > &numAtoms, string &embellishments)
bool parse_species_label (const char label[], ChemAtomList &atomsLeftToRight, vector< int > &numAtoms, string &embellishments, bool &lgExcit, int &charge, bool &lgGas_Phase)
bool lgDifferByExcitation (const molecule &mol1, const molecule &mol2)
moleculefindspecies (const char buf[])
molezonefindspecieslocal (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])
void total_network_elems (double total[LIMELM])
realnum total_molecules (void)
realnum total_molecules_gasphase (void)
void mole_make_groups (void)

Variables

moleculenull_mole
molezonenull_molezone
chem_elementnull_element
chem_atomnull_atom
vector< count_ptr< chem_element > > element_list
ChemAtomList unresolved_atom_list
ChemAtomList atom_list
molecule ** groupspecies

Enumeration Type Documentation

◆ spectype

enum spectype
Enumerator
MOLECULE 
OTHER 

Definition at line 40 of file mole_species.cpp.

Function Documentation

◆ create_isotopologues_one()

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

Definition at line 387 of file mole_species.cpp.

References ASSERT, atoms, and fixit().

Referenced by mole_generate_isotopologue_reactions(), and newspecies().

Here is the call graph for this function:

◆ findatom()

STATIC count_ptr< chem_atom > findatom ( const char buf[])

Definition at line 852 of file mole_species.cpp.

References mole_priv::atomtab, DEBUG_ENTRY, and STATIC.

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

◆ findspecies()

◆ findspecieslocal()

◆ isactive()

STATIC bool isactive ( const molecule & mol)

Definition at line 792 of file mole_species.cpp.

References DEBUG_ENTRY, MOLE_ACTIVE, molecule::state, and STATIC.

Referenced by mole_make_list().

◆ ispassive()

STATIC bool ispassive ( const molecule & mol)

Definition at line 797 of file mole_species.cpp.

References DEBUG_ENTRY, MOLE_PASSIVE, molecule::state, and STATIC.

Referenced by mole_make_list().

◆ lgDifferByExcitation()

bool lgDifferByExcitation ( const molecule & mol1,
const molecule & mol2 )

Definition at line 804 of file mole_species.cpp.

References molecule::label.

Referenced by register_reaction_vectors().

◆ MeanMassOfElement()

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

Definition at line 515 of file mole_species.cpp.

References ASSERT, DEBUG_ENTRY, dense, fp_equal(), and STATIC.

Referenced by t_mole_global::make_species().

Here is the call graph for this function:

◆ mole_make_groups()

void mole_make_groups ( void )

Definition at line 1142 of file mole_species.cpp.

References ASSERT, DEBUG_ENTRY, groupspecies, LIMELM, MALLOC, mole_global, and REALLOC.

Referenced by t_mole_global::init().

◆ mole_make_list()

void mole_make_list ( void )

◆ mole_return_cached_species()

realnum mole_return_cached_species ( const GroupMap & MoleMap)

Definition at line 935 of file mole_species.cpp.

References ASSERT, dense, deut, lgElemsConserved(), mole, MOLE_ACTIVE, mole_global, SDIV(), and total_molecule_deut().

Referenced by mole_solve().

Here is the call graph for this function:

◆ mole_update_species_cache()

void mole_update_species_cache ( void )

Definition at line 866 of file mole_species.cpp.

References ASSERT, DEBUG_ENTRY, gv, ioQQQ, mole, and mole_global.

Referenced by diatomics::H2_LevelPops(), mole_drive(), and mole_update_sources().

◆ newelement()

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

Definition at line 461 of file mole_species.cpp.

References auto_vec< T >::data(), DEBUG_ENTRY, element_list, mole_priv::elemtab, and STATIC.

Referenced by t_mole_global::make_species().

Here is the call graph for this function:

◆ newisotope()

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

Definition at line 487 of file mole_species.cpp.

References ASSERT, atom_list, mole_priv::atomtab, DEBUG_ENTRY, count_ptr< T >::get_ptr(), LIMELM, STATIC, and unresolved_atom_list.

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

Here is the call graph for this function:

◆ newspecies() [1/2]

STATIC molecule * newspecies ( const char label[],
enum spectype type,
enum mole_state state,
realnum form_enthalpy )

Definition at line 534 of file mole_species.cpp.

References newspecies(), state, and STATIC.

Referenced by t_mole_global::make_species(), newspecies(), newspecies(), and read_species_file().

Here is the call graph for this function:

◆ newspecies() [2/2]

STATIC molecule * newspecies ( const char label[],
enum spectype type,
enum mole_state state,
realnum form_enthalpy,
bool lgCreateIsotopologues )

◆ parse_species_label() [1/2]

bool parse_species_label ( const char label[],
ChemAtomList & atomsLeftToRight,
vector< int > & numAtoms,
string & embellishments )

Definition at line 678 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:

◆ parse_species_label() [2/2]

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

Definition at line 685 of file mole_species.cpp.

References ASSERT, CHARS_ISOTOPE_SYM, CHARS_SPECIES, dense, findatom(), count_ptr< T >::get_ptr(), ioQQQ, and trace.

Here is the call graph for this function:

◆ read_species_file()

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

Definition at line 359 of file mole_species.cpp.

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

Referenced by t_mole_global::make_species().

Here is the call graph for this function:

◆ ReadIsotopeFractions()

STATIC void ReadIsotopeFractions ( const vector< bool > & lgResolveNelem)

Definition at line 104 of file mole_species.cpp.

References ASSERT, DEBUG_ENTRY, element_list, FFmtRead(), fixit(), INPUT_LINE_LENGTH, ipCARBON, newisotope(), open_data(), read_whole_line(), and STATIC.

Referenced by t_mole_global::make_species().

Here is the call graph for this function:

◆ total_molecule_deut()

void total_molecule_deut ( realnum & total_f)

Definition at line 1034 of file mole_species.cpp.

References DEBUG_ENTRY, deut, mole, and mole_global.

Referenced by mole_return_cached_species(), and SetDeuteriumIonization().

◆ total_molecule_elems()

void total_molecule_elems ( realnum total[LIMELM])

Definition at line 1063 of file mole_species.cpp.

References ASSERT, DEBUG_ENTRY, ipHYDROGEN, LIMELM, mole, and mole_global.

Referenced by t_dense::updateXMolecules().

◆ total_molecules()

realnum total_molecules ( void )

Definition at line 1109 of file mole_species.cpp.

References DEBUG_ENTRY, mole, and mole_global.

◆ total_molecules_gasphase()

realnum total_molecules_gasphase ( void )

Definition at line 1124 of file mole_species.cpp.

References DEBUG_ENTRY, mole, and mole_global.

Referenced by SumDensities().

◆ total_network_elems()

void total_network_elems ( double total[LIMELM])

Definition at line 1087 of file mole_species.cpp.

References DEBUG_ENTRY, ipHYDROGEN, LIMELM, mole, and mole_global.

Variable Documentation

◆ atom_list

◆ element_list

vector< count_ptr <chem_element> > element_list

Definition at line 69 of file mole_species.cpp.

Referenced by t_mole_global::make_species(), newelement(), and ReadIsotopeFractions().

◆ groupspecies

◆ null_atom

chem_atom* null_atom

Definition at line 68 of file mole_species.cpp.

Referenced by molecule::heavyAtom(), t_mole_global::make_species(), and molcol().

◆ null_element

chem_element* null_element

Definition at line 67 of file mole_species.cpp.

Referenced by t_mole_global::make_species().

◆ null_mole

◆ null_molezone

◆ unresolved_atom_list