Added assignment operator to GasKineticsData
This commit is contained in:
parent
e98ae73fc1
commit
b7bc8a8eb6
2 changed files with 72 additions and 16 deletions
|
|
@ -29,6 +29,52 @@ using namespace std;
|
|||
|
||||
namespace Cantera {
|
||||
|
||||
//====================================================================================================================
|
||||
GasKineticsData::GasKineticsData() :
|
||||
m_logp_ref(0.0),
|
||||
m_logc_ref(0.0),
|
||||
m_logStandConc(0.0),
|
||||
m_ROP_ok(false),
|
||||
m_temp(0.0)
|
||||
{
|
||||
}
|
||||
//====================================================================================================================
|
||||
GasKineticsData::GasKineticsData(const GasKineticsData &right) :
|
||||
m_logp_ref(0.0),
|
||||
m_logc_ref(0.0),
|
||||
m_logStandConc(0.0),
|
||||
m_ROP_ok(false),
|
||||
m_temp(0.0)
|
||||
{
|
||||
*this = right;
|
||||
}
|
||||
//====================================================================================================================
|
||||
GasKineticsData::~GasKineticsData()
|
||||
{
|
||||
}
|
||||
//====================================================================================================================
|
||||
GasKineticsData& GasKineticsData::operator=(const GasKineticsData &right)
|
||||
{
|
||||
if (this == &right) return *this;
|
||||
|
||||
m_logp_ref = right.m_logp_ref;
|
||||
m_logc_ref = right.m_logc_ref;
|
||||
m_logStandConc = right.m_logStandConc;
|
||||
m_ropf = right.m_ropf;
|
||||
m_ropr = right.m_ropr;
|
||||
m_ropnet = right.m_ropnet;
|
||||
m_rfn_low = right.m_rfn_low;
|
||||
m_rfn_high = right.m_rfn_high;
|
||||
m_ROP_ok = right.m_ROP_ok;
|
||||
m_temp = right.m_temp;
|
||||
m_rfn = right.m_rfn;
|
||||
falloff_work = right.falloff_work;
|
||||
concm_3b_values = right.concm_3b_values;
|
||||
concm_falloff_values = right.concm_falloff_values;
|
||||
m_rkcn = right.m_rkcn;
|
||||
|
||||
return *this;
|
||||
}
|
||||
//====================================================================================================================
|
||||
/*
|
||||
* Construct an empty reaction mechanism.
|
||||
|
|
@ -43,9 +89,9 @@ namespace Cantera {
|
|||
m_finalized(false)
|
||||
{
|
||||
if (thermo != 0) addPhase(*thermo);
|
||||
m_kdata = new GasKineticsData;
|
||||
m_kdata = new GasKineticsData();
|
||||
m_kdata->m_temp = 0.0;
|
||||
m_rxnstoich = new ReactionStoichMgr;
|
||||
m_rxnstoich = new ReactionStoichMgr();
|
||||
}
|
||||
|
||||
//====================================================================================================================
|
||||
|
|
@ -83,7 +129,10 @@ namespace Cantera {
|
|||
m_3b_concm = right.m_3b_concm;
|
||||
m_falloff_concm = right.m_falloff_concm;
|
||||
m_irrev = right.m_irrev;
|
||||
m_rxnstoich = right.m_rxnstoich;
|
||||
|
||||
// needs updating
|
||||
m_rxnstoich = (right.m_rxnstoich);
|
||||
|
||||
m_fwdOrder = right.m_fwdOrder;
|
||||
m_nirrev = right.m_nirrev;
|
||||
m_nrev = right.m_nrev;
|
||||
|
|
@ -95,7 +144,9 @@ namespace Cantera {
|
|||
m_dn = right.m_dn;
|
||||
m_revindex = right.m_revindex;
|
||||
m_rxneqn = right.m_rxneqn;
|
||||
m_kdata = right.m_kdata;
|
||||
|
||||
*m_kdata = *(right.m_kdata);
|
||||
|
||||
m_conc = right.m_conc;
|
||||
m_grt = right.m_grt;
|
||||
m_finalized = right.m_finalized;
|
||||
|
|
|
|||
|
|
@ -46,22 +46,27 @@ namespace Cantera {
|
|||
*/
|
||||
class GasKineticsData {
|
||||
public:
|
||||
GasKineticsData() :
|
||||
m_logp_ref(0.0),
|
||||
m_logc_ref(0.0),
|
||||
m_logStandConc(0.0),
|
||||
m_ROP_ok(false),
|
||||
m_temp(0.0)
|
||||
{}
|
||||
virtual ~GasKineticsData(){}
|
||||
|
||||
doublereal m_logp_ref, m_logc_ref, m_logStandConc;
|
||||
array_fp m_ropf, m_ropr, m_ropnet;
|
||||
array_fp m_rfn_low, m_rfn_high;
|
||||
GasKineticsData();
|
||||
|
||||
GasKineticsData(const GasKineticsData &right);
|
||||
|
||||
virtual ~GasKineticsData();
|
||||
|
||||
GasKineticsData& operator=(const GasKineticsData &right);
|
||||
|
||||
doublereal m_logp_ref;
|
||||
doublereal m_logc_ref;
|
||||
doublereal m_logStandConc;
|
||||
array_fp m_ropf;
|
||||
array_fp m_ropr;
|
||||
array_fp m_ropnet;
|
||||
array_fp m_rfn_low;
|
||||
array_fp m_rfn_high;
|
||||
bool m_ROP_ok;
|
||||
|
||||
doublereal m_temp;
|
||||
array_fp m_rfn;
|
||||
array_fp m_rfn;
|
||||
array_fp falloff_work;
|
||||
array_fp concm_3b_values;
|
||||
array_fp concm_falloff_values;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue