PDSS_IonsFromNeutral does not own the neutralMoleculePhase_ pointer
and the state of the neutralMoleculePhase_ is updated by the VPSSIonsFromNeutral phase object that the PDSS_IonsFromNeutral species object belongs to. Remove neutralMoleculePhase_->setState calls from PDSS_IonsFromNeutral to avoid duplicate work, and make it a const * to reflect that.
This commit is contained in:
parent
d4d1093957
commit
2eba1ee7c8
2 changed files with 1 additions and 5 deletions
|
|
@ -459,7 +459,7 @@ protected:
|
|||
/*!
|
||||
* This is a shallow pointer.
|
||||
*/
|
||||
ThermoPhase* neutralMoleculePhase_;
|
||||
const ThermoPhase* neutralMoleculePhase_;
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -491,7 +491,6 @@ doublereal PDSS_IonsFromNeutral::pressure() const
|
|||
void PDSS_IonsFromNeutral::setPressure(doublereal p)
|
||||
{
|
||||
m_pres = p;
|
||||
neutralMoleculePhase_->setPressure(p);
|
||||
}
|
||||
|
||||
//====================================================================================================================
|
||||
|
|
@ -532,7 +531,6 @@ doublereal PDSS_IonsFromNeutral::temperature() const
|
|||
void PDSS_IonsFromNeutral::setTemperature(doublereal temp)
|
||||
{
|
||||
m_temp = temp;
|
||||
neutralMoleculePhase_->setTemperature(temp);
|
||||
}
|
||||
//====================================================================================================================
|
||||
|
||||
|
|
@ -540,12 +538,10 @@ void PDSS_IonsFromNeutral::setState_TP(doublereal temp, doublereal pres)
|
|||
{
|
||||
m_pres = pres;
|
||||
m_temp = temp;
|
||||
neutralMoleculePhase_->setState_TP(temp, pres);
|
||||
}
|
||||
//====================================================================================================================
|
||||
void PDSS_IonsFromNeutral::setState_TR(doublereal temp, doublereal rho)
|
||||
{
|
||||
neutralMoleculePhase_->setState_TR(temp, rho);
|
||||
}
|
||||
//====================================================================================================================
|
||||
// saturation pressure
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue