Changed: AdaptiveSIM::savePoints does not need a time argument,

as this class is for static/stationary problems only. The iStep
argument is not a time step counter, but a refinement step counter.
Also, the method is made protected.
This commit is contained in:
Knut Morten Okstad
2021-10-04 07:23:06 +02:00
committed by Arne Morten Kvarving
parent 458b245b9f
commit 35b4aa95fa
3 changed files with 14 additions and 15 deletions

View File

@@ -44,12 +44,11 @@ protected:
return true;
}
//! \brief Saves point results to output file for a given time step.
//! \param[in] time Load/time step parameter
//! \param[in] iStep Load/time step counter
bool savePoints(double time, int iStep) const override
//! \brief Saves point results to output file for a given refinement step.
//! \param[in] iStep Refinement step counter
bool savePoints(int iStep) const override
{
return model.savePoints(time, iStep);
return model.savePoints(0.0,iStep);
}
T1& model; //!< Reference to the actual sim

View File

@@ -180,7 +180,7 @@ bool AdaptiveSIM::solveStep (const char* inputfile, int iStep, bool withRF,
model.getProcessAdm().cout,true,precision))
return failure();
if (!this->savePoints(0.0, iStep))
if (!this->savePoints(iStep))
return failure();
return true;
@@ -267,7 +267,7 @@ bool AdaptiveSIM::writeGlv (const char* infile, int iStep)
}
bool AdaptiveSIM::savePoints(double time, int iStep) const
bool AdaptiveSIM::savePoints (int iStep) const
{
return model.savePoints(solution.front(), time, iStep);
return model.savePoints(solution.front(),0.0,iStep);
}

View File

@@ -53,7 +53,7 @@ public:
//! \brief Writes current mesh and results to the VTF-file.
//! \param[in] infile File name used to construct the VTF-file name from
//! \param[in] iStep Refinement step identifier
//! \param[in] iStep Refinement step counter
bool writeGlv(const char* infile, int iStep);
//! \brief Accesses the solution of the linear system.
@@ -78,16 +78,16 @@ public:
//! \param[in] fixDup Merge duplicated FE nodes on patch interfaces?
virtual bool preprocess(const std::vector<int>& ignored, bool fixDup);
//! \brief Saves point results to output file for a given time step.
//! \param[in] time Load/time step parameter
//! \param[in] iStep Load/time step counter
//! \details By default it just forwards to the underlying model
virtual bool savePoints(double time, int iStep) const;
protected:
//! \brief Assembles and solves the linear FE equation system.
virtual bool assembleAndSolveSystem();
//! \brief Saves point results to output file for a given refinement step.
//! \param[in] iStep Refinement step counter
//!
//! \details By default, this method just forwards to the underlying model.
virtual bool savePoints(int iStep) const;
private:
Vectors gNorm; //!< Global norms
Vectors dNorm; //!< Dual global norms