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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user