diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C index 9e507b5f92..06c3c5537c 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.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 @@ -24,7 +24,6 @@ License \*---------------------------------------------------------------------------*/ #include "basicXiSubXiEq.H" -#include "zeroGradientFvPatchFields.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -93,59 +92,43 @@ Foam::tmp Foam::XiEqModels::basicSubGrid::XiEq() const const scalarField Cw = pow(mesh.V(), 2.0/3.0); - tmp tN + volScalarField N ( - new volScalarField + IOobject ( - IOobject - ( - "tN", - mesh.time().constant(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "N", + mesh.time().constant(), mesh, - dimensionedScalar("zero", Nv.dimensions(), 0.0), - zeroGradientFvPatchVectorField::typeName - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimensionedScalar("zero", Nv.dimensions(), 0.0) ); - - volScalarField& N = tN(); - N.internalField() = Nv.internalField()*Cw; - tmp tns + volSymmTensorField ns ( - new volSymmTensorField + IOobject ( - IOobject - ( - "tns", - U.mesh().time().timeName(), - U.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "ns", + U.mesh().time().timeName(), U.mesh(), - dimensionedSymmTensor - ( - "zero", - nsv.dimensions(), - pTraits::zero - ), - zeroGradientFvPatchSymmTensorField::typeName + IOobject::NO_READ, + IOobject::NO_WRITE + ), + U.mesh(), + dimensionedSymmTensor + ( + "zero", + nsv.dimensions(), + pTraits::zero ) ); - - volSymmTensorField& ns = tns(); - ns.internalField() = nsv.internalField()*Cw; volScalarField n(max(N - (Uhat & ns & Uhat), scalar(1e-4))); - volScalarField b((Uhat & B_ & Uhat)/sqrt(n)); - volScalarField up(sqrt((2.0/3.0)*turbulence_.k())); volScalarField XiSubEq diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C index 928c424191..fe96d0bfe7 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.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 @@ -24,7 +24,6 @@ License \*---------------------------------------------------------------------------*/ #include "basicXiSubG.H" -#include "zeroGradientFvPatchFields.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -74,29 +73,7 @@ Foam::tmp Foam::XiGModels::basicSubGrid::G() const volScalarField& Gtot = tGtot(); const scalarField Cw = pow(Su_.mesh().V(), 2.0/3.0); - - tmp tN - ( - new volScalarField - ( - IOobject - ( - "tN", - Su_.mesh().time().timeName(), - Su_.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - Su_.mesh(), - dimensionedScalar("zero", Nv.dimensions(), 0.0), - zeroGradientFvPatchVectorField::typeName - ) - ); - - volScalarField& N = tN(); - - N.internalField() = Nv.internalField()*Cw; + scalarField N(Nv.internalField()*Cw); forAll(N, celli) { diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C index 9fd96b2033..7454b2f7ee 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.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 @@ -24,7 +24,6 @@ License \*---------------------------------------------------------------------------*/ #include "basic.H" -#include "zeroGradientFvPatchFields.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -110,8 +109,7 @@ Foam::tmp Foam::PDRDragModels::basic::Dcu() const "zero", dimMass/dimTime/pow(dimLength, 3), pTraits::zero - ), - zeroGradientFvPatchSymmTensorField::typeName + ) ) ); @@ -145,8 +143,7 @@ Foam::tmp Foam::PDRDragModels::basic::Gk() const IOobject::NO_WRITE ), U_.mesh(), - dimensionedScalar("zero", dimMass/dimLength/pow(dimTime, 3), 0.0), - zeroGradientFvPatchVectorField::typeName + dimensionedScalar("zero", dimMass/dimLength/pow(dimTime, 3), 0.0) ) ); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C index 4d1c8c11fd..59f5c81bd3 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.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 @@ -24,7 +24,6 @@ License \*---------------------------------------------------------------------------*/ #include "XiEqModel.H" -#include "zeroGradientFvPatchFields.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -111,39 +110,30 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const false ), mesh, - dimensionedScalar("zero", Nv.dimensions(), 0.0), - zeroGradientFvPatchVectorField::typeName + dimensionedScalar("zero", Nv.dimensions(), 0.0) ) ); - volScalarField& N = tN(); - N.internalField() = Nv.internalField()*pow(mesh.V(), 2.0/3.0); - tmp tns + volSymmTensorField ns ( - new volSymmTensorField + IOobject ( - IOobject - ( - "tns", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "tns", + mesh.time().timeName(), mesh, - dimensionedSymmTensor - ( - "zero", - nsv.dimensions(), - pTraits::zero - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimensionedSymmTensor + ( + "zero", + nsv.dimensions(), + pTraits::zero ) ); - - volSymmTensorField& ns = tns(); - ns.internalField() = nsv.internalField()*pow(mesh.V(), 2.0/3.0); const volVectorField Uhat diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C index 922aa72a95..a9fa5559b8 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.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 @@ -34,7 +34,6 @@ Description #include "dynamicFvMesh.H" #include "psiThermo.H" #include "turbulentFluidThermoModel.H" -#include "zeroGradientFvPatchFields.H" #include "fixedRhoFvPatchScalarField.H" #include "directionInterpolate.H" #include "motionSolver.H" diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C index 7b85b5b11b..841c9a5162 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.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 @@ -33,7 +33,6 @@ Description #include "fvCFD.H" #include "psiThermo.H" #include "turbulentFluidThermoModel.H" -#include "zeroGradientFvPatchFields.H" #include "fixedRhoFvPatchScalarField.H" #include "directionInterpolate.H" #include "localEulerDdtScheme.H" diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C index 55af594283..5730273383 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -59,8 +59,6 @@ void Foam::multiphaseMixtureThermo::calcAlphas() alphas_ += level*phase(); level += 1.0; } - - alphas_.correctBoundaryConditions(); } @@ -104,8 +102,7 @@ Foam::multiphaseMixtureThermo::multiphaseMixtureThermo IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("alphas", dimless, 0.0), - zeroGradientFvPatchScalarField::typeName + dimensionedScalar("alphas", dimless, 0.0) ), sigmas_(lookup("sigmas")), diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index d0cd5c9b18..6755e96ecb 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.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 @@ -54,8 +54,6 @@ void Foam::multiphaseSystem::calcAlphas() alphas_ += level*iter(); level += 1.0; } - - alphas_.correctBoundaryConditions(); } @@ -417,8 +415,7 @@ Foam::multiphaseSystem::multiphaseSystem IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("alphas", dimless, 0.0), - zeroGradientFvPatchScalarField::typeName + dimensionedScalar("alphas", dimless, 0.0) ), sigmas_(lookup("sigmas")), diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C index 1bbd3177af..27f0f51c35 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.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 @@ -52,8 +52,6 @@ void Foam::multiphaseMixture::calcAlphas() alphas_ += level*iter(); level += 1.0; } - - alphas_.correctBoundaryConditions(); } @@ -108,8 +106,7 @@ Foam::multiphaseMixture::multiphaseMixture IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("alphas", dimless, 0.0), - zeroGradientFvPatchScalarField::typeName + dimensionedScalar("alphas", dimless, 0.0) ), nu_ diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C index 00ca3d49ee..ed45643189 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,6 +27,7 @@ License #include "phasePair.H" #include "fvcGrad.H" #include "surfaceInterpolate.H" +#include "zeroGradientFvPatchFields.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C index 3db07ef804..03c26c89dc 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,6 +34,7 @@ License #include "fvcDiv.H" #include "fvmSup.H" #include "fvMatrix.H" +#include "zeroGradientFvPatchFields.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C index ba5e90459b..bd4dda226f 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -78,8 +78,7 @@ Foam::InertPhaseModel::Sh() const this->mesh() ), this->mesh(), - dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0), - zeroGradientFvPatchScalarField::typeName + dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0) ) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index 2ec0b15907..a9de2e6d55 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -64,8 +64,6 @@ void Foam::multiphaseSystem::calcAlphas() alphas_ += level*phases()[i]; level += 1.0; } - - alphas_.correctBoundaryConditions(); } @@ -506,8 +504,7 @@ Foam::multiphaseSystem::multiphaseSystem IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("alphas", dimless, 0.0), - zeroGradientFvPatchScalarField::typeName + dimensionedScalar("alphas", dimless, 0.0) ), cAlphas_(lookup("interfaceCompression")), diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Make/options b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Make/options index 5216efaa9c..622878cc52 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Make/options +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Make/options @@ -1,4 +1,4 @@ -EXE_INC = \ +EXE_INC = -ggdb3 \ -ItwoPhaseSystem/lnInclude \ -I../phaseSystems/lnInclude \ -I../interfacialModels/lnInclude \ diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/segregated/segregated.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/segregated/segregated.C index ca0a145f5b..079b5d187b 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/segregated/segregated.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/segregated/segregated.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,6 +27,7 @@ License #include "phasePair.H" #include "fvcGrad.H" #include "surfaceInterpolate.H" +#include "zeroGradientFvPatchFields.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H b/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H index eca43adbf7..a912d80e07 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H @@ -41,8 +41,7 @@ "rho", dimMass/dimVolume, rhoValue - ), - zeroGradientFvPatchField::typeName + ) ) ); } @@ -97,8 +96,7 @@ "Erho", dimMass/dimLength/sqr(dimTime), rhoEValue - ), - zeroGradientFvPatchField::typeName + ) ) ); } @@ -152,8 +150,7 @@ "nu", dimless, nuValue - ), - zeroGradientFvPatchField::typeName + ) ) ); } diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H b/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H index 45327c2b4b..0c90a88532 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H @@ -75,8 +75,7 @@ if (thermalStress) "C", dimensionSet(0, 2, -2 , -1, 0), CValue - ), - zeroGradientFvPatchField::typeName + ) ) ); @@ -131,8 +130,7 @@ if (thermalStress) "rhoK", dimensionSet(1, 1, -3 , -1, 0), rhoKValue - ), - zeroGradientFvPatchField::typeName + ) ) ); @@ -188,8 +186,7 @@ if (thermalStress) "alpha", inv(dimTemperature), alphaValue - ), - zeroGradientFvPatchField::typeName + ) ) ); } diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index 6f973fb661..1e5db003e8 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -398,8 +398,7 @@ int main(int argc, char *argv[]) IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("cellDist", dimless, 0), - zeroGradientFvPatchScalarField::typeName + dimensionedScalar("cellDist", dimless, 0) ); forAll(procIds, celli) diff --git a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C index 92afcdbaec..cd1b0c4380 100644 --- a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C +++ b/applications/utilities/parallelProcessing/redistributePar/redistributePar.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 @@ -236,20 +236,18 @@ void writeDecomposition false // do not register ), mesh, - dimensionedScalar(name, dimless, -1), - zeroGradientFvPatchScalarField::typeName + dimensionedScalar(name, dimless, -1) ); forAll(procCells, cI) { procCells[cI] = decomp[cI]; } + procCells.write(); } -// Read vol or surface fields -//template template void readFields ( @@ -260,12 +258,12 @@ void readFields PtrList& fields ) { - //typedef GeometricField fldType; - // Get my objects of type IOobjectList objects(allObjects.lookupClass(GeoField::typeName)); + // Check that we all have all objects wordList objectNames = objects.toc(); + // Get master names wordList masterNames(objectNames); Pstream::scatter(masterNames); diff --git a/applications/utilities/postProcessing/velocityField/Co/Co.C b/applications/utilities/postProcessing/velocityField/Co/Co.C index 03718ef523..110c39b415 100644 --- a/applications/utilities/postProcessing/velocityField/Co/Co.C +++ b/applications/utilities/postProcessing/velocityField/Co/Co.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 @@ -35,6 +35,7 @@ Description #include "calc.H" #include "fvc.H" +#include "zeroGradientFvPatchFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.C b/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.C index 164069d2fa..4cdf0ac325 100644 --- a/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.C +++ b/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.C @@ -113,12 +113,12 @@ template Foam::CompactListList::CompactListList ( CompactListList& lst, - bool reUse + bool reuse ) : size_(lst.size()), - offsets_(lst.offsets_, reUse), - m_(lst.m_, reUse) + offsets_(lst.offsets_, reuse), + m_(lst.m_, reuse) {} diff --git a/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.H b/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.H index 5cfa0a07f2..91c6b98fec 100644 --- a/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.H +++ b/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.H @@ -123,7 +123,7 @@ public: explicit CompactListList(const Xfer>&); //- Construct as copy or re-use as specified. - CompactListList(CompactListList&, bool reUse); + CompactListList(CompactListList&, bool reuse); //- Construct from Istream. CompactListList(Istream&); diff --git a/src/OpenFOAM/containers/Lists/List/List.C b/src/OpenFOAM/containers/Lists/List/List.C index cd766c8ed1..134bd4f04a 100644 --- a/src/OpenFOAM/containers/Lists/List/List.C +++ b/src/OpenFOAM/containers/Lists/List/List.C @@ -34,11 +34,8 @@ License #include "BiIndirectList.H" #include "contiguous.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - // * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * // -// Construct with length specified template Foam::List::List(const label s) : @@ -58,7 +55,6 @@ Foam::List::List(const label s) } -// Construct with length and single value specified template Foam::List::List(const label s, const T& a) : @@ -83,7 +79,6 @@ Foam::List::List(const label s, const T& a) } -// Construct as copy template Foam::List::List(const List& a) : @@ -93,13 +88,13 @@ Foam::List::List(const List& a) { this->v_ = new T[this->size_]; -# ifdef USEMEMCPY + #ifdef USEMEMCPY if (contiguous()) { memcpy(this->v_, a.v_, this->byteSize()); } else -# endif + #endif { List_ACCESS(T, (*this), vp); List_CONST_ACCESS(T, a, ap); @@ -111,7 +106,6 @@ Foam::List::List(const List& a) } -// Construct by transferring the parameter contents template Foam::List::List(const Xfer>& lst) { @@ -119,13 +113,12 @@ Foam::List::List(const Xfer>& lst) } -// Construct as copy or re-use as specified. template -Foam::List::List(List& a, bool reUse) +Foam::List::List(List& a, bool reuse) : UList(NULL, a.size_) { - if (reUse) + if (reuse) { this->v_ = a.v_; a.v_ = 0; @@ -135,13 +128,13 @@ Foam::List::List(List& a, bool reUse) { this->v_ = new T[this->size_]; -# ifdef USEMEMCPY + #ifdef USEMEMCPY if (contiguous()) { memcpy(this->v_, a.v_, this->byteSize()); } else -# endif + #endif { List_ACCESS(T, (*this), vp); List_CONST_ACCESS(T, a, ap); @@ -153,7 +146,6 @@ Foam::List::List(List& a, bool reUse) } -// Construct as subset template Foam::List::List(const UList& a, const labelUList& map) : @@ -173,7 +165,6 @@ Foam::List::List(const UList& a, const labelUList& map) } -// Construct given start and end iterators. template template Foam::List::List(InputIterator first, InputIterator last) @@ -205,7 +196,6 @@ Foam::List::List(InputIterator first, InputIterator last) } -// Construct as copy of FixedList template template Foam::List::List(const FixedList& lst) @@ -224,7 +214,6 @@ Foam::List::List(const FixedList& lst) } -// Construct as copy of PtrList template Foam::List::List(const PtrList& lst) : @@ -242,7 +231,6 @@ Foam::List::List(const PtrList& lst) } -// Construct as copy of SLList template Foam::List::List(const SLList& lst) : @@ -266,7 +254,6 @@ Foam::List::List(const SLList& lst) } -// Construct as copy of UIndirectList template Foam::List::List(const UIndirectList& lst) : @@ -284,7 +271,6 @@ Foam::List::List(const UIndirectList& lst) } -// Construct as copy of BiIndirectList template Foam::List::List(const BiIndirectList& lst) : @@ -304,7 +290,6 @@ Foam::List::List(const BiIndirectList& lst) // * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * // -// Destroy list elements template Foam::List::~List() { @@ -334,13 +319,13 @@ void Foam::List::setSize(const label newSize) { label i = min(this->size_, newSize); -# ifdef USEMEMCPY + #ifdef USEMEMCPY if (contiguous()) { memcpy(nv, this->v_, i*sizeof(T)); } else -# endif + #endif { T* vv = &this->v_[i]; T* av = &nv[i]; @@ -384,8 +369,6 @@ void Foam::List::clear() } -// Transfer the contents of the argument List into this List -// and annul the argument list template void Foam::List::transfer(List& a) { @@ -398,25 +381,21 @@ void Foam::List::transfer(List& a) } -// Transfer the contents of the argument DynamicList into this List -// and annul the argument list template template void Foam::List::transfer(DynamicList& a) { - // shrink the allocated space to the number of elements used + // Shrink the allocated space to the number of elements used a.shrink(); transfer(static_cast&>(a)); a.clearStorage(); } -// Transfer the contents of the argument SortableList into this List -// and annul the argument list template void Foam::List::transfer(SortableList& a) { - // shrink away the sort indices + // Shrink away the sort indices a.shrink(); transfer(static_cast&>(a)); } @@ -424,7 +403,6 @@ void Foam::List::transfer(SortableList& a) // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -// Assignment to UList operator. Takes linear time. template void Foam::List::operator=(const UList& a) { @@ -438,13 +416,13 @@ void Foam::List::operator=(const UList& a) if (this->size_) { -# ifdef USEMEMCPY + #ifdef USEMEMCPY if (contiguous()) { memcpy(this->v_, a.v_, this->byteSize()); } else -# endif + #endif { List_ACCESS(T, (*this), vp); List_CONST_ACCESS(T, a, ap); @@ -456,7 +434,6 @@ void Foam::List::operator=(const UList& a) } -// Assignment operator. Takes linear time. template void Foam::List::operator=(const List& a) { @@ -471,7 +448,6 @@ void Foam::List::operator=(const List& a) } -// Assignment operator. Takes linear time. template void Foam::List::operator=(const SLList& lst) { @@ -499,7 +475,6 @@ void Foam::List::operator=(const SLList& lst) } -// Assignment operator. Takes linear time. template void Foam::List::operator=(const UIndirectList& lst) { @@ -518,7 +493,6 @@ void Foam::List::operator=(const UIndirectList& lst) } -// Assignment operator. Takes linear time. template void Foam::List::operator=(const BiIndirectList& lst) { diff --git a/src/OpenFOAM/containers/Lists/List/List.H b/src/OpenFOAM/containers/Lists/List/List.H index ba1e75ad1f..4f8859e32c 100644 --- a/src/OpenFOAM/containers/Lists/List/List.H +++ b/src/OpenFOAM/containers/Lists/List/List.H @@ -112,7 +112,7 @@ public: List(const Xfer>&); //- Construct as copy or re-use as specified. - List(List&, bool reUse); + List(List&, bool reuse); //- Construct as subset. List(const UList&, const labelUList& mapAddressing); diff --git a/src/OpenFOAM/containers/Lists/List/ListIO.C b/src/OpenFOAM/containers/Lists/List/ListIO.C index 97d338470b..1ac3ecc919 100644 --- a/src/OpenFOAM/containers/Lists/List/ListIO.C +++ b/src/OpenFOAM/containers/Lists/List/ListIO.C @@ -31,7 +31,6 @@ License // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -// Construct from Istream template Foam::List::List(Istream& is) : @@ -173,12 +172,12 @@ Foam::List Foam::readList(Istream& is) << exit(FatalIOError); } - // read via a singly-linked list + // Read via a singly-linked list L = SLList(is); } else { - // create list with a single item + // Create list with a single item L.setSize(1); is >> L[0]; diff --git a/src/OpenFOAM/containers/Lists/PtrList/PtrList.C b/src/OpenFOAM/containers/Lists/PtrList/PtrList.C index 0101d481e6..2fdafcbb74 100644 --- a/src/OpenFOAM/containers/Lists/PtrList/PtrList.C +++ b/src/OpenFOAM/containers/Lists/PtrList/PtrList.C @@ -77,20 +77,11 @@ Foam::PtrList::PtrList(const Xfer>& lst) template -Foam::PtrList::PtrList(PtrList& a, bool reUse) +Foam::PtrList::PtrList(PtrList& a, bool reuse) : - ptrs_(a.size()) + ptrs_(a.ptrs_, reuse) { - if (reUse) - { - forAll(*this, i) - { - ptrs_[i] = a.ptrs_[i]; - a.ptrs_[i] = NULL; - } - a.setSize(0); - } - else + if (!reuse) { forAll(*this, i) { diff --git a/src/OpenFOAM/containers/Lists/PtrList/PtrList.H b/src/OpenFOAM/containers/Lists/PtrList/PtrList.H index 68bf3a7157..d412270b13 100644 --- a/src/OpenFOAM/containers/Lists/PtrList/PtrList.H +++ b/src/OpenFOAM/containers/Lists/PtrList/PtrList.H @@ -161,7 +161,7 @@ public: PtrList(const Xfer>&); //- Construct as copy or re-use as specified. - PtrList(PtrList&, bool reUse); + PtrList(PtrList&, bool reuse); //- Construct as copy of SLPtrList explicit PtrList(const SLPtrList&); diff --git a/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.C b/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.C index 3a6a7c2d96..0936f9ac0d 100644 --- a/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.C +++ b/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.C @@ -51,9 +51,9 @@ Foam::UPtrList::UPtrList(const Xfer>& lst) template -Foam::UPtrList::UPtrList(UPtrList& a, bool reUse) +Foam::UPtrList::UPtrList(UPtrList& a, bool reuse) : - ptrs_(a.ptrs_, reUse) + ptrs_(a.ptrs_, reuse) {} diff --git a/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.H b/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.H index 02aee9f141..36cdc80fbc 100644 --- a/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.H +++ b/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.H @@ -113,7 +113,7 @@ public: UPtrList(const Xfer>&); //- Construct as copy or re-use as specified. - UPtrList(UPtrList&, bool reUse); + UPtrList(UPtrList&, bool reuse); // Member functions diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.C b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.C index 27c2948c2f..d7ee58eb21 100644 --- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.C +++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.C @@ -131,11 +131,11 @@ template DimensionedField::DimensionedField ( DimensionedField& df, - bool reUse + bool reuse ) : - regIOobject(df, reUse), - Field(df, reUse), + regIOobject(df, reuse), + Field(df, reuse), mesh_(df.mesh_), dimensions_(df.dimensions_) {} @@ -194,11 +194,11 @@ DimensionedField::DimensionedField ( const IOobject& io, DimensionedField& df, - bool reUse + bool reuse ) : regIOobject(io, df), - Field(df, reUse), + Field(df, reuse), mesh_(df.mesh_), dimensions_(df.dimensions_) {} @@ -223,11 +223,11 @@ DimensionedField::DimensionedField ( const word& newName, DimensionedField& df, - bool reUse + bool reuse ) : regIOobject(newName, df, true), - Field(df, reUse), + Field(df, reuse), mesh_(df.mesh_), dimensions_(df.dimensions_) {} diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.H index 81817fdeba..f90f9bfe25 100644 --- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.H +++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.H @@ -159,7 +159,7 @@ public: DimensionedField ( DimensionedField&, - bool reUse + bool reuse ); //- Construct by transferring the DimensionedField @@ -188,7 +188,7 @@ public: ( const IOobject&, DimensionedField&, - bool reUse + bool reuse ); //- Construct as copy resetting name @@ -203,7 +203,7 @@ public: ( const word& newName, DimensionedField&, - bool reUse + bool reuse ); //- Construct by transferring the DimensionedField with a new name diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.C b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.C index 21fc405c8b..fba85680a4 100644 --- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.C +++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.C @@ -143,10 +143,10 @@ FieldField::FieldField(const FieldField& f) template class Field, class Type> -FieldField::FieldField(FieldField& f, bool reUse) +FieldField::FieldField(FieldField& f, bool reuse) : refCount(), - PtrList>(f, reUse) + PtrList>(f, reuse) {} @@ -157,7 +157,6 @@ FieldField::FieldField(const PtrList>& tl) {} -// Construct as copy of tmp #ifndef NoConstructFromTmp template class Field, class Type> FieldField::FieldField(const tmp>& tf) @@ -168,7 +167,7 @@ FieldField::FieldField(const tmp>& tf) tf.isTmp() ) { - const_cast&>(tf()).resetRefCount(); + tf.clear(); } #endif diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H index 3c1134e207..e63201e5b8 100644 --- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H +++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H @@ -102,7 +102,7 @@ public: FieldField(const FieldField&); //- Construct as copy or re-use as specified. - FieldField(FieldField&, bool reUse); + FieldField(FieldField&, bool reuse); //- Construct as copy of a PtrList FieldField(const PtrList>&); diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldReuseFunctions.H b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldReuseFunctions.H index b941bee749..3e7b3fe665 100644 --- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldReuseFunctions.H +++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldReuseFunctions.H @@ -63,7 +63,8 @@ public: static tmp> New ( - const tmp>& tf1 + const tmp>& tf1, + const bool initRet = false ) { if (tf1.isTmp()) @@ -72,10 +73,17 @@ public: } else { - return tmp> + tmp> rtf ( FieldField::NewCalculatedType(tf1()) ); + + if (initRet) + { + rtf() = tf1(); + } + + return rtf; } } diff --git a/src/OpenFOAM/fields/Fields/Field/Field.C b/src/OpenFOAM/fields/Fields/Field/Field.C index 73dbc688c1..e3f17b61a1 100644 --- a/src/OpenFOAM/fields/Fields/Field/Field.C +++ b/src/OpenFOAM/fields/Fields/Field/Field.C @@ -202,9 +202,9 @@ Foam::Field::Field(const Field& f) template -Foam::Field::Field(Field& f, bool reUse) +Foam::Field::Field(Field& f, bool reuse) : - List(f, reUse) + List(f, reuse) {} @@ -236,7 +236,7 @@ Foam::Field::Field(const tmp>& tf) : List(const_cast&>(tf()), tf.isTmp()) { - const_cast&>(tf()).resetRefCount(); + tf.clear(); } #endif diff --git a/src/OpenFOAM/fields/Fields/Field/Field.H b/src/OpenFOAM/fields/Fields/Field/Field.H index 678dd3c772..fd8a849c1d 100644 --- a/src/OpenFOAM/fields/Fields/Field/Field.H +++ b/src/OpenFOAM/fields/Fields/Field/Field.H @@ -205,7 +205,7 @@ public: Field(const Field&); //- Construct as copy or re-use as specified. - Field(Field&, bool reUse); + Field(Field&, bool reuse); //- Construct by transferring the Field contents Field(const Xfer>&); diff --git a/src/OpenFOAM/fields/Fields/Field/FieldReuseFunctions.H b/src/OpenFOAM/fields/Fields/Field/FieldReuseFunctions.H index 35c5a5c16d..1d3c39859c 100644 --- a/src/OpenFOAM/fields/Fields/Field/FieldReuseFunctions.H +++ b/src/OpenFOAM/fields/Fields/Field/FieldReuseFunctions.H @@ -55,7 +55,11 @@ class reuseTmp { public: - static tmp> New(const tmp>& tf1) + static tmp> New + ( + const tmp>& tf1, + const bool initRet = false + ) { if (tf1.isTmp()) { @@ -63,7 +67,14 @@ public: } else { - return tmp>(new Field(tf1().size())); + tmp> rtf(new Field(tf1().size())); + + if (initRet) + { + rtf() = tf1(); + } + + return rtf; } } diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldReuseFunctions.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldReuseFunctions.H index 06970c3c67..563dc9b193 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldReuseFunctions.H +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldReuseFunctions.H @@ -33,6 +33,48 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +template +< + class Type, + template class PatchField, + class GeoMesh +> +bool reusable(const tmp>& tgf) +{ + if (tgf.isTmp()) + { + if (GeometricField::debug) + { + const GeometricField& gf = tgf(); + const typename GeometricField:: + GeometricBoundaryField& gbf = gf.boundaryField(); + + forAll(gbf, patchi) + { + if + ( + !polyPatch::constraintType(gbf[patchi].patch().type()) + && !isA::Calculated>(gbf[patchi]) + ) + { + WarningInFunction + << "Attempt to reuse temporary with non-reusable BC " + << gbf[patchi].type() << endl; + + return false; + } + } + } + + return true; + } + else + { + return false; + } +} + + template < class TypeR, @@ -46,12 +88,12 @@ public: static tmp> New ( - const tmp>& tdf1, + const tmp>& tgf1, const word& name, const dimensionSet& dimensions ) { - const GeometricField& df1 = tdf1(); + const GeometricField& gf1 = tgf1(); return tmp> ( @@ -60,10 +102,10 @@ public: IOobject ( name, - df1.instance(), - df1.db() + gf1.instance(), + gf1.db() ), - df1.mesh(), + gf1.mesh(), dimensions ) ); @@ -71,10 +113,10 @@ public: static void clear ( - const tmp>& tdf1 + const tmp>& tgf1 ) { - tdf1.clear(); + tgf1.clear(); } }; @@ -86,47 +128,55 @@ public: static tmp> New ( - const tmp>& tdf1, + const tmp>& tgf1, const word& name, - const dimensionSet& dimensions + const dimensionSet& dimensions, + const bool initRet = false ) { - GeometricField& df1 = - const_cast& >(tdf1()); + GeometricField& gf1 = + const_cast& >(tgf1()); - if (tdf1.isTmp()) + if (reusable(tgf1)) { - df1.rename(name); - df1.dimensions().reset(dimensions); - return tdf1; + gf1.rename(name); + gf1.dimensions().reset(dimensions); + return tgf1; } else { - return tmp> + tmp> rtgf ( new GeometricField ( IOobject ( name, - df1.instance(), - df1.db() + gf1.instance(), + gf1.db() ), - df1.mesh(), + gf1.mesh(), dimensions ) ); + + if (initRet) + { + rtgf() == tgf1(); + } + + return rtgf; } } static void clear ( - const tmp>& tdf1 + const tmp>& tgf1 ) { - if (tdf1.isTmp()) + if (reusable(tgf1)) { - tdf1.ptr(); + tgf1.ptr(); } } }; @@ -147,13 +197,13 @@ public: static tmp> New ( - const tmp>& tdf1, - const tmp>& tdf2, + const tmp>& tgf1, + const tmp>& tgf2, const word& name, const dimensionSet& dimensions ) { - const GeometricField& df1 = tdf1(); + const GeometricField& gf1 = tgf1(); return tmp> ( @@ -162,10 +212,10 @@ public: IOobject ( name, - df1.instance(), - df1.db() + gf1.instance(), + gf1.db() ), - df1.mesh(), + gf1.mesh(), dimensions ) ); @@ -173,12 +223,12 @@ public: static void clear ( - const tmp>& tdf1, - const tmp>& tdf2 + const tmp>& tgf1, + const tmp>& tgf2 ) { - tdf1.clear(); - tdf2.clear(); + tgf1.clear(); + tgf2.clear(); } }; @@ -198,21 +248,21 @@ public: static tmp> New ( - const tmp>& tdf1, - const tmp>& tdf2, + const tmp>& tgf1, + const tmp>& tgf2, const word& name, const dimensionSet& dimensions ) { - const GeometricField& df1 = tdf1(); - GeometricField& df2 = - const_cast& >(tdf2()); + const GeometricField& gf1 = tgf1(); + GeometricField& gf2 = + const_cast& >(tgf2()); - if (tdf2.isTmp()) + if (reusable(tgf2)) { - df2.rename(name); - df2.dimensions().reset(dimensions); - return tdf2; + gf2.rename(name); + gf2.dimensions().reset(dimensions); + return tgf2; } else { @@ -223,10 +273,10 @@ public: IOobject ( name, - df1.instance(), - df1.db() + gf1.instance(), + gf1.db() ), - df1.mesh(), + gf1.mesh(), dimensions ) ); @@ -235,14 +285,14 @@ public: static void clear ( - const tmp>& tdf1, - const tmp>& tdf2 + const tmp>& tgf1, + const tmp>& tgf2 ) { - tdf1.clear(); - if (tdf2.isTmp()) + tgf1.clear(); + if (reusable(tgf2)) { - tdf2.ptr(); + tgf2.ptr(); } } }; @@ -261,20 +311,20 @@ public: static tmp> New ( - const tmp>& tdf1, - const tmp>& tdf2, + const tmp>& tgf1, + const tmp>& tgf2, const word& name, const dimensionSet& dimensions ) { - GeometricField& df1 = - const_cast& >(tdf1()); + GeometricField& gf1 = + const_cast& >(tgf1()); - if (tdf1.isTmp()) + if (reusable(tgf1)) { - df1.rename(name); - df1.dimensions().reset(dimensions); - return tdf1; + gf1.rename(name); + gf1.dimensions().reset(dimensions); + return tgf1; } else { @@ -285,10 +335,10 @@ public: IOobject ( name, - df1.instance(), - df1.db() + gf1.instance(), + gf1.db() ), - df1.mesh(), + gf1.mesh(), dimensions ) ); @@ -297,15 +347,15 @@ public: static void clear ( - const tmp>& tdf1, - const tmp>& tdf2 + const tmp>& tgf1, + const tmp>& tgf2 ) { - if (tdf1.isTmp()) + if (reusable(tgf1)) { - tdf1.ptr(); + tgf1.ptr(); } - tdf2.clear(); + tgf2.clear(); } }; @@ -317,28 +367,28 @@ public: static tmp> New ( - const tmp>& tdf1, - const tmp>& tdf2, + const tmp>& tgf1, + const tmp>& tgf2, const word& name, const dimensionSet& dimensions ) { - GeometricField& df1 = - const_cast& >(tdf1()); - GeometricField& df2 = - const_cast& >(tdf2()); + GeometricField& gf1 = + const_cast& >(tgf1()); + GeometricField& gf2 = + const_cast& >(tgf2()); - if (tdf1.isTmp()) + if (reusable(tgf1)) { - df1.rename(name); - df1.dimensions().reset(dimensions); - return tdf1; + gf1.rename(name); + gf1.dimensions().reset(dimensions); + return tgf1; } - else if (tdf2.isTmp()) + else if (reusable(tgf2)) { - df2.rename(name); - df2.dimensions().reset(dimensions); - return tdf2; + gf2.rename(name); + gf2.dimensions().reset(dimensions); + return tgf2; } else { @@ -349,10 +399,10 @@ public: IOobject ( name, - df1.instance(), - df1.db() + gf1.instance(), + gf1.db() ), - df1.mesh(), + gf1.mesh(), dimensions ) ); @@ -361,19 +411,19 @@ public: static void clear ( - const tmp>& tdf1, - const tmp>& tdf2 + const tmp>& tgf1, + const tmp>& tgf2 ) { - if (tdf1.isTmp()) + if (reusable(tgf1)) { - tdf1.ptr(); - tdf2.clear(); + tgf1.ptr(); + tgf2.clear(); } - else if (tdf2.isTmp()) + else if (reusable(tgf2)) { - tdf1.clear(); - tdf2.ptr(); + tgf1.clear(); + tgf2.ptr(); } } }; diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H index ba296fb124..bf77b43ac9 100644 --- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H @@ -63,6 +63,9 @@ class pointMesh; template class pointPatchField; +template +class calculatedPointPatchField; + template Ostream& operator<< ( @@ -99,6 +102,7 @@ class pointPatchField public: typedef pointPatch Patch; + typedef calculatedPointPatchField Calculated; //- Runtime type information @@ -239,8 +243,7 @@ public: const dictionary& ); - - //- Return a pointer to a new CalculatedpointPatchField created on + //- Return a pointer to a new calculatedPointPatchField created on // freestore without setting patchField values template static autoPtr> diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.C b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.C index 8c3d6a79c2..aa50c4def3 100644 --- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.C +++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.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 @@ -77,7 +77,7 @@ Foam::LduMatrix::LduMatrix(const LduMatrix& A) template -Foam::LduMatrix::LduMatrix(LduMatrix& A, bool reUse) +Foam::LduMatrix::LduMatrix(LduMatrix& A, bool reuse) : lduMesh_(A.lduMesh_), diagPtr_(NULL), @@ -88,7 +88,7 @@ Foam::LduMatrix::LduMatrix(LduMatrix& A, bool reUse) interfacesUpper_(0), interfacesLower_(0) { - if (reUse) + if (reuse) { if (A.diagPtr_) { diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.H b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.H index 22b740c4de..55081e89a5 100644 --- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.H +++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.H @@ -470,7 +470,7 @@ public: LduMatrix(const LduMatrix&); //- Construct as copy or re-use as specified. - LduMatrix(LduMatrix&, bool reUse); + LduMatrix(LduMatrix&, bool reuse); //- Construct given an LDU addressed mesh and an Istream // from which the coefficients are read diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C index 1f22e238e0..8de7395626 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.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 @@ -70,14 +70,14 @@ Foam::lduMatrix::lduMatrix(const lduMatrix& A) } -Foam::lduMatrix::lduMatrix(lduMatrix& A, bool reUse) +Foam::lduMatrix::lduMatrix(lduMatrix& A, bool reuse) : lduMesh_(A.lduMesh_), lowerPtr_(NULL), diagPtr_(NULL), upperPtr_(NULL) { - if (reUse) + if (reuse) { if (A.lowerPtr_) { diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.H b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.H index 43566e164f..5d5d62fd48 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.H +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.H @@ -521,7 +521,7 @@ public: lduMatrix(const lduMatrix&); //- Construct as copy or re-use as specified. - lduMatrix(lduMatrix&, bool reUse); + lduMatrix(lduMatrix&, bool reuse); //- Construct given an LDU addressed mesh and an Istream // from which the coefficients are read diff --git a/src/OpenFOAM/memory/autoPtr/autoPtr.H b/src/OpenFOAM/memory/autoPtr/autoPtr.H index c3ea064fb1..748975b5cf 100644 --- a/src/OpenFOAM/memory/autoPtr/autoPtr.H +++ b/src/OpenFOAM/memory/autoPtr/autoPtr.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-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -69,7 +69,7 @@ public: //- Construct either by transferring pointer or cloning. Should // only be called with type that supports cloning. - inline autoPtr(const autoPtr&, const bool reUse); + inline autoPtr(const autoPtr&, const bool reuse); //- Destructor, delete object if pointer is not NULL diff --git a/src/OpenFOAM/memory/autoPtr/autoPtrI.H b/src/OpenFOAM/memory/autoPtr/autoPtrI.H index 961456e5b8..ef199ca20c 100644 --- a/src/OpenFOAM/memory/autoPtr/autoPtrI.H +++ b/src/OpenFOAM/memory/autoPtr/autoPtrI.H @@ -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 @@ -45,9 +45,9 @@ inline Foam::autoPtr::autoPtr(const autoPtr& ap) template -inline Foam::autoPtr::autoPtr(const autoPtr& ap, const bool reUse) +inline Foam::autoPtr::autoPtr(const autoPtr& ap, const bool reuse) { - if (reUse) + if (reuse) { ptr_ = ap.ptr_; ap.ptr_ = 0; diff --git a/src/OpenFOAM/memory/tmp/tmp.H b/src/OpenFOAM/memory/tmp/tmp.H index 783d06feb8..24700bfad4 100644 --- a/src/OpenFOAM/memory/tmp/tmp.H +++ b/src/OpenFOAM/memory/tmp/tmp.H @@ -100,7 +100,8 @@ public: // Edit - //- Return tmp pointer for reuse + //- Return tmp pointer for reuse. + // Returns a clone if the object is not a temporary inline T* ptr() const; //- If object pointer points to valid object: diff --git a/src/OpenFOAM/memory/tmp/tmpI.H b/src/OpenFOAM/memory/tmp/tmpI.H index 4f3ae9c662..490ac76e3f 100644 --- a/src/OpenFOAM/memory/tmp/tmpI.H +++ b/src/OpenFOAM/memory/tmp/tmpI.H @@ -1,4 +1,4 @@ -/*---------------------------------------------------------------------------*\ +/*--------------------------------------------------------------------r-------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | @@ -171,7 +171,7 @@ inline T* Foam::tmp::ptr() const template inline void Foam::tmp::clear() const { - if (isTmp_ && ptr_) // skip this bit: && ptr_->okToDelete()) + if (isTmp_ && ptr_) // Skip this bit: && ptr_->okToDelete()) { delete ptr_; ptr_ = 0; @@ -326,7 +326,7 @@ inline void Foam::tmp::operator=(const tmp& t) } ptr_ = t.ptr_; - t.ptr_ = 0; + const_cast&>(t).ptr_ = 0; ptr_->resetRefCount(); } else diff --git a/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C b/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C index 13731a858b..bdd4dbe09f 100644 --- a/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C +++ b/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -206,12 +206,12 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh labelList& l, labelList& u, const label comm, - bool reUse + bool reuse ) : lduAddressing(nCells), - lowerAddr_(l, reUse), - upperAddr_(u, reUse), + lowerAddr_(l, reuse), + upperAddr_(u, reuse), comm_(comm) {} diff --git a/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.H b/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.H index 5bd7901c8b..e94850f4bd 100644 --- a/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.H +++ b/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.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-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -117,7 +117,7 @@ public: labelList& l, labelList& u, const label comm, - bool reUse + bool reuse ); //- Add interfaces to a mesh constructed without diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.C index ddf90970ff..48d857b05e 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.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 @@ -143,38 +143,38 @@ Foam::mapPolyMesh::mapPolyMesh labelList& oldPatchStarts, labelList& oldPatchNMeshPoints, autoPtr& oldCellVolumesPtr, - const bool reUse + const bool reuse ) : mesh_(mesh), nOldPoints_(nOldPoints), nOldFaces_(nOldFaces), nOldCells_(nOldCells), - pointMap_(pointMap, reUse), - pointsFromPointsMap_(pointsFromPoints, reUse), - faceMap_(faceMap, reUse), - facesFromPointsMap_(facesFromPoints, reUse), - facesFromEdgesMap_(facesFromEdges, reUse), - facesFromFacesMap_(facesFromFaces, reUse), - cellMap_(cellMap, reUse), - cellsFromPointsMap_(cellsFromPoints, reUse), - cellsFromEdgesMap_(cellsFromEdges, reUse), - cellsFromFacesMap_(cellsFromFaces, reUse), - cellsFromCellsMap_(cellsFromCells, reUse), - reversePointMap_(reversePointMap, reUse), - reverseFaceMap_(reverseFaceMap, reUse), - reverseCellMap_(reverseCellMap, reUse), + pointMap_(pointMap, reuse), + pointsFromPointsMap_(pointsFromPoints, reuse), + faceMap_(faceMap, reuse), + facesFromPointsMap_(facesFromPoints, reuse), + facesFromEdgesMap_(facesFromEdges, reuse), + facesFromFacesMap_(facesFromFaces, reuse), + cellMap_(cellMap, reuse), + cellsFromPointsMap_(cellsFromPoints, reuse), + cellsFromEdgesMap_(cellsFromEdges, reuse), + cellsFromFacesMap_(cellsFromFaces, reuse), + cellsFromCellsMap_(cellsFromCells, reuse), + reversePointMap_(reversePointMap, reuse), + reverseFaceMap_(reverseFaceMap, reuse), + reverseCellMap_(reverseCellMap, reuse), flipFaceFlux_(flipFaceFlux), - patchPointMap_(patchPointMap, reUse), - pointZoneMap_(pointZoneMap, reUse), - faceZonePointMap_(faceZonePointMap, reUse), - faceZoneFaceMap_(faceZoneFaceMap, reUse), - cellZoneMap_(cellZoneMap, reUse), - preMotionPoints_(preMotionPoints, reUse), + patchPointMap_(patchPointMap, reuse), + pointZoneMap_(pointZoneMap, reuse), + faceZonePointMap_(faceZonePointMap, reuse), + faceZoneFaceMap_(faceZoneFaceMap, reuse), + cellZoneMap_(cellZoneMap, reuse), + preMotionPoints_(preMotionPoints, reuse), oldPatchSizes_(oldPatchStarts.size()), - oldPatchStarts_(oldPatchStarts, reUse), - oldPatchNMeshPoints_(oldPatchNMeshPoints, reUse), - oldCellVolumesPtr_(oldCellVolumesPtr, reUse) + oldPatchStarts_(oldPatchStarts, reuse), + oldPatchNMeshPoints_(oldPatchNMeshPoints, reuse), + oldCellVolumesPtr_(oldCellVolumesPtr, reuse) { if (oldPatchStarts_.size() > 0) { diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H index e81de98eb7..33ef923403 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H @@ -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 @@ -349,7 +349,7 @@ public: labelList& oldPatchStarts, labelList& oldPatchNMeshPoints, autoPtr& oldCellVolumesPtr, - const bool reUse + const bool reuse ); // Member Functions diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapSubsetMesh/mapSubsetMesh.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapSubsetMesh/mapSubsetMesh.H index d85063422d..ff8ea1f265 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapSubsetMesh/mapSubsetMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapSubsetMesh/mapSubsetMesh.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 @@ -112,7 +112,7 @@ public: const label exposedPatchID, labelList& oldPatchStarts, labelList& oldPatchNMeshPoints, - const bool reUse + const bool reuse ); diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.C b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.C index ade55ed719..6fb9994e4d 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.C @@ -111,11 +111,11 @@ PrimitivePatch ( FaceList& faces, Field& points, - const bool reUse + const bool reuse ) : - FaceList(faces, reUse), - points_(points, reUse), + FaceList(faces, reuse), + points_(points, reuse), edgesPtr_(NULL), nInternalEdges_(-1), boundaryPointsPtr_(NULL), diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H index 9137ed673f..0d7f235d84 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H +++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H @@ -255,7 +255,7 @@ public: ( FaceList& faces, Field& points, - const bool reUse + const bool reuse ); //- Construct as copy diff --git a/src/combustionModels/laminar/laminar.C b/src/combustionModels/laminar/laminar.C index 069e9b588a..d53a859a73 100644 --- a/src/combustionModels/laminar/laminar.C +++ b/src/combustionModels/laminar/laminar.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -151,8 +151,7 @@ Foam::combustionModels::laminar::dQ() const false ), this->mesh(), - dimensionedScalar("dQ", dimEnergy/dimTime, 0.0), - zeroGradientFvPatchScalarField::typeName + dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) ) ); @@ -183,8 +182,7 @@ Foam::combustionModels::laminar::Sh() const false ), this->mesh(), - dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0), - zeroGradientFvPatchScalarField::typeName + dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0) ) ); diff --git a/src/combustionModels/noCombustion/noCombustion.C b/src/combustionModels/noCombustion/noCombustion.C index 838edd169c..f594775917 100644 --- a/src/combustionModels/noCombustion/noCombustion.C +++ b/src/combustionModels/noCombustion/noCombustion.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 @@ -90,8 +90,7 @@ Foam::combustionModels::noCombustion::dQ() const false ), this->mesh(), - dimensionedScalar("dQ", dimEnergy/dimTime, 0.0), - zeroGradientFvPatchScalarField::typeName + dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) ) ); @@ -117,8 +116,7 @@ Foam::combustionModels::noCombustion::Sh() const false ), this->mesh(), - dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0), - zeroGradientFvPatchScalarField::typeName + dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0) ) ); diff --git a/src/combustionModels/singleStepCombustion/singleStepCombustion.C b/src/combustionModels/singleStepCombustion/singleStepCombustion.C index 9441984861..ba586bc1cd 100644 --- a/src/combustionModels/singleStepCombustion/singleStepCombustion.C +++ b/src/combustionModels/singleStepCombustion/singleStepCombustion.C @@ -154,8 +154,7 @@ singleStepCombustion::dQ() const false ), this->mesh_, - dimensionedScalar("dQ", dimEnergy/dimTime, 0.0), - zeroGradientFvPatchScalarField::typeName + dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) ) ); diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index eda874fd02..f94219df92 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -99,6 +99,7 @@ $(fvPatchFields)/fvPatchField/fvPatchFields.C basicFvPatchFields = $(fvPatchFields)/basic $(basicFvPatchFields)/basicSymmetry/basicSymmetryFvPatchScalarField.C $(basicFvPatchFields)/calculated/calculatedFvPatchFields.C +$(basicFvPatchFields)/extrapolatedCalculated/extrapolatedCalculatedFvPatchFields.C $(basicFvPatchFields)/coupled/coupledFvPatchFields.C $(basicFvPatchFields)/directionMixed/directionMixedFvPatchFields.C $(basicFvPatchFields)/fixedGradient/fixedGradientFvPatchFields.C diff --git a/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.C b/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.C index c6cdff20c5..f0fd91f4ba 100644 --- a/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.C +++ b/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,6 +31,7 @@ License #include "fvmLaplacian.H" #include "fvcDiv.H" #include "fixedValueFvPatchFields.H" +#include "zeroGradientFvPatchFields.H" #include "adjustPhi.H" #include "fvcMeshPhi.H" #include "pimpleControl.H" diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C b/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C index 3b045fa22b..89b9e85470 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C @@ -221,47 +221,93 @@ void Foam::MRFZoneList::makeRelative(surfaceScalarField& phi) const Foam::tmp Foam::MRFZoneList::relative ( - const tmp& phi + const tmp& tphi ) const { - tmp rphi(phi.ptr()); - makeRelative(rphi()); - return rphi; + if (size()) + { + tmp rphi + ( + reuseTmpGeometricField + ::New + ( + tphi, + "relative(" + tphi().name() + ')', + tphi().dimensions(), + true + ) + ); + + makeRelative(rphi()); + + reuseTmpGeometricField + ::clear(tphi); + + return rphi; + } + else + { + return tmp(tphi, true); + } } Foam::tmp> Foam::MRFZoneList::relative ( - const tmp>& phi + const tmp>& tphi ) const { - tmp> rphi(phi.ptr()); - - forAll(*this, i) + if (size()) { - operator[](i).makeRelative(rphi()); - } + tmp> rphi + ( + reuseTmpFieldField::New(tphi, true) + ); - return rphi; + forAll(*this, i) + { + operator[](i).makeRelative(rphi()); + } + + reuseTmpFieldField::clear(tphi); + + return rphi; + } + else + { + return tmp>(tphi, true); + } } Foam::tmp> Foam::MRFZoneList::relative ( - const tmp>& phi, + const tmp>& tphi, const label patchi ) const { - tmp> rphi(phi.ptr()); - - forAll(*this, i) + if (size()) { - operator[](i).makeRelative(rphi(), patchi); - } + tmp> rphi + ( + reuseTmp::New(tphi, true) + ); - return rphi; + forAll(*this, i) + { + operator[](i).makeRelative(rphi(), patchi); + } + + reuseTmp::clear(tphi); + + return rphi; + } + else + { + return tmp>(tphi, true); + } } @@ -298,12 +344,34 @@ void Foam::MRFZoneList::makeAbsolute(surfaceScalarField& phi) const Foam::tmp Foam::MRFZoneList::absolute ( - const tmp& phi + const tmp& tphi ) const { - tmp rphi(phi.ptr()); - makeAbsolute(rphi()); - return rphi; + if (size()) + { + tmp rphi + ( + reuseTmpGeometricField + ::New + ( + tphi, + "absolute(" + tphi().name() + ')', + tphi().dimensions(), + true + ) + ); + + makeAbsolute(rphi()); + + reuseTmpGeometricField + ::clear(tphi); + + return rphi; + } + else + { + return tmp(tphi, true); + } } diff --git a/src/finiteVolume/cfdTools/general/include/createRDeltaT.H b/src/finiteVolume/cfdTools/general/include/createRDeltaT.H index 5d24e2f78c..9553e0c365 100644 --- a/src/finiteVolume/cfdTools/general/include/createRDeltaT.H +++ b/src/finiteVolume/cfdTools/general/include/createRDeltaT.H @@ -20,7 +20,7 @@ if (LTS) ), mesh, dimensionedScalar("one", dimless/dimTime, 1), - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); } diff --git a/src/finiteVolume/cfdTools/general/include/fvCFD.H b/src/finiteVolume/cfdTools/general/include/fvCFD.H index bc21a17c42..f539b0a004 100644 --- a/src/finiteVolume/cfdTools/general/include/fvCFD.H +++ b/src/finiteVolume/cfdTools/general/include/fvCFD.H @@ -11,7 +11,9 @@ #include "linear.H" #include "uniformDimensionedFields.H" #include "calculatedFvPatchFields.H" +#include "extrapolatedCalculatedFvPatchFields.H" #include "fixedValueFvPatchFields.H" +#include "zeroGradientFvPatchFields.H" #include "fixedFluxPressureFvPatchScalarField.H" #include "constrainHbyA.H" #include "constrainPressure.H" diff --git a/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C index 1b4018776d..a7b003dd03 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C @@ -48,19 +48,6 @@ Foam::calculatedFvPatchField::calculatedFvPatchField {} -template -Foam::calculatedFvPatchField::calculatedFvPatchField -( - const calculatedFvPatchField& ptf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - fvPatchField(ptf, p, iF, mapper) -{} - - template Foam::calculatedFvPatchField::calculatedFvPatchField ( @@ -74,6 +61,19 @@ Foam::calculatedFvPatchField::calculatedFvPatchField {} +template +Foam::calculatedFvPatchField::calculatedFvPatchField +( + const calculatedFvPatchField& ptf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + fvPatchField(ptf, p, iF, mapper) +{} + + template Foam::calculatedFvPatchField::calculatedFvPatchField ( @@ -154,7 +154,7 @@ Foam::calculatedFvPatchField::valueInternalCoeffs << " in file " << this->dimensionedInternalField().objectPath() << "\n You are probably trying to solve for a field with a " "default boundary condition." - << exit(FatalError); + << abort(FatalError); return *this; } @@ -174,7 +174,7 @@ Foam::calculatedFvPatchField::valueBoundaryCoeffs << " in file " << this->dimensionedInternalField().objectPath() << "\n You are probably trying to solve for a field with a " "default boundary condition." - << exit(FatalError); + << abort(FatalError); return *this; } @@ -191,7 +191,7 @@ Foam::calculatedFvPatchField::gradientInternalCoeffs() const << " in file " << this->dimensionedInternalField().objectPath() << "\n You are probably trying to solve for a field with a " "default boundary condition." - << exit(FatalError); + << abort(FatalError); return *this; } @@ -208,7 +208,7 @@ Foam::calculatedFvPatchField::gradientBoundaryCoeffs() const << " in file " << this->dimensionedInternalField().objectPath() << "\n You are probably trying to solve for a field with a " "default boundary condition." - << exit(FatalError); + << abort(FatalError); return *this; } diff --git a/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.C new file mode 100644 index 0000000000..3d15434880 --- /dev/null +++ b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.C @@ -0,0 +1,112 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "extrapolatedCalculatedFvPatchField.H" +#include "fvPatchFieldMapper.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +Foam::extrapolatedCalculatedFvPatchField:: +extrapolatedCalculatedFvPatchField +( + const fvPatch& p, + const DimensionedField& iF +) +: + calculatedFvPatchField(p, iF) +{} + + +template +Foam::extrapolatedCalculatedFvPatchField:: +extrapolatedCalculatedFvPatchField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict, + const bool valueRequired +) +: + calculatedFvPatchField(p, iF, dict, valueRequired) +{} + + +template +Foam::extrapolatedCalculatedFvPatchField:: +extrapolatedCalculatedFvPatchField +( + const extrapolatedCalculatedFvPatchField& ptf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + calculatedFvPatchField(ptf, p, iF, mapper) +{} + + +template +Foam::extrapolatedCalculatedFvPatchField:: +extrapolatedCalculatedFvPatchField +( + const extrapolatedCalculatedFvPatchField& ptf +) +: + calculatedFvPatchField(ptf) +{} + + +template +Foam::extrapolatedCalculatedFvPatchField:: +extrapolatedCalculatedFvPatchField +( + const extrapolatedCalculatedFvPatchField& ptf, + const DimensionedField& iF +) +: + calculatedFvPatchField(ptf, iF) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::extrapolatedCalculatedFvPatchField::evaluate +( + const Pstream::commsTypes +) +{ + if (!this->updated()) + { + this->updateCoeffs(); + } + + calculatedFvPatchField::operator==(this->patchInternalField()); + calculatedFvPatchField::evaluate(); +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.H new file mode 100644 index 0000000000..0003baac0e --- /dev/null +++ b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.H @@ -0,0 +1,165 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::extrapolatedCalculatedFvPatchField + +Group + grpGenericBoundaryConditions + +Description + This boundary condition applies a zero-gradient condition from the patch + internal field onto the patch faces when \c evaluated but may also be + assigned. \c snGrad returns the patch gradient evaluated from the current + internal and patch field values rather than returning zero. + + \heading Patch usage + + Example of the boundary condition specification: + \verbatim + myPatch + { + type extrapolatedCalculated; + } + \endverbatim + +SourceFiles + extrapolatedCalculatedFvPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef extrapolatedCalculatedFvPatchField_H +#define extrapolatedCalculatedFvPatchField_H + +#include "calculatedFvPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class extrapolatedCalculatedFvPatchField Declaration +\*---------------------------------------------------------------------------*/ + +template +class extrapolatedCalculatedFvPatchField +: + public calculatedFvPatchField +{ + +public: + + //- Runtime type information + TypeName("extrapolatedCalculated"); + + + // Constructors + + //- Construct from patch and internal field + extrapolatedCalculatedFvPatchField + ( + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + extrapolatedCalculatedFvPatchField + ( + const fvPatch&, + const DimensionedField&, + const dictionary&, + const bool valueRequired=false + ); + + //- Construct by mapping given patchField onto a new patch + extrapolatedCalculatedFvPatchField + ( + const extrapolatedCalculatedFvPatchField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + extrapolatedCalculatedFvPatchField + ( + const extrapolatedCalculatedFvPatchField& + ); + + //- Construct and return a clone + virtual tmp> clone() const + { + return tmp> + ( + new extrapolatedCalculatedFvPatchField(*this) + ); + } + + //- Construct as copy setting internal field reference + extrapolatedCalculatedFvPatchField + ( + const extrapolatedCalculatedFvPatchField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp> clone + ( + const DimensionedField& iF + ) const + { + return tmp> + ( + new extrapolatedCalculatedFvPatchField(*this, iF) + ); + } + + + // Member functions + + // Evaluation functions + + //- Evaluate the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType=Pstream::blocking + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "extrapolatedCalculatedFvPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchFields.C b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchFields.C new file mode 100644 index 0000000000..e09d457b8f --- /dev/null +++ b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchFields.C @@ -0,0 +1,44 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "extrapolatedCalculatedFvPatchFields.H" +#include "fvPatchFields.H" +#include "volMesh.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makePatchFields(extrapolatedCalculated); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchFields.H b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchFields.H new file mode 100644 index 0000000000..ec38e37749 --- /dev/null +++ b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchFields.H @@ -0,0 +1,49 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#ifndef extrapolatedCalculatedFvPatchFields_H +#define extrapolatedCalculatedFvPatchFields_H + +#include "extrapolatedCalculatedFvPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makePatchTypeFieldTypedefs(extrapolatedCalculated); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchFieldsFwd.H b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchFieldsFwd.H new file mode 100644 index 0000000000..6f1a89d2f1 --- /dev/null +++ b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchFieldsFwd.H @@ -0,0 +1,50 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#ifndef extrapolatedCalculatedFvPatchFieldsFwd_H +#define extrapolatedCalculatedFvPatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template class extrapolatedCalculatedFvPatchField; + +makePatchTypeFieldTypedefs(extrapolatedCalculated); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H index ffed3dd1fd..05f2391b6f 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H @@ -65,6 +65,9 @@ class volMesh; template class fvPatchField; +template +class calculatedFvPatchField; + template class fvMatrix; @@ -106,6 +109,7 @@ class fvPatchField public: typedef fvPatch Patch; + typedef calculatedFvPatchField Calculated; //- Runtime type information diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H index 0a41d83c1b..96240cd17d 100644 --- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H @@ -65,6 +65,9 @@ class surfaceMesh; template class fvsPatchField; +template +class calculatedFvsPatchField; + template Ostream& operator<<(Ostream&, const fvsPatchField&); @@ -90,6 +93,7 @@ class fvsPatchField public: typedef fvPatch Patch; + typedef calculatedFvsPatchField Calculated; //- Runtime type information diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C index 89a997ba17..f45c34dfce 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C @@ -57,7 +57,7 @@ tmp CoEulerDdtScheme::CorDeltaT() const ), mesh(), dimensionedScalar("CorDeltaT", cofrDeltaT.dimensions(), 0.0), - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C index a48cd0004e..ea87426041 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C @@ -107,7 +107,7 @@ tmp SLTSDdtScheme::SLrDeltaT() const ), mesh(), dimensionedScalar("rDeltaT", dimless/dimTime, 0.0), - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); diff --git a/src/finiteVolume/finiteVolume/fvc/fvcCellReduce.C b/src/finiteVolume/finiteVolume/fvc/fvcCellReduce.C index 55a0c92e95..3ec972fc2a 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcCellReduce.C +++ b/src/finiteVolume/finiteVolume/fvc/fvcCellReduce.C @@ -27,7 +27,7 @@ License #include "fvMesh.H" #include "volFields.H" #include "surfaceFields.H" -#include "zeroGradientFvPatchFields.H" +#include "extrapolatedCalculatedFvPatchFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -66,7 +66,7 @@ tmp> cellReduce ), mesh, dimensioned("0", ssf.dimensions(), pTraits::zero), - zeroGradientFvPatchField::typeName + extrapolatedCalculatedFvPatchField::typeName ) ); diff --git a/src/finiteVolume/finiteVolume/fvc/fvcReconstruct.C b/src/finiteVolume/finiteVolume/fvc/fvcReconstruct.C index 9efe428b49..9b2f375b08 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcReconstruct.C +++ b/src/finiteVolume/finiteVolume/fvc/fvcReconstruct.C @@ -28,7 +28,7 @@ License #include "volFields.H" #include "surfaceFields.H" #include "fvcSurfaceIntegrate.H" -#include "zeroGradientFvPatchFields.H" +#include "extrapolatedCalculatedFvPatchFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -74,7 +74,7 @@ reconstruct IOobject::NO_WRITE ), inv(surfaceSum(SfHat*mesh.Sf()))&surfaceSum(SfHat*ssf), - zeroGradientFvPatchField::typeName + extrapolatedCalculatedFvPatchField::typeName ) ); diff --git a/src/finiteVolume/finiteVolume/fvc/fvcReconstructMag.C b/src/finiteVolume/finiteVolume/fvc/fvcReconstructMag.C index 63c03590ca..2b8c34a41b 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcReconstructMag.C +++ b/src/finiteVolume/finiteVolume/fvc/fvcReconstructMag.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-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,7 +27,7 @@ License #include "fvMesh.H" #include "volFields.H" #include "surfaceFields.H" -#include "zeroGradientFvPatchFields.H" +#include "extrapolatedCalculatedFvPatchFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -72,7 +72,7 @@ tmp reconstructMag(const surfaceScalarField& ssf) ssf.dimensions()/dimArea, scalar(0) ), - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSimpleReconstruct.C b/src/finiteVolume/finiteVolume/fvc/fvcSimpleReconstruct.C index 0c9e6c0b73..6c97f1afd2 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcSimpleReconstruct.C +++ b/src/finiteVolume/finiteVolume/fvc/fvcSimpleReconstruct.C @@ -25,7 +25,7 @@ License #include "fvcReconstruct.H" #include "fvMesh.H" -#include "zeroGradientFvPatchFields.H" +#include "extrapolatedCalculatedFvPatchFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -81,7 +81,7 @@ reconstruct ssf.dimensions()/dimArea, pTraits::zero ), - zeroGradientFvPatchField::typeName + extrapolatedCalculatedFvPatchField::typeName ) ); diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSurfaceIntegrate.C b/src/finiteVolume/finiteVolume/fvc/fvcSurfaceIntegrate.C index b2c638fe2a..ccf92f56c0 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcSurfaceIntegrate.C +++ b/src/finiteVolume/finiteVolume/fvc/fvcSurfaceIntegrate.C @@ -25,7 +25,7 @@ License #include "fvcSurfaceIntegrate.H" #include "fvMesh.H" -#include "zeroGradientFvPatchFields.H" +#include "extrapolatedCalculatedFvPatchFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -104,7 +104,7 @@ surfaceIntegrate ssf.dimensions()/dimVol, pTraits::zero ), - zeroGradientFvPatchField::typeName + extrapolatedCalculatedFvPatchField::typeName ) ); GeometricField& vf = tvf(); @@ -155,7 +155,7 @@ surfaceSum ), mesh, dimensioned("0", ssf.dimensions(), pTraits::zero), - zeroGradientFvPatchField::typeName + extrapolatedCalculatedFvPatchField::typeName ) ); GeometricField& vf = tvf(); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.C b/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.C index dc04fd0f34..26b582f77b 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.C @@ -28,7 +28,7 @@ License #include "gaussGrad.H" #include "fvMesh.H" #include "volMesh.H" -#include "zeroGradientFvPatchField.H" +#include "extrapolatedCalculatedFvPatchField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -77,7 +77,7 @@ Foam::fv::LeastSquaresGrad::calcGrad vtf.dimensions()/dimLength, pTraits::zero ), - zeroGradientFvPatchField::typeName + extrapolatedCalculatedFvPatchField::typeName ) ); GeometricField& lsGrad = tlsGrad(); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.C b/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.C index 73fed99ca5..a70e53f5a1 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "gaussGrad.H" -#include "zeroGradientFvPatchField.H" +#include "extrapolatedCalculatedFvPatchField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -67,7 +67,7 @@ Foam::fv::gaussGrad::gradf ssf.dimensions()/dimLength, pTraits::zero ), - zeroGradientFvPatchField::typeName + extrapolatedCalculatedFvPatchField::typeName ) ); GeometricField& gGrad = tgGrad(); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C index 954ea3f85e..fa80a08567 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C @@ -30,7 +30,7 @@ License #include "volMesh.H" #include "surfaceMesh.H" #include "GeometricField.H" -#include "zeroGradientFvPatchField.H" +#include "extrapolatedCalculatedFvPatchField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -73,7 +73,7 @@ Foam::fv::leastSquaresGrad::calcGrad vsf.dimensions()/dimLength, pTraits::zero ), - zeroGradientFvPatchField::typeName + extrapolatedCalculatedFvPatchField::typeName ) ); GeometricField& lsGrad = tlsGrad(); diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index 91dd8e2347..7fb437976b 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -26,7 +26,7 @@ License #include "volFields.H" #include "surfaceFields.H" #include "calculatedFvPatchFields.H" -#include "zeroGradientFvPatchFields.H" +#include "extrapolatedCalculatedFvPatchFields.H" #include "coupledFvPatchFields.H" #include "UIndirectList.H" @@ -739,7 +739,7 @@ Foam::tmp Foam::fvMatrix::A() const ), psi_.mesh(), dimensions_/psi_.dimensions()/dimVol, - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -768,7 +768,7 @@ Foam::fvMatrix::H() const ), psi_.mesh(), dimensions_/dimVol, - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); GeometricField& Hphi = tHphi(); @@ -830,7 +830,7 @@ Foam::tmp Foam::fvMatrix::H1() const ), psi_.mesh(), dimensions_/(dimVol*psi_.dimensions()), - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); volScalarField& H1_ = tH1(); @@ -2274,7 +2274,7 @@ Foam::operator& ), psi.mesh(), M.dimensions()/dimVol, - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); GeometricField& Mphi = tMphi(); diff --git a/src/finiteVolume/fvMatrices/fvScalarMatrix/fvScalarMatrix.C b/src/finiteVolume/fvMatrices/fvScalarMatrix/fvScalarMatrix.C index 8dc91d4d17..7effdd1ef5 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-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "fvScalarMatrix.H" -#include "zeroGradientFvPatchFields.H" +#include "extrapolatedCalculatedFvPatchFields.H" // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -224,7 +224,7 @@ Foam::tmp Foam::fvMatrix::H() const ), psi_.mesh(), dimensions_/dimVol, - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); volScalarField& Hphi = tHphi(); @@ -256,7 +256,7 @@ Foam::tmp Foam::fvMatrix::H1() const ), psi_.mesh(), dimensions_/(dimVol*psi_.dimensions()), - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); volScalarField& H1_ = tH1(); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H index 7bfc88dce6..fbeb1eef1a 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H @@ -73,7 +73,7 @@ SourceFiles #include "surfaceInterpolationScheme.H" #include "blendedSchemeBase.H" #include "surfaceInterpolate.H" -#include "zeroGradientFvPatchFields.H" +#include "extrapolatedCalculatedFvPatchFields.H" #include "fvcSurfaceIntegrate.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -230,7 +230,7 @@ public: ), mesh, dimensionedScalar("Co", dimless, 0), - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ); scalarField sumPhi diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/outletStabilised/outletStabilised.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/outletStabilised/outletStabilised.H index cecbcff033..49a70b7001 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/outletStabilised/outletStabilised.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/outletStabilised/outletStabilised.H @@ -44,6 +44,7 @@ SourceFiles #include "skewCorrectionVectors.H" #include "linear.H" #include "gaussGrad.H" +#include "zeroGradientFvPatchField.H" #include "mixedFvPatchField.H" #include "directionMixedFvPatchField.H" diff --git a/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C b/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C index f7ce048afa..5ed89df046 100644 --- a/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C +++ b/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,6 +28,7 @@ License #include "basicThermo.H" #include "uniformDimensionedFields.H" #include "zeroGradientFvPatchFields.H" +#include "extrapolatedCalculatedFvPatchFields.H" #include "addToRunTimeSelectionTable.H" #include "geometricOneField.H" @@ -103,7 +104,7 @@ Foam::fv::solidificationMeltingSource::Cp() const dimEnergy/dimMass/dimTemperature, CpRef ), - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); } diff --git a/src/genericPatchFields/genericFvPatchField/genericFvPatchField.C b/src/genericPatchFields/genericFvPatchField/genericFvPatchField.C index 298eb67787..374aa5eac6 100644 --- a/src/genericPatchFields/genericFvPatchField/genericFvPatchField.C +++ b/src/genericPatchFields/genericFvPatchField/genericFvPatchField.C @@ -702,7 +702,7 @@ Foam::genericFvPatchField::valueInternalCoeffs << " in file " << this->dimensionedInternalField().objectPath() << "\n You are probably trying to solve for a field with a " "generic boundary condition." - << exit(FatalError); + << abort(FatalError); return *this; } @@ -723,7 +723,7 @@ Foam::genericFvPatchField::valueBoundaryCoeffs << " in file " << this->dimensionedInternalField().objectPath() << "\n You are probably trying to solve for a field with a " "generic boundary condition." - << exit(FatalError); + << abort(FatalError); return *this; } @@ -741,7 +741,7 @@ Foam::genericFvPatchField::gradientInternalCoeffs() const << " in file " << this->dimensionedInternalField().objectPath() << "\n You are probably trying to solve for a field with a " "generic boundary condition." - << exit(FatalError); + << abort(FatalError); return *this; } @@ -758,7 +758,7 @@ Foam::genericFvPatchField::gradientBoundaryCoeffs() const << " in file " << this->dimensionedInternalField().objectPath() << "\n You are probably trying to solve for a field with a " "generic boundary condition." - << exit(FatalError); + << abort(FatalError); return *this; } diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H index ced4c77f1f..3ed9040875 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H @@ -470,7 +470,7 @@ Foam::KinematicCloud::vDotSweep() const ), mesh_, dimensionedScalar("zero", dimless/dimTime, 0.0), - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -509,7 +509,7 @@ Foam::KinematicCloud::theta() const ), mesh_, dimensionedScalar("zero", dimless, 0.0), - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.C b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.C index c01ae46a01..97bbb7b9b5 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.C @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "Basic.H" +#include "zeroGradientFvPatchField.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C index ab2b457991..73a72f5540 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C @@ -30,6 +30,7 @@ License #include "fvmLaplacian.H" #include "fvcReconstruct.H" #include "volPointInterpolation.H" +#include "zeroGradientFvPatchFields.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -43,8 +44,17 @@ Foam::PackingModels::Implicit::Implicit PackingModel(dict, owner, typeName), alpha_ ( - this->owner().name() + ":alpha", - this->owner().theta() + IOobject + ( + this->owner().name() + ":alpha", + this->owner().db().time().timeName(), + this->owner().mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + this->owner().mesh(), + dimensionedScalar("zero", dimless, 0.0), + zeroGradientFvPatchScalarField::typeName ), phiCorrect_(NULL), uCorrect_(NULL), @@ -53,6 +63,7 @@ Foam::PackingModels::Implicit::Implicit alphaMin_(readScalar(this->coeffDict().lookup("alphaMin"))), rhoMin_(readScalar(this->coeffDict().lookup("rhoMin"))) { + alpha_ = this->owner().theta(); alpha_.oldTime(); } diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C index 868e7cce3f..b84da4a752 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C @@ -54,7 +54,6 @@ License #include "Random.H" #include "searchableSurfaces.H" #include "treeBoundBox.H" -#include "zeroGradientFvPatchFields.H" #include "fvMeshTools.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -2789,8 +2788,7 @@ void Foam::meshRefinement::dumpRefinementLevel() const false ), mesh_, - dimensionedScalar("zero", dimless, 0), - zeroGradientFvPatchScalarField::typeName + dimensionedScalar("zero", dimless, 0) ); const labelList& cellLevel = meshCutter_.cellLevel(); diff --git a/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C b/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C index 89506ebc96..ec56dcc94b 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-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,6 +26,7 @@ License #include "CourantNo.H" #include "surfaceFields.H" #include "fvcSurfaceIntegrate.H" +#include "zeroGradientFvPatchFields.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/postProcessing/functionObjects/utilities/blendingFactor/blendingFactorTemplates.C b/src/postProcessing/functionObjects/utilities/blendingFactor/blendingFactorTemplates.C index a9b3121f4b..a2275cf5f0 100644 --- a/src/postProcessing/functionObjects/utilities/blendingFactor/blendingFactorTemplates.C +++ b/src/postProcessing/functionObjects/utilities/blendingFactor/blendingFactorTemplates.C @@ -26,6 +26,7 @@ License #include "gaussConvectionScheme.H" #include "blendedSchemeBase.H" #include "fvcCellReduce.H" +#include "zeroGradientFvPatchFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C index ae118fa10a..501f4aa64c 100644 --- a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C +++ b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C @@ -25,7 +25,6 @@ License #include "reactingOneDim.H" #include "addToRunTimeSelectionTable.H" -#include "zeroGradientFvPatchFields.H" #include "surfaceInterpolate.H" #include "fvm.H" #include "fvcDiv.H" @@ -464,8 +463,6 @@ reactingOneDim::reactingOneDim IOobject::AUTO_WRITE ), regionMesh() - //dimensionedScalar("zero", dimEnergy/dimArea/dimTime, 0.0), - //zeroGradientFvPatchVectorField::typeName ), lostSolidMass_(dimensionedScalar("zero", dimMass, 0.0)), diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayerI.H b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayerI.H index 39c95ba8cd..3c0bd597f2 100644 --- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayerI.H +++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayerI.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-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -223,8 +223,7 @@ inline tmp kinematicSingleLayer::gNorm() const IOobject::NO_READ, IOobject::NO_WRITE ), - g_ & nHat(), - zeroGradientFvPatchScalarField::typeName + g_ & nHat() ) ); @@ -246,8 +245,7 @@ inline tmp kinematicSingleLayer::gNormClipped() const IOobject::NO_READ, IOobject::NO_WRITE ), - g_ & nHat(), - zeroGradientFvPatchScalarField::typeName + g_ & nHat() ) ); @@ -272,8 +270,7 @@ inline tmp kinematicSingleLayer::gTan() const IOobject::NO_READ, IOobject::NO_WRITE ), - g_ - nHat()*gNorm(), - zeroGradientFvPatchVectorField::typeName + g_ - nHat()*gNorm() ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/constantFilmThermo/constantFilmThermo.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/constantFilmThermo/constantFilmThermo.C index 6e964ac37d..cc53371852 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/constantFilmThermo/constantFilmThermo.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/constantFilmThermo/constantFilmThermo.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-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "constantFilmThermo.H" +#include "extrapolatedCalculatedFvPatchFields.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -270,7 +271,7 @@ tmp constantFilmThermo::rho() const ), owner().regionMesh(), dimensionedScalar("0", dimDensity, 0.0), - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -297,7 +298,7 @@ tmp constantFilmThermo::mu() const ), owner().regionMesh(), dimensionedScalar("0", dimPressure*dimTime, 0.0), - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -324,7 +325,7 @@ tmp constantFilmThermo::sigma() const ), owner().regionMesh(), dimensionedScalar("0", dimMass/sqr(dimTime), 0.0), - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -351,7 +352,7 @@ tmp constantFilmThermo::Cp() const ), owner().regionMesh(), dimensionedScalar("0", dimEnergy/dimMass/dimTemperature, 0.0), - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -378,7 +379,7 @@ tmp constantFilmThermo::kappa() const ), owner().regionMesh(), dimensionedScalar("0", dimPower/dimLength/dimTemperature, 0.0), - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C index c846a98d58..59b5713617 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,6 +27,7 @@ License #include "demandDrivenData.H" #include "thermoSingleLayer.H" #include "SLGThermo.H" +#include "extrapolatedCalculatedFvPatchFields.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -250,7 +251,7 @@ tmp liquidFilmThermo::rho() const ), owner().regionMesh(), dimensionedScalar("0", dimDensity, 0.0), - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -298,7 +299,7 @@ tmp liquidFilmThermo::mu() const ), owner().regionMesh(), dimensionedScalar("0", dimPressure*dimTime, 0.0), - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -346,7 +347,7 @@ tmp liquidFilmThermo::sigma() const ), owner().regionMesh(), dimensionedScalar("0", dimMass/sqr(dimTime), 0.0), - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -394,7 +395,7 @@ tmp liquidFilmThermo::Cp() const ), owner().regionMesh(), dimensionedScalar("0", dimEnergy/dimMass/dimTemperature, 0.0), - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -442,7 +443,7 @@ tmp liquidFilmThermo::kappa() const ), owner().regionMesh(), dimensionedScalar("0", dimPower/dimLength/dimTemperature, 0.0), - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C index 6b015cd800..df7ccf0845 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,7 +31,7 @@ License #include "volFields.H" #include "fvmSup.H" #include "kinematicSingleLayer.H" -#include "zeroGradientFvPatchFields.H" +#include "extrapolatedCalculatedFvPatchFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -84,7 +84,7 @@ tmp laminar::Us() const ), owner_.regionMesh(), dimensionedVector("zero", dimVelocity, vector::zero), - zeroGradientFvPatchVectorField::typeName + extrapolatedCalculatedFvPatchVectorField::typeName ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C index 5d82ba0853..4f5c60f145 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.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-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,6 @@ License #include "constantRadiation.H" #include "volFields.H" -#include "zeroGradientFvPatchFields.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -117,8 +116,7 @@ tmp constantRadiation::Shs() IOobject::NO_WRITE ), owner().regionMesh(), - dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0), - zeroGradientFvPatchScalarField::typeName + dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0) ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/noRadiation/noRadiation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/noRadiation/noRadiation.C index ce200ee3c5..e46dd872e4 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/noRadiation/noRadiation.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/noRadiation/noRadiation.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 @@ -26,7 +26,6 @@ License #include "noRadiation.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" -#include "zeroGradientFvPatchFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -89,8 +88,7 @@ tmp noRadiation::Shs() IOobject::NO_WRITE ), owner().regionMesh(), - dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0), - zeroGradientFvPatchScalarField::typeName + dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0) ) ); } diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/primaryRadiation/primaryRadiation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/primaryRadiation/primaryRadiation.C index 21b982073c..b653ee4638 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/primaryRadiation/primaryRadiation.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/primaryRadiation/primaryRadiation.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-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,6 @@ License #include "primaryRadiation.H" #include "volFields.H" -#include "zeroGradientFvPatchFields.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -104,8 +103,7 @@ tmp primaryRadiation::Shs() IOobject::NO_WRITE ), owner().regionMesh(), - dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0), - zeroGradientFvPatchScalarField::typeName + dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0) ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C index 14c2a3bfd8..3505f9c8a0 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.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 @@ -120,8 +120,7 @@ tmp standardRadiation::Shs() IOobject::NO_WRITE ), owner().regionMesh(), - dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0), - zeroGradientFvPatchScalarField::typeName + dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0) ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/constantHeatTransfer/constantHeatTransfer.C b/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/constantHeatTransfer/constantHeatTransfer.C index 924aee7087..78769a9bdc 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/constantHeatTransfer/constantHeatTransfer.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/constantHeatTransfer/constantHeatTransfer.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 @@ -26,7 +26,6 @@ License #include "constantHeatTransfer.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" -#include "zeroGradientFvPatchFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -96,8 +95,7 @@ tmp constantHeatTransfer::h() const "c0", dimEnergy/dimTime/sqr(dimLength)/dimTemperature, c0_ - ), - zeroGradientFvPatchScalarField::typeName + ) ) ); } diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayerI.H b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayerI.H index edcef99677..223254c38e 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayerI.H +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayerI.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-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -73,8 +73,7 @@ inline tmp thermoSingleLayer::hs IOobject::NO_READ, IOobject::NO_WRITE ), - Cp_*(T - (dimensionedScalar("Tstd", dimTemperature, 298.15))), - zeroGradientFvPatchScalarField::typeName + Cp_*(T - (dimensionedScalar("Tstd", dimTemperature, 298.15))) ) ); } @@ -97,8 +96,7 @@ inline tmp thermoSingleLayer::T IOobject::NO_READ, IOobject::NO_WRITE ), - hs/Cp_ + dimensionedScalar("Tstd", dimTemperature, 298.15), - zeroGradientFvPatchScalarField::typeName + hs/Cp_ + dimensionedScalar("Tstd", dimTemperature, 298.15) ) ); diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C index 92f1db6b87..ee7a8974d6 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C @@ -26,6 +26,7 @@ License #include "chemistryModel.H" #include "reactingMixture.H" #include "UniformField.H" +#include "extrapolatedCalculatedFvPatchFields.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -495,7 +496,7 @@ Foam::chemistryModel::tc() const ), this->mesh(), dimensionedScalar("zero", dimTime, SMALL), - zeroGradientFvPatchScalarField::typeName + extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -563,12 +564,10 @@ Foam::chemistryModel::Sh() const false ), this->mesh_, - dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0), - zeroGradientFvPatchScalarField::typeName + dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0) ) ); - if (this->chemistry_) { scalarField& Sh = tSh(); @@ -605,8 +604,7 @@ Foam::chemistryModel::dQ() const false ), this->mesh_, - dimensionedScalar("dQ", dimEnergy/dimTime, 0.0), - zeroGradientFvPatchScalarField::typeName + dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) ) ); diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C index ef0ab32012..208425212f 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C @@ -26,7 +26,7 @@ License #include "greyMeanAbsorptionEmission.H" #include "addToRunTimeSelectionTable.H" #include "unitConversion.H" -#include "zeroGradientFvPatchFields.H" +#include "extrapolatedCalculatedFvPatchFields.H" #include "basicSpecieMixture.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -209,7 +209,7 @@ Foam::radiation::greyMeanAbsorptionEmission::aCont(const label bandI) const ), mesh(), dimensionedScalar("a", dimless/dimLength, 0.0), - zeroGradientFvPatchVectorField::typeName + extrapolatedCalculatedFvPatchVectorField::typeName ) ); diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C index 2ab1931029..d3da12eb59 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C @@ -26,7 +26,7 @@ License #include "greyMeanSolidAbsorptionEmission.H" #include "addToRunTimeSelectionTable.H" #include "unitConversion.H" -#include "zeroGradientFvPatchFields.H" +#include "extrapolatedCalculatedFvPatchFields.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -158,7 +158,7 @@ calc(const label propertyId) const ), mesh(), dimensionedScalar("a", dimless/dimLength, 0.0), - zeroGradientFvPatchVectorField::typeName + extrapolatedCalculatedFvPatchVectorField::typeName ) ); diff --git a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C index 1973259531..efa78b4e14 100644 --- a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C +++ b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -619,7 +619,6 @@ Foam::pyrolysisChemistryModel::gasHs const label index ) const { - tmp tHs ( new volScalarField @@ -634,8 +633,7 @@ Foam::pyrolysisChemistryModel::gasHs false ), this->mesh_, - dimensionedScalar("zero", dimEnergy/dimMass, 0.0), - zeroGradientFvPatchScalarField::typeName + dimensionedScalar("zero", dimEnergy/dimMass, 0.0) ) ); @@ -664,4 +662,6 @@ void Foam::pyrolysisChemistryModel::solve { NotImplemented; } + + // ************************************************************************* // diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C index e39f1f6352..07cc0c3ae3 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.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 @@ -25,7 +25,6 @@ License #include "solidChemistryModel.H" #include "reactingMixture.H" -#include "zeroGradientFvPatchFields.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -131,8 +130,7 @@ Foam::solidChemistryModel::Sh() const false ), this->mesh_, - dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0), - zeroGradientFvPatchScalarField::typeName + dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0) ) ); @@ -172,8 +170,7 @@ Foam::solidChemistryModel::dQ() const false ), this->mesh_, - dimensionedScalar("dQ", dimEnergy/dimTime, 0.0), - zeroGradientFvPatchScalarField::typeName + dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) ) ); diff --git a/src/triSurface/triSurface/triSurface.C b/src/triSurface/triSurface/triSurface.C index 1a834edad8..7946ae338f 100644 --- a/src/triSurface/triSurface/triSurface.C +++ b/src/triSurface/triSurface/triSurface.C @@ -620,10 +620,10 @@ Foam::triSurface::triSurface List& triangles, const geometricSurfacePatchList& patches, pointField& points, - const bool reUse + const bool reuse ) : - ParentType(triangles, points, reUse), + ParentType(triangles, points, reuse), patches_(patches), sortedEdgeFacesPtr_(NULL), edgeOwnerPtr_(NULL) diff --git a/src/triSurface/triSurface/triSurface.H b/src/triSurface/triSurface/triSurface.H index 89d5461d21..1d8629f360 100644 --- a/src/triSurface/triSurface/triSurface.H +++ b/src/triSurface/triSurface/triSurface.H @@ -259,7 +259,7 @@ public: List&, const geometricSurfacePatchList&, pointField&, - const bool reUse + const bool reuse ); //- Construct from triangles, patches, points.