functionObjects: Fixes to restart and run-time modification behaviour

All function objects now re-read as a result of run-time modifications
to the system/controlDict.

Function objects that write log files (via the logFiles class) will now
generate a new postProcessing/<funcName>/<time> directory as a result of
either restart or run-time modification. Log files will therefore never
be overwritten by restart or run-time modification, except for when a
case is restarted at the same time as a previous execution (e.g.,
repeated runs at the start time).
This commit is contained in:
Will Bainbridge
2021-01-22 10:34:37 +00:00
parent 4e301e9227
commit 3ca14ebe58
24 changed files with 99 additions and 100 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -559,7 +559,6 @@ Foam::functionObjects::forces::forces
initialised_(false)
{
read(dict);
resetNames(createFileNames(dict));
}
@ -594,7 +593,6 @@ Foam::functionObjects::forces::forces
initialised_(false)
{
read(dict);
resetNames(createFileNames(dict));
}
@ -739,6 +737,8 @@ bool Foam::functionObjects::forces::read(const dictionary& dict)
moment_[2].setSize(1);
}
resetNames(createFileNames(dict));
return true;
}