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