mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-09-05 04:40:19 -05:00
PIDAndIterationCountTimeStepControl: add serialization support
This commit is contained in:
@@ -242,6 +242,12 @@ namespace Opm
|
||||
, minTimeStepBasedOnIterations_(minTimeStepBasedOnIterations)
|
||||
{}
|
||||
|
||||
PIDAndIterationCountTimeStepControl
|
||||
PIDAndIterationCountTimeStepControl::serializationTestObject()
|
||||
{
|
||||
return {1, 2.0, 3.0, 4.0, 5.0, true};
|
||||
}
|
||||
|
||||
double PIDAndIterationCountTimeStepControl::
|
||||
computeTimeStepSize( const double dt, const int iterations, const RelativeChangeInterface& relChange, const double simulationTimeElapsed ) const
|
||||
{
|
||||
@@ -264,4 +270,13 @@ namespace Opm
|
||||
return std::min(dtEstimatePID, dtEstimateIter);
|
||||
}
|
||||
|
||||
bool PIDAndIterationCountTimeStepControl::operator==(const PIDAndIterationCountTimeStepControl& ctrl) const
|
||||
{
|
||||
return static_cast<const PIDTimeStepControl&>(*this) == ctrl &&
|
||||
this->target_iterations_ == ctrl.target_iterations_ &&
|
||||
this->decayDampingFactor_ == ctrl.decayDampingFactor_ &&
|
||||
this->growthDampingFactor_ == ctrl.growthDampingFactor_ &&
|
||||
this->minTimeStepBasedOnIterations_ == ctrl.minTimeStepBasedOnIterations_;
|
||||
}
|
||||
|
||||
} // end namespace Opm
|
||||
|
||||
Reference in New Issue
Block a user