cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
species.h
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2022 by Gary J. Ferland and
2  * others. For conditions of distribution and use see copyright notice in license.txt */
3 
4 #ifndef SPECIES_H_
5 #define SPECIES_H_
6 
7 /*The species structure is used to hold information about a particular atom,ion or molecule
8 mentioned in the species.ini file.The name of the atom/ion/molecule is used to obtain the density
9 of molecules in the case of the Leiden Database and along with atomic number and ion stage the
10 density of atoms/ions in the case of the CHIANTI database */
11 class species
12 {
13 public:
15  {
16  chLabel = NULL;
17  database = "";
18  index = INT_MAX;
19  numLevels_max = -INT_MAX;
20  setLevels = -1;
21  numLevels_local = -INT_MAX;
23  fmolweight = realnum(0.);
24  lgMolecular = false;
25  fracType = realnum(0.);
27  CoolTotal = 0.;
28  lgActive = false;
29  maxWN = 0.;
30  lgLTE = false;
31  lgPrtMatrix = false;
32  }
34  {
35  delete[] chLabel;
36  }
37  /*Name of the atom/ion/ molecule*/
38  char *chLabel;
39  /* Database origin */
40  string database;
41  // index in chemistry
42  long index;
43  /*Actual Number of energy levels in the data file*/
45  /*Number of levels defined in "species" command */
46  long setLevels;
47  /*Number of energy levels used locally*/
53  /*Molecular weight*/
55  /* is molecular? */
57  /* fraction in this "type" (e.g. para, ortho) */
59  /* chemical fractionation */
62  double CoolTotal;
64  bool lgActive;
65  /* maximum wavenumber in chianti */
66  double maxWN;
68  bool lgLTE;
71 };
72 
74 {
77  long nBins;
78 };
79 
81 
82 void parsespect(char* chLabel, long& nelem, long& IonStg);
83 string makeChemical(long nelem, long ion);
84 void makeChemical(char* chLabelChemical, long nelem, long ion);
85 void spectral_to_chemical( char *chLabelChemical, char* chLabel );
86 void chemical_to_spectral( const string chLabelChem, string &chLabelSpec );
87 
88 class genericState;
89 
95 void getSpecies( const string &speciesLabel, genericState &species );
96 
97 #endif /* SPECIES_ */
bool lgPrtMatrix
Definition: species.h:70
bool lgActive
Definition: species.h:64
realnum fmolweight
Definition: species.h:54
long nBins
Definition: species.h:77
realnum wlHi
Definition: species.h:76
void getSpecies(const string &speciesLabel, genericState &species)
double maxWN
Definition: species.h:66
t_pseudo_cont pseudoContDef
long setLevels
Definition: species.h:46
STATIC void spectral_to_chemical(char *chLabelChemical, char *chLabel, long &nelem, long &IonStg)
Definition: species.cpp:954
long numLevels_masterlist
Definition: species.h:52
realnum fracIsotopologue
Definition: species.h:60
string database
Definition: species.h:40
species()
Definition: species.h:14
void chemical_to_spectral(const string chLabelChem, string &chLabelSpec)
Definition: species.cpp:983
long numLevels_local
Definition: species.h:48
realnum wlLo
Definition: species.h:75
float realnum
Definition: cddefines.h:124
realnum fracType
Definition: species.h:58
void parsespect(char *chLabel, long &nelem, long &IonStg)
Definition: species.cpp:900
char * chLabel
Definition: species.h:38
long index
Definition: species.h:42
string makeChemical(long nelem, long ion)
Definition: species.cpp:929
long numLevels_max
Definition: species.h:44
bool lgMolecular
Definition: species.h:56
double CoolTotal
Definition: species.h:62
~species()
Definition: species.h:33
bool lgLTE
Definition: species.h:68