Added parameter to advanceStep to tell if the time should be incremented

git-svn-id: http://svn.sintef.no/trondheim/IFEM/trunk@1309 e10b68d5-8a6e-419e-a041-bce267b0401d
This commit is contained in:
rho
2011-11-29 13:31:53 +00:00
committed by Knut Morten Okstad
parent df1a69bb28
commit 2dff9abdf4
2 changed files with 6 additions and 2 deletions

View File

@@ -132,12 +132,15 @@ void NonLinSIM::init (SolvePrm& param, const RealArray& initVal)
}
bool NonLinSIM::advanceStep (SolvePrm& param)
bool NonLinSIM::advanceStep (SolvePrm& param, bool updateTimePrm)
{
// Update solution vectors between time steps
for (int n = solution.size()-1; n > 0; n--)
solution[n] = solution[n-1];
if (!updateTimePrm)
return true;
return param.increment();
}

View File

@@ -65,7 +65,8 @@ public:
//! \param[in] initVal Initial values of the primary solution
virtual void init(SolvePrm& param, const RealArray& initVal = RealArray());
//! \brief Advances the time/load step one step forward.
virtual bool advanceStep(SolvePrm& param);
//! \param[in] updateTimePrm If the time parameters should be incremented
virtual bool advanceStep(SolvePrm& param, bool updateTimePrm = true);
//! \brief Opens a new VTF-file and writes the model geometry to it.
//! \param[in] fileName File name used to construct the VTF-file name from