mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
make sure restart file is written if end time changes
if the OF end time gets modified at runtime, we need to update the time setting for invoking the write_restart command if we only want to write at the end of the simulation; otherwise we will either write the file too soon or - probably even worse - not at all
This commit is contained in:
@ -138,6 +138,19 @@ const char* writeLiggghts::command(int commandLine)
|
||||
bool writeLiggghts::runCommand(int couplingStep)
|
||||
{
|
||||
if (!overwrite_) strCommand_ = addTimeStamp(command_);
|
||||
|
||||
// update time settings if restart file is only written at last step and
|
||||
// end time has changed
|
||||
if
|
||||
(
|
||||
runLast_
|
||||
&& particleCloud_.mesh().time().runTimeModifiable()
|
||||
&& particleCloud_.mesh().time().endTime().value() != endTime_
|
||||
)
|
||||
{
|
||||
checkTimeSettings(dict_);
|
||||
}
|
||||
|
||||
return runThisCommand(couplingStep);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user