Cantera  2.1.2
SolidTransportData.cpp
Go to the documentation of this file.
1 /**
2  * @file SolidTransportData.cpp
3  * Source code for solid transport property evaluations.
4  */
5 
7 
8 using namespace std;
9 
10 namespace Cantera
11 {
12 SolidTransportData::SolidTransportData() :
13  speciesName("-"),
14  ionConductivity(0),
15  thermalConductivity(0),
16  electConductivity(0),
17  defectDiffusivity(0),
18  defectActivity(0)
19 {
20 
21 }
22 
23 SolidTransportData::SolidTransportData(const SolidTransportData& right) :
24  speciesName("-"),
25  ionConductivity(0),
26  thermalConductivity(0),
27  electConductivity(0),
28  defectDiffusivity(0),
29  defectActivity(0)
30 {
31  *this = right; //use assignment operator to do other work
32 }
33 
34 SolidTransportData& SolidTransportData::operator=(const SolidTransportData& right)
35 {
36  if (&right != this) {
37  // These are all shallow pointer copies - yes, yes, yes horrible crime.
38  speciesName = right.speciesName;
39  if (right.ionConductivity) {
40  ionConductivity = (right.ionConductivity)->duplMyselfAsLTPspecies();
41  }
42 
43  if (right.thermalConductivity) {
44  thermalConductivity = (right.thermalConductivity)->duplMyselfAsLTPspecies();
45  }
46  if (right.electConductivity) {
47  electConductivity = (right.electConductivity)->duplMyselfAsLTPspecies();
48  }
49  if (right.defectDiffusivity) {
50  defectDiffusivity = (right.defectDiffusivity)->duplMyselfAsLTPspecies();
51  }
52  if (right.defectActivity) {
53  defectActivity = (right.defectActivity)->duplMyselfAsLTPspecies();
54  }
55  }
56  return *this;
57 }
58 
59 SolidTransportData::~SolidTransportData()
60 {
61  delete ionConductivity;
62  delete thermalConductivity;
63  delete electConductivity;
64  delete defectDiffusivity;
65  delete defectActivity;
66 }
67 
68 }
LTPspecies * defectDiffusivity
Model type for the defectDiffusivity – or more like a defect diffusivity in the context of the solid ...
LTPspecies * defectActivity
Model type for the defectActivity.
Header file defining class SolidTransportData.
LTPspecies * electConductivity
Model type for the electrical conductivity.
std::string speciesName
A SolidTransportData object is instantiated for each species.
LTPspecies * ionConductivity
Model type for the ionic conductivity.
LTPspecies * thermalConductivity
Model type for the thermal conductivity.