mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Revert "ENH: ensure written and evaluated values correspond (issue #311)"
This reverts commitc554dc7b7d. Functionality available in more general change in commitfb78378
This commit is contained in:
@ -112,7 +112,6 @@ Foam::functionObjects::ddt2::ddt2
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fvMeshFunctionObject(name, runTime, dict),
|
fvMeshFunctionObject(name, runTime, dict),
|
||||||
prevTimeIndex_(-1),
|
|
||||||
selectFields_(),
|
selectFields_(),
|
||||||
resultName_(word::null),
|
resultName_(word::null),
|
||||||
blacklist_(),
|
blacklist_(),
|
||||||
@ -218,20 +217,12 @@ bool Foam::functionObjects::ddt2::execute()
|
|||||||
<< "Unprocessed field " << ignored << endl;
|
<< "Unprocessed field " << ignored << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update time index
|
|
||||||
prevTimeIndex_ = obr_.time().timeIndex();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::functionObjects::ddt2::write()
|
bool Foam::functionObjects::ddt2::write()
|
||||||
{
|
{
|
||||||
if (prevTimeIndex_ < obr_.time().timeIndex())
|
|
||||||
{
|
|
||||||
// Ensure written results reflect the current state
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
if (results_.size())
|
if (results_.size())
|
||||||
{
|
{
|
||||||
Log << type() << ' ' << name() << " write:" << endl;
|
Log << type() << ' ' << name() << " write:" << endl;
|
||||||
|
|||||||
@ -101,9 +101,6 @@ class ddt2
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Time at last execute, ensures write uses up-to-date values
|
|
||||||
label prevTimeIndex_;
|
|
||||||
|
|
||||||
//- Name of fields to process
|
//- Name of fields to process
|
||||||
wordReList selectFields_;
|
wordReList selectFields_;
|
||||||
|
|
||||||
|
|||||||
@ -100,7 +100,6 @@ Foam::functionObjects::zeroGradient::zeroGradient
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fvMeshFunctionObject(name, runTime, dict),
|
fvMeshFunctionObject(name, runTime, dict),
|
||||||
prevTimeIndex_(-1),
|
|
||||||
selectFields_(),
|
selectFields_(),
|
||||||
resultName_(string::null),
|
resultName_(string::null),
|
||||||
results_()
|
results_()
|
||||||
@ -175,20 +174,12 @@ bool Foam::functionObjects::zeroGradient::execute()
|
|||||||
<< "Unprocessed field " << ignored << endl;
|
<< "Unprocessed field " << ignored << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update time index
|
|
||||||
prevTimeIndex_ = obr_.time().timeIndex();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::functionObjects::zeroGradient::write()
|
bool Foam::functionObjects::zeroGradient::write()
|
||||||
{
|
{
|
||||||
if (prevTimeIndex_ < obr_.time().timeIndex())
|
|
||||||
{
|
|
||||||
// Ensure written results reflect the current state
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
if (results_.size())
|
if (results_.size())
|
||||||
{
|
{
|
||||||
Log << type() << ' ' << name() << " write:" << endl;
|
Log << type() << ' ' << name() << " write:" << endl;
|
||||||
|
|||||||
@ -95,9 +95,6 @@ class zeroGradient
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Time at last execute, ensures write uses up-to-date values
|
|
||||||
label prevTimeIndex_;
|
|
||||||
|
|
||||||
//- Name of fields to process
|
//- Name of fields to process
|
||||||
wordReList selectFields_;
|
wordReList selectFields_;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user