mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
optional checkTimeStep & reading virtualTimeIndex in the solver
This commit is contained in:
@ -224,6 +224,7 @@ public:
|
||||
}
|
||||
|
||||
virtual void updateRecFields() = 0;
|
||||
virtual label currentTimeIndex() const = 0;
|
||||
|
||||
virtual void writeRecMatrix() const = 0;
|
||||
|
||||
|
||||
@ -63,6 +63,7 @@ standardRecModel::standardRecModel
|
||||
cumulativeNumRecFields_(),
|
||||
totNumRecFields_(0),
|
||||
storeAveragedFields_(propsDict_.lookupOrDefault<bool>("storeAveragedFields",false)),
|
||||
checkTimeStep_(propsDict_.lookupOrDefault<bool>("checkTimeStep",true)),
|
||||
recurrenceMatrix_(1,scalar(-1.0)),
|
||||
timeIndexList_(),
|
||||
timeValueList_(),
|
||||
@ -127,7 +128,11 @@ standardRecModel::standardRecModel
|
||||
|
||||
// check if time steps in databases are consistent
|
||||
// if no initial number of time steps has been specified, create path for full runtime immediately
|
||||
recTimeStep_ = checkTimeStep();
|
||||
if(checkTimeStep_)
|
||||
{
|
||||
recTimeStep_ = checkTimeStep();
|
||||
}
|
||||
|
||||
if(totRecSteps_ < 0)
|
||||
{
|
||||
totRecSteps_ = 1 + static_cast<label>( (endTime_-startTime_) / recTimeStep_ );
|
||||
@ -736,6 +741,10 @@ void standardRecModel::updateRecFields()
|
||||
}
|
||||
}
|
||||
|
||||
label standardRecModel::currentTimeIndex() const
|
||||
{
|
||||
return virtualTimeIndex;
|
||||
}
|
||||
|
||||
void standardRecModel::writeRecMatrix() const
|
||||
{
|
||||
|
||||
@ -61,6 +61,7 @@ protected:
|
||||
label totNumRecFields_;
|
||||
|
||||
bool storeAveragedFields_;
|
||||
bool checkTimeStep_;
|
||||
|
||||
// matrix that contains the recurrence ERROR
|
||||
SymmetricSquareMatrix<scalar> recurrenceMatrix_;
|
||||
@ -151,6 +152,7 @@ public:
|
||||
label numDataBaseFields() const;
|
||||
|
||||
void updateRecFields();
|
||||
label currentTimeIndex() const;
|
||||
|
||||
void writeRecMatrix() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user