Cantera  2.0
vcs_SpeciesProperties.cpp
Go to the documentation of this file.
1 /**
2  * @file vcs_SpeciesProperties.cpp
3  */
5 #include "vcs_SpeciesProperties.h"
7 #include "vcs_species_thermo.h"
9 
10 #include <cstdio>
11 #include <cstdlib>
12 #include <cmath>
13 
14 using namespace std;
15 
16 namespace VCSnonideal
17 {
18 
19 /*****************************************************************************
20  *
21  * constructor():
22  */
23 vcs_SpeciesProperties::vcs_SpeciesProperties(size_t indexPhase,
24  size_t indexSpeciesPhase,
25  vcs_VolPhase* owning) :
26  IndexPhase(indexPhase),
27  IndexSpeciesPhase(indexSpeciesPhase),
28  OwningPhase(owning),
29  SpeciesThermo(0),
30  WtSpecies(0.0),
31  Charge(0.0),
32  SurfaceSpecies(0),
33  VolPM(0.0),
34  ReferenceMoleFraction(1.0E-6)
35 {
36 }
37 
38 /******************************************************************************
39  *
40  * destructor
41  */
42 vcs_SpeciesProperties::~vcs_SpeciesProperties()
43 {
44 }
45 
46 /*****************************************************************************
47  *
48  * Copy Constructor vcs_SpeciesProperties
49  */
50 vcs_SpeciesProperties::vcs_SpeciesProperties(const vcs_SpeciesProperties& b) :
51  IndexPhase(b.IndexPhase),
52  IndexSpeciesPhase(b.IndexSpeciesPhase),
53  OwningPhase(b.OwningPhase),
54  NumElements(b.NumElements),
55  SpeciesThermo(b.SpeciesThermo),
56  WtSpecies(b.WtSpecies),
57  Charge(b.Charge),
58  SurfaceSpecies(b.SurfaceSpecies),
59  VolPM(b.VolPM),
60  ReferenceMoleFraction(b.ReferenceMoleFraction)
61 {
62  SpName = b.SpName;
63  FormulaMatrixCol = b.FormulaMatrixCol;
64 }
65 
66 /*****************************************************************************
67  *
68  * Assignment operator for vcs_SpeciesProperties
69  */
70 vcs_SpeciesProperties&
71 vcs_SpeciesProperties::operator=(const vcs_SpeciesProperties& b)
72 {
73  if (&b != this) {
74  IndexPhase = b.IndexPhase;
75  IndexSpeciesPhase = b.IndexSpeciesPhase;
76  OwningPhase = b.OwningPhase;
77  NumElements = b.NumElements;
78  SpName = b.SpName;
79  WtSpecies = b.WtSpecies;
80  FormulaMatrixCol = b.FormulaMatrixCol;
81  Charge = b.Charge;
82  SurfaceSpecies = b.SurfaceSpecies;
83  VolPM = b.VolPM;
84  ReferenceMoleFraction = b.ReferenceMoleFraction;
85  }
86  return *this;
87 }
88 
89 /*****************************************************************************/
90 }
91