Minor cleanup of constructors and destructors

This commit is contained in:
Ray Speth 2015-02-26 21:58:42 +00:00
parent 5592a52e0f
commit 2e53890adf
53 changed files with 31 additions and 150 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -43,7 +43,7 @@ public:
ExtraGlobalRxn(Kinetics* k_ptr);
//! Destructor
virtual ~ExtraGlobalRxn();
virtual ~ExtraGlobalRxn() {}
void setupElemRxnVector(double* RxnVector,
int specialSpecies = -1);

View file

@ -28,11 +28,11 @@ class RxnOrders {
public:
//! constructors
RxnOrders();
RxnOrders() {}
RxnOrders(const RxnOrders &right);
~RxnOrders();
~RxnOrders() {}
RxnOrders& operator=(const RxnOrders &right);

View file

@ -62,7 +62,7 @@ public:
ReactionStoichMgr();
/// Destructor.
virtual ~ReactionStoichMgr();
virtual ~ReactionStoichMgr() {}
ReactionStoichMgr(const ReactionStoichMgr& right);

View file

@ -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
/*!

View file

@ -154,7 +154,7 @@ public:
solveSP(ImplicitSurfChem* surfChemPtr, int bulkFunc = BULK_ETCH);
//! Destructor. Deletes the integrator.
~solveSP();
~solveSP() {}
private:
//! Unimplemented private copy constructor

View file

@ -43,8 +43,7 @@ class Func1
public:
Func1();
virtual ~Func1();
virtual ~Func1() {}
Func1(const Func1& right);

View file

@ -39,7 +39,7 @@ public:
GeneralMatrix& operator=(const GeneralMatrix& right);
//! Destructor. Does nothing.
virtual ~GeneralMatrix();
virtual ~GeneralMatrix() {}
//! Duplicator member function
/*!

View file

@ -140,7 +140,7 @@ public:
//! Copy constructor
RootFind(const RootFind& r);
~RootFind();
~RootFind() {}
//! Assignment operator
RootFind& operator=(const RootFind& right);

View file

@ -142,7 +142,7 @@ public:
//! Constructor for the object
solveProb(ResidEval* resid);
virtual ~solveProb();
virtual ~solveProb() {}
private:

View file

@ -25,7 +25,7 @@ public:
* but is not meant to be used in most applications. Use the next
* constructor
*/
Sim1D();
Sim1D() {}
/**
* Standard constructor.

View file

@ -29,7 +29,7 @@ class ConstDensityThermo : public ThermoPhase
{
public:
//! Constructor.
ConstDensityThermo();
ConstDensityThermo() {}
//! Copy Constructor
/*!

View file

@ -108,7 +108,7 @@ public:
* density conservation and therefore element conservation
* is the more important principle to follow.
*/
GibbsExcessVPSSTP();
GibbsExcessVPSSTP() {}
//! Copy constructor
/*!

View file

@ -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

View 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
/*!

View file

@ -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);

View file

@ -246,7 +246,7 @@ public:
VPSSMgr(VPStandardStateTP* vptp_ptr, SpeciesThermo* spth = 0);
//! Destructor
virtual ~VPSSMgr();
virtual ~VPSSMgr() {}
//! Copy Constructor
VPSSMgr(const VPSSMgr& right);

View file

@ -105,7 +105,7 @@ public:
LTPspecies& operator=(const LTPspecies& right);
//! Destructor
virtual ~LTPspecies();
virtual ~LTPspecies() {}
//! Duplication routine
/*!

View file

@ -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);

View file

@ -21,7 +21,7 @@ class TransportParams
{
public:
TransportParams();
virtual ~TransportParams();
virtual ~TransportParams() {}
//! Local storage of the number of species
size_t nsp_;

View file

@ -23,7 +23,7 @@ namespace Cantera
class ConstPressureReactor : public Reactor
{
public:
ConstPressureReactor();
ConstPressureReactor() {}
virtual int type() const {
return ConstPressureReactorType;

View file

@ -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());

View file

@ -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;

View file

@ -42,10 +42,6 @@ MultiPhase::MultiPhase(const MultiPhase& right) :
operator=(right);
}
MultiPhase::~MultiPhase()
{
}
MultiPhase& MultiPhase::operator=(const MultiPhase& right)
{
if (&right != this) {

View file

@ -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),

View file

@ -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),

View file

@ -107,10 +107,6 @@ ExtraGlobalRxn::ExtraGlobalRxn(Kinetics* k_ptr) :
m_nKinSpecies = m_kinetics->nTotalSpecies();
}
//============================================================================================================
ExtraGlobalRxn::~ExtraGlobalRxn()
{
}
//============================================================================================================
void ExtraGlobalRxn::setupElemRxnVector(double* RxnVector,
int specialSpecies)
{

View file

@ -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_)

View file

@ -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),

View file

@ -154,11 +154,5 @@ RxnMolChange::RxnMolChange(Cantera::Kinetics* kinPtr, Cantera::ExtraGlobalRxn* e
}
RxnMolChange::~RxnMolChange()
{
}
}

View file

@ -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)
{

View file

@ -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)
{

View file

@ -23,10 +23,6 @@ Func1::Func1(const Func1& right) :
{
}
Func1::~Func1()
{
}
Func1& Func1::operator=(const Func1& right)
{
if (&right == this) {

View file

@ -37,8 +37,4 @@ GeneralMatrix& GeneralMatrix::operator=(const GeneralMatrix& y)
return *this;
}
GeneralMatrix::~GeneralMatrix()
{
}
}

View file

@ -93,10 +93,6 @@ RootFind::RootFind(const RootFind& r) :
*this = r;
}
RootFind::~RootFind()
{
}
RootFind& RootFind::operator=(const RootFind& right)
{
if (this == &right) {

View file

@ -58,10 +58,6 @@ solveProb::solveProb(ResidEval* resid) :
}
solveProb::~solveProb()
{
}
int solveProb::solve(int ifunc, doublereal time_scale,
doublereal reltol)
{

View file

@ -15,10 +15,6 @@ using namespace std;
namespace Cantera
{
Sim1D::Sim1D()
{
}
Sim1D::Sim1D(vector<Domain1D*>& domains) :
OneDim(domains)
{

View file

@ -15,11 +15,6 @@ using namespace ctml;
namespace Cantera
{
ConstDensityThermo::ConstDensityThermo()
{
}
ConstDensityThermo::ConstDensityThermo(const ConstDensityThermo& right)
{
*this = right;

View file

@ -23,10 +23,6 @@ using namespace std;
namespace Cantera
{
GibbsExcessVPSSTP::GibbsExcessVPSSTP()
{
}
GibbsExcessVPSSTP::GibbsExcessVPSSTP(const GibbsExcessVPSSTP& b)
{
GibbsExcessVPSSTP::operator=(b);

View file

@ -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);

View file

@ -152,10 +152,6 @@ PDSS& PDSS::operator=(const PDSS& b)
return *this;
}
PDSS::~PDSS()
{
}
PDSS* PDSS::duplMyselfAsPDSS() const
{
return new PDSS(*this);

View file

@ -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") {

View file

@ -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),

View file

@ -91,10 +91,6 @@ LTPspecies* LTPspecies::duplMyselfAsLTPspecies() const
return new LTPspecies(*this);
}
LTPspecies::~LTPspecies()
{
}
doublereal LTPspecies::getSpeciesTransProp()
{
return 0.0;

View file

@ -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;

View file

@ -23,8 +23,8 @@ namespace Cantera
class MMCollisionInt
{
public:
MMCollisionInt();
virtual ~MMCollisionInt();
MMCollisionInt() {}
virtual ~MMCollisionInt() {}
//! Initialize the object for calculation
/*!

View file

@ -45,10 +45,6 @@ Transport* Transport::duplMyselfAsTransport() const
return new Transport(*this);
}
Transport::~Transport()
{
}
bool Transport::ready()
{
return m_ready;

View file

@ -24,10 +24,6 @@ TransportParams::TransportParams() :
{
}
TransportParams::~TransportParams()
{
}
GasTransportParams::GasTransportParams() :
TransportParams(),
visccoeffs(0),

View file

@ -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) {

View file

@ -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),

View file

@ -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),