functionObject: Log by default to stdout when in postProcess mode, not otherwise

This change formalises the usage of the "log" keyword in function
objects. By default, logging to stdout is activated when running
"postProcess" or "<solver> -postProcess", and deactivated when a
function is being executed as part of a run.

This behaviour can now be overridden in the function object dictionary
when operating in either mode.
This commit is contained in:
Will Bainbridge
2019-11-27 15:45:53 +00:00
parent 9675107f7e
commit 7d229e7026
9 changed files with 5 additions and 16 deletions

View File

@ -126,9 +126,10 @@ const Foam::word& Foam::functionObject::name() const
bool Foam::functionObject::read(const dictionary& dict)
{
log = dict.lookupOrDefault<Switch>("log", postProcess);
if (!postProcess)
{
log = dict.lookupOrDefault<Switch>("log", true);
executeAtStart_ = dict.lookupOrDefault<Switch>("executeAtStart", true);
}