diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C index 14eb3f3616..5c589c8f28 100644 --- a/src/OpenFOAM/db/Time/Time.C +++ b/src/OpenFOAM/db/Time/Time.C @@ -1220,6 +1220,7 @@ Foam::Time& Foam::Time::operator++() writeOnce_ = false; } + functionObjects_.timeSet(); } return *this; diff --git a/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.C b/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.C index bd4d0b3d61..7c6b95ec98 100644 --- a/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.C +++ b/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.C @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -202,6 +202,18 @@ bool Foam::OutputFilterFunctionObject::end() } +template +bool Foam::OutputFilterFunctionObject::timeSet() +{ + if (active()) + { + ptr_->timeSet(); + } + + return true; +} + + template bool Foam::OutputFilterFunctionObject::read ( diff --git a/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.H b/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.H index 87ade4b282..78d1c47be7 100644 --- a/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.H +++ b/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.H @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -201,6 +201,8 @@ public: //- Called when Time::run() determines that the time-loop exits virtual bool end(); + //- Called when time was set at the end of the Time::operator++ + virtual bool timeSet(); //- Read and set the function object if its data have changed virtual bool read(const dictionary&); diff --git a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C index 2e67818359..31e1d92062 100644 --- a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C +++ b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -120,6 +120,12 @@ bool Foam::functionObject::end() } +bool Foam::functionObject::timeSet() +{ + return false; +} + + Foam::autoPtr Foam::functionObject::iNew::operator() ( const word& name, diff --git a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H index a7c027b5b3..47438c3215 100644 --- a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H +++ b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -157,6 +157,9 @@ public: // By default it simply calls execute(). virtual bool end(); + //- Called when time was set at the end of the Time::operator++ + virtual bool timeSet(); + //- Read and set the function object if its data have changed virtual bool read(const dictionary&) = 0; diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C index 799e4b626e..1e7553a760 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C +++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -190,6 +190,27 @@ bool Foam::functionObjectList::end() } +bool Foam::functionObjectList::timeSet() +{ + bool ok = true; + + if (execution_) + { + if (!updated_) + { + read(); + } + + forAll(*this, objectI) + { + ok = operator[](objectI).timeSet() && ok; + } + } + + return ok; +} + + bool Foam::functionObjectList::read() { bool ok = true; diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H index 923e8501a4..4df2c4d263 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H +++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -163,6 +163,9 @@ public: //- Called when Time::run() determines that the time-loop exits virtual bool end(); + //- Called when time was set at the end of the Time::operator++ + virtual bool timeSet(); + //- Read and set the function objects if their data have changed virtual bool read(); diff --git a/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.C b/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.C index 674996e5aa..c14d1b4bf7 100644 --- a/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.C +++ b/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.C @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -87,13 +87,33 @@ void Foam::partialWrite::read(const dictionary& dict) << ". It should be >= 1." << exit(FatalIOError); } + + // Clear out any previously loaded fields + vsf_.clear(); + vvf_.clear(); + vSpheretf_.clear(); + vSymmtf_.clear(); + vtf_.clear(); + + ssf_.clear(); + svf_.clear(); + sSpheretf_.clear(); + sSymmtf_.clear(); + stf_.clear(); + + forAllConstIter(HashSet, objectNames_, iter) + { + loadField(iter.key(), vsf_, ssf_); + loadField(iter.key(), vvf_, svf_); + loadField(iter.key(), vSpheretf_, sSpheretf_); + loadField(iter.key(), vSymmtf_, sSymmtf_); + loadField(iter.key(), vtf_, stf_); + } } void Foam::partialWrite::execute() { - //Pout<< "execute at time " << obr_.time().timeName() - // << " index:" << obr_.time().timeIndex() << endl; } @@ -104,99 +124,61 @@ void Foam::partialWrite::end() } -void Foam::partialWrite::write() +void Foam::partialWrite::timeSet() { - //Pout<< "write at time " << obr_.time().timeName() << endl; if (obr_.time().outputTime()) { - // Above check so it can be used both with - // outputControl timeStep; - // outputInterval 1; - // or with - // outputControl outputTime; - writeInstance_++; if (writeInstance_ == writeInterval_) { - // Normal dump + // Next overall dump corresponf to partial write. Change + // write options to AUTO_WRITE writeInstance_ = 0; + + changeWriteOptions(vsf_, ssf_, IOobject::AUTO_WRITE); + changeWriteOptions(vvf_, svf_, IOobject::AUTO_WRITE); + changeWriteOptions + ( + vSpheretf_, + sSpheretf_, + IOobject::AUTO_WRITE + ); + changeWriteOptions + ( + vSymmtf_, + sSymmtf_, + IOobject::AUTO_WRITE + ); + changeWriteOptions(vtf_, stf_, IOobject::AUTO_WRITE); } else { - // Delete all but marked objects - fileName dbDir; - if (isA(obr_)) - { - dbDir = dynamic_cast(obr_).dbDir(); - } - - IOobjectList objects(obr_, obr_.time().timeName()); - - if (debug) - { - Pout<< "For region:" << obr_.name() << endl; - } - - forAllConstIter(IOobjectList, objects, iter) - { - if (!objectNames_.found(iter()->name())) - { - const fileName f = - obr_.time().timePath() - /dbDir - /iter()->name(); - if (debug) - { - Pout<< " rm " << f << endl; - } - rm(f); - } - } - - // Do the lagrangian files as well. - fileNameList cloudDirs + changeWriteOptions(vsf_, ssf_, IOobject::NO_WRITE); + changeWriteOptions(vvf_, svf_, IOobject::NO_WRITE); + changeWriteOptions ( - readDir - ( - obr_.time().timePath()/dbDir/cloud::prefix, - fileName::DIRECTORY - ) + vSpheretf_, + sSpheretf_, + IOobject::NO_WRITE ); - forAll(cloudDirs, i) - { - if (debug) - { - Pout<< "For cloud:" << cloudDirs[i] << endl; - } - - IOobjectList sprayObjs - ( - obr_, - obr_.time().timeName(), - cloud::prefix/cloudDirs[i] - ); - forAllConstIter(IOobjectList, sprayObjs, iter) - { - if (!objectNames_.found(iter()->name())) - { - const fileName f = - obr_.time().timePath() - /dbDir - /cloud::prefix - /cloudDirs[i] - /iter()->name(); - if (debug) - { - Pout<< " rm " << f << endl; - } - rm(f); - } - } - } + changeWriteOptions + ( + vSymmtf_, + sSymmtf_, + IOobject::NO_WRITE + ); + changeWriteOptions(vtf_, stf_, IOobject::NO_WRITE); } } } +void Foam::partialWrite::write() +{ + // Do nothing. The fields get written through the + // standard dump +} + + // ************************************************************************* // diff --git a/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.H b/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.H index 62a53f5194..09197a671d 100644 --- a/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.H +++ b/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.H @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,8 +29,8 @@ Group Description This function object allows user-selected fields/registered objects to be - written at a custom write interval. It operates by deleting all entries - except those selected after writing. + written at a custom write interval. The interval is given in terms of + number of overall dumps Example of function object specification: \verbatim @@ -66,8 +66,9 @@ SourceFiles #define partialWrite_H #include "HashSet.H" -#include "DynamicList.H" #include "runTimeSelectionTables.H" +#include "volFields.H" +#include "surfaceFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -95,6 +96,18 @@ protected: const objectRegistry& obr_; + //- Loaded fields + UPtrList vsf_; + UPtrList vvf_; + UPtrList vSpheretf_; + UPtrList vSymmtf_; + UPtrList vtf_; + + UPtrList ssf_; + UPtrList svf_; + UPtrList sSpheretf_; + UPtrList sSymmtf_; + UPtrList stf_; // Read from dictionary @@ -105,6 +118,7 @@ protected: label writeInterval_; + //- Current dump instance. If reaches writeInterval do a full write. label writeInstance_; @@ -118,6 +132,24 @@ protected: void operator=(const partialWrite&); + //- Load objects in the objectNames + template + void loadField + ( + const word&, + UPtrList >&, + UPtrList >& + ) const; + + template + void changeWriteOptions + ( + UPtrList >&, + UPtrList >&, + const IOobject::writeOption + ) const; + + public: //- Runtime type information @@ -152,12 +184,15 @@ public: //- Read the partialWrite data virtual void read(const dictionary&); - //- Execute, currently does nothing + //- Execute virtual void execute(); //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write the partialWrite virtual void write(); @@ -177,6 +212,12 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#ifdef NoRepository +# include "partialWriteTemplates.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* // diff --git a/src/postProcessing/functionObjects/IO/removeRegisteredObject/removeRegisteredObject.C b/src/postProcessing/functionObjects/IO/removeRegisteredObject/removeRegisteredObject.C index 802f63f308..4ed2bb524a 100644 --- a/src/postProcessing/functionObjects/IO/removeRegisteredObject/removeRegisteredObject.C +++ b/src/postProcessing/functionObjects/IO/removeRegisteredObject/removeRegisteredObject.C @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -92,6 +92,12 @@ void Foam::removeRegisteredObject::end() } +void Foam::removeRegisteredObject::timeSet() +{ + // Do nothing - only valid on execute +} + + void Foam::removeRegisteredObject::write() { // Do nothing - only valid on execute diff --git a/src/postProcessing/functionObjects/IO/removeRegisteredObject/removeRegisteredObject.H b/src/postProcessing/functionObjects/IO/removeRegisteredObject/removeRegisteredObject.H index 957c1a9a2d..fc02432ad8 100644 --- a/src/postProcessing/functionObjects/IO/removeRegisteredObject/removeRegisteredObject.H +++ b/src/postProcessing/functionObjects/IO/removeRegisteredObject/removeRegisteredObject.H @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -146,6 +146,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write the removeRegisteredObject virtual void write(); diff --git a/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.C b/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.C index 694fba31b6..56cd35a407 100644 --- a/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.C +++ b/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.C @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -199,6 +199,12 @@ void Foam::writeDictionary::end() } +void Foam::writeDictionary::timeSet() +{ + // do nothing +} + + void Foam::writeDictionary::write() { // do nothing diff --git a/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.H b/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.H index 1f12efd096..a4ac474e40 100644 --- a/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.H +++ b/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.H @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -134,6 +134,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write the writeDictionary virtual void write(); diff --git a/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.C b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.C index cc3f0c628e..3700727407 100644 --- a/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.C +++ b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.C @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -79,6 +79,12 @@ void Foam::writeRegisteredObject::end() } +void Foam::writeRegisteredObject::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::writeRegisteredObject::write() { forAll(objectNames_, i) diff --git a/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.H b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.H index 014d4ce90c..7159fad3fc 100644 --- a/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.H +++ b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.H @@ -147,6 +147,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write the writeRegisteredObject virtual void write(); diff --git a/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.C b/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.C index 2a3d212afd..6bea8e6478 100644 --- a/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.C +++ b/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.C @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -106,6 +106,12 @@ void Foam::cloudInfo::end() } +void Foam::cloudInfo::timeSet() +{ + // Do nothing +} + + void Foam::cloudInfo::write() { if (active_) diff --git a/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.H b/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.H index 85558d2e3f..e659807cd4 100644 --- a/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.H +++ b/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.H @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -162,6 +162,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write virtual void write(); diff --git a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C index f19b7f69d1..3f6c39c856 100644 --- a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C +++ b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C @@ -390,6 +390,10 @@ void Foam::fieldAverage::end() {} +void Foam::fieldAverage::timeSet() +{} + + void Foam::fieldAverage::write() { if (active_) diff --git a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.H b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.H index 4a6d75e06b..12cea88cd7 100644 --- a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.H +++ b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.H @@ -318,6 +318,9 @@ public: //- Execute the averaging at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the field average data and write virtual void write(); diff --git a/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C b/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C index ac0fc6da0a..57c26aa472 100644 --- a/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C +++ b/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C @@ -104,6 +104,12 @@ void Foam::fieldCoordinateSystemTransform::end() } +void Foam::fieldCoordinateSystemTransform::timeSet() +{ + // Do nothing +} + + void Foam::fieldCoordinateSystemTransform::write() { forAll(fieldSet_, fieldI) diff --git a/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H b/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H index 0671327ad8..edd1f13b50 100644 --- a/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H +++ b/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -173,6 +173,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write virtual void write(); diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C index e7a611febc..7c3c328389 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C +++ b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -139,6 +139,12 @@ void Foam::fieldMinMax::end() } +void Foam::fieldMinMax::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::fieldMinMax::write() { if (active_) diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.H b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.H index 50e3017f89..25ccd00f41 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.H +++ b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.H @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -189,6 +189,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the field min/max template void calcMinMaxFields diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C b/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C index 50d47d8198..9f651c8ee9 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C +++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C @@ -131,6 +131,12 @@ void Foam::fieldValue::end() } +void Foam::fieldValue::timeSet() +{ + // Do nothing +} + + void Foam::fieldValue::updateMesh(const mapPolyMesh&) { // Do nothing diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.H b/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.H index b7994383d5..9d852cdfb7 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.H +++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.H @@ -191,6 +191,9 @@ public: //- Execute the at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Update mesh virtual void updateMesh(const mapPolyMesh&); diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C index 0e0c93ed1b..30027a864a 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C +++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C @@ -202,6 +202,12 @@ void Foam::fieldValues::fieldValueDelta::end() } +void Foam::fieldValues::fieldValueDelta::timeSet() +{ + // Do nothing +} + + void Foam::fieldValues::fieldValueDelta::updateMesh(const mapPolyMesh&) { // Do nothing diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H index 24d72f1f6b..d408227bbc 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H +++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H @@ -192,6 +192,9 @@ public: //- Execute the at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Update mesh virtual void updateMesh(const mapPolyMesh&); diff --git a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C index 715bcfa7f8..4b82fbd331 100644 --- a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C +++ b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -163,6 +163,11 @@ void Foam::nearWallFields::end() } +void Foam::nearWallFields::timeSet() +{ +} + + void Foam::nearWallFields::write() { if (debug) diff --git a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.H b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.H index df6c8f8063..cea4e42139 100644 --- a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.H +++ b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.H @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -191,6 +191,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write virtual void write(); diff --git a/src/postProcessing/functionObjects/field/processorField/processorField.C b/src/postProcessing/functionObjects/field/processorField/processorField.C index bd72316b23..611ebced0f 100644 --- a/src/postProcessing/functionObjects/field/processorField/processorField.C +++ b/src/postProcessing/functionObjects/field/processorField/processorField.C @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -96,6 +96,12 @@ void Foam::processorField::end() } +void Foam::processorField::timeSet() +{ + // Do nothing +} + + void Foam::processorField::write() { if (active_) diff --git a/src/postProcessing/functionObjects/field/processorField/processorField.H b/src/postProcessing/functionObjects/field/processorField/processorField.H index cee878adc1..6d45e32acb 100644 --- a/src/postProcessing/functionObjects/field/processorField/processorField.H +++ b/src/postProcessing/functionObjects/field/processorField/processorField.H @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -145,6 +145,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write virtual void write(); diff --git a/src/postProcessing/functionObjects/field/readFields/readFields.C b/src/postProcessing/functionObjects/field/readFields/readFields.C index 2d8a0fd0e0..b92998684d 100644 --- a/src/postProcessing/functionObjects/field/readFields/readFields.C +++ b/src/postProcessing/functionObjects/field/readFields/readFields.C @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -122,6 +122,12 @@ void Foam::readFields::end() } +void Foam::readFields::timeSet() +{ + // Do nothing +} + + void Foam::readFields::write() { // Do nothing diff --git a/src/postProcessing/functionObjects/field/readFields/readFields.H b/src/postProcessing/functionObjects/field/readFields/readFields.H index 81f11922b7..0c39404a93 100644 --- a/src/postProcessing/functionObjects/field/readFields/readFields.H +++ b/src/postProcessing/functionObjects/field/readFields/readFields.H @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -173,6 +173,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write virtual void write(); diff --git a/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C b/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C index 3e5e2fc98a..22512c0317 100644 --- a/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C +++ b/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -384,6 +384,12 @@ void Foam::regionSizeDistribution::end() } +void Foam::regionSizeDistribution::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::regionSizeDistribution::write() { if (active_) diff --git a/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H b/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H index 1fd236f024..0c46639846 100644 --- a/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H +++ b/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -266,6 +266,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the regionSizeDistribution and write virtual void write(); diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLine.C b/src/postProcessing/functionObjects/field/streamLine/streamLine.C index 037ddc5ae1..6116950a44 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLine.C +++ b/src/postProcessing/functionObjects/field/streamLine/streamLine.C @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -517,6 +517,10 @@ void Foam::streamLine::end() {} +void Foam::streamLine::timeSet() +{} + + void Foam::streamLine::write() { if (active_) diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLine.H b/src/postProcessing/functionObjects/field/streamLine/streamLine.H index bce1808d90..59d9d9026e 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLine.H +++ b/src/postProcessing/functionObjects/field/streamLine/streamLine.H @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -266,6 +266,9 @@ public: //- Execute the averaging at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the field average data and write virtual void write(); diff --git a/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.C b/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.C index d89a6b3648..69b45c12ca 100644 --- a/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.C +++ b/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.C @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -112,6 +112,12 @@ void Foam::surfaceInterpolateFields::end() } +void Foam::surfaceInterpolateFields::timeSet() +{ + // Do nothing +} + + void Foam::surfaceInterpolateFields::write() { if (active_) diff --git a/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.H b/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.H index 07110c8d88..1a5d38a075 100644 --- a/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.H +++ b/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.H @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -169,6 +169,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write virtual void write(); diff --git a/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFields.C b/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFields.C index 855b3ce800..72585b8148 100644 --- a/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFields.C +++ b/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFields.C @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -259,6 +259,12 @@ void Foam::turbulenceFields::end() } +void Foam::turbulenceFields::timeSet() +{ + // Do nothing +} + + void Foam::turbulenceFields::write() { // Do nothing diff --git a/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFields.H b/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFields.H index b885759223..09ecd93e68 100644 --- a/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFields.H +++ b/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFields.H @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -206,6 +206,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write virtual void write(); diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C index e2487e3cd6..95238cbd30 100644 --- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C +++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -644,6 +644,10 @@ void Foam::wallBoundedStreamLine::end() {} +void Foam::wallBoundedStreamLine::timeSet() +{} + + void Foam::wallBoundedStreamLine::write() { if (active_) diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H index c6b8a178a3..98956ba9ca 100644 --- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H +++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -272,6 +272,9 @@ public: //- Execute the averaging at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the field average data and write virtual void write(); diff --git a/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C index 9537f6a28a..5a29b54bc0 100644 --- a/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C +++ b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C @@ -108,6 +108,12 @@ void Foam::forceCoeffs::end() } +void Foam::forceCoeffs::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::forceCoeffs::write() { if (active_) diff --git a/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.H b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.H index b8112939b3..048c0dd331 100644 --- a/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.H +++ b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.H @@ -177,6 +177,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write the forces virtual void write(); }; diff --git a/src/postProcessing/functionObjects/forces/forces/forces.C b/src/postProcessing/functionObjects/forces/forces/forces.C index dd164d99a4..bdda3d321d 100644 --- a/src/postProcessing/functionObjects/forces/forces/forces.C +++ b/src/postProcessing/functionObjects/forces/forces/forces.C @@ -619,6 +619,12 @@ void Foam::forces::end() } +void Foam::forces::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::forces::write() { if (!active_) diff --git a/src/postProcessing/functionObjects/forces/forces/forces.H b/src/postProcessing/functionObjects/forces/forces/forces.H index dd87184c2f..793cf78cbf 100644 --- a/src/postProcessing/functionObjects/forces/forces/forces.H +++ b/src/postProcessing/functionObjects/forces/forces/forces.H @@ -205,7 +205,7 @@ protected: //- Minimum bin bounds scalar binMin_; - + //- Bin positions along binDir List binPoints_; @@ -309,6 +309,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write the forces virtual void write(); diff --git a/src/postProcessing/functionObjects/fvTools/calcFvcDiv/calcFvcDiv.C b/src/postProcessing/functionObjects/fvTools/calcFvcDiv/calcFvcDiv.C index b5fd621b71..185e83b0a4 100644 --- a/src/postProcessing/functionObjects/fvTools/calcFvcDiv/calcFvcDiv.C +++ b/src/postProcessing/functionObjects/fvTools/calcFvcDiv/calcFvcDiv.C @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -141,6 +141,12 @@ void Foam::calcFvcDiv::end() } +void Foam::calcFvcDiv::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::calcFvcDiv::write() { if (active_) diff --git a/src/postProcessing/functionObjects/fvTools/calcFvcDiv/calcFvcDiv.H b/src/postProcessing/functionObjects/fvTools/calcFvcDiv/calcFvcDiv.H index e15f680e64..447b00c92c 100644 --- a/src/postProcessing/functionObjects/fvTools/calcFvcDiv/calcFvcDiv.H +++ b/src/postProcessing/functionObjects/fvTools/calcFvcDiv/calcFvcDiv.H @@ -148,6 +148,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the calcFvcDiv and write virtual void write(); diff --git a/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGrad.C b/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGrad.C index edcddb2eae..6b8efee0c8 100644 --- a/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGrad.C +++ b/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGrad.C @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -103,6 +103,12 @@ void Foam::calcFvcGrad::end() } +void Foam::calcFvcGrad::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::calcFvcGrad::write() { if (active_) diff --git a/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGrad.H b/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGrad.H index 6822a7bb08..bdaf5383ed 100644 --- a/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGrad.H +++ b/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGrad.H @@ -151,6 +151,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the calcFvcGrad and write virtual void write(); diff --git a/src/postProcessing/functionObjects/fvTools/calcMag/calcMag.C b/src/postProcessing/functionObjects/fvTools/calcMag/calcMag.C index f997cc8b78..93229e7f5d 100644 --- a/src/postProcessing/functionObjects/fvTools/calcMag/calcMag.C +++ b/src/postProcessing/functionObjects/fvTools/calcMag/calcMag.C @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -103,6 +103,12 @@ void Foam::calcMag::end() } +void Foam::calcMag::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::calcMag::write() { if (active_) diff --git a/src/postProcessing/functionObjects/fvTools/calcMag/calcMag.H b/src/postProcessing/functionObjects/fvTools/calcMag/calcMag.H index d8a91cc802..76f1072111 100644 --- a/src/postProcessing/functionObjects/fvTools/calcMag/calcMag.H +++ b/src/postProcessing/functionObjects/fvTools/calcMag/calcMag.H @@ -145,6 +145,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the calcMag and write virtual void write(); diff --git a/src/postProcessing/functionObjects/jobControl/abortCalculation/abortCalculation.C b/src/postProcessing/functionObjects/jobControl/abortCalculation/abortCalculation.C index 41b8f697c1..d0551c84ce 100644 --- a/src/postProcessing/functionObjects/jobControl/abortCalculation/abortCalculation.C +++ b/src/postProcessing/functionObjects/jobControl/abortCalculation/abortCalculation.C @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -179,6 +179,11 @@ void Foam::abortCalculation::end() } +void Foam::abortCalculation::timeSet() +{ +} + + void Foam::abortCalculation::write() { // Do nothing - only valid on execute diff --git a/src/postProcessing/functionObjects/jobControl/abortCalculation/abortCalculation.H b/src/postProcessing/functionObjects/jobControl/abortCalculation/abortCalculation.H index 4040709fdb..95e1994fd4 100644 --- a/src/postProcessing/functionObjects/jobControl/abortCalculation/abortCalculation.H +++ b/src/postProcessing/functionObjects/jobControl/abortCalculation/abortCalculation.H @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -146,6 +146,9 @@ public: //- Execute at the final time-loop, used for cleanup virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Execute, check existence of abort file and take action virtual void write(); diff --git a/src/postProcessing/functionObjects/systemCall/systemCall.C b/src/postProcessing/functionObjects/systemCall/systemCall.C index 00cb7b850c..0fb6d1cfca 100644 --- a/src/postProcessing/functionObjects/systemCall/systemCall.C +++ b/src/postProcessing/functionObjects/systemCall/systemCall.C @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -111,6 +111,11 @@ void Foam::systemCall::end() } +void Foam::systemCall::timeSet() +{ +} + + void Foam::systemCall::write() { forAll(writeCalls_, callI) diff --git a/src/postProcessing/functionObjects/systemCall/systemCall.H b/src/postProcessing/functionObjects/systemCall/systemCall.H index 5de53fa26c..b4d43a2bf7 100644 --- a/src/postProcessing/functionObjects/systemCall/systemCall.H +++ b/src/postProcessing/functionObjects/systemCall/systemCall.H @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -172,6 +172,9 @@ public: //- Execute the "endCalls" at the final time-loop virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write, execute the "writeCalls" virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C b/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C index e72e693338..9309ba42bb 100644 --- a/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C +++ b/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -165,6 +165,12 @@ void Foam::CourantNo::end() } +void Foam::CourantNo::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::CourantNo::write() { if (active_) diff --git a/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.H b/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.H index e74d6c9e2c..16724bee94 100644 --- a/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.H +++ b/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.H @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -134,6 +134,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the CourantNo and write virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.C b/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.C index b9a4843600..9f861596f7 100644 --- a/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.C +++ b/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.C @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -114,6 +114,12 @@ void Foam::DESModelRegions::end() } +void Foam::DESModelRegions::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::DESModelRegions::write() { typedef incompressible::turbulenceModel icoModel; @@ -175,7 +181,7 @@ void Foam::DESModelRegions::write() file() << obr_.time().timeName() << token::TAB << prc << token::TAB << 100.0 - prc << endl; } - + if (log_) { Info<< " LES = " << prc << " % (volume)" << nl diff --git a/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.H b/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.H index 858fab4e05..d0bf101ae0 100644 --- a/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.H +++ b/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.H @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -136,6 +136,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the DESModelRegions and write virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/Lambda2/Lambda2.C b/src/postProcessing/functionObjects/utilities/Lambda2/Lambda2.C index 5b1b3f0cf9..0f1dd72a92 100644 --- a/src/postProcessing/functionObjects/utilities/Lambda2/Lambda2.C +++ b/src/postProcessing/functionObjects/utilities/Lambda2/Lambda2.C @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -126,6 +126,12 @@ void Foam::Lambda2::end() } +void Foam::Lambda2::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::Lambda2::write() { if (active_) diff --git a/src/postProcessing/functionObjects/utilities/Lambda2/Lambda2.H b/src/postProcessing/functionObjects/utilities/Lambda2/Lambda2.H index 77659532e2..f4360f4640 100644 --- a/src/postProcessing/functionObjects/utilities/Lambda2/Lambda2.H +++ b/src/postProcessing/functionObjects/utilities/Lambda2/Lambda2.H @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -127,6 +127,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the Lambda2 and write virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/Peclet/Peclet.C b/src/postProcessing/functionObjects/utilities/Peclet/Peclet.C index 874977faed..885e611fa0 100644 --- a/src/postProcessing/functionObjects/utilities/Peclet/Peclet.C +++ b/src/postProcessing/functionObjects/utilities/Peclet/Peclet.C @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -130,6 +130,12 @@ void Foam::Peclet::end() } +void Foam::Peclet::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::Peclet::write() { typedef compressible::turbulenceModel cmpTurbModel; diff --git a/src/postProcessing/functionObjects/utilities/Peclet/Peclet.H b/src/postProcessing/functionObjects/utilities/Peclet/Peclet.H index 4c4ec390b7..5becbe93e9 100644 --- a/src/postProcessing/functionObjects/utilities/Peclet/Peclet.H +++ b/src/postProcessing/functionObjects/utilities/Peclet/Peclet.H @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -129,6 +129,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the Peclet and write virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/Q/Q.C b/src/postProcessing/functionObjects/utilities/Q/Q.C index 5dec2d3aa7..81a68a152a 100644 --- a/src/postProcessing/functionObjects/utilities/Q/Q.C +++ b/src/postProcessing/functionObjects/utilities/Q/Q.C @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -125,6 +125,12 @@ void Foam::Q::end() } +void Foam::Q::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::Q::write() { if (active_) diff --git a/src/postProcessing/functionObjects/utilities/Q/Q.H b/src/postProcessing/functionObjects/utilities/Q/Q.H index 892808ef95..aed626228c 100644 --- a/src/postProcessing/functionObjects/utilities/Q/Q.H +++ b/src/postProcessing/functionObjects/utilities/Q/Q.H @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -130,6 +130,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the Q and write virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/codedFunctionObject/codedFunctionObject.C b/src/postProcessing/functionObjects/utilities/codedFunctionObject/codedFunctionObject.C index 98b57ec487..5c1ed4a967 100644 --- a/src/postProcessing/functionObjects/utilities/codedFunctionObject/codedFunctionObject.C +++ b/src/postProcessing/functionObjects/utilities/codedFunctionObject/codedFunctionObject.C @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -185,6 +185,12 @@ bool Foam::codedFunctionObject::end() } +bool Foam::codedFunctionObject::timeSet() +{ + return false; +} + + bool Foam::codedFunctionObject::read(const dictionary& dict) { dict.lookup("redirectType") >> redirectType_; diff --git a/src/postProcessing/functionObjects/utilities/codedFunctionObject/codedFunctionObject.H b/src/postProcessing/functionObjects/utilities/codedFunctionObject/codedFunctionObject.H index 84b48a91e6..f597407e1c 100644 --- a/src/postProcessing/functionObjects/utilities/codedFunctionObject/codedFunctionObject.H +++ b/src/postProcessing/functionObjects/utilities/codedFunctionObject/codedFunctionObject.H @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -148,6 +148,9 @@ public: // By default it simply calls execute(). virtual bool end(); + //- Called when time was set at the end of the Time::operator++ + virtual bool timeSet(); + //- Read and set the function object if its data have changed virtual bool read(const dictionary&); diff --git a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C index fb60ce2527..fa26841aef 100644 --- a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C +++ b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -104,6 +104,12 @@ void Foam::dsmcFields::end() } +void Foam::dsmcFields::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::dsmcFields::write() { if (active_) diff --git a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.H b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.H index a88d3c2070..b6f7ae68d6 100644 --- a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.H +++ b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.H @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -123,6 +123,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the dsmcFields and write virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.C b/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.C index 181099c007..6b4fa8fdbf 100644 --- a/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.C +++ b/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.C @@ -242,7 +242,7 @@ void Foam::pressureTools::read(const dictionary& dict) if (p.dimensions() != dimPressure) { dict.lookup("rhoRef") >> rhoInf_; - } + } dict.lookup("calcTotal") >> calcTotal_; if (calcTotal_) @@ -273,6 +273,12 @@ void Foam::pressureTools::end() } +void Foam::pressureTools::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::pressureTools::write() { if (active_) diff --git a/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.H b/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.H index 82a44921ed..6d80b388d1 100644 --- a/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.H +++ b/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.H @@ -241,6 +241,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the pressureTools and write virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C b/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C index ad392c506b..b63fe4acd8 100644 --- a/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C +++ b/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C @@ -66,7 +66,7 @@ Foam::wordList Foam::scalarTransport::boundaryTypes() const } } - return bTypes; + return bTypes; } @@ -228,7 +228,7 @@ void Foam::scalarTransport::execute() { schemeVar = UName_; } - + word divScheme("div(phi," + schemeVar + ")"); word laplacianScheme("laplacian(" + DT.name() + "," + schemeVar + ")"); @@ -303,6 +303,12 @@ void Foam::scalarTransport::end() } +void Foam::scalarTransport::timeSet() +{ + // Do nothing +} + + void Foam::scalarTransport::write() { // Do nothing diff --git a/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.H b/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.H index a58ed22680..ae3db7635c 100644 --- a/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.H +++ b/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.H @@ -170,6 +170,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the scalarTransport and write virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.C b/src/postProcessing/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.C index aa88880eee..9329ad6e3f 100644 --- a/src/postProcessing/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.C +++ b/src/postProcessing/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.C @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -136,6 +136,12 @@ void Foam::timeActivatedFileUpdate::end() } +void Foam::timeActivatedFileUpdate::timeSet() +{ + // Do nothing +} + + void Foam::timeActivatedFileUpdate::write() { // Do nothing diff --git a/src/postProcessing/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.H b/src/postProcessing/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.H index dc43ee39a3..e2f168eaf2 100644 --- a/src/postProcessing/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.H +++ b/src/postProcessing/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.H @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -152,6 +152,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the timeActivatedFileUpdate and write virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C b/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C index 55a4011d6a..22942fa266 100644 --- a/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C +++ b/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -202,6 +202,12 @@ void Foam::wallShearStress::end() } +void Foam::wallShearStress::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::wallShearStress::write() { typedef compressible::turbulenceModel cmpModel; @@ -254,7 +260,7 @@ void Foam::wallShearStress::write() << "database" << exit(FatalError); } - + calcShearStress(mesh, Reff(), wallShearStress); if (log_) diff --git a/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.H b/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.H index f8ecbbcfde..c2927eaad5 100644 --- a/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.H +++ b/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.H @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -177,6 +177,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the wallShearStress and write virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/yPlusLES/yPlusLES.C b/src/postProcessing/functionObjects/utilities/yPlusLES/yPlusLES.C index 789c06ddc7..1b4bc680af 100644 --- a/src/postProcessing/functionObjects/utilities/yPlusLES/yPlusLES.C +++ b/src/postProcessing/functionObjects/utilities/yPlusLES/yPlusLES.C @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -248,6 +248,12 @@ void Foam::yPlusLES::end() } +void Foam::yPlusLES::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::yPlusLES::write() { if (active_) diff --git a/src/postProcessing/functionObjects/utilities/yPlusLES/yPlusLES.H b/src/postProcessing/functionObjects/utilities/yPlusLES/yPlusLES.H index 78e7d38db7..94a2bb349a 100644 --- a/src/postProcessing/functionObjects/utilities/yPlusLES/yPlusLES.H +++ b/src/postProcessing/functionObjects/utilities/yPlusLES/yPlusLES.H @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -153,6 +153,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the yPlusLES and write virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.C b/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.C index 663c6dda74..13412a300e 100644 --- a/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.C +++ b/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.C @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -235,6 +235,12 @@ void Foam::yPlusRAS::end() } +void Foam::yPlusRAS::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::yPlusRAS::write() { if (active_) diff --git a/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.H b/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.H index 241c4b6a74..747f100ab4 100644 --- a/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.H +++ b/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.H @@ -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) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -140,6 +140,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the yPlusRAS and write virtual void write();