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:
@ -12,6 +12,4 @@ libs ("libforces.so");
|
||||
writeControl timeStep;
|
||||
writeInterval 1;
|
||||
|
||||
log off;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -13,7 +13,6 @@ writeControl timeStep;
|
||||
writeInterval 1;
|
||||
|
||||
writeFields false;
|
||||
log false;
|
||||
|
||||
regionType all;
|
||||
operation max;
|
||||
|
||||
@ -13,7 +13,6 @@ writeControl timeStep;
|
||||
writeInterval 1;
|
||||
|
||||
writeFields false;
|
||||
log false;
|
||||
|
||||
regionType all;
|
||||
operation max;
|
||||
|
||||
@ -12,9 +12,6 @@ libs ("libfieldFunctionObjects.so");
|
||||
writeControl timeStep;
|
||||
writeInterval 1;
|
||||
|
||||
write true;
|
||||
log false;
|
||||
|
||||
mode magnitude;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -11,6 +11,5 @@ libs ("libfieldFunctionObjects.so");
|
||||
|
||||
executeControl writeTime;
|
||||
writeControl writeTime;
|
||||
log false;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -9,11 +9,10 @@
|
||||
type fieldValueDelta;
|
||||
libs ("libfieldFunctionObjects.so");
|
||||
|
||||
operation subtract;
|
||||
|
||||
writeControl timeStep;
|
||||
writeInterval 1
|
||||
log false;
|
||||
|
||||
operation subtract;
|
||||
|
||||
region1
|
||||
{
|
||||
|
||||
@ -13,6 +13,5 @@ writeControl timeStep;
|
||||
writeInterval 1;
|
||||
|
||||
writeFields false;
|
||||
log false;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -39,7 +39,6 @@ Description
|
||||
type fieldMinMax;
|
||||
libs ("libfieldFunctionObjects.so");
|
||||
...
|
||||
write yes;
|
||||
log yes;
|
||||
location yes;
|
||||
mode magnitude;
|
||||
@ -55,7 +54,6 @@ Usage
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
type | type name: fieldMinMax | yes |
|
||||
write | write min/max data to file | no | yes
|
||||
log | write min/max data to standard output | no | no
|
||||
location | write location of the min/max value | no | yes
|
||||
mode | calculation mode: magnitude or component | no | magnitude
|
||||
|
||||
Reference in New Issue
Block a user