cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
quantumstate.cpp
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 #include "cddefines.h"
5 #include "quantumstate.h"
6 
7 
8 /*StateJunk set all elements of transition struc to dangerous values */
9 void Junk(qStateProxy st )
10 {
11 
12  DEBUG_ENTRY( "qStateProxy::Junk()" );
13 
15  st.g() = -FLT_MAX;
16 
18  st.ColDen() = -FLT_MAX;
19 
21  st.Pop() = -FLT_MAX;
22 
24  st.DepartCoef() = -FLT_MAX;
25 
27  st.IonStg() = -10000;
28 
30  st.nelem() = -10000;
31 
32  st.n()=st.l()=st.S()=st.j()=st.v()=st.J()=-1;
33 
34  st.status() = LEVEL_ACTIVE;
35 
36  return;
37 }
38 
39 /*StateZero zeros out the structure */
40 void Zero( qStateProxy st)
41 {
42 
43  DEBUG_ENTRY( "qStateProxy::Zero()" );
44 
46  st.Pop() = 0.;
48  st.DepartCoef() = 0.;
49  return;
50 }
51 
52 string qStateProxy::chLabel() const
53 {
54  ostringstream oss;
55  oss << m_list->chLabel()<<'['<<m_index+1<<']';
56  return oss.str();
57 }
59 {
60  ostringstream oss;
61  oss << m_list->chLabel()<<'['<<m_index+1<<']';
62  return oss.str();
63 }
long & j() const
Definition: quantumstate.h:257
int & IonStg() const
Definition: quantumstate.h:217
long & l() const
Definition: quantumstate.h:245
long & v() const
Definition: quantumstate.h:253
double & Pop() const
Definition: quantumstate.h:202
long & n() const
Definition: quantumstate.h:241
enum level_status & status() const
Definition: quantumstate.h:265
double & ColDen() const
Definition: quantumstate.h:212
list_type * m_list
Definition: quantumstate.h:175
double & DepartCoef() const
Definition: quantumstate.h:207
void Junk(qStateProxy st)
Definition: quantumstate.cpp:9
string chLabel() const
#define DEBUG_ENTRY(funcname)
Definition: cddefines.h:723
void Zero(qStateProxy st)
string chLabel() const
realnum & g() const
Definition: quantumstate.h:197
const list_type * m_list
Definition: quantumstate.h:277
int & nelem() const
Definition: quantumstate.h:222
long & S() const
Definition: quantumstate.h:249
long & J() const
Definition: quantumstate.h:261
string chLabel() const
Definition: quantumstate.h:133