mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: functionObjects: call execute on last time step
- old convention was that on last time step it would only call end() and not execute() - however this meant that e.g. the functionObjectProperties file did not get written - and almost all functionObjects were doing an execute() inside of end() - new convention: call execute() on last time step, just before doing end()
This commit is contained in:
@ -3,7 +3,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-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -891,7 +891,10 @@ bool Foam::Time::run() const
|
|||||||
// ie, when exiting the control loop
|
// ie, when exiting the control loop
|
||||||
if (!running && timeIndex_ != startTimeIndex_)
|
if (!running && timeIndex_ != startTimeIndex_)
|
||||||
{
|
{
|
||||||
// Note, end() also calls an indirect start() as required
|
// Ensure functionObjects execute on last time step
|
||||||
|
// (and hence write uptodate functionObjectProperties)
|
||||||
|
functionObjects_.execute();
|
||||||
|
|
||||||
functionObjects_.end();
|
functionObjects_.end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,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-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -207,14 +207,6 @@ bool Foam::OutputFilterFunctionObject<OutputFilter>::end()
|
|||||||
|
|
||||||
ptr_->end();
|
ptr_->end();
|
||||||
|
|
||||||
// Only write if
|
|
||||||
// - time within timeStart_ and timeEnd_
|
|
||||||
// - it is an output time
|
|
||||||
if (active() && outputControl_.output())
|
|
||||||
{
|
|
||||||
ptr_->write();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!storeFilter_)
|
if (!storeFilter_)
|
||||||
{
|
{
|
||||||
destroyFilter();
|
destroyFilter();
|
||||||
|
|||||||
@ -3,7 +3,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-2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -135,12 +135,12 @@ void Foam::partialWrite::read(const dictionary& dict)
|
|||||||
|
|
||||||
void Foam::partialWrite::execute()
|
void Foam::partialWrite::execute()
|
||||||
{
|
{
|
||||||
|
// Do nothing - only valid on write
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::partialWrite::end()
|
void Foam::partialWrite::end()
|
||||||
{
|
{
|
||||||
//Pout<< "end at time " << obr_.time().timeName() << endl;
|
|
||||||
// Do nothing - only valid on write
|
// Do nothing - only valid on write
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -94,7 +94,7 @@ void Foam::removeRegisteredObject::execute()
|
|||||||
|
|
||||||
void Foam::removeRegisteredObject::end()
|
void Foam::removeRegisteredObject::end()
|
||||||
{
|
{
|
||||||
execute();
|
// Do nothing - only valid on execute
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,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-2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -195,7 +195,7 @@ void Foam::writeDictionary::execute()
|
|||||||
|
|
||||||
void Foam::writeDictionary::end()
|
void Foam::writeDictionary::end()
|
||||||
{
|
{
|
||||||
execute();
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -288,12 +288,7 @@ void Foam::fieldAverage::execute()
|
|||||||
|
|
||||||
|
|
||||||
void Foam::fieldAverage::end()
|
void Foam::fieldAverage::end()
|
||||||
{
|
{}
|
||||||
if (active_)
|
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::fieldAverage::timeSet()
|
void Foam::fieldAverage::timeSet()
|
||||||
|
|||||||
@ -3,7 +3,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-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -118,10 +118,7 @@ void Foam::fieldCoordinateSystemTransform::execute()
|
|||||||
|
|
||||||
void Foam::fieldCoordinateSystemTransform::end()
|
void Foam::fieldCoordinateSystemTransform::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -242,10 +242,7 @@ void Foam::fieldValues::fieldValueDelta::execute()
|
|||||||
|
|
||||||
void Foam::fieldValues::fieldValueDelta::end()
|
void Foam::fieldValues::fieldValueDelta::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,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-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -369,15 +369,7 @@ void Foam::nearWallFields::execute()
|
|||||||
|
|
||||||
void Foam::nearWallFields::end()
|
void Foam::nearWallFields::end()
|
||||||
{
|
{
|
||||||
if (debug)
|
// Do nothing
|
||||||
{
|
|
||||||
Info<< "nearWallFields:end()" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (active_)
|
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,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-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -127,10 +127,7 @@ void Foam::processorField::execute()
|
|||||||
|
|
||||||
void Foam::processorField::end()
|
void Foam::processorField::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -112,10 +112,7 @@ void Foam::readFields::execute()
|
|||||||
|
|
||||||
void Foam::readFields::end()
|
void Foam::readFields::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -116,10 +116,7 @@ void Foam::surfaceInterpolateFields::execute()
|
|||||||
|
|
||||||
void Foam::surfaceInterpolateFields::end()
|
void Foam::surfaceInterpolateFields::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -180,10 +180,7 @@ void Foam::valueAverage::execute()
|
|||||||
|
|
||||||
void Foam::valueAverage::end()
|
void Foam::valueAverage::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -424,10 +424,7 @@ void Foam::forceCoeffs::execute()
|
|||||||
|
|
||||||
void Foam::forceCoeffs::end()
|
void Foam::forceCoeffs::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1037,10 +1037,7 @@ void Foam::forces::execute()
|
|||||||
|
|
||||||
void Foam::forces::end()
|
void Foam::forces::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -157,10 +157,7 @@ void Foam::calcFvcDiv::execute()
|
|||||||
|
|
||||||
void Foam::calcFvcDiv::end()
|
void Foam::calcFvcDiv::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -119,10 +119,7 @@ void Foam::calcFvcGrad::execute()
|
|||||||
|
|
||||||
void Foam::calcFvcGrad::end()
|
void Foam::calcFvcGrad::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -122,10 +122,7 @@ void Foam::calcMag::execute()
|
|||||||
|
|
||||||
void Foam::calcMag::end()
|
void Foam::calcMag::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,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 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -236,10 +236,7 @@ void Foam::runTimeControl::execute()
|
|||||||
|
|
||||||
void Foam::runTimeControl::end()
|
void Foam::runTimeControl::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -167,10 +167,7 @@ void Foam::CourantNo::execute()
|
|||||||
|
|
||||||
void Foam::CourantNo::end()
|
void Foam::CourantNo::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -184,10 +184,7 @@ void Foam::DESModelRegions::execute()
|
|||||||
|
|
||||||
void Foam::DESModelRegions::end()
|
void Foam::DESModelRegions::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -156,10 +156,7 @@ void Foam::Lambda2::execute()
|
|||||||
|
|
||||||
void Foam::Lambda2::end()
|
void Foam::Lambda2::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -210,10 +210,7 @@ void Foam::Peclet::execute()
|
|||||||
|
|
||||||
void Foam::Peclet::end()
|
void Foam::Peclet::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,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-2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -149,10 +149,7 @@ void Foam::Q::execute()
|
|||||||
|
|
||||||
void Foam::Q::end()
|
void Foam::Q::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -146,12 +146,10 @@ void Foam::blendingFactor::execute()
|
|||||||
|
|
||||||
void Foam::blendingFactor::end()
|
void Foam::blendingFactor::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::blendingFactor::timeSet()
|
void Foam::blendingFactor::timeSet()
|
||||||
{
|
{
|
||||||
// Do nothing
|
// Do nothing
|
||||||
|
|||||||
@ -343,10 +343,7 @@ void Foam::pressureTools::execute()
|
|||||||
|
|
||||||
void Foam::pressureTools::end()
|
void Foam::pressureTools::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -328,10 +328,7 @@ void Foam::scalarTransport::execute()
|
|||||||
|
|
||||||
void Foam::scalarTransport::end()
|
void Foam::scalarTransport::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -140,10 +140,7 @@ void Foam::timeActivatedFileUpdate::execute()
|
|||||||
|
|
||||||
void Foam::timeActivatedFileUpdate::end()
|
void Foam::timeActivatedFileUpdate::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,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-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -284,12 +284,7 @@ void Foam::turbulenceFields::execute()
|
|||||||
|
|
||||||
|
|
||||||
void Foam::turbulenceFields::end()
|
void Foam::turbulenceFields::end()
|
||||||
{
|
{}
|
||||||
if (active_)
|
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::turbulenceFields::timeSet()
|
void Foam::turbulenceFields::timeSet()
|
||||||
|
|||||||
@ -3,7 +3,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) 2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -144,10 +144,7 @@ void Foam::vorticity::execute()
|
|||||||
|
|
||||||
void Foam::vorticity::end()
|
void Foam::vorticity::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -274,10 +274,7 @@ void Foam::wallShearStress::execute()
|
|||||||
|
|
||||||
void Foam::wallShearStress::end()
|
void Foam::wallShearStress::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -209,10 +209,7 @@ void Foam::yPlus::execute()
|
|||||||
|
|
||||||
void Foam::yPlus::end()
|
void Foam::yPlus::end()
|
||||||
{
|
{
|
||||||
if (active_)
|
// Do nothing
|
||||||
{
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user