From 0c163e40e505cb787ab06b063e4ab10a1a592e03 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 1 May 2020 16:25:11 +0200 Subject: [PATCH] COMP: missing clone methods for some derived boundary conditions --- .../nutWallFunctionFvPatchScalarField.H | 4 ++- ...haseChangeWallFunctionFvPatchScalarField.H | 11 +++++--- .../copiedFixedValueFvPatchScalarField.H | 28 +++++++++++++++++-- ...ixedMultiPhaseHeatFluxFvPatchScalarField.H | 27 ++++++++++++++++-- 4 files changed, 59 insertions(+), 11 deletions(-) diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H index ee935c4bbc..18851d81ec 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016, 2019 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -177,6 +177,8 @@ public: const DimensionedField& ); + // No clone methods - abstract class + // Member Functions diff --git a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/alphatPhaseChangeWallFunction/alphatPhaseChangeWallFunctionFvPatchScalarField.H b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/alphatPhaseChangeWallFunction/alphatPhaseChangeWallFunctionFvPatchScalarField.H index e7021b854a..f790a5acec 100644 --- a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/alphatPhaseChangeWallFunction/alphatPhaseChangeWallFunctionFvPatchScalarField.H +++ b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/alphatPhaseChangeWallFunction/alphatPhaseChangeWallFunctionFvPatchScalarField.H @@ -61,7 +61,7 @@ class alphatPhaseChangeWallFunctionFvPatchScalarField { protected: - // Protected data + // Protected Data //- Rate of phase-change scalarField dmdt_; @@ -117,8 +117,10 @@ public: const DimensionedField& ); + // No clone methods - abstract class - // Member functions + + // Member Functions //- Return the rate of phase-change virtual const scalarField& dmdt() const @@ -162,9 +164,10 @@ public: return mDotL_; } - // Evaluation functions - //- Update the coefficients associated with the patch field + // Evaluation Functions + + //- Update the coefficients associated with the patch field virtual void updateCoeffs() = 0; diff --git a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.H b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.H index 4e6b3e6974..c0bc19e023 100644 --- a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.H +++ b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -57,7 +58,7 @@ class copiedFixedValueFvPatchScalarField { protected: - // Protected data + // Protected Data word sourceFieldName_; @@ -101,6 +102,15 @@ public: const copiedFixedValueFvPatchScalarField& ); + //- Construct and return a clone + virtual tmp clone() const + { + return tmp + ( + new copiedFixedValueFvPatchScalarField(*this) + ); + } + //- Construct as copy setting internal field reference copiedFixedValueFvPatchScalarField ( @@ -108,10 +118,22 @@ public: const DimensionedField& ); + //- Construct and return a clone setting internal field reference + virtual tmp clone + ( + const DimensionedField& iF + ) const + { + return tmp + ( + new copiedFixedValueFvPatchScalarField(*this, iF) + ); + } - // Member functions - // Evaluation functions + // Member Functions + + // Evaluation Functions //- Update the coefficients associated with the patch field virtual void updateCoeffs(); diff --git a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.H b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.H index 96219aeda7..9b05924876 100644 --- a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.H +++ b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.H @@ -61,7 +61,7 @@ class fixedMultiPhaseHeatFluxFvPatchScalarField : public fixedValueFvPatchScalarField { - // Private data + // Private Data //- Heat power [W] or flux [W/m2] scalarField q_; @@ -113,6 +113,15 @@ public: const fixedMultiPhaseHeatFluxFvPatchScalarField& ); + //- Construct and return a clone + virtual tmp clone() const + { + return tmp + ( + new fixedMultiPhaseHeatFluxFvPatchScalarField(*this) + ); + } + //- Construct as copy setting internal field reference fixedMultiPhaseHeatFluxFvPatchScalarField ( @@ -120,10 +129,22 @@ public: const DimensionedField& ); + //- Construct and return a clone setting internal field reference + virtual tmp clone + ( + const DimensionedField& iF + ) const + { + return tmp + ( + new fixedMultiPhaseHeatFluxFvPatchScalarField(*this, iF) + ); + } - // Member functions - // Evaluation functions + // Member Functions + + // Evaluation Functions //- Update the coefficients associated with the patch field virtual void updateCoeffs();