Cantera  2.4.0
SolidTransportData.cpp
Go to the documentation of this file.
1 /**
2  * @file SolidTransportData.cpp
3  * Source code for solid transport property evaluations.
4  */
5 
6 // This file is part of Cantera. See License.txt in the top-level directory or
7 // at http://www.cantera.org/license.txt for license and copyright information.
8 
10 
11 using namespace std;
12 
13 namespace Cantera
14 {
15 SolidTransportData::SolidTransportData() :
16  speciesName("-"),
17  ionConductivity(0),
18  thermalConductivity(0),
19  electConductivity(0),
20  defectDiffusivity(0),
21  defectActivity(0)
22 {
23  warn_deprecated("Class SolidTransportData", "To be removed after Cantera 2.4");
24 }
25 
26 SolidTransportData::SolidTransportData(const SolidTransportData& right) :
27  speciesName("-"),
28  ionConductivity(0),
29  thermalConductivity(0),
30  electConductivity(0),
31  defectDiffusivity(0),
32  defectActivity(0)
33 {
34  *this = right; //use assignment operator to do other work
35 }
36 
37 SolidTransportData& SolidTransportData::operator=(const SolidTransportData& right)
38 {
39  if (&right != this) {
40  // These are all shallow pointer copies - yes, yes, yes horrible crime.
41  speciesName = right.speciesName;
42  if (right.ionConductivity) {
43  ionConductivity = (right.ionConductivity)->duplMyselfAsLTPspecies();
44  }
45 
46  if (right.thermalConductivity) {
47  thermalConductivity = (right.thermalConductivity)->duplMyselfAsLTPspecies();
48  }
49  if (right.electConductivity) {
50  electConductivity = (right.electConductivity)->duplMyselfAsLTPspecies();
51  }
52  if (right.defectDiffusivity) {
53  defectDiffusivity = (right.defectDiffusivity)->duplMyselfAsLTPspecies();
54  }
55  if (right.defectActivity) {
56  defectActivity = (right.defectActivity)->duplMyselfAsLTPspecies();
57  }
58  }
59  return *this;
60 }
61 
62 SolidTransportData::~SolidTransportData()
63 {
64  delete ionConductivity;
65  delete thermalConductivity;
66  delete electConductivity;
67  delete defectDiffusivity;
68  delete defectActivity;
69 }
70 
71 }
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.
void warn_deprecated(const std::string &method, const std::string &extra)
Print a warning indicating that method is deprecated.
Definition: global.cpp:54
STL namespace.
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.
Namespace for the Cantera kernel.
Definition: AnyMap.cpp:8