mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Standardized the naming of functions which control the writing of fields etc.
to have the prefix 'write' rather than 'output' So outputTime() -> writeTime() but 'outputTime()' is still supported for backward-compatibility. Also removed the redundant secondary-writing functionality from Time which has been superseded by the 'writeRegisteredObject' functionObject.
This commit is contained in:
@ -113,7 +113,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
if (runTime.outputTime())
|
if (runTime.writeTime())
|
||||||
{
|
{
|
||||||
calcEk(U, K).write
|
calcEk(U, K).write
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
if (runTime.outputTime())
|
if (runTime.writeTime())
|
||||||
{
|
{
|
||||||
volVectorField gradT(fvc::grad(T));
|
volVectorField gradT(fvc::grad(T));
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -82,7 +82,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
if (runTime.outputTime())
|
if (runTime.writeTime())
|
||||||
{
|
{
|
||||||
nAveragingSteps = 0;
|
nAveragingSteps = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,7 +64,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
if (runTime.outputTime())
|
if (runTime.writeTime())
|
||||||
{
|
{
|
||||||
nAveragingSteps = 0;
|
nAveragingSteps = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -71,7 +71,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
if (runTime.outputTime())
|
if (runTime.writeTime())
|
||||||
{
|
{
|
||||||
writeCellGraph(V, runTime.graphFormat());
|
writeCellGraph(V, runTime.graphFormat());
|
||||||
writeCellGraph(delta, runTime.graphFormat());
|
writeCellGraph(delta, runTime.graphFormat());
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -98,7 +98,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
#include "evaluateNearWall.H"
|
#include "evaluateNearWall.H"
|
||||||
|
|
||||||
if (runTime.outputTime())
|
if (runTime.writeTime())
|
||||||
{
|
{
|
||||||
#include "makeGraphs.H"
|
#include "makeGraphs.H"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
if (runTime.outputTime())
|
if (runTime.writeTime())
|
||||||
{
|
{
|
||||||
volVectorField Ur
|
volVectorField Ur
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
if (runTime.outputTime())
|
if (runTime.writeTime())
|
||||||
{
|
{
|
||||||
volSymmTensorField sigma
|
volSymmTensorField sigma
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
if (runTime.outputTime())
|
if (runTime.writeTime())
|
||||||
{
|
{
|
||||||
volSymmTensorField sigma
|
volSymmTensorField sigma
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1525,7 +1525,7 @@ void Foam::conformalVoronoiMesh::move()
|
|||||||
<< "They will not be inserted." << endl;
|
<< "They will not be inserted." << endl;
|
||||||
|
|
||||||
// Save displacements to file.
|
// Save displacements to file.
|
||||||
if (foamyHexMeshControls().objOutput() && time().outputTime())
|
if (foamyHexMeshControls().objOutput() && time().writeTime())
|
||||||
{
|
{
|
||||||
Info<< "Writing point displacement vectors to file." << endl;
|
Info<< "Writing point displacement vectors to file." << endl;
|
||||||
OFstream str
|
OFstream str
|
||||||
@ -1706,7 +1706,7 @@ void Foam::conformalVoronoiMesh::move()
|
|||||||
printVertexInfo(Info);
|
printVertexInfo(Info);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (time().outputTime())
|
if (time().writeTime())
|
||||||
{
|
{
|
||||||
writeMesh(time().timeName());
|
writeMesh(time().timeName());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -476,7 +476,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||||
|
|
||||||
// Bypass runTime write (since only writes at outputTime)
|
// Bypass runTime write (since only writes at writeTime)
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
!runTime.objectRegistry::writeObject
|
!runTime.objectRegistry::writeObject
|
||||||
|
|||||||
@ -59,14 +59,14 @@ functions
|
|||||||
|
|
||||||
// When to write:
|
// When to write:
|
||||||
// timeStep (with optional writeInterval)
|
// timeStep (with optional writeInterval)
|
||||||
// outputTime (with optional writeInterval)
|
// writeTime (with optional writeInterval)
|
||||||
// adjustableTime
|
// adjustableTime
|
||||||
// runTime
|
// runTime
|
||||||
// clockTime
|
// clockTime
|
||||||
// cpuTime
|
// cpuTime
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
// Write every writeInterval (only valid for timeStemp, outputTime)
|
// Write every writeInterval (only valid for timeStemp, writeTime)
|
||||||
writeInterval 1;
|
writeInterval 1;
|
||||||
|
|
||||||
// Interval of time (valid for adjustableTime, runTime, clockTime,
|
// Interval of time (valid for adjustableTime, runTime, clockTime,
|
||||||
|
|||||||
@ -18,6 +18,6 @@ type Lambda2;
|
|||||||
functionObjectLibs ("libutilityFunctionObjects.so");
|
functionObjectLibs ("libutilityFunctionObjects.so");
|
||||||
|
|
||||||
enabled true;
|
enabled true;
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -18,6 +18,6 @@ type Q;
|
|||||||
functionObjectLibs ("libutilityFunctionObjects.so");
|
functionObjectLibs ("libutilityFunctionObjects.so");
|
||||||
|
|
||||||
enabled true;
|
enabled true;
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -18,7 +18,7 @@ type sets;
|
|||||||
functionObjectLibs ("libsampling.so");
|
functionObjectLibs ("libsampling.so");
|
||||||
|
|
||||||
enabled true;
|
enabled true;
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
sets
|
sets
|
||||||
(
|
(
|
||||||
|
|||||||
@ -18,7 +18,7 @@ type pressureTools;
|
|||||||
functionObjectLibs ("libutilityFunctionObjects.so");
|
functionObjectLibs ("libutilityFunctionObjects.so");
|
||||||
|
|
||||||
enabled true;
|
enabled true;
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
log false;
|
log false;
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -18,6 +18,6 @@ type sets;
|
|||||||
functionObjectLibs ("libsampling.so");
|
functionObjectLibs ("libsampling.so");
|
||||||
|
|
||||||
enabled true;
|
enabled true;
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -17,7 +17,7 @@ FoamFile
|
|||||||
type streamLine;
|
type streamLine;
|
||||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||||
|
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
setFormat vtk;
|
setFormat vtk;
|
||||||
UName U;
|
UName U;
|
||||||
|
|||||||
@ -18,7 +18,7 @@ type surfaces;
|
|||||||
functionObjectLibs ("libsampling.so");
|
functionObjectLibs ("libsampling.so");
|
||||||
|
|
||||||
enabled true;
|
enabled true;
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
surfaceFormat vtk;
|
surfaceFormat vtk;
|
||||||
interpolationScheme cellPoint;
|
interpolationScheme cellPoint;
|
||||||
|
|||||||
@ -18,7 +18,7 @@ graph
|
|||||||
{
|
{
|
||||||
type sets;
|
type sets;
|
||||||
functionObjectLibs ("libsampling.so");
|
functionObjectLibs ("libsampling.so");
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
interpolationScheme cellPointFace;
|
interpolationScheme cellPointFace;
|
||||||
|
|
||||||
|
|||||||
@ -91,21 +91,7 @@ void Foam::Time::adjustDeltaT()
|
|||||||
timeToNextWrite = max
|
timeToNextWrite = max
|
||||||
(
|
(
|
||||||
0.0,
|
0.0,
|
||||||
(outputTimeIndex_ + 1)*writeInterval_ - (value() - startTime_)
|
(writeTimeIndex_ + 1)*writeInterval_ - (value() - startTime_)
|
||||||
);
|
|
||||||
}
|
|
||||||
if (secondaryWriteControl_ == wcAdjustableRunTime)
|
|
||||||
{
|
|
||||||
adjustTime = true;
|
|
||||||
timeToNextWrite = max
|
|
||||||
(
|
|
||||||
0.0,
|
|
||||||
min
|
|
||||||
(
|
|
||||||
timeToNextWrite,
|
|
||||||
(secondaryOutputTimeIndex_ + 1)*secondaryWriteInterval_
|
|
||||||
- (value() - startTime_)
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -376,10 +362,7 @@ Foam::Time::Time
|
|||||||
stopAt_(saEndTime),
|
stopAt_(saEndTime),
|
||||||
writeControl_(wcTimeStep),
|
writeControl_(wcTimeStep),
|
||||||
writeInterval_(GREAT),
|
writeInterval_(GREAT),
|
||||||
secondaryWriteControl_(wcTimeStep),
|
|
||||||
secondaryWriteInterval_(labelMax/10.0), // bit less to allow calculations
|
|
||||||
purgeWrite_(0),
|
purgeWrite_(0),
|
||||||
secondaryPurgeWrite_(0),
|
|
||||||
writeOnce_(false),
|
writeOnce_(false),
|
||||||
subCycling_(false),
|
subCycling_(false),
|
||||||
sigWriteNow_(true, *this),
|
sigWriteNow_(true, *this),
|
||||||
@ -471,10 +454,7 @@ Foam::Time::Time
|
|||||||
stopAt_(saEndTime),
|
stopAt_(saEndTime),
|
||||||
writeControl_(wcTimeStep),
|
writeControl_(wcTimeStep),
|
||||||
writeInterval_(GREAT),
|
writeInterval_(GREAT),
|
||||||
secondaryWriteControl_(wcTimeStep),
|
|
||||||
secondaryWriteInterval_(labelMax/10.0),
|
|
||||||
purgeWrite_(0),
|
purgeWrite_(0),
|
||||||
secondaryPurgeWrite_(0),
|
|
||||||
writeOnce_(false),
|
writeOnce_(false),
|
||||||
subCycling_(false),
|
subCycling_(false),
|
||||||
sigWriteNow_(true, *this),
|
sigWriteNow_(true, *this),
|
||||||
@ -573,10 +553,7 @@ Foam::Time::Time
|
|||||||
stopAt_(saEndTime),
|
stopAt_(saEndTime),
|
||||||
writeControl_(wcTimeStep),
|
writeControl_(wcTimeStep),
|
||||||
writeInterval_(GREAT),
|
writeInterval_(GREAT),
|
||||||
secondaryWriteControl_(wcTimeStep),
|
|
||||||
secondaryWriteInterval_(labelMax/10.0),
|
|
||||||
purgeWrite_(0),
|
purgeWrite_(0),
|
||||||
secondaryPurgeWrite_(0),
|
|
||||||
writeOnce_(false),
|
writeOnce_(false),
|
||||||
subCycling_(false),
|
subCycling_(false),
|
||||||
sigWriteNow_(true, *this),
|
sigWriteNow_(true, *this),
|
||||||
@ -671,10 +648,7 @@ Foam::Time::Time
|
|||||||
stopAt_(saEndTime),
|
stopAt_(saEndTime),
|
||||||
writeControl_(wcTimeStep),
|
writeControl_(wcTimeStep),
|
||||||
writeInterval_(GREAT),
|
writeInterval_(GREAT),
|
||||||
secondaryWriteControl_(wcTimeStep),
|
|
||||||
secondaryWriteInterval_(labelMax/10.0),
|
|
||||||
purgeWrite_(0),
|
purgeWrite_(0),
|
||||||
secondaryPurgeWrite_(0),
|
|
||||||
writeOnce_(false),
|
writeOnce_(false),
|
||||||
subCycling_(false),
|
subCycling_(false),
|
||||||
|
|
||||||
@ -1115,126 +1089,63 @@ Foam::Time& Foam::Time::operator++()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
writeTime_ = false;
|
||||||
outputTime_ = false;
|
|
||||||
primaryOutputTime_ = false;
|
|
||||||
secondaryOutputTime_ = false;
|
|
||||||
|
|
||||||
switch (writeControl_)
|
switch (writeControl_)
|
||||||
{
|
{
|
||||||
case wcTimeStep:
|
case wcTimeStep:
|
||||||
primaryOutputTime_ = !(timeIndex_ % label(writeInterval_));
|
writeTime_ = !(timeIndex_ % label(writeInterval_));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wcRunTime:
|
case wcRunTime:
|
||||||
case wcAdjustableRunTime:
|
case wcAdjustableRunTime:
|
||||||
{
|
{
|
||||||
label outputIndex = label
|
label writeIndex = label
|
||||||
(
|
(
|
||||||
((value() - startTime_) + 0.5*deltaT_)
|
((value() - startTime_) + 0.5*deltaT_)
|
||||||
/ writeInterval_
|
/ writeInterval_
|
||||||
);
|
);
|
||||||
|
|
||||||
if (outputIndex > outputTimeIndex_)
|
if (writeIndex > writeTimeIndex_)
|
||||||
{
|
{
|
||||||
primaryOutputTime_ = true;
|
writeTime_ = true;
|
||||||
outputTimeIndex_ = outputIndex;
|
writeTimeIndex_ = writeIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wcCpuTime:
|
case wcCpuTime:
|
||||||
{
|
{
|
||||||
label outputIndex = label
|
label writeIndex = label
|
||||||
(
|
(
|
||||||
returnReduce(elapsedCpuTime(), maxOp<double>())
|
returnReduce(elapsedCpuTime(), maxOp<double>())
|
||||||
/ writeInterval_
|
/ writeInterval_
|
||||||
);
|
);
|
||||||
if (outputIndex > outputTimeIndex_)
|
if (writeIndex > writeTimeIndex_)
|
||||||
{
|
{
|
||||||
primaryOutputTime_ = true;
|
writeTime_ = true;
|
||||||
outputTimeIndex_ = outputIndex;
|
writeTimeIndex_ = writeIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wcClockTime:
|
case wcClockTime:
|
||||||
{
|
{
|
||||||
label outputIndex = label
|
label writeIndex = label
|
||||||
(
|
(
|
||||||
returnReduce(label(elapsedClockTime()), maxOp<label>())
|
returnReduce(label(elapsedClockTime()), maxOp<label>())
|
||||||
/ writeInterval_
|
/ writeInterval_
|
||||||
);
|
);
|
||||||
if (outputIndex > outputTimeIndex_)
|
if (writeIndex > writeTimeIndex_)
|
||||||
{
|
{
|
||||||
primaryOutputTime_ = true;
|
writeTime_ = true;
|
||||||
outputTimeIndex_ = outputIndex;
|
writeTimeIndex_ = writeIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Adapt for secondaryWrite controls
|
|
||||||
switch (secondaryWriteControl_)
|
|
||||||
{
|
|
||||||
case wcTimeStep:
|
|
||||||
secondaryOutputTime_ =
|
|
||||||
!(timeIndex_ % label(secondaryWriteInterval_));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case wcRunTime:
|
|
||||||
case wcAdjustableRunTime:
|
|
||||||
{
|
|
||||||
label outputIndex = label
|
|
||||||
(
|
|
||||||
((value() - startTime_) + 0.5*deltaT_)
|
|
||||||
/ secondaryWriteInterval_
|
|
||||||
);
|
|
||||||
|
|
||||||
if (outputIndex > secondaryOutputTimeIndex_)
|
|
||||||
{
|
|
||||||
secondaryOutputTime_ = true;
|
|
||||||
secondaryOutputTimeIndex_ = outputIndex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case wcCpuTime:
|
|
||||||
{
|
|
||||||
label outputIndex = label
|
|
||||||
(
|
|
||||||
returnReduce(elapsedCpuTime(), maxOp<double>())
|
|
||||||
/ secondaryWriteInterval_
|
|
||||||
);
|
|
||||||
if (outputIndex > secondaryOutputTimeIndex_)
|
|
||||||
{
|
|
||||||
secondaryOutputTime_ = true;
|
|
||||||
secondaryOutputTimeIndex_ = outputIndex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case wcClockTime:
|
|
||||||
{
|
|
||||||
label outputIndex = label
|
|
||||||
(
|
|
||||||
returnReduce(label(elapsedClockTime()), maxOp<label>())
|
|
||||||
/ secondaryWriteInterval_
|
|
||||||
);
|
|
||||||
if (outputIndex > secondaryOutputTimeIndex_)
|
|
||||||
{
|
|
||||||
secondaryOutputTime_ = true;
|
|
||||||
secondaryOutputTimeIndex_ = outputIndex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
outputTime_ = primaryOutputTime_ || secondaryOutputTime_;
|
|
||||||
|
|
||||||
|
|
||||||
// Check if endTime needs adjustment to stop at the next run()/end()
|
// Check if endTime needs adjustment to stop at the next run()/end()
|
||||||
if (!end())
|
if (!end())
|
||||||
{
|
{
|
||||||
@ -1245,25 +1156,23 @@ Foam::Time& Foam::Time::operator++()
|
|||||||
else if (stopAt_ == saWriteNow)
|
else if (stopAt_ == saWriteNow)
|
||||||
{
|
{
|
||||||
endTime_ = value();
|
endTime_ = value();
|
||||||
outputTime_ = true;
|
writeTime_ = true;
|
||||||
primaryOutputTime_ = true;
|
|
||||||
}
|
}
|
||||||
else if (stopAt_ == saNextWrite && outputTime_ == true)
|
else if (stopAt_ == saNextWrite && writeTime_ == true)
|
||||||
{
|
{
|
||||||
endTime_ = value();
|
endTime_ = value();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Override outputTime if one-shot writing
|
// Override writeTime if one-shot writing
|
||||||
if (writeOnce_)
|
if (writeOnce_)
|
||||||
{
|
{
|
||||||
primaryOutputTime_ = true;
|
writeTime_ = true;
|
||||||
outputTime_ = true;
|
|
||||||
writeOnce_ = false;
|
writeOnce_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adjust the precision of the time directory name if necessary
|
// Adjust the precision of the time directory name if necessary
|
||||||
if (outputTime_)
|
if (writeTime_)
|
||||||
{
|
{
|
||||||
// Tolerance used when testing time equivalence
|
// Tolerance used when testing time equivalence
|
||||||
const scalar timeTol =
|
const scalar timeTol =
|
||||||
|
|||||||
@ -132,20 +132,8 @@ protected:
|
|||||||
|
|
||||||
scalar writeInterval_;
|
scalar writeInterval_;
|
||||||
|
|
||||||
// Additional writing
|
|
||||||
|
|
||||||
writeControls secondaryWriteControl_;
|
|
||||||
|
|
||||||
scalar secondaryWriteInterval_;
|
|
||||||
|
|
||||||
label purgeWrite_;
|
label purgeWrite_;
|
||||||
mutable FIFOStack<word> previousOutputTimes_;
|
mutable FIFOStack<word> previousWriteTimes_;
|
||||||
|
|
||||||
// Additional purging
|
|
||||||
|
|
||||||
label secondaryPurgeWrite_;
|
|
||||||
mutable FIFOStack<word> previousSecondaryOutputTimes_;
|
|
||||||
|
|
||||||
|
|
||||||
// One-shot writing
|
// One-shot writing
|
||||||
bool writeOnce_;
|
bool writeOnce_;
|
||||||
@ -157,7 +145,7 @@ protected:
|
|||||||
autoPtr<TimeState> prevTimeState_;
|
autoPtr<TimeState> prevTimeState_;
|
||||||
|
|
||||||
|
|
||||||
// Signal handlers for secondary writing
|
// Signal handlers for writing
|
||||||
|
|
||||||
//- Enable one-shot writing upon signal
|
//- Enable one-shot writing upon signal
|
||||||
sigWriteNow sigWriteNow_;
|
sigWriteNow sigWriteNow_;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -207,7 +207,6 @@ void Foam::Time::readDict()
|
|||||||
}
|
}
|
||||||
|
|
||||||
scalar oldWriteInterval = writeInterval_;
|
scalar oldWriteInterval = writeInterval_;
|
||||||
scalar oldSecondaryWriteInterval = secondaryWriteInterval_;
|
|
||||||
|
|
||||||
if (controlDict_.readIfPresent("writeInterval", writeInterval_))
|
if (controlDict_.readIfPresent("writeInterval", writeInterval_))
|
||||||
{
|
{
|
||||||
@ -224,55 +223,17 @@ void Foam::Time::readDict()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Additional writing
|
|
||||||
if (controlDict_.found("secondaryWriteControl"))
|
|
||||||
{
|
|
||||||
secondaryWriteControl_ = writeControlNames_.read
|
|
||||||
(
|
|
||||||
controlDict_.lookup("secondaryWriteControl")
|
|
||||||
);
|
|
||||||
|
|
||||||
if
|
|
||||||
(
|
|
||||||
controlDict_.readIfPresent
|
|
||||||
(
|
|
||||||
"secondaryWriteInterval",
|
|
||||||
secondaryWriteInterval_
|
|
||||||
)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if
|
|
||||||
(
|
|
||||||
secondaryWriteControl_ == wcTimeStep
|
|
||||||
&& label(secondaryWriteInterval_) < 1
|
|
||||||
)
|
|
||||||
{
|
|
||||||
FatalIOErrorInFunction(controlDict_)
|
|
||||||
<< "secondaryWriteInterval < 1"
|
|
||||||
<< " for secondaryWriteControl timeStep"
|
|
||||||
<< exit(FatalIOError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
controlDict_.lookup("secondaryWriteFrequency")
|
|
||||||
>> secondaryWriteInterval_;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (oldWriteInterval != writeInterval_)
|
if (oldWriteInterval != writeInterval_)
|
||||||
{
|
{
|
||||||
switch (writeControl_)
|
switch (writeControl_)
|
||||||
{
|
{
|
||||||
case wcRunTime:
|
case wcRunTime:
|
||||||
case wcAdjustableRunTime:
|
case wcAdjustableRunTime:
|
||||||
// Recalculate outputTimeIndex_ to be in units of current
|
// Recalculate writeTimeIndex_ to be in units of current
|
||||||
// writeInterval.
|
// writeInterval.
|
||||||
outputTimeIndex_ = label
|
writeTimeIndex_ = label
|
||||||
(
|
(
|
||||||
outputTimeIndex_
|
writeTimeIndex_
|
||||||
* oldWriteInterval
|
* oldWriteInterval
|
||||||
/ writeInterval_
|
/ writeInterval_
|
||||||
);
|
);
|
||||||
@ -282,26 +243,6 @@ void Foam::Time::readDict()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (oldSecondaryWriteInterval != secondaryWriteInterval_)
|
|
||||||
{
|
|
||||||
switch (secondaryWriteControl_)
|
|
||||||
{
|
|
||||||
case wcRunTime:
|
|
||||||
case wcAdjustableRunTime:
|
|
||||||
// Recalculate secondaryOutputTimeIndex_ to be in units of
|
|
||||||
// current writeInterval.
|
|
||||||
secondaryOutputTimeIndex_ = label
|
|
||||||
(
|
|
||||||
secondaryOutputTimeIndex_
|
|
||||||
* oldSecondaryWriteInterval
|
|
||||||
/ secondaryWriteInterval_
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (controlDict_.readIfPresent("purgeWrite", purgeWrite_))
|
if (controlDict_.readIfPresent("purgeWrite", purgeWrite_))
|
||||||
{
|
{
|
||||||
@ -316,20 +257,6 @@ void Foam::Time::readDict()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (controlDict_.readIfPresent("secondaryPurgeWrite", secondaryPurgeWrite_))
|
|
||||||
{
|
|
||||||
if (secondaryPurgeWrite_ < 0)
|
|
||||||
{
|
|
||||||
WarningInFunction
|
|
||||||
<< "invalid value for secondaryPurgeWrite "
|
|
||||||
<< secondaryPurgeWrite_
|
|
||||||
<< ", should be >= 0, setting to 0"
|
|
||||||
<< endl;
|
|
||||||
|
|
||||||
secondaryPurgeWrite_ = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (controlDict_.found("timeFormat"))
|
if (controlDict_.found("timeFormat"))
|
||||||
{
|
{
|
||||||
const word formatName(controlDict_.lookup("timeFormat"));
|
const word formatName(controlDict_.lookup("timeFormat"));
|
||||||
@ -490,7 +417,7 @@ bool Foam::Time::writeObject
|
|||||||
IOstream::compressionType cmp
|
IOstream::compressionType cmp
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (outputTime())
|
if (writeTime())
|
||||||
{
|
{
|
||||||
const word tmName(timeName());
|
const word tmName(timeName());
|
||||||
|
|
||||||
@ -519,42 +446,14 @@ bool Foam::Time::writeObject
|
|||||||
|
|
||||||
if (writeOK)
|
if (writeOK)
|
||||||
{
|
{
|
||||||
// Does primary or secondary time trigger purging?
|
// Does the writeTime trigger purging?
|
||||||
// Note that primary times can only be purged by primary
|
if (writeTime_ && purgeWrite_)
|
||||||
// purging. Secondary times can be purged by either primary
|
|
||||||
// or secondary purging.
|
|
||||||
if (primaryOutputTime_ && purgeWrite_)
|
|
||||||
{
|
{
|
||||||
previousOutputTimes_.push(tmName);
|
previousWriteTimes_.push(tmName);
|
||||||
|
|
||||||
while (previousOutputTimes_.size() > purgeWrite_)
|
while (previousWriteTimes_.size() > purgeWrite_)
|
||||||
{
|
{
|
||||||
rmDir(objectRegistry::path(previousOutputTimes_.pop()));
|
rmDir(objectRegistry::path(previousWriteTimes_.pop()));
|
||||||
}
|
|
||||||
}
|
|
||||||
if
|
|
||||||
(
|
|
||||||
!primaryOutputTime_
|
|
||||||
&& secondaryOutputTime_
|
|
||||||
&& secondaryPurgeWrite_
|
|
||||||
)
|
|
||||||
{
|
|
||||||
// Writing due to secondary
|
|
||||||
previousSecondaryOutputTimes_.push(tmName);
|
|
||||||
|
|
||||||
while
|
|
||||||
(
|
|
||||||
previousSecondaryOutputTimes_.size()
|
|
||||||
> secondaryPurgeWrite_
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rmDir
|
|
||||||
(
|
|
||||||
objectRegistry::path
|
|
||||||
(
|
|
||||||
previousSecondaryOutputTimes_.pop()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -570,8 +469,7 @@ bool Foam::Time::writeObject
|
|||||||
|
|
||||||
bool Foam::Time::writeNow()
|
bool Foam::Time::writeNow()
|
||||||
{
|
{
|
||||||
primaryOutputTime_ = true;
|
writeTime_ = true;
|
||||||
outputTime_ = true;
|
|
||||||
return write();
|
return write();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -36,11 +36,8 @@ Foam::TimeState::TimeState()
|
|||||||
deltaTSave_(0),
|
deltaTSave_(0),
|
||||||
deltaT0_(0),
|
deltaT0_(0),
|
||||||
deltaTchanged_(false),
|
deltaTchanged_(false),
|
||||||
outputTimeIndex_(0),
|
writeTimeIndex_(0),
|
||||||
primaryOutputTime_(false),
|
writeTime_(false)
|
||||||
secondaryOutputTimeIndex_(0),
|
|
||||||
secondaryOutputTime_(false),
|
|
||||||
outputTime_(false)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -64,34 +61,4 @@ Foam::scalar Foam::TimeState::timeToUserTime(const scalar t) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::scalar Foam::TimeState::timeOutputValue() const
|
|
||||||
{
|
|
||||||
return timeToUserTime(value());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::label Foam::TimeState::timeIndex() const
|
|
||||||
{
|
|
||||||
return timeIndex_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionedScalar Foam::TimeState::deltaT() const
|
|
||||||
{
|
|
||||||
return dimensionedScalar("deltaT", dimTime, deltaT_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionedScalar Foam::TimeState::deltaT0() const
|
|
||||||
{
|
|
||||||
return dimensionedScalar("deltaT0", dimTime, deltaT0_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool Foam::TimeState::outputTime() const
|
|
||||||
{
|
|
||||||
return outputTime_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -46,7 +46,6 @@ namespace Foam
|
|||||||
Class TimeState Declaration
|
Class TimeState Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
class TimeState
|
class TimeState
|
||||||
:
|
:
|
||||||
public dimensionedScalar
|
public dimensionedScalar
|
||||||
@ -59,16 +58,9 @@ protected:
|
|||||||
scalar deltaTSave_;
|
scalar deltaTSave_;
|
||||||
scalar deltaT0_;
|
scalar deltaT0_;
|
||||||
bool deltaTchanged_;
|
bool deltaTchanged_;
|
||||||
|
label writeTimeIndex_;
|
||||||
|
bool writeTime_;
|
||||||
|
|
||||||
label outputTimeIndex_;
|
|
||||||
//- Is outputTime because of primary?
|
|
||||||
bool primaryOutputTime_;
|
|
||||||
|
|
||||||
label secondaryOutputTimeIndex_;
|
|
||||||
//- Is outputTime because of secondary?
|
|
||||||
bool secondaryOutputTime_;
|
|
||||||
|
|
||||||
bool outputTime_;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -92,34 +84,32 @@ public:
|
|||||||
virtual scalar timeToUserTime(const scalar t) const;
|
virtual scalar timeToUserTime(const scalar t) const;
|
||||||
|
|
||||||
//- Return current time value
|
//- Return current time value
|
||||||
scalar timeOutputValue() const;
|
inline scalar timeOutputValue() const;
|
||||||
|
|
||||||
//- Return current time index
|
//- Return current time index
|
||||||
label timeIndex() const;
|
inline label timeIndex() const;
|
||||||
|
|
||||||
//- Return time step value
|
//- Return time step value
|
||||||
inline scalar deltaTValue() const
|
inline scalar deltaTValue() const;
|
||||||
{
|
|
||||||
return deltaT_;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return old time step value
|
//- Return old time step value
|
||||||
inline scalar deltaT0Value() const
|
inline scalar deltaT0Value() const;
|
||||||
{
|
|
||||||
return deltaT0_;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return time step
|
//- Return time step
|
||||||
dimensionedScalar deltaT() const;
|
inline dimensionedScalar deltaT() const;
|
||||||
|
|
||||||
//- Return old time step
|
//- Return old time step
|
||||||
dimensionedScalar deltaT0() const;
|
inline dimensionedScalar deltaT0() const;
|
||||||
|
|
||||||
|
|
||||||
// Check
|
// Check
|
||||||
|
|
||||||
//- Return true if this is an output time (primary or secondary)
|
//- Return true if this is a write time
|
||||||
bool outputTime() const;
|
inline bool writeTime() const;
|
||||||
|
|
||||||
|
//- Return true if this is a write time.
|
||||||
|
// Provided for backward-compatibility
|
||||||
|
inline bool outputTime() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -129,6 +119,10 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "TimeStateI.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
77
src/OpenFOAM/db/Time/TimeStateI.H
Normal file
77
src/OpenFOAM/db/Time/TimeStateI.H
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
||||||
|
inline Foam::scalar Foam::TimeState::timeOutputValue() const
|
||||||
|
{
|
||||||
|
return timeToUserTime(value());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline Foam::label Foam::TimeState::timeIndex() const
|
||||||
|
{
|
||||||
|
return timeIndex_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline Foam::scalar Foam::TimeState::deltaTValue() const
|
||||||
|
{
|
||||||
|
return deltaT_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline Foam::scalar Foam::TimeState::deltaT0Value() const
|
||||||
|
{
|
||||||
|
return deltaT0_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline Foam::dimensionedScalar Foam::TimeState::deltaT() const
|
||||||
|
{
|
||||||
|
return dimensionedScalar("deltaT", dimTime, deltaT_);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline Foam::dimensionedScalar Foam::TimeState::deltaT0() const
|
||||||
|
{
|
||||||
|
return dimensionedScalar("deltaT0", dimTime, deltaT0_);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool Foam::TimeState::writeTime() const
|
||||||
|
{
|
||||||
|
return writeTime_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool Foam::TimeState::outputTime() const
|
||||||
|
{
|
||||||
|
return writeTime_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -93,12 +93,12 @@ bool Foam::OutputFilterFunctionObject<OutputFilter>::execute
|
|||||||
{
|
{
|
||||||
if (active())
|
if (active())
|
||||||
{
|
{
|
||||||
if (evaluateControl_.output())
|
if (evaluateControl_.execute())
|
||||||
{
|
{
|
||||||
filter_.execute();
|
filter_.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (forceWrite || writeControl_.output())
|
if (forceWrite || writeControl_.execute())
|
||||||
{
|
{
|
||||||
filter_.write();
|
filter_.write();
|
||||||
}
|
}
|
||||||
@ -113,7 +113,7 @@ bool Foam::OutputFilterFunctionObject<OutputFilter>::end()
|
|||||||
{
|
{
|
||||||
filter_.end();
|
filter_.end();
|
||||||
|
|
||||||
if (writeControl_.output())
|
if (writeControl_.execute())
|
||||||
{
|
{
|
||||||
filter_.write();
|
filter_.write();
|
||||||
}
|
}
|
||||||
@ -140,17 +140,17 @@ bool Foam::OutputFilterFunctionObject<OutputFilter>::adjustTimeStep()
|
|||||||
if
|
if
|
||||||
(
|
(
|
||||||
active()
|
active()
|
||||||
&& writeControl_.writeControl()
|
&& writeControl_.control()
|
||||||
== outputFilterControl::ocAdjustableRunTime
|
== outputFilterControl::ocAdjustableRunTime
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const label outputTimeIndex = writeControl_.outputTimeLastDump();
|
const label writeTimeIndex = writeControl_.executionIndex();
|
||||||
const scalar writeInterval = writeControl_.writeInterval();
|
const scalar writeInterval = writeControl_.interval();
|
||||||
|
|
||||||
scalar timeToNextWrite = max
|
scalar timeToNextWrite = max
|
||||||
(
|
(
|
||||||
0.0,
|
0.0,
|
||||||
(outputTimeIndex + 1)*writeInterval
|
(writeTimeIndex + 1)*writeInterval
|
||||||
- (time_.value() - time_.startTime().value())
|
- (time_.value() - time_.startTime().value())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ Description
|
|||||||
enabled yes;
|
enabled yes;
|
||||||
timeStart 0;
|
timeStart 0;
|
||||||
timeEnd 10;
|
timeEnd 10;
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
writeInterval 1;
|
writeInterval 1;
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
@ -77,7 +77,7 @@ Description
|
|||||||
\table
|
\table
|
||||||
Option | Description
|
Option | Description
|
||||||
timeStep | Execute/write every 'writeInterval' time-steps
|
timeStep | Execute/write every 'writeInterval' time-steps
|
||||||
outputTime | Execute/write every 'writeInterval' output times
|
writeTime | Execute/write every 'writeInterval' output times
|
||||||
adjustableRunTime | Execute/write every 'writeInterval' run time period
|
adjustableRunTime | Execute/write every 'writeInterval' run time period
|
||||||
runTime | Execute/write every 'writeInterval' run time period
|
runTime | Execute/write every 'writeInterval' run time period
|
||||||
clockTime | Execute/write every 'writeInterval' clock time period
|
clockTime | Execute/write every 'writeInterval' clock time period
|
||||||
|
|||||||
@ -31,7 +31,7 @@ License
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
template<>
|
template<>
|
||||||
const char* NamedEnum<outputFilterControl::writeControls, 8>::
|
const char* NamedEnum<outputFilterControl::timeControls, 8>::
|
||||||
names[] =
|
names[] =
|
||||||
{
|
{
|
||||||
"timeStep",
|
"timeStep",
|
||||||
@ -45,8 +45,8 @@ namespace Foam
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const Foam::NamedEnum<Foam::outputFilterControl::writeControls, 8>
|
const Foam::NamedEnum<Foam::outputFilterControl::timeControls, 8>
|
||||||
Foam::outputFilterControl::writeControlNames_;
|
Foam::outputFilterControl::timeControlNames_;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
@ -60,10 +60,10 @@ Foam::outputFilterControl::outputFilterControl
|
|||||||
:
|
:
|
||||||
time_(t),
|
time_(t),
|
||||||
prefix_(prefix),
|
prefix_(prefix),
|
||||||
writeControl_(ocTimeStep),
|
timeControl_(ocTimeStep),
|
||||||
outputInterval_(0),
|
intervalSteps_(0),
|
||||||
writeInterval_(-1),
|
interval_(-1),
|
||||||
outputTimeLastDump_(0)
|
executionIndex_(0)
|
||||||
{
|
{
|
||||||
read(dict);
|
read(dict);
|
||||||
}
|
}
|
||||||
@ -98,25 +98,25 @@ void Foam::outputFilterControl::read(const dictionary& dict)
|
|||||||
|
|
||||||
if (dict.found(controlName))
|
if (dict.found(controlName))
|
||||||
{
|
{
|
||||||
writeControl_ = writeControlNames_.read(dict.lookup(controlName));
|
timeControl_ = timeControlNames_.read(dict.lookup(controlName));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
writeControl_ = ocTimeStep;
|
timeControl_ = ocTimeStep;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (writeControl_)
|
switch (timeControl_)
|
||||||
{
|
{
|
||||||
case ocTimeStep:
|
case ocTimeStep:
|
||||||
{
|
{
|
||||||
outputInterval_ = dict.lookupOrDefault<label>(intervalName, 0);
|
intervalSteps_ = dict.lookupOrDefault<label>(intervalName, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case ocWriteTime:
|
case ocWriteTime:
|
||||||
case ocOutputTime:
|
case ocOutputTime:
|
||||||
{
|
{
|
||||||
outputInterval_ = dict.lookupOrDefault<label>(intervalName, 1);
|
intervalSteps_ = dict.lookupOrDefault<label>(intervalName, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ void Foam::outputFilterControl::read(const dictionary& dict)
|
|||||||
case ocCpuTime:
|
case ocCpuTime:
|
||||||
case ocAdjustableRunTime:
|
case ocAdjustableRunTime:
|
||||||
{
|
{
|
||||||
writeInterval_ = readScalar(dict.lookup(intervalName));
|
interval_ = readScalar(dict.lookup(intervalName));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,16 +137,16 @@ void Foam::outputFilterControl::read(const dictionary& dict)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::outputFilterControl::output()
|
bool Foam::outputFilterControl::execute()
|
||||||
{
|
{
|
||||||
switch (writeControl_)
|
switch (timeControl_)
|
||||||
{
|
{
|
||||||
case ocTimeStep:
|
case ocTimeStep:
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
(
|
(
|
||||||
(outputInterval_ <= 1)
|
(intervalSteps_ <= 1)
|
||||||
|| !(time_.timeIndex() % outputInterval_)
|
|| !(time_.timeIndex() % intervalSteps_)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -154,10 +154,10 @@ bool Foam::outputFilterControl::output()
|
|||||||
case ocWriteTime:
|
case ocWriteTime:
|
||||||
case ocOutputTime:
|
case ocOutputTime:
|
||||||
{
|
{
|
||||||
if (time_.outputTime())
|
if (time_.writeTime())
|
||||||
{
|
{
|
||||||
outputTimeLastDump_++;
|
executionIndex_++;
|
||||||
return !(outputTimeLastDump_ % outputInterval_);
|
return !(executionIndex_ % intervalSteps_);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -165,18 +165,18 @@ bool Foam::outputFilterControl::output()
|
|||||||
case ocRunTime:
|
case ocRunTime:
|
||||||
case ocAdjustableRunTime:
|
case ocAdjustableRunTime:
|
||||||
{
|
{
|
||||||
label outputIndex = label
|
label executionIndex = label
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
(time_.value() - time_.startTime().value())
|
(time_.value() - time_.startTime().value())
|
||||||
+ 0.5*time_.deltaTValue()
|
+ 0.5*time_.deltaTValue()
|
||||||
)
|
)
|
||||||
/writeInterval_
|
/interval_
|
||||||
);
|
);
|
||||||
|
|
||||||
if (outputIndex > outputTimeLastDump_)
|
if (executionIndex > executionIndex_)
|
||||||
{
|
{
|
||||||
outputTimeLastDump_ = outputIndex;
|
executionIndex_ = executionIndex;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -184,14 +184,14 @@ bool Foam::outputFilterControl::output()
|
|||||||
|
|
||||||
case ocCpuTime:
|
case ocCpuTime:
|
||||||
{
|
{
|
||||||
label outputIndex = label
|
label executionIndex = label
|
||||||
(
|
(
|
||||||
returnReduce(time_.elapsedCpuTime(), maxOp<double>())
|
returnReduce(time_.elapsedCpuTime(), maxOp<double>())
|
||||||
/writeInterval_
|
/interval_
|
||||||
);
|
);
|
||||||
if (outputIndex > outputTimeLastDump_)
|
if (executionIndex > executionIndex_)
|
||||||
{
|
{
|
||||||
outputTimeLastDump_ = outputIndex;
|
executionIndex_ = executionIndex;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -199,14 +199,14 @@ bool Foam::outputFilterControl::output()
|
|||||||
|
|
||||||
case ocClockTime:
|
case ocClockTime:
|
||||||
{
|
{
|
||||||
label outputIndex = label
|
label executionIndex = label
|
||||||
(
|
(
|
||||||
returnReduce(label(time_.elapsedClockTime()), maxOp<label>())
|
returnReduce(label(time_.elapsedClockTime()), maxOp<label>())
|
||||||
/writeInterval_
|
/interval_
|
||||||
);
|
);
|
||||||
if (outputIndex > outputTimeLastDump_)
|
if (executionIndex > executionIndex_)
|
||||||
{
|
{
|
||||||
outputTimeLastDump_ = outputIndex;
|
executionIndex_ = executionIndex;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -221,7 +221,7 @@ bool Foam::outputFilterControl::output()
|
|||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Undefined output control: "
|
<< "Undefined output control: "
|
||||||
<< writeControlNames_[writeControl_] << nl
|
<< timeControlNames_[timeControl_] << nl
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -54,15 +54,15 @@ class outputFilterControl
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
//- The output control options
|
//- The output control options
|
||||||
enum writeControls
|
enum timeControls
|
||||||
{
|
{
|
||||||
ocTimeStep, //!< execution is coupled to the time-step
|
ocTimeStep, //!< execution is coupled to the time-step
|
||||||
ocWriteTime, //!< execution is coupled to the write-time
|
ocWriteTime, //!< execution is coupled to the write-time
|
||||||
ocOutputTime, //!< execution is coupled to the output-time
|
ocOutputTime, //!< execution is coupled to the output-time
|
||||||
ocAdjustableRunTime, //!< Adjust time step for dumping
|
ocAdjustableRunTime, //!< Adjust time step for execution
|
||||||
ocRunTime, //!< run time for dumping
|
ocRunTime, //!< run time for execution
|
||||||
ocClockTime, //!< clock time for dumping
|
ocClockTime, //!< clock time for execution
|
||||||
ocCpuTime, //!< cpu time for dumping
|
ocCpuTime, //!< cpu time for execution
|
||||||
ocNone //!< no output
|
ocNone //!< no output
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -77,28 +77,29 @@ private:
|
|||||||
//- Prefix
|
//- Prefix
|
||||||
const word prefix_;
|
const word prefix_;
|
||||||
|
|
||||||
//- String representation of writeControls enums
|
//- String representation of timeControls enums
|
||||||
static const NamedEnum<writeControls, 8> writeControlNames_;
|
static const NamedEnum<timeControls, 8> timeControlNames_;
|
||||||
|
|
||||||
//- Type of output
|
//- Type of output
|
||||||
writeControls writeControl_;
|
timeControls timeControl_;
|
||||||
|
|
||||||
//- The execution interval (in time steps) when using \c timeStep mode,
|
//- Execution interval steps for timeStep mode
|
||||||
// a value <= 1 means execute at every time step
|
// a value <= 1 means execute at every time step
|
||||||
label outputInterval_;
|
label intervalSteps_;
|
||||||
|
|
||||||
//- Dump each deltaT (adjust Ttime)
|
//- Execution interval
|
||||||
scalar writeInterval_;
|
scalar interval_;
|
||||||
|
|
||||||
//- Dumping counter for ocOutputTime or index dump
|
//- Index of previous execution
|
||||||
// for ocAdjustableRunTime
|
label executionIndex_;
|
||||||
label outputTimeLastDump_;
|
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct and assignment
|
//- Disallow default bitwise copy construct and assignment
|
||||||
outputFilterControl(const outputFilterControl&);
|
outputFilterControl(const outputFilterControl&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const outputFilterControl&);
|
void operator=(const outputFilterControl&);
|
||||||
|
|
||||||
|
|
||||||
@ -124,20 +125,20 @@ public:
|
|||||||
//- Read from dictionary
|
//- Read from dictionary
|
||||||
void read(const dictionary&);
|
void read(const dictionary&);
|
||||||
|
|
||||||
//- Return const access to the Time object
|
//- Return Time
|
||||||
inline const Time& time() const;
|
inline const Time& time() const;
|
||||||
|
|
||||||
//- Flag to indicate whether to output
|
//- Flag to indicate whether to execute
|
||||||
bool output();
|
bool execute();
|
||||||
|
|
||||||
//- Return writeControl
|
//- Return control
|
||||||
inline writeControls writeControl() const;
|
inline timeControls control() const;
|
||||||
|
|
||||||
//- Return writeInterval
|
//- Return interval
|
||||||
inline scalar writeInterval() const;
|
inline scalar interval() const;
|
||||||
|
|
||||||
//- Return outputTimeLastDump
|
//- Return the index of the previous execution
|
||||||
inline label outputTimeLastDump() const;
|
inline label executionIndex() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -31,22 +31,22 @@ inline const Foam::Time& Foam::outputFilterControl::time() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::outputFilterControl::writeControls
|
inline Foam::outputFilterControl::timeControls
|
||||||
Foam::outputFilterControl::writeControl() const
|
Foam::outputFilterControl::control() const
|
||||||
{
|
{
|
||||||
return writeControl_;
|
return timeControl_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::scalar Foam::outputFilterControl::writeInterval() const
|
inline Foam::scalar Foam::outputFilterControl::interval() const
|
||||||
{
|
{
|
||||||
return writeInterval_;
|
return interval_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::label Foam::outputFilterControl::outputTimeLastDump() const
|
inline Foam::label Foam::outputFilterControl::executionIndex() const
|
||||||
{
|
{
|
||||||
return outputTimeLastDump_;
|
return executionIndex_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -161,7 +161,7 @@ void Foam::subModelBase::cacheFields(const bool)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::subModelBase::outputTime() const
|
bool Foam::subModelBase::writeTime() const
|
||||||
{
|
{
|
||||||
return active();
|
return active();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -153,7 +153,7 @@ public:
|
|||||||
virtual void cacheFields(const bool store);
|
virtual void cacheFields(const bool store);
|
||||||
|
|
||||||
//- Flag to indicate when to write a property
|
//- Flag to indicate when to write a property
|
||||||
virtual bool outputTime() const;
|
virtual bool writeTime() const;
|
||||||
|
|
||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
|
|||||||
@ -130,7 +130,7 @@ void Foam::porosityModels::DarcyForchheimer::calcTransformModelData()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug && mesh_.time().outputTime())
|
if (debug && mesh_.time().writeTime())
|
||||||
{
|
{
|
||||||
volTensorField Dout
|
volTensorField Dout
|
||||||
(
|
(
|
||||||
|
|||||||
@ -55,7 +55,7 @@ void Foam::fv::meanVelocityForce::writeProps
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// Only write on output time
|
// Only write on output time
|
||||||
if (mesh_.time().outputTime())
|
if (mesh_.time().writeTime())
|
||||||
{
|
{
|
||||||
IOdictionary propsDict
|
IOdictionary propsDict
|
||||||
(
|
(
|
||||||
|
|||||||
@ -537,7 +537,7 @@ void Foam::fv::rotorDiskSource::addSup
|
|||||||
// Add source to rhs of eqn
|
// Add source to rhs of eqn
|
||||||
eqn -= force;
|
eqn -= force;
|
||||||
|
|
||||||
if (mesh_.time().outputTime())
|
if (mesh_.time().writeTime())
|
||||||
{
|
{
|
||||||
force.write();
|
force.write();
|
||||||
}
|
}
|
||||||
@ -575,7 +575,7 @@ void Foam::fv::rotorDiskSource::addSup
|
|||||||
// Add source to rhs of eqn
|
// Add source to rhs of eqn
|
||||||
eqn -= force;
|
eqn -= force;
|
||||||
|
|
||||||
if (mesh_.time().outputTime())
|
if (mesh_.time().writeTime())
|
||||||
{
|
{
|
||||||
force.write();
|
force.write();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -167,7 +167,7 @@ void Foam::fv::rotorDiskSource::writeField
|
|||||||
{
|
{
|
||||||
typedef GeometricField<Type, fvPatchField, volMesh> fieldType;
|
typedef GeometricField<Type, fvPatchField, volMesh> fieldType;
|
||||||
|
|
||||||
if (mesh_.time().outputTime() || writeNow)
|
if (mesh_.time().writeTime() || writeNow)
|
||||||
{
|
{
|
||||||
tmp<fieldType> tfield
|
tmp<fieldType> tfield
|
||||||
(
|
(
|
||||||
|
|||||||
@ -209,7 +209,7 @@ void Foam::fv::interRegionHeatTransferModel::addSup
|
|||||||
<< fvc::domainIntegrate(htc_).value()
|
<< fvc::domainIntegrate(htc_).value()
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
if (mesh_.time().outputTime())
|
if (mesh_.time().writeTime())
|
||||||
{
|
{
|
||||||
Tmapped.write();
|
Tmapped.write();
|
||||||
htc_.write();
|
htc_.write();
|
||||||
|
|||||||
@ -233,7 +233,7 @@ void Foam::KinematicCloud<CloudType>::postEvolve()
|
|||||||
|
|
||||||
solution_.nextIter();
|
solution_.nextIter();
|
||||||
|
|
||||||
if (this->db().time().outputTime())
|
if (this->db().time().writeTime())
|
||||||
{
|
{
|
||||||
outputProperties_.writeObject
|
outputProperties_.writeObject
|
||||||
(
|
(
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -202,7 +202,7 @@ bool Foam::cloudSolution::solveThisStep() const
|
|||||||
return
|
return
|
||||||
active_
|
active_
|
||||||
&& (
|
&& (
|
||||||
mesh_.time().outputTime()
|
mesh_.time().writeTime()
|
||||||
|| (mesh_.time().timeIndex() % calcFrequency_ == 0)
|
|| (mesh_.time().timeIndex() % calcFrequency_ == 0)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -225,7 +225,7 @@ bool Foam::cloudSolution::canEvolve()
|
|||||||
|
|
||||||
bool Foam::cloudSolution::output() const
|
bool Foam::cloudSolution::output() const
|
||||||
{
|
{
|
||||||
return active_ && mesh_.time().outputTime();
|
return active_ && mesh_.time().writeTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -103,7 +103,7 @@ void Foam::CloudFunctionObject<CloudType>::preEvolve()
|
|||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
void Foam::CloudFunctionObject<CloudType>::postEvolve()
|
void Foam::CloudFunctionObject<CloudType>::postEvolve()
|
||||||
{
|
{
|
||||||
if (this->owner().time().outputTime())
|
if (this->owner().time().writeTime())
|
||||||
{
|
{
|
||||||
this->write();
|
this->write();
|
||||||
}
|
}
|
||||||
@ -158,7 +158,7 @@ const Foam::fileName& Foam::CloudFunctionObject<CloudType>::outputDir() const
|
|||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
Foam::fileName Foam::CloudFunctionObject<CloudType>::outputTimeDir() const
|
Foam::fileName Foam::CloudFunctionObject<CloudType>::writeTimeDir() const
|
||||||
{
|
{
|
||||||
return outputDir_/this->owner().time().timeName();
|
return outputDir_/this->owner().time().timeName();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -179,7 +179,7 @@ public:
|
|||||||
const fileName& outputDir() const;
|
const fileName& outputDir() const;
|
||||||
|
|
||||||
//- Return the output time path
|
//- Return the output time path
|
||||||
fileName outputTimeDir() const;
|
fileName writeTimeDir() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ void Foam::FacePostProcessing<CloudType>::makeLogFile
|
|||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
// Create directory if does not exist
|
// Create directory if does not exist
|
||||||
mkDir(this->outputTimeDir());
|
mkDir(this->writeTimeDir());
|
||||||
|
|
||||||
// Open new file at start up
|
// Open new file at start up
|
||||||
outputFilePtr_.set
|
outputFilePtr_.set
|
||||||
@ -59,7 +59,7 @@ void Foam::FacePostProcessing<CloudType>::makeLogFile
|
|||||||
zoneI,
|
zoneI,
|
||||||
new OFstream
|
new OFstream
|
||||||
(
|
(
|
||||||
this->outputTimeDir()/(type() + '_' + zoneName + ".dat")
|
this->writeTimeDir()/(type() + '_' + zoneName + ".dat")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ void Foam::FacePostProcessing<CloudType>::write()
|
|||||||
|
|
||||||
writer->write
|
writer->write
|
||||||
(
|
(
|
||||||
this->outputTimeDir(),
|
this->writeTimeDir(),
|
||||||
fZone.name(),
|
fZone.name(),
|
||||||
allPoints,
|
allPoints,
|
||||||
allFaces,
|
allFaces,
|
||||||
@ -213,7 +213,7 @@ void Foam::FacePostProcessing<CloudType>::write()
|
|||||||
|
|
||||||
writer->write
|
writer->write
|
||||||
(
|
(
|
||||||
this->outputTimeDir(),
|
this->writeTimeDir(),
|
||||||
fZone.name(),
|
fZone.name(),
|
||||||
allPoints,
|
allPoints,
|
||||||
allFaces,
|
allFaces,
|
||||||
|
|||||||
@ -52,12 +52,12 @@ void Foam::ParticleCollector<CloudType>::makeLogFile
|
|||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
// Create directory if does not exist
|
// Create directory if does not exist
|
||||||
mkDir(this->outputTimeDir());
|
mkDir(this->writeTimeDir());
|
||||||
|
|
||||||
// Open new file at start up
|
// Open new file at start up
|
||||||
outputFilePtr_.reset
|
outputFilePtr_.reset
|
||||||
(
|
(
|
||||||
new OFstream(this->outputTimeDir()/(type() + ".dat"))
|
new OFstream(this->writeTimeDir()/(type() + ".dat"))
|
||||||
);
|
);
|
||||||
|
|
||||||
outputFilePtr_()
|
outputFilePtr_()
|
||||||
@ -457,7 +457,7 @@ void Foam::ParticleCollector<CloudType>::write()
|
|||||||
|
|
||||||
writer->write
|
writer->write
|
||||||
(
|
(
|
||||||
this->outputTimeDir(),
|
this->writeTimeDir(),
|
||||||
"collector",
|
"collector",
|
||||||
points_,
|
points_,
|
||||||
faces_,
|
faces_,
|
||||||
@ -468,7 +468,7 @@ void Foam::ParticleCollector<CloudType>::write()
|
|||||||
|
|
||||||
writer->write
|
writer->write
|
||||||
(
|
(
|
||||||
this->outputTimeDir(),
|
this->writeTimeDir(),
|
||||||
"collector",
|
"collector",
|
||||||
points_,
|
points_,
|
||||||
faces_,
|
faces_,
|
||||||
|
|||||||
@ -69,13 +69,13 @@ void Foam::PatchPostProcessing<CloudType>::write()
|
|||||||
const fvMesh& mesh = this->owner().mesh();
|
const fvMesh& mesh = this->owner().mesh();
|
||||||
|
|
||||||
// Create directory if it doesn't exist
|
// Create directory if it doesn't exist
|
||||||
mkDir(this->outputTimeDir());
|
mkDir(this->writeTimeDir());
|
||||||
|
|
||||||
const word& patchName = mesh.boundaryMesh()[patchIDs_[i]].name();
|
const word& patchName = mesh.boundaryMesh()[patchIDs_[i]].name();
|
||||||
|
|
||||||
OFstream patchOutFile
|
OFstream patchOutFile
|
||||||
(
|
(
|
||||||
this->outputTimeDir()/patchName + ".post",
|
this->writeTimeDir()/patchName + ".post",
|
||||||
IOstream::ASCII,
|
IOstream::ASCII,
|
||||||
IOstream::currentVersion,
|
IOstream::currentVersion,
|
||||||
mesh.time().writeCompression()
|
mesh.time().writeCompression()
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -114,12 +114,12 @@ CloudType& Foam::CloudSubModelBase<CloudType>::owner()
|
|||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
bool Foam::CloudSubModelBase<CloudType>::outputTime() const
|
bool Foam::CloudSubModelBase<CloudType>::writeTime() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
active()
|
active()
|
||||||
&& owner_.solution().transient()
|
&& owner_.solution().transient()
|
||||||
&& owner_.db().time().outputTime();
|
&& owner_.db().time().writeTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -105,7 +105,7 @@ public:
|
|||||||
const CloudType& owner() const;
|
const CloudType& owner() const;
|
||||||
|
|
||||||
//- Flag to indicate when to write a property
|
//- Flag to indicate when to write a property
|
||||||
virtual bool outputTime() const;
|
virtual bool writeTime() const;
|
||||||
|
|
||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
|
|||||||
@ -628,7 +628,7 @@ void Foam::InjectionModel<CloudType>::info(Ostream& os)
|
|||||||
<< " number of parcels added = " << parcelsAddedTotal_ << nl
|
<< " number of parcels added = " << parcelsAddedTotal_ << nl
|
||||||
<< " mass introduced = " << massInjected_ << nl;
|
<< " mass introduced = " << massInjected_ << nl;
|
||||||
|
|
||||||
if (this->outputTime())
|
if (this->writeTime())
|
||||||
{
|
{
|
||||||
this->setModelProperty("massInjected", massInjected_);
|
this->setModelProperty("massInjected", massInjected_);
|
||||||
this->setModelProperty("nInjections", nInjections_);
|
this->setModelProperty("nInjections", nInjections_);
|
||||||
|
|||||||
@ -316,7 +316,7 @@ void Foam::LocalInteraction<CloudType>::info(Ostream& os)
|
|||||||
<< ", " << mps[i] << nl;
|
<< ", " << mps[i] << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->outputTime())
|
if (this->writeTime())
|
||||||
{
|
{
|
||||||
this->setModelProperty("nEscape", npe);
|
this->setModelProperty("nEscape", npe);
|
||||||
nEscape_ = 0;
|
nEscape_ = 0;
|
||||||
|
|||||||
@ -199,7 +199,7 @@ void Foam::StandardWallInteraction<CloudType>::info(Ostream& os)
|
|||||||
<< " - escape = " << npe << ", " << mpe << nl
|
<< " - escape = " << npe << ", " << mpe << nl
|
||||||
<< " - stick = " << nps << ", " << mps << nl;
|
<< " - stick = " << nps << ", " << mps << nl;
|
||||||
|
|
||||||
if (this->outputTime())
|
if (this->writeTime())
|
||||||
{
|
{
|
||||||
this->setModelProperty("nEscape", npe);
|
this->setModelProperty("nEscape", npe);
|
||||||
this->setModelProperty("massEscape", mpe);
|
this->setModelProperty("massEscape", mpe);
|
||||||
|
|||||||
@ -269,7 +269,7 @@ void Foam::SurfaceFilmModel<CloudType>::info(Ostream& os)
|
|||||||
os << " Parcels absorbed into film = " << nTransTotal << nl
|
os << " Parcels absorbed into film = " << nTransTotal << nl
|
||||||
<< " New film detached parcels = " << nInjectTotal << endl;
|
<< " New film detached parcels = " << nInjectTotal << endl;
|
||||||
|
|
||||||
if (this->outputTime())
|
if (this->writeTime())
|
||||||
{
|
{
|
||||||
this->setModelProperty("nParcelsTransferred", nTransTotal);
|
this->setModelProperty("nParcelsTransferred", nTransTotal);
|
||||||
this->setModelProperty("nParcelsInjected", nInjectTotal);
|
this->setModelProperty("nParcelsInjected", nInjectTotal);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -170,7 +170,7 @@ void Foam::PhaseChangeModel<CloudType>::info(Ostream& os)
|
|||||||
|
|
||||||
Info<< " Mass transfer phase change = " << massTotal << nl;
|
Info<< " Mass transfer phase change = " << massTotal << nl;
|
||||||
|
|
||||||
if (this->outputTime())
|
if (this->writeTime())
|
||||||
{
|
{
|
||||||
this->setBaseProperty("mass", massTotal);
|
this->setBaseProperty("mass", massTotal);
|
||||||
dMass_ = 0.0;
|
dMass_ = 0.0;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -89,7 +89,7 @@ void Foam::DevolatilisationModel<CloudType>::info(Ostream& os)
|
|||||||
|
|
||||||
Info<< " Mass transfer devolatilisation = " << massTotal << nl;
|
Info<< " Mass transfer devolatilisation = " << massTotal << nl;
|
||||||
|
|
||||||
if (this->outputTime())
|
if (this->writeTime())
|
||||||
{
|
{
|
||||||
this->setBaseProperty("mass", massTotal);
|
this->setBaseProperty("mass", massTotal);
|
||||||
dMass_ = 0.0;
|
dMass_ = 0.0;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -89,7 +89,7 @@ void Foam::SurfaceReactionModel<CloudType>::info(Ostream& os)
|
|||||||
|
|
||||||
Info<< " Mass transfer surface reaction = " << massTotal << nl;
|
Info<< " Mass transfer surface reaction = " << massTotal << nl;
|
||||||
|
|
||||||
if (this->outputTime())
|
if (this->writeTime())
|
||||||
{
|
{
|
||||||
this->setBaseProperty("mass", massTotal);
|
this->setBaseProperty("mass", massTotal);
|
||||||
dMass_ = 0.0;
|
dMass_ = 0.0;
|
||||||
|
|||||||
@ -669,7 +669,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::info(Ostream& os)
|
|||||||
|
|
||||||
os << " New film splash parcels = " << nSplashTotal << endl;
|
os << " New film splash parcels = " << nSplashTotal << endl;
|
||||||
|
|
||||||
if (this->outputTime())
|
if (this->writeTime())
|
||||||
{
|
{
|
||||||
this->setModelProperty("nParcelsSplashed", nSplashTotal);
|
this->setModelProperty("nParcelsSplashed", nSplashTotal);
|
||||||
nParcelsSplashed_ = 0;
|
nParcelsSplashed_ = 0;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
if (runTime.outputTime())
|
if (runTime.writeTime())
|
||||||
{
|
{
|
||||||
/*-----------------------------------------------------------------------*\
|
/*-----------------------------------------------------------------------*\
|
||||||
Number density
|
Number density
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
if (runTime.outputTime())
|
if (runTime.writeTime())
|
||||||
{
|
{
|
||||||
allSpeciesN_RU = List<scalarField>
|
allSpeciesN_RU = List<scalarField>
|
||||||
(
|
(
|
||||||
|
|||||||
@ -48,7 +48,7 @@ accumulatedNMols += singleStepNMols;
|
|||||||
|
|
||||||
accumulatedDOFs += singleStepDOFs;
|
accumulatedDOFs += singleStepDOFs;
|
||||||
|
|
||||||
if (runTime.outputTime())
|
if (runTime.writeTime())
|
||||||
{
|
{
|
||||||
if (accumulatedNMols)
|
if (accumulatedNMols)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -29,7 +29,7 @@ Description
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
if (runTime.outputTime())
|
if (runTime.writeTime())
|
||||||
{
|
{
|
||||||
molecules.applyConstraintsAndThermostats
|
molecules.applyConstraintsAndThermostats
|
||||||
(
|
(
|
||||||
|
|||||||
@ -58,7 +58,7 @@ functions
|
|||||||
enabled true;
|
enabled true;
|
||||||
|
|
||||||
// When to output the average fields
|
// When to output the average fields
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
// Fields to be averaged - runTime modifiable
|
// Fields to be averaged - runTime modifiable
|
||||||
fields
|
fields
|
||||||
|
|||||||
@ -28,7 +28,7 @@ functions
|
|||||||
enabled true;
|
enabled true;
|
||||||
|
|
||||||
// When to output the average fields
|
// When to output the average fields
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
// Fields to be transformed - runTime modifiable
|
// Fields to be transformed - runTime modifiable
|
||||||
fields
|
fields
|
||||||
|
|||||||
@ -52,7 +52,7 @@ functions
|
|||||||
functionObjectLibs ("libfieldFunctionObjects.so");
|
functionObjectLibs ("libfieldFunctionObjects.so");
|
||||||
|
|
||||||
enabled true;
|
enabled true;
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
// Output to log&file (true) or to file only
|
// Output to log&file (true) or to file only
|
||||||
log true;
|
log true;
|
||||||
@ -93,7 +93,7 @@ functions
|
|||||||
type faceSource;
|
type faceSource;
|
||||||
functionObjectLibs ("libfieldFunctionObjects.so");
|
functionObjectLibs ("libfieldFunctionObjects.so");
|
||||||
enabled true;
|
enabled true;
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
log true;
|
log true;
|
||||||
valueOutput true;
|
valueOutput true;
|
||||||
source faceZone;
|
source faceZone;
|
||||||
@ -111,7 +111,7 @@ functions
|
|||||||
type cellSource;
|
type cellSource;
|
||||||
functionObjectLibs ("libfieldFunctionObjects.so");
|
functionObjectLibs ("libfieldFunctionObjects.so");
|
||||||
enabled true;
|
enabled true;
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
log true;
|
log true;
|
||||||
valueOutput true;
|
valueOutput true;
|
||||||
source cellZone;
|
source cellZone;
|
||||||
|
|||||||
@ -54,7 +54,7 @@ functions
|
|||||||
type nearWallFields;
|
type nearWallFields;
|
||||||
|
|
||||||
// Output every
|
// Output every
|
||||||
writeControl outputTime; //timeStep;
|
writeControl writeTime; //timeStep;
|
||||||
//writeInterval 5;
|
//writeInterval 5;
|
||||||
|
|
||||||
// Fields to be sampled. Per field original name and mapped field to
|
// Fields to be sampled. Per field original name and mapped field to
|
||||||
|
|||||||
@ -28,7 +28,7 @@ functions
|
|||||||
enabled true;
|
enabled true;
|
||||||
|
|
||||||
// When to output the average fields
|
// When to output the average fields
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -54,7 +54,7 @@ functions
|
|||||||
functionObjectLibs ("libfieldFunctionObjects.so");
|
functionObjectLibs ("libfieldFunctionObjects.so");
|
||||||
|
|
||||||
// Output every
|
// Output every
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
// writeInterval 10;
|
// writeInterval 10;
|
||||||
|
|
||||||
setFormat vtk; //gnuplot, raw etc. See sampleDict.
|
setFormat vtk; //gnuplot, raw etc. See sampleDict.
|
||||||
|
|||||||
@ -63,7 +63,7 @@ functions
|
|||||||
type nearWallFields;
|
type nearWallFields;
|
||||||
|
|
||||||
// Output every
|
// Output every
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
//writeInterval 1;
|
//writeInterval 1;
|
||||||
|
|
||||||
// Fields to be sampled. Per field original name and mapped field to
|
// Fields to be sampled. Per field original name and mapped field to
|
||||||
@ -86,7 +86,7 @@ functions
|
|||||||
type wallBoundedStreamLine;
|
type wallBoundedStreamLine;
|
||||||
|
|
||||||
// Output every
|
// Output every
|
||||||
writeControl timeStep; //outputTime;
|
writeControl timeStep; //writeTime;
|
||||||
// writeInterval 10;
|
// writeInterval 10;
|
||||||
|
|
||||||
setFormat vtk; //gnuplot; //xmgr; //raw; //jplot;
|
setFormat vtk; //gnuplot; //xmgr; //raw; //jplot;
|
||||||
|
|||||||
@ -66,19 +66,19 @@ functions
|
|||||||
|
|
||||||
// Execute upon options:
|
// Execute upon options:
|
||||||
// timeStep
|
// timeStep
|
||||||
// outputTime
|
// writeTime
|
||||||
// adjustableRunTime
|
// adjustableRunTime
|
||||||
// runTime
|
// runTime
|
||||||
// clockTime
|
// clockTime
|
||||||
// cpuTime
|
// cpuTime
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
// Objects (fields or lagrangian fields in any of the clouds)
|
// Objects (fields or lagrangian fields in any of the clouds)
|
||||||
// to write every outputTime
|
// to write every writeTime
|
||||||
objectNames (p positions nParticle);
|
objectNames (p positions nParticle);
|
||||||
|
|
||||||
// Write as normal every writeInterval'th outputTime.
|
// Write as normal every writeInterval'th writeTime.
|
||||||
writeInterval 1; // (timeStep, outputTime)
|
writeInterval 1; // (timeStep, writeTime)
|
||||||
|
|
||||||
// Interval of time (sec) to write down(
|
// Interval of time (sec) to write down(
|
||||||
writeInterval 10.5 //(adjustableRunTime, runTime, clockTime, cpuTime)
|
writeInterval 10.5 //(adjustableRunTime, runTime, clockTime, cpuTime)
|
||||||
@ -95,14 +95,14 @@ functions
|
|||||||
|
|
||||||
// When to write:
|
// When to write:
|
||||||
// timeStep (with optional writeInterval)
|
// timeStep (with optional writeInterval)
|
||||||
// outputTime (with optional writeInterval)
|
// writeTime (with optional writeInterval)
|
||||||
// adjustableRunTime
|
// adjustableRunTime
|
||||||
// runTime
|
// runTime
|
||||||
// clockTime
|
// clockTime
|
||||||
// cpuTime
|
// cpuTime
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
// Write every writeInterval (only valid for timeStemp, outputTime)
|
// Write every writeInterval (only valid for timeStemp, writeTime)
|
||||||
writeInterval 1;
|
writeInterval 1;
|
||||||
|
|
||||||
// Interval of time (valid for adjustableRunTime, runTime, clockTime,
|
// Interval of time (valid for adjustableRunTime, runTime, clockTime,
|
||||||
|
|||||||
@ -74,7 +74,7 @@ void Foam::functionObjects::partialWrite::read(const dictionary& dict)
|
|||||||
|
|
||||||
Info<< type() << " " << name() << ":" << nl
|
Info<< type() << " " << name() << ":" << nl
|
||||||
<< " dumping every " << writeInterval_
|
<< " dumping every " << writeInterval_
|
||||||
<< " th outputTime : " << nl << endl ;
|
<< " th writeTime : " << nl << endl ;
|
||||||
|
|
||||||
forAllConstIter(HashSet<word>, objectNames_, iter)
|
forAllConstIter(HashSet<word>, objectNames_, iter)
|
||||||
{
|
{
|
||||||
@ -123,7 +123,7 @@ void Foam::functionObjects::partialWrite::end()
|
|||||||
|
|
||||||
void Foam::functionObjects::partialWrite::timeSet()
|
void Foam::functionObjects::partialWrite::timeSet()
|
||||||
{
|
{
|
||||||
if (obr_.time().outputTime())
|
if (obr_.time().writeTime())
|
||||||
{
|
{
|
||||||
writeInstance_++;
|
writeInstance_++;
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ functions
|
|||||||
type systemCall;
|
type systemCall;
|
||||||
functionObjectLibs ("libsystemCall.so");
|
functionObjectLibs ("libsystemCall.so");
|
||||||
enabled true;
|
enabled true;
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
// called every time step
|
// called every time step
|
||||||
executeCalls
|
executeCalls
|
||||||
|
|||||||
@ -66,19 +66,19 @@ functions
|
|||||||
|
|
||||||
// Execute upon options:
|
// Execute upon options:
|
||||||
// timeStep
|
// timeStep
|
||||||
// outputTime
|
// writeTime
|
||||||
// adjustableRunTime
|
// adjustableRunTime
|
||||||
// runTime
|
// runTime
|
||||||
// clockTime
|
// clockTime
|
||||||
// cpuTime
|
// cpuTime
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
// Objects (fields or lagrangian fields in any of the clouds)
|
// Objects (fields or lagrangian fields in any of the clouds)
|
||||||
// to write every outputTime
|
// to write every writeTime
|
||||||
objectNames (p positions nParticle);
|
objectNames (p positions nParticle);
|
||||||
|
|
||||||
// Write as normal every writeInterval'th outputTime.
|
// Write as normal every writeInterval'th writeTime.
|
||||||
writeInterval 1; // (timeStep, outputTime)
|
writeInterval 1; // (timeStep, writeTime)
|
||||||
|
|
||||||
// Interval of time (sec) to write down(
|
// Interval of time (sec) to write down(
|
||||||
writeInterval 10.5 //(adjustableRunTime, runTime, clockTime, cpuTime)
|
writeInterval 10.5 //(adjustableRunTime, runTime, clockTime, cpuTime)
|
||||||
@ -95,14 +95,14 @@ functions
|
|||||||
|
|
||||||
// When to write:
|
// When to write:
|
||||||
// timeStep (with optional writeInterval)
|
// timeStep (with optional writeInterval)
|
||||||
// outputTime (with optional writeInterval)
|
// writeTime (with optional writeInterval)
|
||||||
// adjustableRunTime
|
// adjustableRunTime
|
||||||
// runTime
|
// runTime
|
||||||
// clockTime
|
// clockTime
|
||||||
// cpuTime
|
// cpuTime
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
// Write every writeInterval (only valid for timeStemp, outputTime)
|
// Write every writeInterval (only valid for timeStemp, writeTime)
|
||||||
writeInterval 1;
|
writeInterval 1;
|
||||||
|
|
||||||
// Interval of time (valid for adjustableRunTime, runTime, clockTime,
|
// Interval of time (valid for adjustableRunTime, runTime, clockTime,
|
||||||
|
|||||||
@ -33,7 +33,7 @@ Description
|
|||||||
as the main time database through the writeControl setting:
|
as the main time database through the writeControl setting:
|
||||||
|
|
||||||
\li \c timeStep
|
\li \c timeStep
|
||||||
\li \c outputTime
|
\li \c writeTime
|
||||||
\li \c adjustableRunTime
|
\li \c adjustableRunTime
|
||||||
\li \c runTime
|
\li \c runTime
|
||||||
\li \c clockTime
|
\li \c clockTime
|
||||||
|
|||||||
@ -527,7 +527,7 @@ void Foam::regionModels::regionModel::evolve()
|
|||||||
Info<< endl << decrIndent;
|
Info<< endl << decrIndent;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (time_.outputTime())
|
if (time_.writeTime())
|
||||||
{
|
{
|
||||||
outputProperties().writeObject
|
outputProperties().writeObject
|
||||||
(
|
(
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -90,7 +90,7 @@ void Foam::regionModels::regionModelFunctionObject::preEvolveRegion()
|
|||||||
|
|
||||||
void Foam::regionModels::regionModelFunctionObject::postEvolveRegion()
|
void Foam::regionModels::regionModelFunctionObject::postEvolveRegion()
|
||||||
{
|
{
|
||||||
if (owner_.regionMesh().time().outputTime())
|
if (owner_.regionMesh().time().writeTime())
|
||||||
{
|
{
|
||||||
write();
|
write();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -149,7 +149,7 @@ void kinematicSingleLayer::transferPrimaryRegionSourceFields()
|
|||||||
pSp_.correctBoundaryConditions();
|
pSp_.correctBoundaryConditions();
|
||||||
|
|
||||||
// update addedMassTotal counter
|
// update addedMassTotal counter
|
||||||
if (time().outputTime())
|
if (time().writeTime())
|
||||||
{
|
{
|
||||||
scalar addedMassTotal = 0.0;
|
scalar addedMassTotal = 0.0;
|
||||||
outputProperties().readIfPresent("addedMassTotal", addedMassTotal);
|
outputProperties().readIfPresent("addedMassTotal", addedMassTotal);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -93,9 +93,9 @@ filmSubModelBase::~filmSubModelBase()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
bool filmSubModelBase::outputTime() const
|
bool filmSubModelBase::writeTime() const
|
||||||
{
|
{
|
||||||
return active() && owner_.time().outputTime();
|
return active() && owner_.time().writeTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -101,7 +101,7 @@ public:
|
|||||||
// Access
|
// Access
|
||||||
|
|
||||||
//- Flag to indicate when to write a property
|
//- Flag to indicate when to write a property
|
||||||
virtual bool outputTime() const;
|
virtual bool writeTime() const;
|
||||||
|
|
||||||
//- Return const access to the owner surface film model
|
//- Return const access to the owner surface film model
|
||||||
inline const surfaceFilmModel& owner() const;
|
inline const surfaceFilmModel& owner() const;
|
||||||
|
|||||||
@ -221,7 +221,7 @@ tmp<fvVectorMatrix> contactAngleForce::correct(volVectorField& U)
|
|||||||
|
|
||||||
force /= magSf;
|
force /= magSf;
|
||||||
|
|
||||||
if (owner_.regionMesh().time().outputTime())
|
if (owner_.regionMesh().time().writeTime())
|
||||||
{
|
{
|
||||||
tForce().write();
|
tForce().write();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -101,7 +101,7 @@ tmp<volScalarField> curvatureSeparation::calcInvR1
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug && mesh.time().outputTime())
|
if (debug && mesh.time().writeTime())
|
||||||
{
|
{
|
||||||
tinvR1().write();
|
tinvR1().write();
|
||||||
}
|
}
|
||||||
@ -192,7 +192,7 @@ tmp<scalarField> curvatureSeparation::calcCosAngle
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
// checks
|
// checks
|
||||||
if (debug && mesh.time().outputTime())
|
if (debug && mesh.time().writeTime())
|
||||||
{
|
{
|
||||||
volScalarField volCosAngle
|
volScalarField volCosAngle
|
||||||
(
|
(
|
||||||
@ -334,7 +334,7 @@ void curvatureSeparation::correct
|
|||||||
|
|
||||||
addToInjectedMass(sum(separated*availableMass));
|
addToInjectedMass(sum(separated*availableMass));
|
||||||
|
|
||||||
if (debug && mesh.time().outputTime())
|
if (debug && mesh.time().writeTime())
|
||||||
{
|
{
|
||||||
volScalarField volFnet
|
volScalarField volFnet
|
||||||
(
|
(
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -78,7 +78,7 @@ injectionModel::~injectionModel()
|
|||||||
|
|
||||||
void injectionModel::correct()
|
void injectionModel::correct()
|
||||||
{
|
{
|
||||||
if (outputTime())
|
if (writeTime())
|
||||||
{
|
{
|
||||||
scalar injectedMass0 = getModelProperty<scalar>("injectedMass");
|
scalar injectedMass0 = getModelProperty<scalar>("injectedMass");
|
||||||
injectedMass0 += returnReduce(injectedMass_, sumOp<scalar>());
|
injectedMass0 += returnReduce(injectedMass_, sumOp<scalar>());
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -166,7 +166,7 @@ void injectionModelList::info(Ostream& os)
|
|||||||
<< mass[i] << endl;
|
<< mass[i] << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (owner().time().outputTime())
|
if (owner().time().writeTime())
|
||||||
{
|
{
|
||||||
setBaseProperty("massInjected", mass);
|
setBaseProperty("massInjected", mass);
|
||||||
massInjected_ = 0.0;
|
massInjected_ = 0.0;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -142,7 +142,7 @@ void patchInjection::correct
|
|||||||
|
|
||||||
injectionModel::correct();
|
injectionModel::correct();
|
||||||
|
|
||||||
if (outputTime())
|
if (writeTime())
|
||||||
{
|
{
|
||||||
scalarField patchInjectedMasses0
|
scalarField patchInjectedMasses0
|
||||||
(
|
(
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -120,7 +120,7 @@ void thixotropicViscosity::correct
|
|||||||
// Shear rate
|
// Shear rate
|
||||||
volScalarField gDot("gDot", alpha*mag(U - Uw)/(delta + film.deltaSmall()));
|
volScalarField gDot("gDot", alpha*mag(U - Uw)/(delta + film.deltaSmall()));
|
||||||
|
|
||||||
if (debug && runTime.outputTime())
|
if (debug && runTime.writeTime())
|
||||||
{
|
{
|
||||||
gDot.write();
|
gDot.write();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -100,7 +100,7 @@ void phaseChangeModel::correct
|
|||||||
availableMass -= dMass;
|
availableMass -= dMass;
|
||||||
dMass.correctBoundaryConditions();
|
dMass.correctBoundaryConditions();
|
||||||
|
|
||||||
if (outputTime())
|
if (writeTime())
|
||||||
{
|
{
|
||||||
scalar phaseChangeMass = getModelProperty<scalar>("phaseChangeMass");
|
scalar phaseChangeMass = getModelProperty<scalar>("phaseChangeMass");
|
||||||
phaseChangeMass += returnReduce(totalMassPC_, sumOp<scalar>());
|
phaseChangeMass += returnReduce(totalMassPC_, sumOp<scalar>());
|
||||||
|
|||||||
@ -15,7 +15,7 @@ functions
|
|||||||
|
|
||||||
functionObjectLibs ("libsampling.so");
|
functionObjectLibs ("libsampling.so");
|
||||||
|
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
setFormat gnuplot;
|
setFormat gnuplot;
|
||||||
fields (p U);
|
fields (p U);
|
||||||
interpolationScheme cellPoint;
|
interpolationScheme cellPoint;
|
||||||
|
|||||||
@ -11,7 +11,7 @@ cuttingPlane
|
|||||||
type surfaces;
|
type surfaces;
|
||||||
functionObjectLibs ("libsampling.so");
|
functionObjectLibs ("libsampling.so");
|
||||||
|
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
surfaceFormat vtk;
|
surfaceFormat vtk;
|
||||||
fields ( p U );
|
fields ( p U );
|
||||||
|
|||||||
@ -56,7 +56,7 @@ functions
|
|||||||
type fieldAverage;
|
type fieldAverage;
|
||||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||||
enabled true;
|
enabled true;
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
fields
|
fields
|
||||||
(
|
(
|
||||||
|
|||||||
@ -11,7 +11,7 @@ cuttingPlane
|
|||||||
type surfaces;
|
type surfaces;
|
||||||
functionObjectLibs ("libsampling.so");
|
functionObjectLibs ("libsampling.so");
|
||||||
|
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
surfaceFormat vtk;
|
surfaceFormat vtk;
|
||||||
fields ( p U );
|
fields ( p U );
|
||||||
|
|||||||
@ -53,7 +53,7 @@ functions
|
|||||||
{
|
{
|
||||||
type fieldAverage;
|
type fieldAverage;
|
||||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
fields
|
fields
|
||||||
(
|
(
|
||||||
@ -118,7 +118,7 @@ functions
|
|||||||
type dsmcFields;
|
type dsmcFields;
|
||||||
functionObjectLibs ( "libutilityFunctionObjects.so" );
|
functionObjectLibs ( "libutilityFunctionObjects.so" );
|
||||||
enabled true;
|
enabled true;
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,7 @@ functions
|
|||||||
{
|
{
|
||||||
type fieldAverage;
|
type fieldAverage;
|
||||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
restartOnOutput off;
|
restartOnOutput off;
|
||||||
|
|
||||||
fields
|
fields
|
||||||
@ -119,7 +119,7 @@ functions
|
|||||||
type dsmcFields;
|
type dsmcFields;
|
||||||
functionObjectLibs ( "libutilityFunctionObjects.so" );
|
functionObjectLibs ( "libutilityFunctionObjects.so" );
|
||||||
enabled true;
|
enabled true;
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,7 @@ functions
|
|||||||
{
|
{
|
||||||
type fieldAverage;
|
type fieldAverage;
|
||||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
fields
|
fields
|
||||||
(
|
(
|
||||||
@ -118,7 +118,7 @@ functions
|
|||||||
type dsmcFields;
|
type dsmcFields;
|
||||||
functionObjectLibs ( "libutilityFunctionObjects.so" );
|
functionObjectLibs ( "libutilityFunctionObjects.so" );
|
||||||
enabled true;
|
enabled true;
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,7 @@ functions
|
|||||||
{
|
{
|
||||||
type fieldAverage;
|
type fieldAverage;
|
||||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
fields
|
fields
|
||||||
(
|
(
|
||||||
@ -119,7 +119,7 @@ functions
|
|||||||
type dsmcFields;
|
type dsmcFields;
|
||||||
functionObjectLibs ( "libutilityFunctionObjects.so" );
|
functionObjectLibs ( "libutilityFunctionObjects.so" );
|
||||||
enabled true;
|
enabled true;
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
forces1
|
forces1
|
||||||
@ -127,7 +127,7 @@ functions
|
|||||||
type forces;
|
type forces;
|
||||||
enabled true;
|
enabled true;
|
||||||
functionObjectLibs ( "libforces.so" );
|
functionObjectLibs ( "libforces.so" );
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
patches ( obstacle );
|
patches ( obstacle );
|
||||||
directForceDensity true;
|
directForceDensity true;
|
||||||
fDName fDMean;
|
fDName fDMean;
|
||||||
|
|||||||
@ -11,7 +11,7 @@ cuttingPlane
|
|||||||
type surfaces;
|
type surfaces;
|
||||||
functionObjectLibs ("libsampling.so");
|
functionObjectLibs ("libsampling.so");
|
||||||
|
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
surfaceFormat vtk;
|
surfaceFormat vtk;
|
||||||
fields ( p U );
|
fields ( p U );
|
||||||
|
|||||||
@ -15,7 +15,7 @@ Q
|
|||||||
type Q;
|
type Q;
|
||||||
|
|
||||||
// Output every
|
// Output every
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@ surfaces
|
|||||||
{
|
{
|
||||||
type surfaces;
|
type surfaces;
|
||||||
functionObjectLibs ("libsampling.so");
|
functionObjectLibs ("libsampling.so");
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
surfaceFormat vtk;
|
surfaceFormat vtk;
|
||||||
fields (p U Q);
|
fields (p U Q);
|
||||||
|
|||||||
@ -62,7 +62,7 @@ functions
|
|||||||
name probes;
|
name probes;
|
||||||
|
|
||||||
// Write at same frequency as fields
|
// Write at same frequency as fields
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
writeInterval 1;
|
writeInterval 1;
|
||||||
|
|
||||||
// Fields to be probed
|
// Fields to be probed
|
||||||
|
|||||||
@ -62,7 +62,7 @@ functions
|
|||||||
name probes;
|
name probes;
|
||||||
|
|
||||||
// Write at same frequency as fields
|
// Write at same frequency as fields
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
writeInterval 1;
|
writeInterval 1;
|
||||||
|
|
||||||
// Fields to be probed
|
// Fields to be probed
|
||||||
|
|||||||
@ -52,7 +52,7 @@ functions
|
|||||||
type fieldAverage;
|
type fieldAverage;
|
||||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||||
enabled true;
|
enabled true;
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
fields
|
fields
|
||||||
(
|
(
|
||||||
|
|||||||
@ -52,7 +52,7 @@ functions
|
|||||||
streamLines
|
streamLines
|
||||||
{
|
{
|
||||||
type streamLine;
|
type streamLine;
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
setFormat vtk;
|
setFormat vtk;
|
||||||
UName U;
|
UName U;
|
||||||
trackForward true;
|
trackForward true;
|
||||||
@ -74,7 +74,7 @@ functions
|
|||||||
{
|
{
|
||||||
type surfaces;
|
type surfaces;
|
||||||
functionObjectLibs ( "libsampling.so" );
|
functionObjectLibs ( "libsampling.so" );
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
surfaceFormat vtk;
|
surfaceFormat vtk;
|
||||||
fields ( p U );
|
fields ( p U );
|
||||||
interpolationScheme cellPoint;
|
interpolationScheme cellPoint;
|
||||||
|
|||||||
@ -10,7 +10,7 @@ cuttingPlane
|
|||||||
{
|
{
|
||||||
type surfaces;
|
type surfaces;
|
||||||
functionObjectLibs ("libsampling.so");
|
functionObjectLibs ("libsampling.so");
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
surfaceFormat vtk;
|
surfaceFormat vtk;
|
||||||
fields ( p U );
|
fields ( p U );
|
||||||
|
|||||||
@ -11,7 +11,7 @@ streamLines
|
|||||||
type streamLine;
|
type streamLine;
|
||||||
|
|
||||||
// Output every
|
// Output every
|
||||||
writeControl outputTime;
|
writeControl writeTime;
|
||||||
// writeInterval 10;
|
// writeInterval 10;
|
||||||
|
|
||||||
setFormat vtk; //gnuplot; //xmgr; //raw; //jplot; //csv; //ensight;
|
setFormat vtk; //gnuplot; //xmgr; //raw; //jplot; //csv; //ensight;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user