Minor cleanup of constructors and destructors
This commit is contained in:
parent
5592a52e0f
commit
2e53890adf
53 changed files with 31 additions and 150 deletions
|
|
@ -64,7 +64,7 @@ public:
|
|||
|
||||
//! Destructor. Does nothing. Class MultiPhase does not take "ownership"
|
||||
//! (i.e. responsibility for destroying) the phase objects.
|
||||
virtual ~MultiPhase();
|
||||
virtual ~MultiPhase() {}
|
||||
|
||||
MultiPhase& operator=(const MultiPhase& right);
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public:
|
|||
|
||||
vcs_SpeciesProperties(size_t indexPhase, size_t indexSpeciesPhase,
|
||||
vcs_VolPhase* owning);
|
||||
virtual ~vcs_SpeciesProperties();
|
||||
virtual ~vcs_SpeciesProperties() {}
|
||||
|
||||
vcs_SpeciesProperties(const vcs_SpeciesProperties& b);
|
||||
vcs_SpeciesProperties& operator=(const vcs_SpeciesProperties& b);
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ public:
|
|||
int m_VCS_UnitsFormat;
|
||||
|
||||
VCS_SPECIES_THERMO(size_t indexPhase, size_t indexSpeciesPhase);
|
||||
virtual ~VCS_SPECIES_THERMO();
|
||||
virtual ~VCS_SPECIES_THERMO() {}
|
||||
|
||||
VCS_SPECIES_THERMO(const VCS_SPECIES_THERMO& b);
|
||||
VCS_SPECIES_THERMO& operator=(const VCS_SPECIES_THERMO& b);
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public:
|
|||
ExtraGlobalRxn(Kinetics* k_ptr);
|
||||
|
||||
//! Destructor
|
||||
virtual ~ExtraGlobalRxn();
|
||||
virtual ~ExtraGlobalRxn() {}
|
||||
|
||||
void setupElemRxnVector(double* RxnVector,
|
||||
int specialSpecies = -1);
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@ class RxnOrders {
|
|||
|
||||
public:
|
||||
//! constructors
|
||||
RxnOrders();
|
||||
RxnOrders() {}
|
||||
|
||||
RxnOrders(const RxnOrders &right);
|
||||
|
||||
~RxnOrders();
|
||||
~RxnOrders() {}
|
||||
|
||||
RxnOrders& operator=(const RxnOrders &right);
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public:
|
|||
ReactionStoichMgr();
|
||||
|
||||
/// Destructor.
|
||||
virtual ~ReactionStoichMgr();
|
||||
virtual ~ReactionStoichMgr() {}
|
||||
|
||||
ReactionStoichMgr(const ReactionStoichMgr& right);
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public:
|
|||
RxnMolChange(Cantera::Kinetics* kinPtr, int irxn);
|
||||
|
||||
//! Destructor
|
||||
~RxnMolChange();
|
||||
~RxnMolChange() {}
|
||||
|
||||
//! Constructor for the object if the object refers to a global reaction
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ public:
|
|||
solveSP(ImplicitSurfChem* surfChemPtr, int bulkFunc = BULK_ETCH);
|
||||
|
||||
//! Destructor. Deletes the integrator.
|
||||
~solveSP();
|
||||
~solveSP() {}
|
||||
|
||||
private:
|
||||
//! Unimplemented private copy constructor
|
||||
|
|
|
|||
|
|
@ -43,8 +43,7 @@ class Func1
|
|||
public:
|
||||
Func1();
|
||||
|
||||
virtual ~Func1();
|
||||
|
||||
virtual ~Func1() {}
|
||||
|
||||
Func1(const Func1& right);
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public:
|
|||
GeneralMatrix& operator=(const GeneralMatrix& right);
|
||||
|
||||
//! Destructor. Does nothing.
|
||||
virtual ~GeneralMatrix();
|
||||
virtual ~GeneralMatrix() {}
|
||||
|
||||
//! Duplicator member function
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ public:
|
|||
//! Copy constructor
|
||||
RootFind(const RootFind& r);
|
||||
|
||||
~RootFind();
|
||||
~RootFind() {}
|
||||
|
||||
//! Assignment operator
|
||||
RootFind& operator=(const RootFind& right);
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ public:
|
|||
//! Constructor for the object
|
||||
solveProb(ResidEval* resid);
|
||||
|
||||
virtual ~solveProb();
|
||||
virtual ~solveProb() {}
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public:
|
|||
* but is not meant to be used in most applications. Use the next
|
||||
* constructor
|
||||
*/
|
||||
Sim1D();
|
||||
Sim1D() {}
|
||||
|
||||
/**
|
||||
* Standard constructor.
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class ConstDensityThermo : public ThermoPhase
|
|||
{
|
||||
public:
|
||||
//! Constructor.
|
||||
ConstDensityThermo();
|
||||
ConstDensityThermo() {}
|
||||
|
||||
//! Copy Constructor
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ public:
|
|||
* density conservation and therefore element conservation
|
||||
* is the more important principle to follow.
|
||||
*/
|
||||
GibbsExcessVPSSTP();
|
||||
GibbsExcessVPSSTP() {}
|
||||
|
||||
//! Copy constructor
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class MineralEQ3 : public StoichSubstanceSSTP
|
|||
{
|
||||
public:
|
||||
//! Default constructor for the StoichSubstanceSSTP class
|
||||
MineralEQ3();
|
||||
MineralEQ3() {}
|
||||
|
||||
//! Construct and initialize a StoichSubstanceSSTP ThermoPhase object
|
||||
//! directly from an ASCII input file
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ public:
|
|||
PDSS& operator=(const PDSS& b);
|
||||
|
||||
//! Destructor for the phase
|
||||
virtual ~PDSS();
|
||||
virtual ~PDSS() {}
|
||||
|
||||
//! Duplication routine for objects which inherit from PDSS
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ class StoichSubstanceSSTP : public SingleSpeciesTP
|
|||
{
|
||||
public:
|
||||
//! Default constructor for the StoichSubstanceSSTP class
|
||||
StoichSubstanceSSTP();
|
||||
StoichSubstanceSSTP() {}
|
||||
|
||||
//! Construct and initialize a StoichSubstanceSSTP ThermoPhase object
|
||||
//! directly from an ASCII input file
|
||||
|
|
@ -521,7 +521,7 @@ public:
|
|||
electrodeElectron& operator=(const electrodeElectron& right);
|
||||
|
||||
//! Destructor
|
||||
virtual ~electrodeElectron();
|
||||
virtual ~electrodeElectron() {}
|
||||
|
||||
void setParametersFromXML(const XML_Node& eosdata);
|
||||
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ public:
|
|||
VPSSMgr(VPStandardStateTP* vptp_ptr, SpeciesThermo* spth = 0);
|
||||
|
||||
//! Destructor
|
||||
virtual ~VPSSMgr();
|
||||
virtual ~VPSSMgr() {}
|
||||
|
||||
//! Copy Constructor
|
||||
VPSSMgr(const VPSSMgr& right);
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ public:
|
|||
LTPspecies& operator=(const LTPspecies& right);
|
||||
|
||||
//! Destructor
|
||||
virtual ~LTPspecies();
|
||||
virtual ~LTPspecies() {}
|
||||
|
||||
//! Duplication routine
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ public:
|
|||
*/
|
||||
Transport(thermo_t* thermo=0, size_t ndim = 1);
|
||||
|
||||
virtual ~Transport();
|
||||
virtual ~Transport() {}
|
||||
Transport(const Transport& right);
|
||||
Transport& operator=(const Transport& right);
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class TransportParams
|
|||
{
|
||||
public:
|
||||
TransportParams();
|
||||
virtual ~TransportParams();
|
||||
virtual ~TransportParams() {}
|
||||
|
||||
//! Local storage of the number of species
|
||||
size_t nsp_;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace Cantera
|
|||
class ConstPressureReactor : public Reactor
|
||||
{
|
||||
public:
|
||||
ConstPressureReactor();
|
||||
ConstPressureReactor() {}
|
||||
|
||||
virtual int type() const {
|
||||
return ConstPressureReactorType;
|
||||
|
|
|
|||
|
|
@ -67,8 +67,6 @@ static int get_modified_time(const std::string& path) {
|
|||
}
|
||||
|
||||
Application::Messages::Messages() :
|
||||
errorMessage(0),
|
||||
errorRoutine(0),
|
||||
logwriter(0)
|
||||
{
|
||||
// install a default logwriter that writes to standard
|
||||
|
|
@ -171,12 +169,8 @@ void Application::ThreadMessages::removeThreadMessages()
|
|||
#endif // THREAD_SAFE_CANTERA
|
||||
|
||||
Application::Application() :
|
||||
inputDirs(0),
|
||||
stop_on_error(false),
|
||||
options(),
|
||||
xmlfiles(),
|
||||
m_suppress_deprecation_warnings(false),
|
||||
pMessenger()
|
||||
m_suppress_deprecation_warnings(false)
|
||||
{
|
||||
#if !defined( THREAD_SAFE_CANTERA )
|
||||
pMessenger = std::auto_ptr<Messages>(new Messages());
|
||||
|
|
|
|||
|
|
@ -162,9 +162,7 @@ private:
|
|||
|
||||
//! Units class constructor, containing the default mappings between
|
||||
//! strings and units.
|
||||
Unit() :
|
||||
m_u(),
|
||||
m_act_u() {
|
||||
Unit() {
|
||||
|
||||
// unity
|
||||
m_u["1"] = 1.0;
|
||||
|
|
|
|||
|
|
@ -42,10 +42,6 @@ MultiPhase::MultiPhase(const MultiPhase& right) :
|
|||
operator=(right);
|
||||
}
|
||||
|
||||
MultiPhase::~MultiPhase()
|
||||
{
|
||||
}
|
||||
|
||||
MultiPhase& MultiPhase::operator=(const MultiPhase& right)
|
||||
{
|
||||
if (&right != this) {
|
||||
|
|
|
|||
|
|
@ -23,10 +23,6 @@ vcs_SpeciesProperties::vcs_SpeciesProperties(size_t indexPhase,
|
|||
{
|
||||
}
|
||||
|
||||
vcs_SpeciesProperties::~vcs_SpeciesProperties()
|
||||
{
|
||||
}
|
||||
|
||||
vcs_SpeciesProperties::vcs_SpeciesProperties(const vcs_SpeciesProperties& b) :
|
||||
IndexPhase(b.IndexPhase),
|
||||
IndexSpeciesPhase(b.IndexSpeciesPhase),
|
||||
|
|
|
|||
|
|
@ -43,10 +43,6 @@ VCS_SPECIES_THERMO::VCS_SPECIES_THERMO(size_t indexPhase,
|
|||
SS0_Pref = 1.01325E5;
|
||||
}
|
||||
|
||||
VCS_SPECIES_THERMO::~VCS_SPECIES_THERMO()
|
||||
{
|
||||
}
|
||||
|
||||
VCS_SPECIES_THERMO::VCS_SPECIES_THERMO(const VCS_SPECIES_THERMO& b) :
|
||||
IndexPhase(b.IndexPhase),
|
||||
IndexSpeciesPhase(b.IndexSpeciesPhase),
|
||||
|
|
|
|||
|
|
@ -107,10 +107,6 @@ ExtraGlobalRxn::ExtraGlobalRxn(Kinetics* k_ptr) :
|
|||
m_nKinSpecies = m_kinetics->nTotalSpecies();
|
||||
}
|
||||
//============================================================================================================
|
||||
ExtraGlobalRxn::~ExtraGlobalRxn()
|
||||
{
|
||||
}
|
||||
//============================================================================================================
|
||||
void ExtraGlobalRxn::setupElemRxnVector(double* RxnVector,
|
||||
int specialSpecies)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1369,14 +1369,6 @@ void EdgeKinetics::finalize()
|
|||
m_finalized = true;
|
||||
}
|
||||
|
||||
RxnOrders::RxnOrders()
|
||||
{
|
||||
}
|
||||
|
||||
RxnOrders::~RxnOrders()
|
||||
{
|
||||
}
|
||||
|
||||
RxnOrders::RxnOrders(const RxnOrders& right) :
|
||||
kinSpeciesIDs_(right.kinSpeciesIDs_),
|
||||
kinSpeciesOrders_(right.kinSpeciesOrders_)
|
||||
|
|
|
|||
|
|
@ -24,10 +24,6 @@ ReactionStoichMgr::ReactionStoichMgr()
|
|||
m_dummy.resize(10,1.0);
|
||||
}
|
||||
|
||||
ReactionStoichMgr::~ReactionStoichMgr()
|
||||
{
|
||||
}
|
||||
|
||||
ReactionStoichMgr::ReactionStoichMgr(const ReactionStoichMgr& right) :
|
||||
m_reactants(right.m_reactants),
|
||||
m_revproducts(right.m_revproducts),
|
||||
|
|
|
|||
|
|
@ -154,11 +154,5 @@ RxnMolChange::RxnMolChange(Cantera::Kinetics* kinPtr, Cantera::ExtraGlobalRxn* e
|
|||
|
||||
}
|
||||
|
||||
|
||||
RxnMolChange::~RxnMolChange()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -128,10 +128,6 @@ solveSP::solveSP(ImplicitSurfChem* surfChemPtr, int bulkFunc) :
|
|||
m_Jac.resize(dim1, dim1, 0.0);
|
||||
}
|
||||
|
||||
solveSP::~solveSP()
|
||||
{
|
||||
}
|
||||
|
||||
int solveSP::solveSurfProb(int ifunc, doublereal time_scale, doublereal TKelvin,
|
||||
doublereal PGas, doublereal reltol, doublereal abstol)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ DenseMatrix::DenseMatrix() :
|
|||
|
||||
DenseMatrix::DenseMatrix(size_t n, size_t m, doublereal v) :
|
||||
Array2D(n, m, v),
|
||||
m_ipiv(0),
|
||||
m_useReturnErrorCode(0),
|
||||
m_printLevel(0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,10 +23,6 @@ Func1::Func1(const Func1& right) :
|
|||
{
|
||||
}
|
||||
|
||||
Func1::~Func1()
|
||||
{
|
||||
}
|
||||
|
||||
Func1& Func1::operator=(const Func1& right)
|
||||
{
|
||||
if (&right == this) {
|
||||
|
|
|
|||
|
|
@ -37,8 +37,4 @@ GeneralMatrix& GeneralMatrix::operator=(const GeneralMatrix& y)
|
|||
return *this;
|
||||
}
|
||||
|
||||
GeneralMatrix::~GeneralMatrix()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,10 +93,6 @@ RootFind::RootFind(const RootFind& r) :
|
|||
*this = r;
|
||||
}
|
||||
|
||||
RootFind::~RootFind()
|
||||
{
|
||||
}
|
||||
|
||||
RootFind& RootFind::operator=(const RootFind& right)
|
||||
{
|
||||
if (this == &right) {
|
||||
|
|
|
|||
|
|
@ -58,10 +58,6 @@ solveProb::solveProb(ResidEval* resid) :
|
|||
|
||||
}
|
||||
|
||||
solveProb::~solveProb()
|
||||
{
|
||||
}
|
||||
|
||||
int solveProb::solve(int ifunc, doublereal time_scale,
|
||||
doublereal reltol)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,10 +15,6 @@ using namespace std;
|
|||
namespace Cantera
|
||||
{
|
||||
|
||||
Sim1D::Sim1D()
|
||||
{
|
||||
}
|
||||
|
||||
Sim1D::Sim1D(vector<Domain1D*>& domains) :
|
||||
OneDim(domains)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,11 +15,6 @@ using namespace ctml;
|
|||
namespace Cantera
|
||||
{
|
||||
|
||||
ConstDensityThermo::ConstDensityThermo()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ConstDensityThermo::ConstDensityThermo(const ConstDensityThermo& right)
|
||||
{
|
||||
*this = right;
|
||||
|
|
|
|||
|
|
@ -23,10 +23,6 @@ using namespace std;
|
|||
namespace Cantera
|
||||
{
|
||||
|
||||
GibbsExcessVPSSTP::GibbsExcessVPSSTP()
|
||||
{
|
||||
}
|
||||
|
||||
GibbsExcessVPSSTP::GibbsExcessVPSSTP(const GibbsExcessVPSSTP& b)
|
||||
{
|
||||
GibbsExcessVPSSTP::operator=(b);
|
||||
|
|
|
|||
|
|
@ -27,10 +27,6 @@ namespace Cantera
|
|||
* ---- Constructors -------
|
||||
*/
|
||||
|
||||
MineralEQ3::MineralEQ3()
|
||||
{
|
||||
}
|
||||
|
||||
MineralEQ3::MineralEQ3(const std::string& infile, std::string id_)
|
||||
{
|
||||
XML_Node* root = get_XML_File(infile);
|
||||
|
|
|
|||
|
|
@ -152,10 +152,6 @@ PDSS& PDSS::operator=(const PDSS& b)
|
|||
return *this;
|
||||
}
|
||||
|
||||
PDSS::~PDSS()
|
||||
{
|
||||
}
|
||||
|
||||
PDSS* PDSS::duplMyselfAsPDSS() const
|
||||
{
|
||||
return new PDSS(*this);
|
||||
|
|
|
|||
|
|
@ -24,10 +24,6 @@ namespace Cantera
|
|||
* ---- Constructors -------
|
||||
*/
|
||||
|
||||
StoichSubstanceSSTP::StoichSubstanceSSTP()
|
||||
{
|
||||
}
|
||||
|
||||
StoichSubstanceSSTP::StoichSubstanceSSTP(const std::string& infile, std::string id_)
|
||||
{
|
||||
XML_Node* root = get_XML_File(infile);
|
||||
|
|
@ -315,10 +311,6 @@ electrodeElectron::operator=(const electrodeElectron& right)
|
|||
return *this;
|
||||
}
|
||||
|
||||
electrodeElectron::~electrodeElectron()
|
||||
{
|
||||
}
|
||||
|
||||
void electrodeElectron::setParametersFromXML(const XML_Node& eosdata)
|
||||
{
|
||||
if (eosdata["model"] != "electrodeElectron") {
|
||||
|
|
|
|||
|
|
@ -42,10 +42,6 @@ VPSSMgr::VPSSMgr(VPStandardStateTP* vptp_ptr, SpeciesThermo* spthermo) :
|
|||
}
|
||||
}
|
||||
|
||||
VPSSMgr::~VPSSMgr()
|
||||
{
|
||||
}
|
||||
|
||||
VPSSMgr::VPSSMgr(const VPSSMgr& right) :
|
||||
m_kk(0),
|
||||
m_vptp_ptr(0),
|
||||
|
|
|
|||
|
|
@ -91,10 +91,6 @@ LTPspecies* LTPspecies::duplMyselfAsLTPspecies() const
|
|||
return new LTPspecies(*this);
|
||||
}
|
||||
|
||||
LTPspecies::~LTPspecies()
|
||||
{
|
||||
}
|
||||
|
||||
doublereal LTPspecies::getSpeciesTransProp()
|
||||
{
|
||||
return 0.0;
|
||||
|
|
|
|||
|
|
@ -213,14 +213,6 @@ double MMCollisionInt::cstar_table[39*8] = {
|
|||
0.94444, 0.94444,0.94444,0.94444,0.94444,0.94444,0.94444,0.94444
|
||||
};
|
||||
|
||||
MMCollisionInt::MMCollisionInt()
|
||||
{
|
||||
}
|
||||
|
||||
MMCollisionInt::~MMCollisionInt()
|
||||
{
|
||||
}
|
||||
|
||||
void MMCollisionInt::init(doublereal tsmin, doublereal tsmax, int log_level)
|
||||
{
|
||||
m_loglevel = log_level;
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ namespace Cantera
|
|||
class MMCollisionInt
|
||||
{
|
||||
public:
|
||||
MMCollisionInt();
|
||||
virtual ~MMCollisionInt();
|
||||
MMCollisionInt() {}
|
||||
virtual ~MMCollisionInt() {}
|
||||
|
||||
//! Initialize the object for calculation
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -45,10 +45,6 @@ Transport* Transport::duplMyselfAsTransport() const
|
|||
return new Transport(*this);
|
||||
}
|
||||
|
||||
Transport::~Transport()
|
||||
{
|
||||
}
|
||||
|
||||
bool Transport::ready()
|
||||
{
|
||||
return m_ready;
|
||||
|
|
|
|||
|
|
@ -24,10 +24,6 @@ TransportParams::TransportParams() :
|
|||
{
|
||||
}
|
||||
|
||||
TransportParams::~TransportParams()
|
||||
{
|
||||
}
|
||||
|
||||
GasTransportParams::GasTransportParams() :
|
||||
TransportParams(),
|
||||
visccoeffs(0),
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@ using namespace std;
|
|||
namespace Cantera
|
||||
{
|
||||
|
||||
ConstPressureReactor::ConstPressureReactor() : Reactor() {}
|
||||
|
||||
void ConstPressureReactor::getInitialConditions(double t0, size_t leny, double* y)
|
||||
{
|
||||
if (m_thermo == 0) {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ using namespace std;
|
|||
|
||||
namespace Cantera
|
||||
{
|
||||
Reactor::Reactor() : ReactorBase(),
|
||||
Reactor::Reactor() :
|
||||
m_kin(0),
|
||||
m_vdot(0.0),
|
||||
m_Q(0.0),
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ using namespace std;
|
|||
namespace Cantera
|
||||
{
|
||||
|
||||
ReactorNet::ReactorNet() : Cantera::FuncEval(),
|
||||
ReactorNet::ReactorNet() :
|
||||
m_integ(0), m_time(0.0), m_init(false), m_integrator_init(false),
|
||||
m_nv(0), m_rtol(1.0e-9), m_rtolsens(1.0e-4),
|
||||
m_atols(1.0e-15), m_atolsens(1.0e-4),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue