diff --git a/src/OpenFOAM/db/error/messageStream.C b/src/OpenFOAM/db/error/messageStream.C index 402bede540..98febd8f58 100644 --- a/src/OpenFOAM/db/error/messageStream.C +++ b/src/OpenFOAM/db/error/messageStream.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -57,6 +57,26 @@ Foam::messageStream::messageStream(const dictionary& dict) {} +Foam::OSstream& Foam::messageStream::masterStream(const label communicator) +{ + if (UPstream::warnComm != -1 && communicator != UPstream::warnComm) + { + Pout<< "** messageStream with comm:" << communicator + << endl; + error::printStack(Pout); + } + + if (communicator == UPstream::worldComm) + { + return operator()(); + } + else + { + return operator()(UPstream::master(communicator)); + } +} + + Foam::OSstream& Foam::messageStream::operator() ( const char* functionName, @@ -166,53 +186,37 @@ Foam::OSstream& Foam::messageStream::operator() } -Foam::OSstream& Foam::messageStream::operator()(const label communicator) +Foam::OSstream& Foam::messageStream::operator()(const bool output) { - if (UPstream::warnComm != -1 && communicator != UPstream::warnComm) + if (output && level) { - Pout<< "** messageStream with comm:" << communicator - << endl; - error::printStack(Pout); - } + bool collect = (severity_ == INFO || severity_ == WARNING); - if (communicator == UPstream::worldComm) - { - return operator()(); - } - else - { - bool master = UPstream::master(communicator); - - if (level) + // Report the error + if (collect) { - bool collect = (severity_ == INFO || severity_ == WARNING); - - // Report the error - if (!master && collect) + return Snull; + } + else + { + if (title().size()) { - return Snull; + Pout<< title().c_str(); } - else + + if (maxErrors_) { - if (title().size()) + errorCount_++; + + if (errorCount_ >= maxErrors_) { - Pout<< title().c_str(); + FatalErrorIn("messageStream::operator OSstream&()") + << "Too many errors" + << abort(FatalError); } - - if (maxErrors_) - { - errorCount_++; - - if (errorCount_ >= maxErrors_) - { - FatalErrorIn("messageStream::operator OSstream&()") - << "Too many errors" - << abort(FatalError); - } - } - - return Pout; } + + return Pout; } } diff --git a/src/OpenFOAM/db/error/messageStream.H b/src/OpenFOAM/db/error/messageStream.H index 54c41ab564..68032d406f 100644 --- a/src/OpenFOAM/db/error/messageStream.H +++ b/src/OpenFOAM/db/error/messageStream.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -134,6 +134,11 @@ public: return maxErrors_; } + //- Convert to OSstream + // Prints to Pout for the master stream + OSstream& masterStream(const label communicator); + + //- Convert to OSstream // Prints basic message and returns OSstream for further info. OSstream& operator() @@ -185,9 +190,8 @@ public: ); //- Convert to OSstream - // Use Info for default communicator, use Pout - // on master for non-default one. - OSstream& operator()(const label communicator); + // Use Info for default communicator, control output using bool flag + OSstream& operator()(const bool output); //- Convert to OSstream for << operations operator OSstream&(); diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C index 5b58b1c438..42f141965b 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -131,7 +131,7 @@ Foam::solverPerformance Foam::GAMGSolver::solve if (debug >= 2) { - solverPerf.print(Info(matrix().mesh().comm())); + solverPerf.print(Info.masterStream(matrix().mesh().comm())); } } while ( @@ -631,7 +631,7 @@ void Foam::GAMGSolver::solveCoarsestLevel // // if (debug >= 2) // { - // coarseSolverPerf.print(Info(coarseComm)); + // coarseSolverPerf.print(Info.masterStream(coarseComm)); // } // // Pout<< "procAgglom: coarsestSource :" << coarsestSource << endl; @@ -679,7 +679,7 @@ void Foam::GAMGSolver::solveCoarsestLevel if (debug >= 2) { - coarseSolverPerf.print(Info(coarseComm)); + coarseSolverPerf.print(Info.masterStream(coarseComm)); } } diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/smoothSolver/smoothSolver.C b/src/OpenFOAM/matrices/lduMatrix/solvers/smoothSolver/smoothSolver.C index d073e73c37..1fa2ee70cf 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/smoothSolver/smoothSolver.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/smoothSolver/smoothSolver.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -132,7 +132,7 @@ Foam::solverPerformance Foam::smoothSolver::solve if (lduMatrix::debug >= 2) { - Info(matrix().mesh().comm()) + Info.masterStream(matrix().mesh().comm()) << " Normalisation factor = " << normFactor << endl; } diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C index 333acca086..eec5c77c71 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -60,7 +60,7 @@ Foam::solverPerformance Foam::fvMatrix::solve { if (debug) { - Info(this->mesh().comm()) + Info.masterStream(this->mesh().comm()) << "fvMatrix::solve(const dictionary& solverControls) : " "solving fvMatrix" << endl; @@ -108,7 +108,7 @@ Foam::solverPerformance Foam::fvMatrix::solveSegregated { if (debug) { - Info(this->mesh().comm()) + Info.masterStream(this->mesh().comm()) << "fvMatrix::solveSegregated" "(const dictionary& solverControls) : " "solving fvMatrix" @@ -202,7 +202,7 @@ Foam::solverPerformance Foam::fvMatrix::solveSegregated if (solverPerformance::debug) { - solverPerf.print(Info(this->mesh().comm())); + solverPerf.print(Info.masterStream(this->mesh().comm())); } solverPerfVec = max(solverPerfVec, solverPerf); @@ -228,7 +228,7 @@ Foam::solverPerformance Foam::fvMatrix::solveCoupled { if (debug) { - Info(this->mesh().comm()) + Info.masterStream(this->mesh().comm()) << "fvMatrix::solveCoupled" "(const dictionary& solverControls) : " "solving fvMatrix" @@ -269,7 +269,7 @@ Foam::solverPerformance Foam::fvMatrix::solveCoupled if (SolverPerformance::debug) { - solverPerf.print(Info(this->mesh().comm())); + solverPerf.print(Info.masterStream(this->mesh().comm())); } psi.correctBoundaryConditions(); diff --git a/src/finiteVolume/fvMatrices/fvScalarMatrix/fvScalarMatrix.C b/src/finiteVolume/fvMatrices/fvScalarMatrix/fvScalarMatrix.C index 7bd9c2a2c2..8dc91d4d17 100644 --- a/src/finiteVolume/fvMatrices/fvScalarMatrix/fvScalarMatrix.C +++ b/src/finiteVolume/fvMatrices/fvScalarMatrix/fvScalarMatrix.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -61,7 +61,7 @@ Foam::fvMatrix::solver { if (debug) { - Info(this->mesh().comm()) + Info.masterStream(this->mesh().comm()) << "fvMatrix::solver(const dictionary& solverControls) : " "solver for fvMatrix" << endl; @@ -120,7 +120,7 @@ Foam::solverPerformance Foam::fvMatrix::fvSolver::solve if (solverPerformance::debug) { - solverPerf.print(Info(fvMat_.mesh().comm())); + solverPerf.print(Info.masterStream(fvMat_.mesh().comm())); } fvMat_.diag() = saveDiag; @@ -141,7 +141,7 @@ Foam::solverPerformance Foam::fvMatrix::solveSegregated { if (debug) { - Info(this->mesh().comm()) + Info.masterStream(this->mesh().comm()) << "fvMatrix::solveSegregated" "(const dictionary& solverControls) : " "solving fvMatrix" @@ -170,7 +170,7 @@ Foam::solverPerformance Foam::fvMatrix::solveSegregated if (solverPerformance::debug) { - solverPerf.print(Info(mesh().comm())); + solverPerf.print(Info.masterStream(mesh().comm())); } diag() = saveDiag; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C index e65f77ec20..cb2084c658 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -98,7 +98,7 @@ void Foam::CellZoneInjection::setPositions injectorCells.append(cellI); injectorTetFaces.append(cellTetIs[tetI].face()); - injectorTetPts.append(cellTetIs[tetI].faceBasePt()); + injectorTetPts.append(cellTetIs[tetI].tetPt()); } } diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C index 21cb38d2ed..cc29f5810b 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -91,7 +91,8 @@ Foam::AveragingMethod::New ( "Foam::AveragingMethod::New" "(" - "const dictionary&" + "const IOobject&, " + "const dictionary&, " "const fvMesh&" ")" ) << "Unknown averaging method " << averageType @@ -243,10 +244,10 @@ bool Foam::AveragingMethod::write() const pointGrad.internalField() /= pointVolume; // write - if(!cellValue.write()) return false; - if(!cellGrad.write()) return false; - if(!pointValue.write()) return false; - if(!pointGrad.write()) return false; + if (!cellValue.write()) return false; + if (!cellGrad.write()) return false; + if (!pointValue.write()) return false; + if (!pointGrad.write()) return false; return true; } diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Dual/Dual.H b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Dual/Dual.H index 537c1270b9..0c905e003e 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Dual/Dual.H +++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Dual/Dual.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -58,7 +58,7 @@ namespace AveragingMethods { /*---------------------------------------------------------------------------*\ - Class Dual Declaration + Class Dual Declaration \*---------------------------------------------------------------------------*/ template diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Moment/Moment.H b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Moment/Moment.H index 67aec06b58..e429ed43ec 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Moment/Moment.H +++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Moment/Moment.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -55,7 +55,7 @@ namespace AveragingMethods { /*---------------------------------------------------------------------------*\ - Class Moment Declaration + Class Moment Declaration \*---------------------------------------------------------------------------*/ template diff --git a/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/CorrectionLimitingMethod/CorrectionLimitingMethod.C b/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/CorrectionLimitingMethod/CorrectionLimitingMethod.C index 84545e7640..3c6b0ca885 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/CorrectionLimitingMethod/CorrectionLimitingMethod.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/CorrectionLimitingMethod/CorrectionLimitingMethod.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -69,7 +69,6 @@ Foam::CorrectionLimitingMethod::New ( "CorrectionLimitingMethod::New" "(" - "const word&, " "const dictionary&" ")" ) << "Unknown correction limiter type " << modelType diff --git a/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/CorrectionLimitingMethod/CorrectionLimitingMethod.H b/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/CorrectionLimitingMethod/CorrectionLimitingMethod.H index a478d47e91..18978b5a0f 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/CorrectionLimitingMethod/CorrectionLimitingMethod.H +++ b/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/CorrectionLimitingMethod/CorrectionLimitingMethod.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,7 +45,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class CorrectionLimitingMethod Declaration + Class CorrectionLimitingMethod Declaration \*---------------------------------------------------------------------------*/ class CorrectionLimitingMethod diff --git a/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/absolute/absolute.H b/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/absolute/absolute.H index 637d99ec44..742746b5e3 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/absolute/absolute.H +++ b/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/absolute/absolute.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -50,7 +50,7 @@ namespace CorrectionLimitingMethods { /*---------------------------------------------------------------------------*\ - Class absolute Declaration + Class absolute Declaration \*---------------------------------------------------------------------------*/ class absolute diff --git a/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/noCorrectionLimiting/noCorrectionLimiting.H b/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/noCorrectionLimiting/noCorrectionLimiting.H index b1656e2043..f601491cea 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/noCorrectionLimiting/noCorrectionLimiting.H +++ b/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/noCorrectionLimiting/noCorrectionLimiting.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,7 +44,7 @@ namespace CorrectionLimitingMethods { /*---------------------------------------------------------------------------*\ - Class noCorrectionLimiting Declaration + Class noCorrectionLimiting Declaration \*---------------------------------------------------------------------------*/ class noCorrectionLimiting diff --git a/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/relative/relative.H b/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/relative/relative.H index 0d84e4eb39..e7d9f2233f 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/relative/relative.H +++ b/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/relative/relative.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -50,7 +50,7 @@ namespace CorrectionLimitingMethods { /*---------------------------------------------------------------------------*\ - Class relative Declaration + Class relative Declaration \*---------------------------------------------------------------------------*/ class relative diff --git a/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/IsotropyModel/IsotropyModel.H b/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/IsotropyModel/IsotropyModel.H index 08f20f1256..103b748dc9 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/IsotropyModel/IsotropyModel.H +++ b/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/IsotropyModel/IsotropyModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -51,7 +51,7 @@ namespace Foam class TimeScaleModel; /*---------------------------------------------------------------------------*\ - Class IsotropyModel Declaration + Class IsotropyModel Declaration \*---------------------------------------------------------------------------*/ template @@ -129,27 +129,27 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeIsotropyModel(CloudType) \ +#define makeIsotropyModel(CloudType) \ \ typedef CloudType::MPPICCloudType MPPICCloudType; \ defineNamedTemplateTypeNameAndDebug \ ( \ - IsotropyModel, \ + IsotropyModel, \ 0 \ ); \ defineTemplateRunTimeSelectionTable \ ( \ - IsotropyModel, \ + IsotropyModel, \ dictionary \ ); -#define makeIsotropyModelType(SS, CloudType) \ +#define makeIsotropyModelType(SS, CloudType) \ \ typedef CloudType::MPPICCloudType MPPICCloudType; \ defineNamedTemplateTypeNameAndDebug(SS, 0); \ \ - IsotropyModel:: \ + IsotropyModel:: \ adddictionaryConstructorToTable > \ add##SS##CloudType##MPPICCloudType##ConstructorToTable_; diff --git a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.H b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.H index c3064d73f2..ae8bb68135 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.H +++ b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -50,7 +50,7 @@ namespace PackingModels { /*---------------------------------------------------------------------------*\ - Class Implicit Declaration + Class Implicit Declaration \*---------------------------------------------------------------------------*/ template diff --git a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/ParticleStressModel/ParticleStressModel.H b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/ParticleStressModel/ParticleStressModel.H index 3338f3a94b..d5f5ebb6ce 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/ParticleStressModel/ParticleStressModel.H +++ b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/ParticleStressModel/ParticleStressModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,7 +45,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class ParticleStressModel Declaration + Class ParticleStressModel Declaration \*---------------------------------------------------------------------------*/ class ParticleStressModel diff --git a/src/postProcessing/functionObjects/IO/removeRegisteredObject/removeRegisteredObject.C b/src/postProcessing/functionObjects/IO/removeRegisteredObject/removeRegisteredObject.C index eb4f5ee21a..28bb18292e 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) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -92,7 +92,7 @@ void Foam::removeRegisteredObject::execute() void Foam::removeRegisteredObject::end() { - // Do nothing - only valid on execute + execute(); } diff --git a/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.C b/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.C index fff2c68041..74fa1f0b00 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) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -195,7 +195,7 @@ void Foam::writeDictionary::execute() void Foam::writeDictionary::end() { - // do nothing + execute(); } diff --git a/src/postProcessing/functionObjects/field/Make/files b/src/postProcessing/functionObjects/field/Make/files index dd138902e3..75464c4013 100644 --- a/src/postProcessing/functionObjects/field/Make/files +++ b/src/postProcessing/functionObjects/field/Make/files @@ -34,9 +34,6 @@ streamLine/streamLineParticle.C streamLine/streamLineParticleCloud.C streamLine/streamLineFunctionObject.C -turbulenceFields/turbulenceFields.C -turbulenceFields/turbulenceFieldsFunctionObject.C - wallBoundedStreamLine/wallBoundedStreamLine.C wallBoundedStreamLine/wallBoundedStreamLineFunctionObject.C wallBoundedStreamLine/wallBoundedStreamLineParticle.C diff --git a/src/postProcessing/functionObjects/field/Make/options b/src/postProcessing/functionObjects/field/Make/options index 0cb1bb8f09..0732822dba 100644 --- a/src/postProcessing/functionObjects/field/Make/options +++ b/src/postProcessing/functionObjects/field/Make/options @@ -3,11 +3,7 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/fileFormats/lnInclude \ - -I$(LIB_SRC)/surfMesh/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/surfMesh/lnInclude LIB_LIBS = \ @@ -16,8 +12,5 @@ LIB_LIBS = \ -lsurfMesh \ -llagrangian \ -lfileFormats \ - -lsurfMesh \ -lsampling \ - -lincompressibleTransportModels \ - -lcompressibleTurbulenceModel \ - -lincompressibleTurbulenceModel + -lsurfMesh diff --git a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C index 5469335d4a..251b9d3f1f 100644 --- a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C +++ b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -111,8 +111,6 @@ void Foam::fieldAverage::calcAverages() initialize(); } - Info<< type() << " " << name_ << " output:" << nl; - const label currentTimeIndex = static_cast(obr_).time().timeIndex(); @@ -125,6 +123,8 @@ void Foam::fieldAverage::calcAverages() prevTimeIndex_ = currentTimeIndex; } + Info<< type() << " " << name_ << " output:" << nl; + Info<< " Calculating averages" << nl; addMeanSqrToPrime2Mean(); @@ -317,14 +317,19 @@ void Foam::fieldAverage::execute() if (active_) { calcAverages(); - Info<< endl; } } void Foam::fieldAverage::end() -{} +{ + if (active_) + { + calcAverages(); + Info<< endl; + } +} void Foam::fieldAverage::timeSet() diff --git a/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C b/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C index 7fdb74f812..4e30b881ca 100644 --- a/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C +++ b/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -115,7 +115,10 @@ void Foam::fieldCoordinateSystemTransform::execute() void Foam::fieldCoordinateSystemTransform::end() { - // Do nothing + if (active_) + { + execute(); + } } diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C index 0c61259012..d13ae8d791 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-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -159,10 +159,7 @@ void Foam::fieldMinMax::write() { functionObjectFile::write(); - if (log_) - { - Info<< type() << " " << name_ << " output:" << nl; - } + Info(log_)<< type() << " " << name_ << " output:" << nl; forAll(fieldSet_, fieldI) { @@ -173,10 +170,7 @@ void Foam::fieldMinMax::write() calcMinMaxFields(fieldSet_[fieldI], mode_); } - if (log_) - { - Info<< endl; - } + Info(log_)<< endl; } } diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.H b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.H index 25ccd00f41..361420da07 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-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -139,6 +139,20 @@ protected: // Private Member Functions + //- Helper function to write the output + template + void output + ( + const word& fieldName, + const word& outputName, + const vector& minC, + const vector& maxC, + const label minProcI, + const label maxProcI, + const Type& minValue, + const Type& maxValue + ); + //- Disallow default bitwise copy construct fieldMinMax(const fieldMinMax&); diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C index 4aa2a2b6cd..a8477d8d50 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C +++ b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,6 +31,62 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +template +void Foam::fieldMinMax::output +( + const word& fieldName, + const word& outputName, + const vector& minC, + const vector& maxC, + const label minProcI, + const label maxProcI, + const Type& minValue, + const Type& maxValue +) +{ + file()<< obr_.time().value(); + writeTabbed(file(), fieldName); + + file() + << token::TAB << minValue + << token::TAB << minC; + + if (Pstream::parRun()) + { + file()<< token::TAB << minProcI; + } + + file() + << token::TAB << maxValue + << token::TAB << maxC; + + if (Pstream::parRun()) + { + file()<< token::TAB << maxProcI; + } + + file() << endl; + + Info(log_)<< " min(" << outputName << ") = " + << minValue << " at position " << minC; + + if (Pstream::parRun()) + { + Info(log_)<< " on processor " << minProcI; + } + + Info(log_)<< nl << " max(" << outputName << ") = " + << maxValue << " at position " << maxC; + + if (Pstream::parRun()) + { + Info(log_)<< " on processor " << maxProcI; + } + + Info(log_)<< endl; +} + + template void Foam::fieldMinMax::calcMinMaxFields ( @@ -111,49 +167,17 @@ void Foam::fieldMinMax::calcMinMaxFields scalar maxValue = maxVs[maxI]; const vector& maxC = maxCs[maxI]; - file()<< obr_.time().value(); - writeTabbed(file(), fieldName); - - file() - << token::TAB << minValue - << token::TAB << minC; - - if (Pstream::parRun()) - { - file()<< token::TAB << minI; - } - - file() - << token::TAB << maxValue - << token::TAB << maxC; - - if (Pstream::parRun()) - { - file()<< token::TAB << maxI; - } - - file() << endl; - - if (log_) - { - Info<< " min(mag(" << fieldName << ")) = " - << minValue << " at position " << minC; - - if (Pstream::parRun()) - { - Info<< " on processor " << minI; - } - - Info<< nl << " max(mag(" << fieldName << ")) = " - << maxValue << " at position " << maxC; - - if (Pstream::parRun()) - { - Info<< " on processor " << maxI; - } - - Info<< endl; - } + output + ( + fieldName, + word("mag(" + fieldName + ")"), + minC, + maxC, + minI, + maxI, + minValue, + maxValue + ); } break; } @@ -216,49 +240,17 @@ void Foam::fieldMinMax::calcMinMaxFields Type maxValue = maxVs[maxI]; const vector& maxC = maxCs[maxI]; - file()<< obr_.time().value(); - writeTabbed(file(), fieldName); - - file() - << token::TAB << minValue - << token::TAB << minC; - - if (Pstream::parRun()) - { - file()<< token::TAB << minI; - } - - file() - << token::TAB << maxValue - << token::TAB << maxC; - - if (Pstream::parRun()) - { - file()<< token::TAB << maxI; - } - - file() << endl; - - if (log_) - { - Info<< " min(" << fieldName << ") = " - << minValue << " at position " << minC; - - if (Pstream::parRun()) - { - Info<< " on processor " << minI; - } - - Info<< nl << " max(" << fieldName << ") = " - << maxValue << " at position " << maxC; - - if (Pstream::parRun()) - { - Info<< " on processor " << maxI; - } - - Info<< endl; - } + output + ( + fieldName, + fieldName, + minC, + maxC, + minI, + maxI, + minValue, + maxValue + ); } break; } diff --git a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C index 595c16084d..a441189f39 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C +++ b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -245,10 +245,7 @@ void Foam::fieldValues::cellSource::write() file()<< endl; } - if (log_) - { - Info<< endl; - } + Info(log_)<< endl; } } diff --git a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceTemplates.C b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceTemplates.C index bdeccc6dd0..372bd224b9 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceTemplates.C +++ b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceTemplates.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-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -200,12 +200,9 @@ bool Foam::fieldValues::cellSource::writeValues(const word& fieldName) file()<< tab << result; - if (log_) - { - Info<< " " << operationTypeNames_[operation_] - << "(" << sourceName_ << ") for " << fieldName - << " = " << result << endl; - } + Info(log_)<< " " << operationTypeNames_[operation_] + << "(" << sourceName_ << ") for " << fieldName + << " = " << result << endl; } } diff --git a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C index 054ef40423..ea38597aef 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C +++ b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -663,10 +663,7 @@ void Foam::fieldValues::faceSource::write() file()<< endl; } - if (log_) - { - Info<< endl; - } + Info(log_)<< endl; } } diff --git a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C index 76b50be88f..6def30c520 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C +++ b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -344,12 +344,9 @@ bool Foam::fieldValues::faceSource::writeValues(const word& fieldName) file()<< tab << result; - if (log_) - { - Info<< " " << operationTypeNames_[operation_] - << "(" << sourceName_ << ") for " << fieldName - << " = " << result << endl; - } + Info(log_)<< " " << operationTypeNames_[operation_] + << "(" << sourceName_ << ") for " << fieldName + << " = " << result << endl; } } diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C b/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C index 6d0856a916..25f2c84cbe 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C +++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -58,10 +58,7 @@ void Foam::fieldValue::write() { functionObjectFile::write(); - if (log_) - { - Info<< type() << " " << name_ << " output:" << nl; - } + Info(log_)<< type() << " " << name_ << " output:" << nl; } } diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C index b251a362ea..d467b8146c 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C +++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -158,10 +158,7 @@ void Foam::fieldValues::fieldValueDelta::write() file()<< obr_.time().value(); } - if (log_) - { - Info<< type() << " " << name_ << " output:" << endl; - } + Info(log_)<< type() << " " << name_ << " output:" << endl; bool found = false; processFields(found); diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDeltaTemplates.C b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDeltaTemplates.C index b107c79527..48581422a9 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDeltaTemplates.C +++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDeltaTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -114,12 +114,9 @@ void Foam::fieldValues::fieldValueDelta::processFields(bool& found) Type result = applyOperation(r1, r2); - if (log_) - { - Info<< " " << operationTypeNames_[operation_] - << "(" << fieldName << ") = " << result - << endl; - } + Info(log_)<< " " << operationTypeNames_[operation_] + << "(" << fieldName << ") = " << result + << endl; if (Pstream::master()) { diff --git a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C index 40211ae7a2..d65c9acf87 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-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -374,6 +374,11 @@ void Foam::nearWallFields::end() { Info<< "nearWallFields:end()" << endl; } + + if (active_) + { + execute(); + } } diff --git a/src/postProcessing/functionObjects/field/processorField/processorField.C b/src/postProcessing/functionObjects/field/processorField/processorField.C index 37c61b5db2..a57ee9a293 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-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -122,7 +122,10 @@ void Foam::processorField::execute() void Foam::processorField::end() { - // Do nothing + if (active_) + { + execute(); + } } diff --git a/src/postProcessing/functionObjects/field/readFields/readFields.C b/src/postProcessing/functionObjects/field/readFields/readFields.C index 7897bfd92b..869f46beb0 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-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -91,36 +91,42 @@ void Foam::readFields::read(const dictionary& dict) void Foam::readFields::execute() { - //Info<< type() << " " << name_ << ":" << nl; - - // 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(); - - forAll(fieldSet_, fieldI) + if (active_) { - // If necessary load field - loadField(fieldSet_[fieldI], vsf_, ssf_); - loadField(fieldSet_[fieldI], vvf_, svf_); - loadField(fieldSet_[fieldI], vSpheretf_, sSpheretf_); - loadField(fieldSet_[fieldI], vSymmtf_, sSymmtf_); - loadField(fieldSet_[fieldI], vtf_, stf_); + // 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(); + + forAll(fieldSet_, fieldI) + { + const word& fieldName = fieldSet_[fieldI]; + + // If necessary load field + loadField(fieldName, vsf_, ssf_); + loadField(fieldName, vvf_, svf_); + loadField(fieldName, vSpheretf_, sSpheretf_); + loadField(fieldName, vSymmtf_, sSymmtf_); + loadField(fieldName, vtf_, stf_); + } } } void Foam::readFields::end() { - execute(); + if (active_) + { + execute(); + } } diff --git a/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.C b/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.C index 53e991d76b..0048f0d15a 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-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -114,7 +114,10 @@ void Foam::surfaceInterpolateFields::execute() void Foam::surfaceInterpolateFields::end() { - // Do nothing + if (active_) + { + execute(); + } } diff --git a/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C index 42ae77e264..283a93e426 100644 --- a/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C +++ b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -227,15 +227,12 @@ void Foam::forceCoeffs::write() << obr_.time().value() << tab << Cm << tab << Cd << tab << Cl << tab << Clf << tab << Clr << endl; - if (log_) - { - Info<< type() << " " << name_ << " output:" << nl - << " Cm = " << Cm << nl - << " Cd = " << Cd << nl - << " Cl = " << Cl << nl - << " Cl(f) = " << Clf << nl - << " Cl(r) = " << Clr << endl; - } + Info(log_)<< type() << " " << name_ << " output:" << nl + << " Cm = " << Cm << nl + << " Cd = " << Cd << nl + << " Cl = " << Cl << nl + << " Cl(f) = " << Clf << nl + << " Cl(r) = " << Clr << endl; if (nBin_ > 1) { @@ -262,10 +259,7 @@ void Foam::forceCoeffs::write() file(1) << endl; } - if (log_) - { - Info<< endl; - } + Info(log_)<< endl; } } diff --git a/src/postProcessing/functionObjects/forces/forces/forces.C b/src/postProcessing/functionObjects/forces/forces/forces.C index c096ad5d4b..e38c5a4622 100644 --- a/src/postProcessing/functionObjects/forces/forces/forces.C +++ b/src/postProcessing/functionObjects/forces/forces/forces.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -391,19 +391,17 @@ void Foam::forces::applyBins void Foam::forces::writeForces() { - if (log_) - { - Info<< type() << " " << name_ << " output:" << nl - << " sum of forces:" << nl - << " pressure : " << sum(force_[0]) << nl - << " viscous : " << sum(force_[1]) << nl - << " porous : " << sum(force_[2]) << nl - << " sum of moments:" << nl - << " pressure : " << sum(moment_[0]) << nl - << " viscous : " << sum(moment_[1]) << nl - << " porous : " << sum(moment_[2]) - << endl; - } + Info(log_) + << type() << " " << name_ << " output:" << nl + << " sum of forces:" << nl + << " pressure : " << sum(force_[0]) << nl + << " viscous : " << sum(force_[1]) << nl + << " porous : " << sum(force_[2]) << nl + << " sum of moments:" << nl + << " pressure : " << sum(moment_[0]) << nl + << " viscous : " << sum(moment_[1]) << nl + << " porous : " << sum(moment_[2]) + << endl; file(0) << obr_.time().value() << tab << setw(1) << '[' << sum(force_[0]) << setw(1) << ',' @@ -642,10 +640,7 @@ void Foam::forces::read(const dictionary& dict) log_ = dict.lookupOrDefault("log", false); - if (log_) - { - Info<< type() << " " << name_ << ":" << nl; - } + Info(log_)<< type() << " " << name_ << ":" << nl; directForceDensity_ = dict.lookupOrDefault("directForceDensity", false); @@ -809,10 +804,7 @@ void Foam::forces::write() writeBins(); - if (log_) - { - Info<< endl; - } + Info(log_)<< endl; } } diff --git a/src/postProcessing/functionObjects/fvTools/calcFvcDiv/calcFvcDiv.C b/src/postProcessing/functionObjects/fvTools/calcFvcDiv/calcFvcDiv.C index 9620fe3222..8c951de8ec 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) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -154,7 +154,10 @@ void Foam::calcFvcDiv::execute() void Foam::calcFvcDiv::end() { - // Do nothing + if (active_) + { + execute(); + } } diff --git a/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGrad.C b/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGrad.C index 31d24da4e9..c0642ecf01 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) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -116,7 +116,10 @@ void Foam::calcFvcGrad::execute() void Foam::calcFvcGrad::end() { - // Do nothing + if (active_) + { + execute(); + } } diff --git a/src/postProcessing/functionObjects/fvTools/calcMag/calcMag.C b/src/postProcessing/functionObjects/fvTools/calcMag/calcMag.C index 3b400f4889..d853aaf00d 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) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -119,7 +119,10 @@ void Foam::calcMag::execute() void Foam::calcMag::end() { - // Do nothing + if (active_) + { + execute(); + } } diff --git a/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C b/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C index 2a662c6513..dbb81f8363 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) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -185,7 +185,10 @@ void Foam::CourantNo::execute() void Foam::CourantNo::end() { - // Do nothing + if (active_) + { + execute(); + } } diff --git a/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.C b/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.C index 0edfdb727d..0bfbc94126 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) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -142,10 +142,7 @@ void Foam::DESModelRegions::execute() const fvMesh& mesh = refCast(obr_); - if (log_) - { - Info<< type() << " " << name_ << " output:" << nl; - } + Info(log_)<< type() << " " << name_ << " output:" << nl; volScalarField& DESModelRegions = const_cast @@ -196,19 +193,14 @@ void Foam::DESModelRegions::execute() << endl; } - if (log_) - { - Info<< " LES = " << prc << " % (volume)" << nl - << " RAS = " << 100.0 - prc << " % (volume)" << endl; - } + Info(log_) + << " LES = " << prc << " % (volume)" << nl + << " RAS = " << 100.0 - prc << " % (volume)" << endl; } else { - if (log_) - { - Info<< " No DES turbulence model found in database" << nl - << endl; - } + Info(log_)<< " No DES turbulence model found in database" << nl + << endl; } } } @@ -216,7 +208,10 @@ void Foam::DESModelRegions::execute() void Foam::DESModelRegions::end() { - // Do nothing + if (active_) + { + execute(); + } } diff --git a/src/postProcessing/functionObjects/utilities/Lambda2/Lambda2.C b/src/postProcessing/functionObjects/utilities/Lambda2/Lambda2.C index b008b7b4fa..3c72fbfd9b 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) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -144,7 +144,10 @@ void Foam::Lambda2::execute() void Foam::Lambda2::end() { - // Do nothing + if (active_) + { + execute(); + } } diff --git a/src/postProcessing/functionObjects/utilities/Make/files b/src/postProcessing/functionObjects/utilities/Make/files index 6a905f28a1..43b161e634 100644 --- a/src/postProcessing/functionObjects/utilities/Make/files +++ b/src/postProcessing/functionObjects/utilities/Make/files @@ -30,6 +30,9 @@ scalarTransport/scalarTransportFunctionObject.C timeActivatedFileUpdate/timeActivatedFileUpdate.C timeActivatedFileUpdate/timeActivatedFileUpdateFunctionObject.C +turbulenceFields/turbulenceFields.C +turbulenceFields/turbulenceFieldsFunctionObject.C + wallShearStress/wallShearStress.C wallShearStress/wallShearStressFunctionObject.C diff --git a/src/postProcessing/functionObjects/utilities/Peclet/Peclet.C b/src/postProcessing/functionObjects/utilities/Peclet/Peclet.C index 0c77608b13..6d288fcfc0 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) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -197,7 +197,10 @@ void Foam::Peclet::execute() void Foam::Peclet::end() { - // Do nothing + if (active_) + { + execute(); + } } void Foam::Peclet::timeSet() diff --git a/src/postProcessing/functionObjects/utilities/Q/Q.C b/src/postProcessing/functionObjects/utilities/Q/Q.C index a17561217e..2dda80a88b 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) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -137,7 +137,10 @@ void Foam::Q::execute() void Foam::Q::end() { - // Do nothing + if (active_) + { + execute(); + } } diff --git a/src/postProcessing/functionObjects/utilities/blendingFactor/blendingFactor.C b/src/postProcessing/functionObjects/utilities/blendingFactor/blendingFactor.C index 351c48bfb4..3c98c9d86f 100644 --- a/src/postProcessing/functionObjects/utilities/blendingFactor/blendingFactor.C +++ b/src/postProcessing/functionObjects/utilities/blendingFactor/blendingFactor.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -101,7 +101,10 @@ void Foam::blendingFactor::execute() void Foam::blendingFactor::end() { - // Do nothing + if (active_) + { + execute(); + } } void Foam::blendingFactor::timeSet() diff --git a/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.C b/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.C index 3417dfec39..2d6c157d4d 100644 --- a/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.C +++ b/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -309,7 +309,10 @@ void Foam::pressureTools::execute() void Foam::pressureTools::end() { - // Do nothing + if (active_) + { + execute(); + } } diff --git a/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C b/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C index b63fe4acd8..4428388604 100644 --- a/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C +++ b/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -214,92 +214,97 @@ void Foam::scalarTransport::read(const dictionary& dict) void Foam::scalarTransport::execute() { - Info<< type() << " output:" << endl; - - const surfaceScalarField& phi = - mesh_.lookupObject(phiName_); - - // calculate the diffusivity - volScalarField DT(this->DT(phi)); - - // set schemes - word schemeVar = T_.name(); - if (autoSchemes_) + if (active_) { - schemeVar = UName_; - } + Info<< type() << " output:" << endl; - word divScheme("div(phi," + schemeVar + ")"); - word laplacianScheme("laplacian(" + DT.name() + "," + schemeVar + ")"); + const surfaceScalarField& phi = + mesh_.lookupObject(phiName_); - // set under-relaxation coeff - scalar relaxCoeff = 0.0; - if (mesh_.relaxEquation(schemeVar)) - { - relaxCoeff = mesh_.equationRelaxationFactor(schemeVar); - } + // calculate the diffusivity + volScalarField DT(this->DT(phi)); - if (phi.dimensions() == dimMass/dimTime) - { - const volScalarField& rho = - mesh_.lookupObject(rhoName_); - - // solve - for (label i = 0; i <= nCorr_; i++) + // set schemes + word schemeVar = T_.name(); + if (autoSchemes_) { - fvScalarMatrix TEqn - ( - fvm::ddt(rho, T_) - + fvm::div(phi, T_, divScheme) - - fvm::laplacian(DT, T_, laplacianScheme) - == - fvOptions_(rho, T_) - ); - - TEqn.relax(relaxCoeff); - - fvOptions_.constrain(TEqn); - - TEqn.solve(mesh_.solverDict(schemeVar)); + schemeVar = UName_; } - } - else if (phi.dimensions() == dimVolume/dimTime) - { - // solve - for (label i = 0; i <= nCorr_; i++) + + word divScheme("div(phi," + schemeVar + ")"); + word laplacianScheme("laplacian(" + DT.name() + "," + schemeVar + ")"); + + // set under-relaxation coeff + scalar relaxCoeff = 0.0; + if (mesh_.relaxEquation(schemeVar)) { - fvScalarMatrix TEqn - ( - fvm::ddt(T_) - + fvm::div(phi, T_, divScheme) - - fvm::laplacian(DT, T_, laplacianScheme) - == - fvOptions_(T_) - ); - - TEqn.relax(relaxCoeff); - - fvOptions_.constrain(TEqn); - - TEqn.solve(mesh_.solverDict(schemeVar)); + relaxCoeff = mesh_.equationRelaxationFactor(schemeVar); } - } - else - { - FatalErrorIn("void Foam::scalarTransport::execute()") - << "Incompatible dimensions for phi: " << phi.dimensions() << nl - << "Dimensions should be " << dimMass/dimTime << " or " - << dimVolume/dimTime << endl; - } + if (phi.dimensions() == dimMass/dimTime) + { + const volScalarField& rho = + mesh_.lookupObject(rhoName_); - Info<< endl; + // solve + for (label i = 0; i <= nCorr_; i++) + { + fvScalarMatrix TEqn + ( + fvm::ddt(rho, T_) + + fvm::div(phi, T_, divScheme) + - fvm::laplacian(DT, T_, laplacianScheme) + == + fvOptions_(rho, T_) + ); + + TEqn.relax(relaxCoeff); + + fvOptions_.constrain(TEqn); + + TEqn.solve(mesh_.solverDict(schemeVar)); + } + } + else if (phi.dimensions() == dimVolume/dimTime) + { + // solve + for (label i = 0; i <= nCorr_; i++) + { + fvScalarMatrix TEqn + ( + fvm::ddt(T_) + + fvm::div(phi, T_, divScheme) + - fvm::laplacian(DT, T_, laplacianScheme) + == + fvOptions_(T_) + ); + + TEqn.relax(relaxCoeff); + + fvOptions_.constrain(TEqn); + + TEqn.solve(mesh_.solverDict(schemeVar)); + } + } + else + { + FatalErrorIn("void Foam::scalarTransport::execute()") + << "Incompatible dimensions for phi: " << phi.dimensions() << nl + << "Dimensions should be " << dimMass/dimTime << " or " + << dimVolume/dimTime << endl; + } + + Info<< endl; + } } void Foam::scalarTransport::end() { - // Do nothing + if (active_) + { + execute(); + } } diff --git a/src/postProcessing/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.C b/src/postProcessing/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.C index 9329ad6e3f..91d5f381f6 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-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -132,7 +132,10 @@ void Foam::timeActivatedFileUpdate::execute() void Foam::timeActivatedFileUpdate::end() { - // Do nothing + if (active_) + { + execute(); + } } diff --git a/src/postProcessing/functionObjects/field/turbulenceFields/IOturbulenceFields.H b/src/postProcessing/functionObjects/utilities/turbulenceFields/IOturbulenceFields.H similarity index 95% rename from src/postProcessing/functionObjects/field/turbulenceFields/IOturbulenceFields.H rename to src/postProcessing/functionObjects/utilities/turbulenceFields/IOturbulenceFields.H index 3ac6a32e54..c6005f8e37 100644 --- a/src/postProcessing/functionObjects/field/turbulenceFields/IOturbulenceFields.H +++ b/src/postProcessing/functionObjects/utilities/turbulenceFields/IOturbulenceFields.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) 2012-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/field/turbulenceFields/postProcessingDict b/src/postProcessing/functionObjects/utilities/turbulenceFields/postProcessingDict similarity index 100% rename from src/postProcessing/functionObjects/field/turbulenceFields/postProcessingDict rename to src/postProcessing/functionObjects/utilities/turbulenceFields/postProcessingDict diff --git a/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFields.C b/src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFields.C similarity index 98% rename from src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFields.C rename to src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFields.C index b3fd284abd..9f25e517a7 100644 --- a/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFields.C +++ b/src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFields.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -257,7 +257,10 @@ void Foam::turbulenceFields::execute() void Foam::turbulenceFields::end() { - // Do nothing + if (active_) + { + execute(); + } } diff --git a/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFields.H b/src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFields.H similarity index 98% rename from src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFields.H rename to src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFields.H index 09ecd93e68..2ff4476dad 100644 --- a/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFields.H +++ b/src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFields.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFieldsFunctionObject.C b/src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFieldsFunctionObject.C similarity index 95% rename from src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFieldsFunctionObject.C rename to src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFieldsFunctionObject.C index f5f542d12f..4f779363f8 100644 --- a/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFieldsFunctionObject.C +++ b/src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFieldsFunctionObject.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) 2012-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFieldsFunctionObject.H b/src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFieldsFunctionObject.H similarity index 96% rename from src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFieldsFunctionObject.H rename to src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFieldsFunctionObject.H index 6631fb1434..e9e393d170 100644 --- a/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFieldsFunctionObject.H +++ b/src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFieldsFunctionObject.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) 2012-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFieldsTemplates.C b/src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFieldsTemplates.C similarity index 97% rename from src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFieldsTemplates.C rename to src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFieldsTemplates.C index bee5824013..a3bcd7135f 100644 --- a/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFieldsTemplates.C +++ b/src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFieldsTemplates.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) 2012-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C b/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C index a507428c6f..64255a7efd 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) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -82,11 +82,8 @@ void Foam::wallShearStress::calcShearStress << endl; } - if (log_) - { - Info<< " min/max(" << pp.name() << ") = " - << minSsp << ", " << maxSsp << endl; - } + Info(log_)<< " min/max(" << pp.name() << ") = " + << minSsp << ", " << maxSsp << endl; } } @@ -240,10 +237,7 @@ void Foam::wallShearStress::execute() mesh.lookupObject(type()) ); - if (log_) - { - Info<< type() << " " << name_ << " output:" << nl; - } + Info(log_)<< type() << " " << name_ << " output:" << nl; tmp Reff; @@ -275,7 +269,10 @@ void Foam::wallShearStress::execute() void Foam::wallShearStress::end() { - // Do nothing + if (active_) + { + execute(); + } } @@ -294,12 +291,9 @@ void Foam::wallShearStress::write() const volVectorField& wallShearStress = obr_.lookupObject(type()); - if (log_) - { - Info<< type() << " " << name_ << " output:" << nl - << " writing field " << wallShearStress.name() << nl - << endl; - } + Info(log_)<< type() << " " << name_ << " output:" << nl + << " writing field " << wallShearStress.name() << nl + << endl; wallShearStress.write(); } diff --git a/src/postProcessing/functionObjects/utilities/yPlusLES/yPlusLES.C b/src/postProcessing/functionObjects/utilities/yPlusLES/yPlusLES.C index 57951c6bae..b84942fffb 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) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -94,15 +94,12 @@ void Foam::yPlusLES::calcIncompressibleYPlus scalar maxYp = gMax(Yp); scalar avgYp = gAverage(Yp); - if (log_) - { - Info<< " patch " << currPatch.name() - << " y+ : min = " << minYp << ", max = " << maxYp - << ", average = " << avgYp << nl; - } - if (Pstream::master()) { + Info(log_)<< " patch " << currPatch.name() + << " y+ : min = " << minYp << ", max = " << maxYp + << ", average = " << avgYp << nl; + file() << obr_.time().value() << token::TAB << currPatch.name() << token::TAB << minYp @@ -162,15 +159,12 @@ void Foam::yPlusLES::calcCompressibleYPlus scalar maxYp = gMax(Yp); scalar avgYp = gAverage(Yp); - if (log_) - { - Info<< " patch " << currPatch.name() - << " y+ : min = " << minYp << ", max = " << maxYp - << ", average = " << avgYp << nl; - } - if (Pstream::master()) { + Info(log_)<< " patch " << currPatch.name() + << " y+ : min = " << minYp << ", max = " << maxYp + << ", average = " << avgYp << nl; + file() << obr_.time().value() << token::TAB << currPatch.name() << token::TAB << minYp @@ -286,10 +280,7 @@ void Foam::yPlusLES::execute() mesh.lookupObject(type()) ); - if (log_) - { - Info<< type() << " " << name_ << " output:" << nl; - } + Info(log_)<< type() << " " << name_ << " output:" << nl; if (phi.dimensions() == dimMass/dimTime) { @@ -305,7 +296,10 @@ void Foam::yPlusLES::execute() void Foam::yPlusLES::end() { - // Do nothing + if (active_) + { + execute(); + } } @@ -324,10 +318,7 @@ void Foam::yPlusLES::write() const volScalarField& yPlusLES = obr_.lookupObject(type()); - if (log_) - { - Info<< " writing field " << yPlusLES.name() << nl << endl; - } + Info(log_)<< " writing field " << yPlusLES.name() << nl << endl; yPlusLES.write(); } diff --git a/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.C b/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.C index 8d84bda486..c93875b3e5 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) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -89,15 +89,12 @@ void Foam::yPlusRAS::calcIncompressibleYPlus scalar maxYp = gMax(Yp); scalar avgYp = gAverage(Yp); - if (log_) - { - Info<< " patch " << nutPw.patch().name() - << " y+ : min = " << minYp << ", max = " << maxYp - << ", average = " << avgYp << nl; - } - if (Pstream::master()) { + Info(log_)<< " patch " << nutPw.patch().name() + << " y+ : min = " << minYp << ", max = " << maxYp + << ", average = " << avgYp << nl; + file() << obr_.time().value() << token::TAB << nutPw.patch().name() << token::TAB << minYp @@ -149,15 +146,12 @@ void Foam::yPlusRAS::calcCompressibleYPlus scalar maxYp = gMax(Yp); scalar avgYp = gAverage(Yp); - if (log_) - { - Info<< " patch " << mutPw.patch().name() - << " y+ : min = " << minYp << ", max = " << maxYp - << ", average = " << avgYp << nl; - } - if (Pstream::master()) { + Info(log_)<< " patch " << mutPw.patch().name() + << " y+ : min = " << minYp << ", max = " << maxYp + << ", average = " << avgYp << nl; + file() << obr_.time().value() << token::TAB << mutPw.patch().name() << token::TAB << minYp @@ -271,10 +265,7 @@ void Foam::yPlusRAS::execute() mesh.lookupObject(type()) ); - if (log_) - { - Info<< type() << " " << name_ << " output:" << nl; - } + Info(log_)<< type() << " " << name_ << " output:" << nl; if (phi.dimensions() == dimMass/dimTime) { @@ -290,7 +281,10 @@ void Foam::yPlusRAS::execute() void Foam::yPlusRAS::end() { - // Do nothing + if (active_) + { + execute(); + } } @@ -309,10 +303,7 @@ void Foam::yPlusRAS::write() const volScalarField& yPlusRAS = obr_.lookupObject(type()); - if (log_) - { - Info<< " writing field " << yPlusRAS.name() << nl << endl; - } + Info(log_)<< " writing field " << yPlusRAS.name() << nl << endl; yPlusRAS.write(); }