From f33b40c2022a6416ddbc7496b373e8d4836298bf Mon Sep 17 00:00:00 2001 From: Henry Weller <http://cfd.direct> Date: Fri, 22 Apr 2016 14:21:50 +0100 Subject: [PATCH] foamCalcFunctions: Avoid the inclusion of fvCFD.H --- .../postProcessing/foamCalc/foamCalcApp.C | 4 ++- .../basic/addSubtract/writeAddSubtractValue.C | 8 ++++-- .../foamCalcFunctions/calcType/calcType.C | 26 +++++++------------ .../foamCalcFunctions/calcType/calcType.H | 7 +++-- .../field/components/writeComponentFields.C | 8 ++++-- .../field/div/writeDivField.C | 8 ++++-- .../field/interpolate/writeInterpolateField.C | 8 ++++-- .../field/mag/writeMagField.C | 8 ++++-- .../field/magGrad/writeMagGradField.C | 8 ++++-- .../field/magSqr/writeMagSqrField.C | 8 ++++-- .../field/randomise/writeRandomField.C | 8 ++++-- 11 files changed, 64 insertions(+), 37 deletions(-) diff --git a/applications/utilities/postProcessing/foamCalc/foamCalcApp.C b/applications/utilities/postProcessing/foamCalc/foamCalcApp.C index 0a24afc131..2ac25d8e5d 100644 --- a/applications/utilities/postProcessing/foamCalc/foamCalcApp.C +++ b/applications/utilities/postProcessing/foamCalc/foamCalcApp.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,6 +38,8 @@ Description #include "timeSelector.H" #include "calcType.H" +using namespace Foam; + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) diff --git a/src/postProcessing/foamCalcFunctions/basic/addSubtract/writeAddSubtractValue.C b/src/postProcessing/foamCalcFunctions/basic/addSubtract/writeAddSubtractValue.C index 8bded09490..b1ec01bdd9 100644 --- a/src/postProcessing/foamCalcFunctions/basic/addSubtract/writeAddSubtractValue.C +++ b/src/postProcessing/foamCalcFunctions/basic/addSubtract/writeAddSubtractValue.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) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,6 +23,10 @@ License \*---------------------------------------------------------------------------*/ +#include "volFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + template<class Type> void Foam::calcTypes::addSubtract::writeAddSubtractValue ( @@ -86,4 +90,4 @@ void Foam::calcTypes::addSubtract::writeAddSubtractValue } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// ************************************************************************* // diff --git a/src/postProcessing/foamCalcFunctions/calcType/calcType.C b/src/postProcessing/foamCalcFunctions/calcType/calcType.C index 9aceab5da3..b78de6d993 100644 --- a/src/postProcessing/foamCalcFunctions/calcType/calcType.C +++ b/src/postProcessing/foamCalcFunctions/calcType/calcType.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) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,9 +27,11 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(calcType, 0); - -defineRunTimeSelectionTable(calcType, dictionary); +namespace Foam +{ + defineTypeNameAndDebug(calcType, 0); + defineRunTimeSelectionTable(calcType, dictionary); +} // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -47,9 +49,7 @@ Foam::calcType::~calcType() // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // void Foam::calcType::init() -{ - // Do nothing -} +{} void Foam::calcType::preCalc @@ -58,9 +58,7 @@ void Foam::calcType::preCalc const Time& runTime, const fvMesh& mesh ) -{ - // Do nothing -} +{} void Foam::calcType::calc @@ -69,9 +67,7 @@ void Foam::calcType::calc const Time& runTime, const fvMesh& mesh ) -{ - // Do nothing -} +{} void Foam::calcType::postCalc @@ -80,9 +76,7 @@ void Foam::calcType::postCalc const Time& runTime, const fvMesh& mesh ) -{ - // Do nothing -} +{} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/postProcessing/foamCalcFunctions/calcType/calcType.H b/src/postProcessing/foamCalcFunctions/calcType/calcType.H index 4519eb61a1..33ae4da26a 100644 --- a/src/postProcessing/foamCalcFunctions/calcType/calcType.H +++ b/src/postProcessing/foamCalcFunctions/calcType/calcType.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -42,11 +42,10 @@ SourceFiles #ifndef calcType_H #define calcType_H -#include "autoPtr.H" +#include "argList.H" +#include "fvMesh.H" #include "runTimeSelectionTables.H" -#include "fvCFD.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam diff --git a/src/postProcessing/foamCalcFunctions/field/components/writeComponentFields.C b/src/postProcessing/foamCalcFunctions/field/components/writeComponentFields.C index 866952afa7..82b234f60f 100644 --- a/src/postProcessing/foamCalcFunctions/field/components/writeComponentFields.C +++ b/src/postProcessing/foamCalcFunctions/field/components/writeComponentFields.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-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,6 +23,10 @@ License \*---------------------------------------------------------------------------*/ +#include "volFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + template<class Type> void Foam::calcTypes::components::writeComponentFields ( @@ -62,4 +66,4 @@ void Foam::calcTypes::components::writeComponentFields } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// ************************************************************************* // diff --git a/src/postProcessing/foamCalcFunctions/field/div/writeDivField.C b/src/postProcessing/foamCalcFunctions/field/div/writeDivField.C index 75fa73f5ca..9cb87d180f 100644 --- a/src/postProcessing/foamCalcFunctions/field/div/writeDivField.C +++ b/src/postProcessing/foamCalcFunctions/field/div/writeDivField.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) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,6 +23,10 @@ License \*---------------------------------------------------------------------------*/ +#include "fvcDiv.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + template<class Type> void Foam::calcTypes::div::writeDivField ( @@ -55,4 +59,4 @@ void Foam::calcTypes::div::writeDivField } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// ************************************************************************* // diff --git a/src/postProcessing/foamCalcFunctions/field/interpolate/writeInterpolateField.C b/src/postProcessing/foamCalcFunctions/field/interpolate/writeInterpolateField.C index 87ae342696..31d4f45373 100644 --- a/src/postProcessing/foamCalcFunctions/field/interpolate/writeInterpolateField.C +++ b/src/postProcessing/foamCalcFunctions/field/interpolate/writeInterpolateField.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) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,6 +23,10 @@ License \*---------------------------------------------------------------------------*/ +#include "surfaceInterpolate.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + template<class Type> void Foam::calcTypes::interpolate::writeInterpolateField ( @@ -58,4 +62,4 @@ void Foam::calcTypes::interpolate::writeInterpolateField } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// ************************************************************************* // diff --git a/src/postProcessing/foamCalcFunctions/field/mag/writeMagField.C b/src/postProcessing/foamCalcFunctions/field/mag/writeMagField.C index 9246dd1f54..e33c0a9837 100644 --- a/src/postProcessing/foamCalcFunctions/field/mag/writeMagField.C +++ b/src/postProcessing/foamCalcFunctions/field/mag/writeMagField.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) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,6 +23,10 @@ License \*---------------------------------------------------------------------------*/ +#include "fvcGrad.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + template<class Type> void Foam::calcTypes::mag::writeMagField ( @@ -57,4 +61,4 @@ void Foam::calcTypes::mag::writeMagField } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// ************************************************************************* // diff --git a/src/postProcessing/foamCalcFunctions/field/magGrad/writeMagGradField.C b/src/postProcessing/foamCalcFunctions/field/magGrad/writeMagGradField.C index 1c47ad1f8e..cfc9ccc6cb 100644 --- a/src/postProcessing/foamCalcFunctions/field/magGrad/writeMagGradField.C +++ b/src/postProcessing/foamCalcFunctions/field/magGrad/writeMagGradField.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) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,6 +23,10 @@ License \*---------------------------------------------------------------------------*/ +#include "fvcGrad.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + template<class Type> void Foam::calcTypes::magGrad::writeMagGradField ( @@ -57,4 +61,4 @@ void Foam::calcTypes::magGrad::writeMagGradField } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// ************************************************************************* // diff --git a/src/postProcessing/foamCalcFunctions/field/magSqr/writeMagSqrField.C b/src/postProcessing/foamCalcFunctions/field/magSqr/writeMagSqrField.C index b61be63cb9..22a56292af 100644 --- a/src/postProcessing/foamCalcFunctions/field/magSqr/writeMagSqrField.C +++ b/src/postProcessing/foamCalcFunctions/field/magSqr/writeMagSqrField.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) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,6 +23,10 @@ License \*---------------------------------------------------------------------------*/ +#include "volFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + template<class Type> void Foam::calcTypes::magSqr::writeMagSqrField ( @@ -57,4 +61,4 @@ void Foam::calcTypes::magSqr::writeMagSqrField } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// ************************************************************************* // diff --git a/src/postProcessing/foamCalcFunctions/field/randomise/writeRandomField.C b/src/postProcessing/foamCalcFunctions/field/randomise/writeRandomField.C index 0c024aa136..df9beed0ef 100644 --- a/src/postProcessing/foamCalcFunctions/field/randomise/writeRandomField.C +++ b/src/postProcessing/foamCalcFunctions/field/randomise/writeRandomField.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-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,6 +23,10 @@ License \*---------------------------------------------------------------------------*/ +#include "volFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + template<class Type> void Foam::calcTypes::randomise::writeRandomField ( @@ -69,4 +73,4 @@ void Foam::calcTypes::randomise::writeRandomField } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// ************************************************************************* // -- GitLab