Commit c983670c authored by Henry Weller's avatar Henry Weller
Browse files

functionObjects: Changed options 'outputControl' -> 'writeControl' and...

functionObjects: Changed options 'outputControl' -> 'writeControl' and 'outputInterval' -> 'writeInterval'

for consistency with the time controls in controlDict and to avoid
unnecessary confusion.  All code and tutorials have been updated.

The old names 'outputControl' and 'outputInterval' are but supported for
backward compatibility but deprecated.
parent cacbc688
......@@ -58,16 +58,16 @@ functions
functionObjectLibs ("libfoamToVTK.so");
// When to write:
// timeStep (with optional outputInterval)
// outputTime (with optional outputInterval)
// timeStep (with optional writeInterval)
// outputTime (with optional writeInterval)
// adjustableTime
// runTime
// clockTime
// cpuTime
outputControl outputTime;
writeControl outputTime;
// Write every writeInterval (only valid for timeStemp, outputTime)
outputInterval 1;
writeInterval 1;
// Interval of time (valid for adjustableTime, runTime, clockTime,
// cpuTime)
......
......@@ -18,7 +18,7 @@ type faceSource;
functionObjectLibs ("libfieldFunctionObjects.so");
enabled true;
outputControl timeStep;
writeControl timeStep;
writeInterval 1;
valueOutput false;
......
......@@ -18,6 +18,6 @@ type Lambda2;
functionObjectLibs ("libutilityFunctionObjects.so");
enabled true;
outputControl outputTime;
writeControl outputTime;
// ************************************************************************* //
......@@ -18,6 +18,6 @@ type Q;
functionObjectLibs ("libutilityFunctionObjects.so");
enabled true;
outputControl outputTime;
writeControl outputTime;
// ************************************************************************* //
......@@ -18,8 +18,8 @@ type forces;
functionObjectLibs ( "libforces.so" );
enabled true;
outputControl timeStep;
outputInterval 1;
writeControl timeStep;
writeInterval 1;
pName p;
UName U;
......
......@@ -18,7 +18,7 @@ type sets;
functionObjectLibs ("libsampling.so");
enabled true;
outputControl outputTime;
writeControl outputTime;
sets
(
......
......@@ -18,7 +18,7 @@ type cellSource;
functionObjectLibs ("libfieldFunctionObjects.so");
enabled true;
outputControl timeStep;
writeControl timeStep;
writeInterval 1;
valueOutput false;
......
......@@ -18,7 +18,7 @@ type faceSource;
functionObjectLibs ("libfieldFunctionObjects.so");
enabled true;
outputControl timeStep;
writeControl timeStep;
writeInterval 1;
valueOutput false;
......
......@@ -18,7 +18,7 @@ type fieldMinMax;
functionObjectLibs ("libfieldFunctionObjects.so");
enabled true;
outputControl timeStep;
writeControl timeStep;
writeInterval 1;
write true;
......
......@@ -18,7 +18,7 @@ type residuals;
functionObjectLibs ("libutilityFunctionObjects.so");
enabled true;
outputControl timeStep;
outputInterval 1;
writeControl timeStep;
writeInterval 1;
// ************************************************************************* //
......@@ -20,7 +20,7 @@ functionObjectLibs ("libfieldFunctionObjects.so");
operation subtract;
enabled true;
outputControl timeStep;
writeControl timeStep;
writeInterval 1
log false;
......
......@@ -18,7 +18,7 @@ type pressureTools;
functionObjectLibs ("libutilityFunctionObjects.so");
enabled true;
outputControl outputTime;
writeControl outputTime;
log false;
// ************************************************************************* //
......@@ -18,6 +18,6 @@ type sets;
functionObjectLibs ("libsampling.so");
enabled true;
outputControl outputTime;
writeControl outputTime;
// ************************************************************************* //
......@@ -18,7 +18,7 @@ type probes;
functionObjectLibs ("libsampling.so");
enabled true;
outputControl timeStep;
outputInterval 1;
writeControl timeStep;
writeInterval 1;
// ************************************************************************* //
......@@ -18,7 +18,7 @@ type scalarTransport;
functionObjectLibs ("libutilityFunctionObjects.so");
enabled true;
outputControl timeStep;
writeControl timeStep;
writeInterval 1;
write true;
......
......@@ -17,7 +17,7 @@ FoamFile
type streamLine;
functionObjectLibs ( "libfieldFunctionObjects.so" );
outputControl outputTime;
writeControl outputTime;
setFormat vtk;
UName U;
......
......@@ -18,7 +18,7 @@ type surfaces;
functionObjectLibs ("libsampling.so");
enabled true;
outputControl outputTime;
writeControl outputTime;
surfaceFormat vtk;
interpolationScheme cellPoint;
......
......@@ -18,7 +18,7 @@ graph
{
type sets;
functionObjectLibs ("libsampling.so");
outputControl outputTime;
writeControl outputTime;
interpolationScheme cellPointFace;
......
......@@ -218,7 +218,7 @@ db/functionObjects/functionObject/functionObject.C
db/functionObjects/functionObjectList/functionObjectList.C
db/functionObjects/functionObjectFile/functionObjectFile.C
db/functionObjects/functionObjectFiles/functionObjectFiles.C
db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.C
db/functionObjects/outputFilterControl/outputFilterControl.C
Time = db/Time
......
......@@ -61,19 +61,21 @@ Foam::OutputFilterFunctionObject<OutputFilter>::OutputFilterFunctionObject
functionObject(name),
time_(t),
dict_(dict),
regionName_(dict.lookupOrDefault("region", polyMesh::defaultRegion)),
timeStart_(-VGREAT),
timeEnd_(VGREAT),
nStepsToStartTimeChange_
(
dict.lookupOrDefault("nStepsToStartTimeChange", 3)
),
outputControl_(t, dict, "output"),
writeControl_(t, dict, "write"),
evaluateControl_(t, dict, "evaluate"),
filter_
(
name,
time_.lookupObject<objectRegistry>(regionName_),
time_.lookupObject<objectRegistry>
(
dict.lookupOrDefault("region", polyMesh::defaultRegion)
),
dict_
)
{
......@@ -96,7 +98,7 @@ bool Foam::OutputFilterFunctionObject<OutputFilter>::execute
filter_.execute();
}
if (forceWrite || outputControl_.output())
if (forceWrite || writeControl_.output())
{
filter_.write();
}
......@@ -111,7 +113,7 @@ bool Foam::OutputFilterFunctionObject<OutputFilter>::end()
{
filter_.end();
if (outputControl_.output())
if (writeControl_.output())
{
filter_.write();
}
......@@ -138,12 +140,12 @@ bool Foam::OutputFilterFunctionObject<OutputFilter>::adjustTimeStep()
if
(
active()
&& outputControl_.outputControl()
== outputFilterOutputControl::ocAdjustableRunTime
&& writeControl_.writeControl()
== outputFilterControl::ocAdjustableRunTime
)
{
const label outputTimeIndex = outputControl_.outputTimeLastDump();
const scalar writeInterval = outputControl_.writeInterval();
const label outputTimeIndex = writeControl_.outputTimeLastDump();
const scalar writeInterval = writeControl_.writeInterval();
scalar timeToNextWrite = max
(
......@@ -188,7 +190,7 @@ bool Foam::OutputFilterFunctionObject<OutputFilter>::read
{
dict_ = dict;
outputControl_.read(dict);
writeControl_.read(dict);
evaluateControl_.read(dict);
readControls();
......@@ -207,7 +209,7 @@ void Foam::OutputFilterFunctionObject<OutputFilter>::updateMesh
const mapPolyMesh& mpm
)
{
if (active() && mpm.mesh().name() == regionName_)
if (active())
{
filter_.updateMesh(mpm);
}
......@@ -220,7 +222,7 @@ void Foam::OutputFilterFunctionObject<OutputFilter>::movePoints
const polyMesh& mesh
)
{
if (active() && mesh.name() == regionName_)
if (active())
{
filter_.movePoints(mesh);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment