fix some issues introduce by virtualizing this function

you cannot mix virtual and overloads with a default parameter
making the methods indistinguishable.
This commit is contained in:
Arne Morten Kvarving 2017-05-05 11:49:04 +02:00
parent 784d8ee967
commit 02d84c07e2
3 changed files with 10 additions and 4 deletions

View File

@ -53,7 +53,13 @@ public:
}
//! \brief Computes the solution for the current time step.
virtual bool solveStep(TimeStep& tp, bool firstS1 = true)
virtual bool solveStep(TimeStep& tp)
{
return this->solveStep(tp, true);
}
//! \brief Computes the solution for the current time step.
virtual bool solveStep(TimeStep& tp, bool firstS1)
{
if (firstS1)
return S1.solveStep(tp) && S2.solveStep(tp);

View File

@ -32,7 +32,8 @@ public:
virtual ~SIMCoupledSI() {}
//! \brief Computes the solution for the current time step.
virtual bool solveStep(TimeStep& tp, bool firstS1 = true)
using SIMCoupled<T1,T2>::solveStep;
virtual bool solveStep(TimeStep& tp, bool firstS1)
{
if (maxIter <= 0)
maxIter = std::min(this->S1.getMaxit(),this->S2.getMaxit());

View File

@ -128,11 +128,10 @@ public:
return 2;
}
}
return 0;
}
protected:
using SIMSolver<T1>::parse;
//! \brief Parses a data section from an XML element.
virtual bool parse(const TiXmlElement* elem)
{