diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.H b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.H index 0ac35141e6..ef03d5e198 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.H +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.H @@ -110,15 +110,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new smoluchowskiJumpTFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference smoluchowskiJumpTFvPatchScalarField ( @@ -126,18 +117,22 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new smoluchowskiJumpTFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } + // Mapping functions //- Map (and resize as needed) from self given a mapping object diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.H b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.H index 1ebe0338ae..50862433b3 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.H +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.H @@ -118,15 +118,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new maxwellSlipUFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference maxwellSlipUFvPatchVectorField ( @@ -134,16 +125,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new maxwellSlipUFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.H b/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.H index 28587acaca..85fff0f1c8 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.H +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.H @@ -135,15 +135,6 @@ public: const fixedRhoFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new fixedRhoFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference fixedRhoFvPatchScalarField ( @@ -151,16 +142,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new fixedRhoFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/derivedFvPatchFields/turbulentTemperatureTwoPhaseRadCoupledMixed/turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/derivedFvPatchFields/turbulentTemperatureTwoPhaseRadCoupledMixed/turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.H index 072a0d2807..3268eab8d3 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/derivedFvPatchFields/turbulentTemperatureTwoPhaseRadCoupledMixed/turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/derivedFvPatchFields/turbulentTemperatureTwoPhaseRadCoupledMixed/turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.H @@ -196,18 +196,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField ( @@ -215,20 +203,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointOutletPressure/adjointOutletPressureFvPatchScalarField.H b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointOutletPressure/adjointOutletPressureFvPatchScalarField.H index d649748745..a6bd29689c 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointOutletPressure/adjointOutletPressureFvPatchScalarField.H +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointOutletPressure/adjointOutletPressureFvPatchScalarField.H @@ -85,15 +85,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new adjointOutletPressureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference adjointOutletPressureFvPatchScalarField ( @@ -101,16 +92,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new adjointOutletPressureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.H b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.H index 6a1357a820..5256fdfbd0 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.H +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.H @@ -85,15 +85,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new adjointOutletVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference adjointOutletVelocityFvPatchVectorField ( @@ -101,16 +92,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new adjointOutletVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/alphaContactAngle/alphaContactAngleFvPatchScalarField.H b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/alphaContactAngle/alphaContactAngleFvPatchScalarField.H index 2863677d83..208c574975 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/alphaContactAngle/alphaContactAngleFvPatchScalarField.H +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/alphaContactAngle/alphaContactAngleFvPatchScalarField.H @@ -164,15 +164,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new alphaContactAngleFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference alphaContactAngleFvPatchScalarField ( @@ -180,16 +171,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new alphaContactAngleFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.H b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.H index 433ae213e2..c84ffe0692 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.H @@ -164,15 +164,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new alphaContactAngleFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference alphaContactAngleFvPatchScalarField ( @@ -180,16 +171,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new alphaContactAngleFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/tractionDisplacement/tractionDisplacementFvPatchVectorField.H b/applications/solvers/stressAnalysis/solidDisplacementFoam/tractionDisplacement/tractionDisplacementFvPatchVectorField.H index 9c13942f15..b20d6f64cc 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/tractionDisplacement/tractionDisplacementFvPatchVectorField.H +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/tractionDisplacement/tractionDisplacementFvPatchVectorField.H @@ -100,15 +100,6 @@ public: const tractionDisplacementFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new tractionDisplacementFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference tractionDisplacementFvPatchVectorField ( @@ -116,16 +107,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new tractionDisplacementFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/tractionDisplacementCorrection/tractionDisplacementCorrectionFvPatchVectorField.H b/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/tractionDisplacementCorrection/tractionDisplacementCorrectionFvPatchVectorField.H index 52c2593a1a..6590915eb6 100644 --- a/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/tractionDisplacementCorrection/tractionDisplacementCorrectionFvPatchVectorField.H +++ b/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/tractionDisplacementCorrection/tractionDisplacementCorrectionFvPatchVectorField.H @@ -98,15 +98,6 @@ public: const tractionDisplacementCorrectionFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new tractionDisplacementCorrectionFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference tractionDisplacementCorrectionFvPatchVectorField ( @@ -114,16 +105,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new tractionDisplacementCorrectionFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/etc/codeTemplates/dynamicCode/fixedValueFvPatchFieldTemplate.H b/etc/codeTemplates/dynamicCode/fixedValueFvPatchFieldTemplate.H index 1baf7be91e..92f61528f6 100644 --- a/etc/codeTemplates/dynamicCode/fixedValueFvPatchFieldTemplate.H +++ b/etc/codeTemplates/dynamicCode/fixedValueFvPatchFieldTemplate.H @@ -107,15 +107,6 @@ public: const ${typeName}FixedValueFvPatch${FieldType}& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new ${typeName}FixedValueFvPatch${FieldType}(*this) - ); - } - //- Construct as copy setting internal field reference ${typeName}FixedValueFvPatch${FieldType} ( @@ -123,16 +114,19 @@ public: const DimensionedField<${TemplateType}, volMesh>& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField<${TemplateType}>::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField<${TemplateType}, volMesh>& iF ) const { - return tmp - ( - new ${typeName}FixedValueFvPatch${FieldType}(*this, iF) - ); + return fvPatchField<${TemplateType}>::Clone(*this, iF); } diff --git a/etc/codeTemplates/dynamicCode/fixedValuePointPatchFieldTemplate.H b/etc/codeTemplates/dynamicCode/fixedValuePointPatchFieldTemplate.H index d46cd3e1a6..3fef28149c 100644 --- a/etc/codeTemplates/dynamicCode/fixedValuePointPatchFieldTemplate.H +++ b/etc/codeTemplates/dynamicCode/fixedValuePointPatchFieldTemplate.H @@ -108,15 +108,6 @@ public: const ${typeName}FixedValuePointPatch${FieldType}& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new ${typeName}FixedValuePointPatch${FieldType}(*this) - ); - } - //- Construct as copy setting internal field reference ${typeName}FixedValuePointPatch${FieldType} ( @@ -124,16 +115,19 @@ public: const DimensionedField<${TemplateType}, pointMesh>& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField<${TemplateType}>::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField<${TemplateType}, pointMesh>& iF ) const { - return autoPtr> - ( - new ${typeName}FixedValuePointPatch${FieldType}(*this, iF) - ); + return pointPatchField<${TemplateType}>::Clone(*this, iF); } diff --git a/etc/codeTemplates/dynamicCode/mixedFvPatchFieldTemplate.H b/etc/codeTemplates/dynamicCode/mixedFvPatchFieldTemplate.H index 74195dc8df..8e9ee59f82 100644 --- a/etc/codeTemplates/dynamicCode/mixedFvPatchFieldTemplate.H +++ b/etc/codeTemplates/dynamicCode/mixedFvPatchFieldTemplate.H @@ -107,15 +107,6 @@ public: const ${typeName}MixedValueFvPatch${FieldType}& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new ${typeName}MixedValueFvPatch${FieldType}(*this) - ); - } - //- Construct as copy setting internal field reference ${typeName}MixedValueFvPatch${FieldType} ( @@ -123,16 +114,19 @@ public: const DimensionedField<${TemplateType}, volMesh>& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField<${TemplateType}>::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField<${TemplateType}, volMesh>& iF ) const { - return tmp - ( - new ${typeName}MixedValueFvPatch${FieldType}(*this, iF) - ); + return fvPatchField<${TemplateType}>::Clone(*this, iF); } diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H index c94efce3dd..20cb347469 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H @@ -83,18 +83,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new basicSymmetryPointPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference basicSymmetryPointPatchField ( @@ -102,20 +90,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new basicSymmetryPointPatchField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/calculated/calculatedPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/basic/calculated/calculatedPointPatchField.C index 44c460d5c6..220be3b830 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/calculated/calculatedPointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/basic/calculated/calculatedPointPatchField.C @@ -78,14 +78,13 @@ Foam::calculatedPointPatchField::calculatedPointPatchField template -template Foam::autoPtr> Foam::pointPatchField::NewCalculatedType ( - const pointPatchField& pf + const pointPatch& p ) { - auto* patchTypeCtor = patchConstructorTable(pf.patch().type()); + auto* patchTypeCtor = patchConstructorTable(p.type()); if (patchTypeCtor) { @@ -93,8 +92,8 @@ Foam::pointPatchField::NewCalculatedType ( patchTypeCtor ( - pf.patch(), - Field::null() + p, + DimensionedField::null() ) ); } @@ -104,12 +103,24 @@ Foam::pointPatchField::NewCalculatedType ( new calculatedPointPatchField ( - pf.patch(), - Field::null() + p, + DimensionedField::null() ) ); } } +template +template +Foam::autoPtr> +Foam::pointPatchField::NewCalculatedType +( + const pointPatchField& pf +) +{ + return NewCalculatedType(pf.patch()); +} + + // ************************************************************************* // diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/calculated/calculatedPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/calculated/calculatedPointPatchField.H index 42189f5a27..a3f040c7fa 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/calculated/calculatedPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/basic/calculated/calculatedPointPatchField.H @@ -85,18 +85,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new calculatedPointPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference calculatedPointPatchField ( @@ -104,18 +92,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual autoPtr> - clone(const DimensionedField& iF) const + //- Return a clone + virtual autoPtr> clone() const { - return autoPtr> - ( - new calculatedPointPatchField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this); + } + + //- Construct and return a clone setting internal field reference + virtual autoPtr> clone + ( + const DimensionedField& iF + ) const + { + return pointPatchField::Clone(*this, iF); } }; diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/coupled/coupledPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/coupled/coupledPointPatchField.H index 616743df38..a70e06f732 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/coupled/coupledPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/basic/coupled/coupledPointPatchField.H @@ -87,9 +87,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const = 0; - //- Construct as copy setting internal field reference coupledPointPatchField ( @@ -97,6 +94,9 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const = 0; + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/fixedValue/fixedValuePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/fixedValue/fixedValuePointPatchField.H index 06203b7ad8..c325c85529 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/fixedValue/fixedValuePointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/basic/fixedValue/fixedValuePointPatchField.H @@ -111,18 +111,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new fixedValuePointPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference fixedValuePointPatchField ( @@ -130,20 +118,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new fixedValuePointPatchField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H index 2bd1a9e993..377be79930 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H @@ -142,18 +142,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new valuePointPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference valuePointPatchField ( @@ -161,20 +149,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new valuePointPatchField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/zeroGradient/zeroGradientPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/zeroGradient/zeroGradientPointPatchField.H index ca91d23cff..14ac2777e1 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/zeroGradient/zeroGradientPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/basic/zeroGradient/zeroGradientPointPatchField.H @@ -85,18 +85,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new zeroGradientPointPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference zeroGradientPointPatchField ( @@ -104,20 +92,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new zeroGradientPointPatchField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } }; diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H index f8cccfa7b0..80e5905a4e 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H @@ -92,18 +92,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new cyclicPointPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference cyclicPointPatchField ( @@ -111,19 +99,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new cyclicPointPatchField - ( - *this, iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.H index 600fc2080b..628ae11ae9 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.H @@ -87,18 +87,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new cyclicSlipPointPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference cyclicSlipPointPatchField ( @@ -106,19 +94,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new cyclicSlipPointPatchField - ( - *this, iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/empty/emptyPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/empty/emptyPointPatchField.H index dc2c9fc903..a865ee9ee7 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/empty/emptyPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/empty/emptyPointPatchField.H @@ -86,18 +86,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new emptyPointPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference emptyPointPatchField ( @@ -105,22 +93,22 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new emptyPointPatchField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } + // Member functions //- Constraint handling diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.H index 982884b84a..8808cc3a0a 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.H @@ -87,18 +87,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new nonuniformTransformCyclicPointPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference nonuniformTransformCyclicPointPatchField ( @@ -106,19 +94,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new nonuniformTransformCyclicPointPatchField - ( - *this, iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H index ed9f82d669..61f0962398 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H @@ -91,18 +91,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new processorPointPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference processorPointPatchField ( @@ -110,20 +98,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new processorPointPatchField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H index 7dd46e4f74..a5eed9049d 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H @@ -99,18 +99,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new processorCyclicPointPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference processorCyclicPointPatchField ( @@ -118,20 +106,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new processorCyclicPointPatchField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/symmetry/symmetryPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetry/symmetryPointPatchField.H index 7be7b6ff01..8a9192bd16 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/symmetry/symmetryPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetry/symmetryPointPatchField.H @@ -87,18 +87,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new symmetryPointPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference symmetryPointPatchField ( @@ -106,20 +94,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new symmetryPointPatchField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.H index 1422a61320..1b9b545902 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.H @@ -92,18 +92,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new symmetryPlanePointPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference symmetryPlanePointPatchField ( @@ -111,20 +99,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new symmetryPlanePointPatchField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.H index 7b2ebc8586..436076f521 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.H @@ -87,18 +87,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new wedgePointPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference wedgePointPatchField ( @@ -106,19 +94,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new wedgePointPatchField - ( - *this, iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.H index 438acf74ce..9999047742 100644 --- a/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.H @@ -209,15 +209,6 @@ public: const codedFixedValuePointPatchField& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new codedFixedValuePointPatchField(*this) - ); - } - //- Construct as copy setting internal field reference codedFixedValuePointPatchField ( @@ -225,20 +216,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new codedFixedValuePointPatchField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.H index d4c031350e..bdfa66a5a8 100644 --- a/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.H @@ -104,18 +104,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new fixedNormalSlipPointPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference fixedNormalSlipPointPatchField ( @@ -123,22 +111,22 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new fixedNormalSlipPointPatchField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } + // Member functions //- Update the patch field diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/slip/slipPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/derived/slip/slipPointPatchField.H index 027cc956ad..cae5ae2550 100644 --- a/src/OpenFOAM/fields/pointPatchFields/derived/slip/slipPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/derived/slip/slipPointPatchField.H @@ -86,18 +86,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new slipPointPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference slipPointPatchField ( @@ -105,20 +93,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new slipPointPatchField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } }; diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValuePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValuePointPatchField.H index 2fe588648a..88de0d0d09 100644 --- a/src/OpenFOAM/fields/pointPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValuePointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValuePointPatchField.H @@ -101,15 +101,6 @@ public: const timeVaryingUniformFixedValuePointPatchField& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new timeVaryingUniformFixedValuePointPatchField(*this) - ); - } - //- Construct as copy setting internal field reference timeVaryingUniformFixedValuePointPatchField ( @@ -117,16 +108,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new timeVaryingUniformFixedValuePointPatchField(*this, iF) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H index 011569f452..543b7f57cf 100644 --- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H @@ -345,17 +345,31 @@ public: const DimensionedField& ); - //- Construct and return a clone + //- Clone patch field with its own internal field reference virtual autoPtr> clone() const = 0; - //- Construct and return a clone setting internal field reference + //- Clone patch field with an internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const = 0; - // Selectors + // Factory Methods + + //- Clone a patch field, optionally with internal field reference etc. + template + static autoPtr> Clone + ( + const DerivedPatchField& pf, + Args&&... args + ) + { + return autoPtr> + ( + new DerivedPatchField(pf, std::forward(args)...) + ); + } //- Return a pointer to a new patchField created on freestore given // patch and internal field @@ -400,11 +414,19 @@ public: //- Return a pointer to a new calculatedPointPatchField created on // freestore without setting patchField values - template static autoPtr> NewCalculatedType ( - const pointPatchField& + const pointPatch& p + ); + + //- Return a pointer to a new calculatedPointPatchField created on + // freestore without setting patchField values + template + static autoPtr> + NewCalculatedType + ( + const pointPatchField& pf ); diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H index e0e9d41ab0..7f7a2d2d17 100644 --- a/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H @@ -172,15 +172,6 @@ public: const alphatJayatillekeWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new alphatJayatillekeWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference alphatJayatillekeWallFunctionFvPatchScalarField ( @@ -188,16 +179,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new alphatJayatillekeWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H index 9246a28536..e32721ee5c 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H @@ -167,18 +167,6 @@ public: const turbulentMixingLengthDissipationRateInletFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new turbulentMixingLengthDissipationRateInletFvPatchScalarField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference turbulentMixingLengthDissipationRateInletFvPatchScalarField ( @@ -186,20 +174,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new turbulentMixingLengthDissipationRateInletFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H index 4ea6936c7e..c89a8cb0db 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H @@ -144,18 +144,6 @@ public: const turbulentMixingLengthFrequencyInletFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new turbulentMixingLengthFrequencyInletFvPatchScalarField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference turbulentMixingLengthFrequencyInletFvPatchScalarField ( @@ -163,20 +151,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new turbulentMixingLengthFrequencyInletFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.H b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.H index 0077f5ed27..158130e4c5 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.H +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.H @@ -130,15 +130,6 @@ public: const fixedShearStressFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new fixedShearStressFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference fixedShearStressFvPatchVectorField ( @@ -146,16 +137,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new fixedShearStressFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.H b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.H index 0fb4f64e3f..e99ee74e9a 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.H +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.H @@ -182,15 +182,6 @@ public: const porousBafflePressureFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new porousBafflePressureFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference porousBafflePressureFvPatchField ( @@ -198,16 +189,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new porousBafflePressureFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H index db8c5fa6c6..622df17ae6 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H @@ -212,15 +212,6 @@ public: const epsilonWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new epsilonWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference epsilonWallFunctionFvPatchScalarField ( @@ -228,16 +219,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new epsilonWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.H b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.H index 9ddf258d94..6c3aef724d 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.H +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.H @@ -173,15 +173,6 @@ public: const kLowReWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new kLowReWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference kLowReWallFunctionFvPatchScalarField ( @@ -189,16 +180,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new kLowReWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H index 0c8d12d140..b552a4cf48 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H @@ -123,15 +123,6 @@ public: const kqRWallFunctionFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new kqRWallFunctionFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference kqRWallFunctionFvPatchField ( @@ -139,16 +130,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new kqRWallFunctionFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.H b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.H index b90fd8a988..2c2cf4eff9 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.H +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.H @@ -129,15 +129,6 @@ public: const nutLowReWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new nutLowReWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference nutLowReWallFunctionFvPatchScalarField ( @@ -145,16 +136,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new nutLowReWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUBlendedWallFunction/nutUBlendedWallFunctionFvPatchScalarField.H b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUBlendedWallFunction/nutUBlendedWallFunctionFvPatchScalarField.H index 3f84c8be6f..351bf18474 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUBlendedWallFunction/nutUBlendedWallFunctionFvPatchScalarField.H +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUBlendedWallFunction/nutUBlendedWallFunctionFvPatchScalarField.H @@ -175,15 +175,6 @@ public: const nutUBlendedWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new nutUBlendedWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference nutUBlendedWallFunctionFvPatchScalarField ( @@ -191,16 +182,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new nutUBlendedWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.H b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.H index 9a9e747781..efcd889d93 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.H +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.H @@ -171,15 +171,6 @@ public: const nutURoughWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new nutURoughWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference nutURoughWallFunctionFvPatchScalarField ( @@ -187,16 +178,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new nutURoughWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.H b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.H index 09935152a5..edac484a4f 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.H +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.H @@ -189,15 +189,6 @@ public: const nutUSpaldingWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new nutUSpaldingWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference nutUSpaldingWallFunctionFvPatchScalarField ( @@ -205,16 +196,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new nutUSpaldingWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.H b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.H index 18cb127738..e2010c780c 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.H +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.H @@ -156,15 +156,6 @@ public: const nutUTabulatedWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new nutUTabulatedWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference nutUTabulatedWallFunctionFvPatchScalarField ( @@ -172,16 +163,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new nutUTabulatedWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.H b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.H index 9b96cb2b68..81f8ecaf95 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.H +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.H @@ -143,15 +143,6 @@ public: const nutUWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new nutUWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference nutUWallFunctionFvPatchScalarField ( @@ -159,16 +150,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new nutUWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.H b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.H index 1f1da1e629..322819f8bb 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.H +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.H @@ -153,15 +153,6 @@ public: const nutkRoughWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new nutkRoughWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference nutkRoughWallFunctionFvPatchScalarField ( @@ -169,16 +160,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new nutkRoughWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.H b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.H index e04791c48b..5691a52d08 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.H +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.H @@ -134,15 +134,6 @@ public: const nutkWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new nutkWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference nutkWallFunctionFvPatchScalarField ( @@ -150,16 +141,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new nutkWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H index 4fb98c8c34..0e0e25f908 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H @@ -203,15 +203,6 @@ public: const omegaWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new omegaWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference omegaWallFunctionFvPatchScalarField ( @@ -219,18 +210,22 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new omegaWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } + //- Destructor virtual ~omegaWallFunctionFvPatchScalarField() = default; diff --git a/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H b/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H index 2641003b1f..f718dbeca3 100644 --- a/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H +++ b/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H @@ -149,15 +149,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new atmBoundaryLayerInletEpsilonFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference atmBoundaryLayerInletEpsilonFvPatchScalarField ( @@ -165,16 +156,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new atmBoundaryLayerInletEpsilonFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.H b/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.H index e2d8d70213..db567693f7 100644 --- a/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.H +++ b/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.H @@ -148,15 +148,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new atmBoundaryLayerInletKFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference atmBoundaryLayerInletKFvPatchScalarField ( @@ -164,16 +155,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new atmBoundaryLayerInletKFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletOmega/atmBoundaryLayerInletOmegaFvPatchScalarField.H b/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletOmega/atmBoundaryLayerInletOmegaFvPatchScalarField.H index ffe51f9d37..b1c0d08eca 100644 --- a/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletOmega/atmBoundaryLayerInletOmegaFvPatchScalarField.H +++ b/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletOmega/atmBoundaryLayerInletOmegaFvPatchScalarField.H @@ -145,15 +145,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new atmBoundaryLayerInletOmegaFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference atmBoundaryLayerInletOmegaFvPatchScalarField ( @@ -161,16 +152,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new atmBoundaryLayerInletOmegaFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.H b/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.H index ddbbd8179e..fc541a22b7 100644 --- a/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.H +++ b/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.H @@ -152,15 +152,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new atmBoundaryLayerInletVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference atmBoundaryLayerInletVelocityFvPatchVectorField ( @@ -168,16 +159,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new atmBoundaryLayerInletVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/atmosphericModels/derivedFvPatchFields/atmTurbulentHeatFluxTemperature/atmTurbulentHeatFluxTemperatureFvPatchScalarField.H b/src/atmosphericModels/derivedFvPatchFields/atmTurbulentHeatFluxTemperature/atmTurbulentHeatFluxTemperatureFvPatchScalarField.H index af5169c211..003299c83f 100644 --- a/src/atmosphericModels/derivedFvPatchFields/atmTurbulentHeatFluxTemperature/atmTurbulentHeatFluxTemperatureFvPatchScalarField.H +++ b/src/atmosphericModels/derivedFvPatchFields/atmTurbulentHeatFluxTemperature/atmTurbulentHeatFluxTemperatureFvPatchScalarField.H @@ -177,15 +177,6 @@ public: const atmTurbulentHeatFluxTemperatureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new atmTurbulentHeatFluxTemperatureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference atmTurbulentHeatFluxTemperatureFvPatchScalarField ( @@ -193,20 +184,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new atmTurbulentHeatFluxTemperatureFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmAlphatkWallFunction/atmAlphatkWallFunctionFvPatchScalarField.H b/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmAlphatkWallFunction/atmAlphatkWallFunctionFvPatchScalarField.H index 3280cedc7d..94e6583857 100644 --- a/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmAlphatkWallFunction/atmAlphatkWallFunctionFvPatchScalarField.H +++ b/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmAlphatkWallFunction/atmAlphatkWallFunctionFvPatchScalarField.H @@ -179,15 +179,6 @@ public: const atmAlphatkWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new atmAlphatkWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference atmAlphatkWallFunctionFvPatchScalarField ( @@ -195,16 +186,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new atmAlphatkWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmEpsilonWallFunction/atmEpsilonWallFunctionFvPatchScalarField.H b/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmEpsilonWallFunction/atmEpsilonWallFunctionFvPatchScalarField.H index e80434bf47..3101206000 100644 --- a/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmEpsilonWallFunction/atmEpsilonWallFunctionFvPatchScalarField.H +++ b/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmEpsilonWallFunction/atmEpsilonWallFunctionFvPatchScalarField.H @@ -170,15 +170,6 @@ public: const atmEpsilonWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new atmEpsilonWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference atmEpsilonWallFunctionFvPatchScalarField ( @@ -186,18 +177,22 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new atmEpsilonWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } + //- Destructor virtual ~atmEpsilonWallFunctionFvPatchScalarField() = default; diff --git a/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmNutUWallFunction/atmNutUWallFunctionFvPatchScalarField.H b/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmNutUWallFunction/atmNutUWallFunctionFvPatchScalarField.H index c006c0249a..8dc5162c0e 100644 --- a/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmNutUWallFunction/atmNutUWallFunctionFvPatchScalarField.H +++ b/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmNutUWallFunction/atmNutUWallFunctionFvPatchScalarField.H @@ -170,15 +170,6 @@ public: const atmNutUWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new atmNutUWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference atmNutUWallFunctionFvPatchScalarField ( @@ -186,16 +177,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new atmNutUWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmNutWallFunction/atmNutWallFunctionFvPatchScalarField.H b/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmNutWallFunction/atmNutWallFunctionFvPatchScalarField.H index 2cace45acf..ecb892deab 100644 --- a/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmNutWallFunction/atmNutWallFunctionFvPatchScalarField.H +++ b/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmNutWallFunction/atmNutWallFunctionFvPatchScalarField.H @@ -207,15 +207,6 @@ public: const atmNutWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new atmNutWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference atmNutWallFunctionFvPatchScalarField ( @@ -223,16 +214,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new atmNutWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmNutkWallFunction/atmNutkWallFunctionFvPatchScalarField.H b/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmNutkWallFunction/atmNutkWallFunctionFvPatchScalarField.H index 0dce8f571c..f17cbf217e 100644 --- a/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmNutkWallFunction/atmNutkWallFunctionFvPatchScalarField.H +++ b/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmNutkWallFunction/atmNutkWallFunctionFvPatchScalarField.H @@ -191,15 +191,6 @@ public: const atmNutkWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new atmNutkWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference atmNutkWallFunctionFvPatchScalarField ( @@ -207,16 +198,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new atmNutkWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmOmegaWallFunction/atmOmegaWallFunctionFvPatchScalarField.H b/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmOmegaWallFunction/atmOmegaWallFunctionFvPatchScalarField.H index 49b7a09992..a3439bed58 100644 --- a/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmOmegaWallFunction/atmOmegaWallFunctionFvPatchScalarField.H +++ b/src/atmosphericModels/derivedFvPatchFields/wallFunctions/atmOmegaWallFunction/atmOmegaWallFunctionFvPatchScalarField.H @@ -169,15 +169,6 @@ public: const atmOmegaWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new atmOmegaWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference atmOmegaWallFunctionFvPatchScalarField ( @@ -185,16 +176,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new atmOmegaWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/dynamicFaMesh/interfaceTrackingFvMesh/fvPatchFields/freeSurfacePressure/freeSurfacePressureFvPatchScalarField.H b/src/dynamicFaMesh/interfaceTrackingFvMesh/fvPatchFields/freeSurfacePressure/freeSurfacePressureFvPatchScalarField.H index 818ce6ba41..95a7f26b42 100644 --- a/src/dynamicFaMesh/interfaceTrackingFvMesh/fvPatchFields/freeSurfacePressure/freeSurfacePressureFvPatchScalarField.H +++ b/src/dynamicFaMesh/interfaceTrackingFvMesh/fvPatchFields/freeSurfacePressure/freeSurfacePressureFvPatchScalarField.H @@ -132,15 +132,6 @@ public: const freeSurfacePressureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new freeSurfacePressureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference freeSurfacePressureFvPatchScalarField ( @@ -148,16 +139,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new freeSurfacePressureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/dynamicFaMesh/interfaceTrackingFvMesh/fvPatchFields/freeSurfaceVelocity/freeSurfaceVelocityFvPatchVectorField.H b/src/dynamicFaMesh/interfaceTrackingFvMesh/fvPatchFields/freeSurfaceVelocity/freeSurfaceVelocityFvPatchVectorField.H index 77c81522de..500a4aa322 100644 --- a/src/dynamicFaMesh/interfaceTrackingFvMesh/fvPatchFields/freeSurfaceVelocity/freeSurfaceVelocityFvPatchVectorField.H +++ b/src/dynamicFaMesh/interfaceTrackingFvMesh/fvPatchFields/freeSurfaceVelocity/freeSurfaceVelocityFvPatchVectorField.H @@ -90,15 +90,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new freeSurfaceVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference freeSurfaceVelocityFvPatchVectorField ( @@ -106,16 +97,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new freeSurfaceVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/dynamicMesh/motionSolvers/displacement/solidBody/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.H b/src/dynamicMesh/motionSolvers/displacement/solidBody/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.H index 1ed9211e1b..2a61023250 100644 --- a/src/dynamicMesh/motionSolvers/displacement/solidBody/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.H +++ b/src/dynamicMesh/motionSolvers/displacement/solidBody/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.H @@ -101,18 +101,6 @@ public: const solidBodyMotionDisplacementPointPatchVectorField& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new solidBodyMotionDisplacementPointPatchVectorField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference solidBodyMotionDisplacementPointPatchVectorField ( @@ -121,20 +109,19 @@ public: ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new solidBodyMotionDisplacementPointPatchVectorField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchField.H index 6e6ae1696c..9772728ab5 100644 --- a/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchField.H @@ -95,15 +95,6 @@ public: const basicSymmetryFaPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new basicSymmetryFaPatchField(*this) - ); - } - //- Construct as copy setting internal field reference basicSymmetryFaPatchField ( @@ -111,16 +102,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new basicSymmetryFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchField.C b/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchField.C index 4f8eefa33c..53b7f314f1 100644 --- a/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchField.C +++ b/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchField.C @@ -90,19 +90,19 @@ Foam::calculatedFaPatchField::calculatedFaPatchField template -template -Foam::tmp> Foam::faPatchField::NewCalculatedType +Foam::tmp> +Foam::faPatchField::NewCalculatedType ( - const faPatchField& pf + const faPatch& p ) { - auto* patchTypeCtor = patchConstructorTable(pf.patch().type()); + auto* patchTypeCtor = patchConstructorTable(p.type()); if (patchTypeCtor) { return patchTypeCtor ( - pf.patch(), + p, DimensionedField::null() ); } @@ -112,7 +112,7 @@ Foam::tmp> Foam::faPatchField::NewCalculatedType ( new calculatedFaPatchField ( - pf.patch(), + p, DimensionedField::null() ) ); @@ -120,6 +120,18 @@ Foam::tmp> Foam::faPatchField::NewCalculatedType } +template +template +Foam::tmp> +Foam::faPatchField::NewCalculatedType +( + const faPatchField& pf +) +{ + return NewCalculatedType(pf.patch()); +} + + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template diff --git a/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchField.H index 9f180b65f2..07f612924d 100644 --- a/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchField.H @@ -97,15 +97,6 @@ public: const calculatedFaPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new calculatedFaPatchField(*this) - ); - } - //- Construct as copy setting internal field reference calculatedFaPatchField ( @@ -113,16 +104,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new calculatedFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchField.H index 0c6232d962..616d257fe4 100644 --- a/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchField.H @@ -108,9 +108,6 @@ public: const coupledFaPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const = 0; - //- Construct as copy setting internal field reference coupledFaPatchField ( @@ -118,6 +115,9 @@ public: const DimensionedField& ); + //- Return clone + virtual tmp> clone() const = 0; + //- Construct and return a clone virtual tmp> clone ( diff --git a/src/finiteArea/fields/faPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFaPatchField.H index c326fe3d63..1c618f3f7f 100644 --- a/src/finiteArea/fields/faPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFaPatchField.H @@ -108,15 +108,6 @@ public: const extrapolatedCalculatedFaPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new extrapolatedCalculatedFaPatchField(*this) - ); - } - //- Construct as copy setting internal field reference extrapolatedCalculatedFaPatchField ( @@ -124,16 +115,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new extrapolatedCalculatedFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchField.H index abedc11327..760d9668b4 100644 --- a/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchField.H @@ -144,15 +144,6 @@ public: const fixedGradientFaPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new fixedGradientFaPatchField(*this) - ); - } - //- Construct as copy setting internal field reference fixedGradientFaPatchField ( @@ -160,16 +151,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new fixedGradientFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchField.H index b99f739ee9..fa3f891e13 100644 --- a/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchField.H @@ -106,15 +106,6 @@ public: const fixedValueFaPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new fixedValueFaPatchField(*this) - ); - } - //- Construct as copy setting internal field reference fixedValueFaPatchField ( @@ -122,16 +113,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new fixedValueFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchField.H index f4d0bdbab5..16f0e01da0 100644 --- a/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchField.H @@ -144,15 +144,6 @@ public: const mixedFaPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new mixedFaPatchField(*this) - ); - } - //- Construct as copy setting internal field reference mixedFaPatchField ( @@ -160,16 +151,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new mixedFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchField.C b/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchField.C index becbcfcf05..fb9846b148 100644 --- a/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchField.C +++ b/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchField.C @@ -111,47 +111,14 @@ Foam::slicedFaPatchField::slicedFaPatchField } -template -Foam::tmp> -Foam::slicedFaPatchField::clone() const -{ - return tmp> - ( - new slicedFaPatchField(*this) - ); -} - - template Foam::slicedFaPatchField::slicedFaPatchField ( const slicedFaPatchField& ptf ) : - faPatchField - ( - ptf.patch(), - ptf.internalField(), - Field() - ) -{ - // Transfer the slice from the argument - UList::shallowCopy(ptf); -} - - -template -Foam::tmp> -Foam::slicedFaPatchField::clone -( - const DimensionedField& iF -) const -{ - return tmp> - ( - new slicedFaPatchField(*this, iF) - ); -} + slicedFaPatchField(ptf, ptf.internalField()) +{} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // @@ -170,8 +137,7 @@ template Foam::tmp> Foam::slicedFaPatchField::snGrad() const { NotImplemented; - - return Field::null(); + return nullptr; } @@ -180,8 +146,7 @@ Foam::tmp> Foam::slicedFaPatchField::patchInternalField() const { NotImplemented; - - return Field::null(); + return nullptr; } @@ -200,8 +165,7 @@ Foam::slicedFaPatchField::patchNeighbourField ) const { NotImplemented; - - return Field::null(); + return nullptr; } @@ -210,8 +174,7 @@ Foam::tmp> Foam::slicedFaPatchField::patchNeighbourField() const { NotImplemented; - - return Field::null(); + return nullptr; } @@ -223,8 +186,7 @@ Foam::slicedFaPatchField::valueInternalCoeffs ) const { NotImplemented; - - return Field::null(); + return nullptr; } @@ -236,8 +198,7 @@ Foam::slicedFaPatchField::valueBoundaryCoeffs ) const { NotImplemented; - - return Field::null(); + return nullptr; } @@ -246,8 +207,7 @@ Foam::tmp> Foam::slicedFaPatchField::gradientInternalCoeffs() const { NotImplemented; - - return Field::null(); + return nullptr; } @@ -256,8 +216,7 @@ Foam::tmp> Foam::slicedFaPatchField::gradientBoundaryCoeffs() const { NotImplemented; - - return Field::null(); + return nullptr; } diff --git a/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchField.H index 8afba50b8e..dcee956514 100644 --- a/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchField.H @@ -116,9 +116,6 @@ public: //- Construct as copy slicedFaPatchField(const slicedFaPatchField&); - //- Construct and return a clone - virtual tmp> clone() const; - //- Construct as copy setting internal field reference slicedFaPatchField ( @@ -126,11 +123,20 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF - ) const; + ) const + { + return faPatchField::Clone(*this, iF); + } //- Destructor diff --git a/src/finiteArea/fields/faPatchFields/basic/transform/transformFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/transform/transformFaPatchField.H index 7915ed2fc1..f4515b6a59 100644 --- a/src/finiteArea/fields/faPatchFields/basic/transform/transformFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/basic/transform/transformFaPatchField.H @@ -92,9 +92,6 @@ public: const faPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp> clone() const = 0; - //- Construct as copy setting internal field reference transformFaPatchField ( @@ -102,6 +99,9 @@ public: const DimensionedField& ); + //- Return clone + virtual tmp> clone() const = 0; + //- Construct and return a clone setting internal field reference virtual tmp> clone ( diff --git a/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchField.H index ba4a9dff76..407c9a9b15 100644 --- a/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchField.H @@ -96,15 +96,6 @@ public: const zeroGradientFaPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new zeroGradientFaPatchField(*this) - ); - } - //- Construct as copy setting internal field reference zeroGradientFaPatchField ( @@ -112,16 +103,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new zeroGradientFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.H b/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.H index 359800d18c..5ac2a891c5 100644 --- a/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.H @@ -118,15 +118,6 @@ public: const cyclicFaPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new cyclicFaPatchField(*this) - ); - } - //- Construct as copy setting internal field reference cyclicFaPatchField ( @@ -134,16 +125,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new cyclicFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchField.H b/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchField.H index f21c228ad6..de754592be 100644 --- a/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchField.H @@ -97,15 +97,6 @@ public: const emptyFaPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new emptyFaPatchField(*this) - ); - } - //- Construct as copy setting internal field reference emptyFaPatchField ( @@ -113,16 +104,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new emptyFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.H b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.H index 32bc5e91ad..06736b61b3 100644 --- a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.H @@ -137,15 +137,6 @@ public: //- Construct as copy processorFaPatchField(const processorFaPatchField&); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new processorFaPatchField(*this) - ); - } - //- Construct as copy setting internal field reference processorFaPatchField ( @@ -153,16 +144,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new processorFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faPatchFields/constraint/symmetry/symmetryFaPatchField.H b/src/finiteArea/fields/faPatchFields/constraint/symmetry/symmetryFaPatchField.H index 7233d56e89..e09d2aea51 100644 --- a/src/finiteArea/fields/faPatchFields/constraint/symmetry/symmetryFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/constraint/symmetry/symmetryFaPatchField.H @@ -97,15 +97,6 @@ public: const symmetryFaPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new symmetryFaPatchField(*this) - ); - } - //- Construct as copy setting internal field reference symmetryFaPatchField ( @@ -113,16 +104,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new symmetryFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } }; diff --git a/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchField.H b/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchField.H index f1933ec1ab..f417f28c40 100644 --- a/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchField.H @@ -91,15 +91,6 @@ public: const faPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new wedgeFaPatchField(*this) - ); - } - //- Construct as copy setting internal field reference wedgeFaPatchField ( @@ -107,16 +98,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new wedgeFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faPatchFields/derived/clampedPlate/clampedPlateFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/clampedPlate/clampedPlateFaPatchField.H index de365d612c..828937bb6c 100644 --- a/src/finiteArea/fields/faPatchFields/derived/clampedPlate/clampedPlateFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/derived/clampedPlate/clampedPlateFaPatchField.H @@ -115,15 +115,6 @@ public: const clampedPlateFaPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new clampedPlateFaPatchField(*this) - ); - } - //- Construct as copy setting internal field reference clampedPlateFaPatchField ( @@ -131,16 +122,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new clampedPlateFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faPatchFields/derived/edgeNormalFixedValue/edgeNormalFixedValueFaPatchVectorField.H b/src/finiteArea/fields/faPatchFields/derived/edgeNormalFixedValue/edgeNormalFixedValueFaPatchVectorField.H index dd4718cd35..8a6c8dffb9 100644 --- a/src/finiteArea/fields/faPatchFields/derived/edgeNormalFixedValue/edgeNormalFixedValueFaPatchVectorField.H +++ b/src/finiteArea/fields/faPatchFields/derived/edgeNormalFixedValue/edgeNormalFixedValueFaPatchVectorField.H @@ -113,15 +113,6 @@ public: const edgeNormalFixedValueFaPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new edgeNormalFixedValueFaPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference edgeNormalFixedValueFaPatchVectorField ( @@ -129,24 +120,22 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new edgeNormalFixedValueFaPatchVectorField - ( - *this, - iF - ) - ); + return faPatchField::Clone(*this, iF); } - // Member functions // Mapping functions diff --git a/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchField.H index d6b63c61c4..80b1522c26 100644 --- a/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchField.H @@ -96,15 +96,6 @@ public: const fixedValueOutflowFaPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new fixedValueOutflowFaPatchField(*this) - ); - } - //- Construct as copy setting internal field reference fixedValueOutflowFaPatchField ( @@ -112,16 +103,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new fixedValueOutflowFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faPatchFields/derived/ignore/ignoreFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/ignore/ignoreFaPatchField.H index 6d83692442..29a2d67a5f 100644 --- a/src/finiteArea/fields/faPatchFields/derived/ignore/ignoreFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/derived/ignore/ignoreFaPatchField.H @@ -114,15 +114,6 @@ public: const ignoreFaPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new ignoreFaPatchField(*this) - ); - } - //- Construct as copy setting internal field reference ignoreFaPatchField ( @@ -130,16 +121,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new ignoreFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchField.H index 88abbde9c8..02cb6831c7 100644 --- a/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchField.H @@ -136,15 +136,6 @@ public: const inletOutletFaPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new inletOutletFaPatchField(*this) - ); - } - //- Construct as copy setting internal field reference inletOutletFaPatchField ( @@ -152,16 +143,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new inletOutletFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faPatchFields/derived/outletInlet/outletInletFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/outletInlet/outletInletFaPatchField.H index 3b9187c63b..e46a1d25b2 100644 --- a/src/finiteArea/fields/faPatchFields/derived/outletInlet/outletInletFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/derived/outletInlet/outletInletFaPatchField.H @@ -135,15 +135,6 @@ public: const outletInletFaPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new outletInletFaPatchField(*this) - ); - } - //- Construct as copy setting internal field reference outletInletFaPatchField ( @@ -151,16 +142,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new outletInletFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faPatchFields/derived/slip/slipFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/slip/slipFaPatchField.H index f140258de0..32996ee384 100644 --- a/src/finiteArea/fields/faPatchFields/derived/slip/slipFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/derived/slip/slipFaPatchField.H @@ -97,15 +97,6 @@ public: const slipFaPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new slipFaPatchField(*this) - ); - } - //- Construct as copy setting internal field reference slipFaPatchField ( @@ -113,16 +104,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new slipFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchField.H index 70154cc728..1e56baf866 100644 --- a/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchField.H @@ -137,15 +137,6 @@ public: const timeVaryingUniformFixedValueFaPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new timeVaryingUniformFixedValueFaPatchField(*this) - ); - } - //- Construct as copy setting internal field reference timeVaryingUniformFixedValueFaPatchField ( @@ -153,16 +144,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new timeVaryingUniformFixedValueFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faPatchFields/derived/uniformFixedGradient/uniformFixedGradientFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/uniformFixedGradient/uniformFixedGradientFaPatchField.H index 7340d59a20..4c049d4f45 100644 --- a/src/finiteArea/fields/faPatchFields/derived/uniformFixedGradient/uniformFixedGradientFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/derived/uniformFixedGradient/uniformFixedGradientFaPatchField.H @@ -138,15 +138,6 @@ public: const uniformFixedGradientFaPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new uniformFixedGradientFaPatchField(*this) - ); - } - //- Construct as copy setting internal field reference uniformFixedGradientFaPatchField ( @@ -154,16 +145,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new uniformFixedGradientFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faPatchFields/derived/uniformFixedValue/uniformFixedValueFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/uniformFixedValue/uniformFixedValueFaPatchField.H index 4af170d7b8..3bb1027458 100644 --- a/src/finiteArea/fields/faPatchFields/derived/uniformFixedValue/uniformFixedValueFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/derived/uniformFixedValue/uniformFixedValueFaPatchField.H @@ -139,15 +139,6 @@ public: const uniformFixedValueFaPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new uniformFixedValueFaPatchField(*this) - ); - } - //- Construct as copy setting internal field reference uniformFixedValueFaPatchField ( @@ -155,16 +146,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new uniformFixedValueFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faPatchFields/derived/uniformMixed/uniformMixedFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/uniformMixed/uniformMixedFaPatchField.H index 620a16dbad..ab3182b3a4 100644 --- a/src/finiteArea/fields/faPatchFields/derived/uniformMixed/uniformMixedFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/derived/uniformMixed/uniformMixedFaPatchField.H @@ -160,15 +160,6 @@ public: const uniformMixedFaPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new uniformMixedFaPatchField(*this) - ); - } - //- Construct as copy setting internal field reference uniformMixedFaPatchField ( @@ -176,16 +167,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new uniformMixedFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.H b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.H index f2c438325b..e99ab8dae0 100644 --- a/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.H +++ b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.H @@ -393,23 +393,56 @@ public: const DimensionedField& ); - //- Construct and return a clone + //- Clone patch field with its own internal field reference virtual tmp> clone() const { - return tmp>(new faPatchField(*this)); + return tmp> + ( + new faPatchField(*this, this->internalField_) + ); } - //- Construct and return a clone setting internal field reference + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp>(new faPatchField(*this, iF)); + return tmp> + ( + new faPatchField(*this, iF) + ); } - // Selectors + // Factory Methods + + //- Clone a patch field with its own internal field reference + template + static tmp> Clone + ( + const DerivedPatchField& pf + ) + { + return tmp> + ( + new DerivedPatchField(pf) + ); + } + + //- Clone a patch field with an internal field reference + template + static tmp> Clone + ( + const DerivedPatchField& pf, + const DimensionedField& iF + ) + { + return tmp> + ( + new DerivedPatchField(pf, iF) + ); + } //- Return a pointer to a new patchField created on freestore given //- patch and internal field @@ -451,6 +484,13 @@ public: const dictionary& ); + //- Return a pointer to a new calculatedFaPatchField created on + //- freestore without setting patchField values + static tmp> NewCalculatedType + ( + const faPatch& p + ); + //- Return a pointer to a new calculatedFaPatchField created on //- freestore without setting patchField values template diff --git a/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchField.C b/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchField.C index 5fc16ad869..ad447c3321 100644 --- a/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchField.C +++ b/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchField.C @@ -90,20 +90,19 @@ Foam::calculatedFaePatchField::calculatedFaePatchField template -template Foam::tmp> Foam::faePatchField::NewCalculatedType ( - const faePatchField& pf + const faPatch& p ) { - auto* patchTypeCtor = patchConstructorTable(pf.patch().type()); + auto* patchTypeCtor = patchConstructorTable(p.type()); if (patchTypeCtor) { return patchTypeCtor ( - pf.patch(), + p, DimensionedField::null() ); } @@ -113,7 +112,7 @@ Foam::faePatchField::NewCalculatedType ( new calculatedFaePatchField ( - pf.patch(), + p, DimensionedField::null() ) ); @@ -121,6 +120,18 @@ Foam::faePatchField::NewCalculatedType } +template +template +Foam::tmp> +Foam::faePatchField::NewCalculatedType +( + const faePatchField& pf +) +{ + return NewCalculatedType(pf.patch()); +} + + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template diff --git a/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchField.H b/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchField.H index 723426ff2e..745414151c 100644 --- a/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchField.H +++ b/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchField.H @@ -94,15 +94,6 @@ public: //- Construct as copy calculatedFaePatchField(const calculatedFaePatchField&); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new calculatedFaePatchField(*this) - ); - } - //- Construct as copy setting internal field reference calculatedFaePatchField ( @@ -110,18 +101,22 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faePatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new calculatedFaePatchField(*this, iF) - ); + return faePatchField::Clone(*this, iF); } + //- Destructor virtual ~calculatedFaePatchField() = default; diff --git a/src/finiteArea/fields/faePatchFields/basic/coupled/coupledFaePatchField.H b/src/finiteArea/fields/faePatchFields/basic/coupled/coupledFaePatchField.H index 507cb9ad0f..4dcafedc41 100644 --- a/src/finiteArea/fields/faePatchFields/basic/coupled/coupledFaePatchField.H +++ b/src/finiteArea/fields/faePatchFields/basic/coupled/coupledFaePatchField.H @@ -106,9 +106,6 @@ public: const coupledFaePatchField& ); - //- Construct and return a clone - virtual tmp> clone() const = 0; - //- Construct as copy setting internal field reference coupledFaePatchField ( @@ -116,6 +113,9 @@ public: const DimensionedField& ); + //- Return clone + virtual tmp> clone() const = 0; + //- Construct and return a clone virtual tmp> clone ( diff --git a/src/finiteArea/fields/faePatchFields/basic/fixedValue/fixedValueFaePatchField.H b/src/finiteArea/fields/faePatchFields/basic/fixedValue/fixedValueFaePatchField.H index ae9585421c..b84e735304 100644 --- a/src/finiteArea/fields/faePatchFields/basic/fixedValue/fixedValueFaePatchField.H +++ b/src/finiteArea/fields/faePatchFields/basic/fixedValue/fixedValueFaePatchField.H @@ -106,15 +106,6 @@ public: const fixedValueFaePatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new fixedValueFaePatchField(*this) - ); - } - //- Construct as copy setting internal field reference fixedValueFaePatchField ( @@ -122,18 +113,22 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faePatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new fixedValueFaePatchField(*this, iF) - ); + return faePatchField::Clone(*this, iF); } + //- Destructor virtual ~fixedValueFaePatchField() = default; diff --git a/src/finiteArea/fields/faePatchFields/basic/sliced/slicedFaePatchField.C b/src/finiteArea/fields/faePatchFields/basic/sliced/slicedFaePatchField.C index 6ddf22fb42..fd746a305e 100644 --- a/src/finiteArea/fields/faePatchFields/basic/sliced/slicedFaePatchField.C +++ b/src/finiteArea/fields/faePatchFields/basic/sliced/slicedFaePatchField.C @@ -111,47 +111,14 @@ Foam::slicedFaePatchField::slicedFaePatchField } -template -Foam::tmp> -Foam::slicedFaePatchField::clone() const -{ - return tmp> - ( - new slicedFaePatchField(*this) - ); -} - - template Foam::slicedFaePatchField::slicedFaePatchField ( const slicedFaePatchField& ptf ) : - faePatchField - ( - ptf.patch(), - ptf.internalField(), - Field() - ) -{ - // Transfer the slice from the argument - UList::shallowCopy(ptf); -} - - -template -Foam::tmp> -Foam::slicedFaePatchField::clone -( - const DimensionedField& iF -) const -{ - return tmp> - ( - new slicedFaePatchField(*this, iF) - ); -} + slicedFaePatchField(ptf, ptf.internalField()) +{} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/finiteArea/fields/faePatchFields/basic/sliced/slicedFaePatchField.H b/src/finiteArea/fields/faePatchFields/basic/sliced/slicedFaePatchField.H index c56b7a9ffe..b7fb3fa912 100644 --- a/src/finiteArea/fields/faePatchFields/basic/sliced/slicedFaePatchField.H +++ b/src/finiteArea/fields/faePatchFields/basic/sliced/slicedFaePatchField.H @@ -109,9 +109,6 @@ public: //- Construct as copy slicedFaePatchField(const slicedFaePatchField&); - //- Construct and return a clone - virtual tmp> clone() const; - //- Construct as copy setting internal field reference slicedFaePatchField ( @@ -119,11 +116,20 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faePatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF - ) const; + ) const + { + return faePatchField::Clone(*this, iF); + } //- Destructor diff --git a/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchField.H b/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchField.H index 180033d5e7..3993605ab3 100644 --- a/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchField.H +++ b/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchField.H @@ -103,15 +103,6 @@ public: const cyclicFaePatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new cyclicFaePatchField(*this) - ); - } - //- Construct as copy setting internal field reference cyclicFaePatchField ( @@ -119,16 +110,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faePatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new cyclicFaePatchField(*this, iF) - ); + return faePatchField::Clone(*this, iF); } diff --git a/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchField.H b/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchField.H index a539268742..6c7004db9f 100644 --- a/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchField.H +++ b/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchField.H @@ -96,15 +96,6 @@ public: const emptyFaePatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new emptyFaePatchField(*this) - ); - } - //- Construct as copy setting internal field reference emptyFaePatchField ( @@ -112,18 +103,22 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faePatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new emptyFaePatchField(*this, iF) - ); + return faePatchField::Clone(*this, iF); } + //- Destructor virtual ~emptyFaePatchField() = default; diff --git a/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchField.H b/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchField.H index c8f9e6441f..78baf53156 100644 --- a/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchField.H +++ b/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchField.H @@ -106,15 +106,6 @@ public: //- Construct as copy processorFaePatchField(const processorFaePatchField&); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new processorFaePatchField(*this) - ); - } - //- Construct as copy setting internal field reference processorFaePatchField ( @@ -122,16 +113,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faePatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new processorFaePatchField(*this, iF) - ); + return faePatchField::Clone(*this, iF); } @@ -144,7 +138,7 @@ public: //- Return true if running parallel virtual bool coupled() const { - return Pstream::parRun(); + return UPstream::parRun(); } }; diff --git a/src/finiteArea/fields/faePatchFields/constraint/symmetry/symmetryFaePatchField.H b/src/finiteArea/fields/faePatchFields/constraint/symmetry/symmetryFaePatchField.H index f2f80db21a..08dd7ab39b 100644 --- a/src/finiteArea/fields/faePatchFields/constraint/symmetry/symmetryFaePatchField.H +++ b/src/finiteArea/fields/faePatchFields/constraint/symmetry/symmetryFaePatchField.H @@ -98,15 +98,6 @@ public: const symmetryFaePatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new symmetryFaePatchField(*this) - ); - } - //- Construct as copy setting internal field reference symmetryFaePatchField ( @@ -114,18 +105,22 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faePatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new symmetryFaePatchField(*this, iF) - ); + return faePatchField::Clone(*this, iF); } + //- Destructor virtual ~symmetryFaePatchField() = default; }; diff --git a/src/finiteArea/fields/faePatchFields/constraint/wedge/wedgeFaePatchField.H b/src/finiteArea/fields/faePatchFields/constraint/wedge/wedgeFaePatchField.H index 017e642643..f179b3e8de 100644 --- a/src/finiteArea/fields/faePatchFields/constraint/wedge/wedgeFaePatchField.H +++ b/src/finiteArea/fields/faePatchFields/constraint/wedge/wedgeFaePatchField.H @@ -95,15 +95,6 @@ public: const wedgeFaePatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new wedgeFaePatchField(*this) - ); - } - //- Construct as copy setting internal field reference wedgeFaePatchField ( @@ -111,16 +102,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faePatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new wedgeFaePatchField(*this, iF) - ); + return faePatchField::Clone(*this, iF); } }; diff --git a/src/finiteArea/fields/faePatchFields/faePatchField/faePatchField.H b/src/finiteArea/fields/faePatchFields/faePatchField/faePatchField.H index b484b702b5..96428b68fd 100644 --- a/src/finiteArea/fields/faePatchFields/faePatchField/faePatchField.H +++ b/src/finiteArea/fields/faePatchFields/faePatchField/faePatchField.H @@ -362,13 +362,16 @@ public: const DimensionedField& ); - //- Construct and return a clone + //- Clone patch field with its own internal field reference virtual tmp> clone() const { - return tmp>(new faePatchField(*this)); + return tmp> + ( + new faePatchField(*this, this->internalField_) + ); } - //- Construct and return a clone setting internal field reference + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF @@ -385,7 +388,21 @@ public: virtual ~faePatchField() = default; - // Selectors + // Factory Methods + + //- Clone a patch field, optionally with internal field reference etc. + template + static tmp> Clone + ( + const DerivedPatchField& pf, + Args&&... args + ) + { + return tmp> + ( + new DerivedPatchField(pf, std::forward(args)...) + ); + } //- Return a pointer to a new patchField created on freestore given // patch and internal field @@ -430,10 +447,17 @@ public: //- Return a pointer to a new calculatedFaePatchField created on // freestore without setting patchField values - template static tmp> NewCalculatedType ( - const faePatchField& + const faPatch& p + ); + + //- Return a pointer to a new calculatedFaePatchField created on + // freestore without setting patchField values + template + static tmp> NewCalculatedType + ( + const faePatchField& pf ); diff --git a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.H b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.H index 228a801ff7..ae77aee61a 100644 --- a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.H +++ b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.H @@ -143,15 +143,6 @@ public: const SRFFreestreamVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new SRFFreestreamVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference SRFFreestreamVelocityFvPatchVectorField ( @@ -159,16 +150,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new SRFFreestreamVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.H b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.H index 4b998a3fca..b5f8c50fa4 100644 --- a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.H +++ b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.H @@ -154,15 +154,6 @@ public: const SRFVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new SRFVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference SRFVelocityFvPatchVectorField ( @@ -170,16 +161,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new SRFVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFWallVelocityFvPatchVectorField/SRFWallVelocityFvPatchVectorField.H b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFWallVelocityFvPatchVectorField/SRFWallVelocityFvPatchVectorField.H index f5732855a5..95d3ad431a 100644 --- a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFWallVelocityFvPatchVectorField/SRFWallVelocityFvPatchVectorField.H +++ b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFWallVelocityFvPatchVectorField/SRFWallVelocityFvPatchVectorField.H @@ -129,15 +129,6 @@ public: const SRFWallVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new SRFWallVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference SRFWallVelocityFvPatchVectorField ( @@ -145,16 +136,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new SRFWallVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/expressions/fields/fvPatchFields/exprFixedValueFvPatchField.H b/src/finiteVolume/expressions/fields/fvPatchFields/exprFixedValueFvPatchField.H index 69395b5c62..2b2a407ac7 100644 --- a/src/finiteVolume/expressions/fields/fvPatchFields/exprFixedValueFvPatchField.H +++ b/src/finiteVolume/expressions/fields/fvPatchFields/exprFixedValueFvPatchField.H @@ -131,16 +131,6 @@ public: const exprFixedValueFvPatchField& ); - - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new exprFixedValueFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference exprFixedValueFvPatchField ( @@ -148,16 +138,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new exprFixedValueFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/expressions/fields/fvPatchFields/exprMixedFvPatchField.H b/src/finiteVolume/expressions/fields/fvPatchFields/exprMixedFvPatchField.H index 32bfa068db..938ce78d2b 100644 --- a/src/finiteVolume/expressions/fields/fvPatchFields/exprMixedFvPatchField.H +++ b/src/finiteVolume/expressions/fields/fvPatchFields/exprMixedFvPatchField.H @@ -135,15 +135,6 @@ public: const exprMixedFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new exprMixedFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference exprMixedFvPatchField ( @@ -151,16 +142,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new exprMixedFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/expressions/fields/pointPatchFields/exprValuePointPatchField.H b/src/finiteVolume/expressions/fields/pointPatchFields/exprValuePointPatchField.H index fa328a5428..59aed7e1c4 100644 --- a/src/finiteVolume/expressions/fields/pointPatchFields/exprValuePointPatchField.H +++ b/src/finiteVolume/expressions/fields/pointPatchFields/exprValuePointPatchField.H @@ -126,17 +126,10 @@ public: const exprValuePointPatchField& ); - - //- Construct and return a clone + //- Return a clone virtual autoPtr> clone() const { - return autoPtr> - ( - new exprValuePointPatchField - ( - *this - ) - ); + return pointPatchField::Clone(*this); } //- Construct and return a clone setting internal field reference @@ -145,14 +138,7 @@ public: const DimensionedField& iF ) const { - return autoPtr> - ( - new exprValuePointPatchField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H index bb730b23f5..33e2c8784e 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H @@ -93,15 +93,6 @@ public: const basicSymmetryFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new basicSymmetryFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference basicSymmetryFvPatchField ( @@ -109,16 +100,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new basicSymmetryFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C index 03e44871b4..8de6386d2a 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C @@ -121,10 +121,11 @@ Foam::fvPatchField::NewCalculatedType template -template -Foam::tmp> Foam::fvPatchField::NewCalculatedType +template +Foam::tmp> +Foam::fvPatchField::NewCalculatedType ( - const fvPatchField& pf + const fvPatchField& pf ) { return NewCalculatedType(pf.patch()); diff --git a/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.H index 59089a4b4d..ab2abde60d 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.H @@ -124,15 +124,6 @@ public: const calculatedFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new calculatedFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference calculatedFvPatchField ( @@ -140,16 +131,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new calculatedFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H index 2729af6a17..155a20cb7e 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H @@ -123,9 +123,6 @@ public: const coupledFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const = 0; - //- Construct as copy setting internal field reference coupledFvPatchField ( @@ -133,6 +130,9 @@ public: const DimensionedField& ); + //- Return a clone + virtual tmp> clone() const = 0; + //- Construct and return a clone virtual tmp> clone ( diff --git a/src/finiteVolume/fields/fvPatchFields/basic/directionMixed/directionMixedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/directionMixed/directionMixedFvPatchField.H index d56bc7113a..effa2031c7 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/directionMixed/directionMixedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/directionMixed/directionMixedFvPatchField.H @@ -101,15 +101,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new directionMixedFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference directionMixedFvPatchField ( @@ -117,16 +108,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new directionMixedFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.H index dad65d55ff..a18da2822a 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.H @@ -107,15 +107,6 @@ public: const extrapolatedCalculatedFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new extrapolatedCalculatedFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference extrapolatedCalculatedFvPatchField ( @@ -123,16 +114,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new extrapolatedCalculatedFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.H index 5d10c6a2a9..f80fadc4fe 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.H @@ -143,15 +143,6 @@ public: const fixedGradientFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new fixedGradientFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference fixedGradientFvPatchField ( @@ -159,16 +150,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new fixedGradientFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.H index d8c09c5717..1abd1eb2b3 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.H @@ -137,15 +137,6 @@ public: const fixedValueFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new fixedValueFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference fixedValueFvPatchField ( @@ -153,16 +144,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new fixedValueFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H index 7c43a6ca22..7d4f5518f7 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H @@ -168,15 +168,6 @@ public: const mixedFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new mixedFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference mixedFvPatchField ( @@ -184,16 +175,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new mixedFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.C index d886c4d8d3..a15239c2bb 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.C @@ -111,47 +111,14 @@ Foam::slicedFvPatchField::slicedFvPatchField } -template -Foam::tmp> -Foam::slicedFvPatchField::clone() const -{ - return tmp> - ( - new slicedFvPatchField(*this) - ); -} - - template Foam::slicedFvPatchField::slicedFvPatchField ( const slicedFvPatchField& ptf ) : - fvPatchField - ( - ptf.patch(), - ptf.internalField(), - Field() - ) -{ - // Transfer the slice from the argument - UList::shallowCopy(ptf); -} - - -template -Foam::tmp> -Foam::slicedFvPatchField::clone -( - const DimensionedField& iF -) const -{ - return tmp> - ( - new slicedFvPatchField(*this, iF) - ); -} + slicedFvPatchField(ptf, ptf.internalField()) +{} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // @@ -170,8 +137,7 @@ template Foam::tmp> Foam::slicedFvPatchField::snGrad() const { NotImplemented; - - return Field::null(); + return nullptr; } @@ -180,8 +146,7 @@ Foam::tmp> Foam::slicedFvPatchField::patchInternalField() const { NotImplemented; - - return Field::null(); + return nullptr; } @@ -200,8 +165,7 @@ Foam::slicedFvPatchField::patchNeighbourField ) const { NotImplemented; - - return Field::null(); + return nullptr; } @@ -210,8 +174,7 @@ Foam::tmp> Foam::slicedFvPatchField::patchNeighbourField() const { NotImplemented; - - return Field::null(); + return nullptr; } @@ -223,8 +186,7 @@ Foam::slicedFvPatchField::valueInternalCoeffs ) const { NotImplemented; - - return Field::null(); + return nullptr; } @@ -236,8 +198,7 @@ Foam::slicedFvPatchField::valueBoundaryCoeffs ) const { NotImplemented; - - return Field::null(); + return nullptr; } @@ -246,8 +207,7 @@ Foam::tmp> Foam::slicedFvPatchField::gradientInternalCoeffs() const { NotImplemented; - - return Field::null(); + return nullptr; } @@ -256,8 +216,7 @@ Foam::tmp> Foam::slicedFvPatchField::gradientBoundaryCoeffs() const { NotImplemented; - - return Field::null(); + return nullptr; } diff --git a/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.H index 6b7a51733e..cb2f0797ac 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.H @@ -115,9 +115,6 @@ public: //- Construct as copy slicedFvPatchField(const slicedFvPatchField&); - //- Construct and return a clone - virtual tmp> clone() const; - //- Construct as copy setting internal field reference slicedFvPatchField ( @@ -125,11 +122,20 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF - ) const; + ) const + { + return fvPatchField::Clone(*this, iF); + } //- Destructor diff --git a/src/finiteVolume/fields/fvPatchFields/basic/transform/transformFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/transform/transformFvPatchField.H index 89042ab751..0576d3ccce 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/transform/transformFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/transform/transformFvPatchField.H @@ -96,9 +96,6 @@ public: const transformFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const = 0; - //- Construct as copy setting internal field reference transformFvPatchField ( @@ -106,6 +103,9 @@ public: const DimensionedField& ); + //- Return a clone + virtual tmp> clone() const = 0; + //- Construct and return a clone setting internal field reference virtual tmp> clone ( diff --git a/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.H index 65d8582bc2..094fe5b625 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.H @@ -105,15 +105,6 @@ public: const zeroGradientFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new zeroGradientFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference zeroGradientFvPatchField ( @@ -121,16 +112,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new zeroGradientFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/calculatedProcessor/calculatedProcessorFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/calculatedProcessor/calculatedProcessorFvPatchField.H index ef6807119e..a01b26187b 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/calculatedProcessor/calculatedProcessorFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/calculatedProcessor/calculatedProcessorFvPatchField.H @@ -132,15 +132,6 @@ public: const calculatedProcessorFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new calculatedProcessorFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference calculatedProcessorFvPatchField ( @@ -148,16 +139,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new calculatedProcessorFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H index b2b3595ae5..7b265ce604 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H @@ -131,15 +131,6 @@ public: const cyclicFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new cyclicFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference cyclicFvPatchField ( @@ -147,16 +138,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new cyclicFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H index 1b2a9083ad..f79ce7aa64 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H @@ -180,15 +180,6 @@ public: //- Construct as copy cyclicACMIFvPatchField(const cyclicACMIFvPatchField&); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new cyclicACMIFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference cyclicACMIFvPatchField ( @@ -196,16 +187,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new cyclicACMIFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.H index 3b41ecc270..09fc3971b1 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.H @@ -200,15 +200,6 @@ public: //- Construct as copy cyclicAMIFvPatchField(const cyclicAMIFvPatchField&); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new cyclicAMIFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference cyclicAMIFvPatchField ( @@ -216,16 +207,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new cyclicAMIFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicSlip/cyclicSlipFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicSlip/cyclicSlipFvPatchField.H index b78bb1e67d..da0eb6fef0 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicSlip/cyclicSlipFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicSlip/cyclicSlipFvPatchField.H @@ -109,15 +109,6 @@ public: const cyclicSlipFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new cyclicSlipFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference cyclicSlipFvPatchField ( @@ -125,16 +116,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new cyclicSlipFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } }; diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/empty/emptyFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/empty/emptyFvPatchField.H index 6d97bc67ed..d86c9084cb 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/empty/emptyFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/empty/emptyFvPatchField.H @@ -107,15 +107,6 @@ public: const emptyFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new emptyFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference emptyFvPatchField ( @@ -123,16 +114,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new emptyFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.H index 21c42d36f0..9f325feb1b 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.H @@ -102,15 +102,6 @@ public: const nonuniformTransformCyclicFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new nonuniformTransformCyclicFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference nonuniformTransformCyclicFvPatchField ( @@ -118,18 +109,20 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new nonuniformTransformCyclicFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } - }; diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.H index 4bc96dadd4..08b110dc81 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.H @@ -145,15 +145,6 @@ public: //- Construct as copy processorFvPatchField(const processorFvPatchField&); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new processorFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference processorFvPatchField ( @@ -161,16 +152,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new processorFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.H index f8068ac40a..08e018d2cb 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.H @@ -122,15 +122,6 @@ public: //- Construct as copy processorCyclicFvPatchField(const processorCyclicFvPatchField&); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new processorCyclicFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference processorCyclicFvPatchField ( @@ -138,16 +129,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new processorCyclicFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/symmetry/symmetryFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/symmetry/symmetryFvPatchField.H index 7416fa0685..0727afe5f8 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/symmetry/symmetryFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/symmetry/symmetryFvPatchField.H @@ -108,15 +108,6 @@ public: const symmetryFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new symmetryFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference symmetryFvPatchField ( @@ -124,16 +115,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new symmetryFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } }; diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.H index fea87f176d..400112d67a 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.H @@ -114,15 +114,6 @@ public: const symmetryPlaneFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new symmetryPlaneFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference symmetryPlaneFvPatchField ( @@ -130,16 +121,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new symmetryPlaneFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.H index d51a2942b7..36c2252e7e 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.H @@ -109,15 +109,6 @@ public: const wedgeFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new wedgeFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference wedgeFvPatchField ( @@ -125,16 +116,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new wedgeFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/acousticWaveTransmissive/acousticWaveTransmissiveFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/acousticWaveTransmissive/acousticWaveTransmissiveFvPatchField.H index f0f31cfefb..2dc9d4592d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/acousticWaveTransmissive/acousticWaveTransmissiveFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/acousticWaveTransmissive/acousticWaveTransmissiveFvPatchField.H @@ -131,15 +131,6 @@ public: const acousticWaveTransmissiveFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new acousticWaveTransmissiveFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference acousticWaveTransmissiveFvPatchField ( @@ -147,16 +138,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new acousticWaveTransmissiveFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.H index 1390546190..675c182dfa 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.H @@ -187,15 +187,6 @@ public: const activeBaffleVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new activeBaffleVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference activeBaffleVelocityFvPatchVectorField ( @@ -203,16 +194,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new activeBaffleVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.H index 56663319a4..295aba0836 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.H @@ -200,15 +200,6 @@ public: const activePressureForceBaffleVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new activePressureForceBaffleVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference activePressureForceBaffleVelocityFvPatchVectorField ( @@ -216,20 +207,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new activePressureForceBaffleVelocityFvPatchVectorField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.H index 38be063ad4..4eadf0edfc 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.H @@ -154,15 +154,6 @@ public: const advectiveFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new advectiveFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference advectiveFvPatchField ( @@ -170,16 +161,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new advectiveFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.H index 0c747c5cb8..3cde2e1c53 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.H @@ -211,15 +211,6 @@ public: const codedFixedValueFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new codedFixedValueFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference codedFixedValueFvPatchField ( @@ -227,16 +218,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new codedFixedValueFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.H index 821b473d23..863bd67ffb 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.H @@ -215,15 +215,6 @@ public: const codedMixedFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new codedMixedFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference codedMixedFvPatchField ( @@ -231,16 +222,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new codedMixedFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.H index 401d3e1477..495472af4e 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.H @@ -147,15 +147,6 @@ public: const cylindricalInletVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new cylindricalInletVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference cylindricalInletVelocityFvPatchVectorField ( @@ -163,16 +154,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new cylindricalInletVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/electrostaticDeposition/electrostaticDepositionFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/electrostaticDeposition/electrostaticDepositionFvPatchScalarField.H index efda99389e..a0d8c5bf9c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/electrostaticDeposition/electrostaticDepositionFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/electrostaticDeposition/electrostaticDepositionFvPatchScalarField.H @@ -302,15 +302,6 @@ public: const electrostaticDepositionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new electrostaticDepositionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference electrostaticDepositionFvPatchScalarField ( @@ -318,16 +309,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new electrostaticDepositionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.H index 96a57d99f0..4a0fb21631 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.H @@ -196,15 +196,6 @@ public: const fanFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new fanFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference fanFvPatchField ( @@ -212,16 +203,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new fanFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fanPressure/fanPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/fanPressure/fanPressureFvPatchScalarField.H index a4707921bd..6c7fd4ebe7 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fanPressure/fanPressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fanPressure/fanPressureFvPatchScalarField.H @@ -200,15 +200,6 @@ public: const fanPressureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new fanPressureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference fanPressureFvPatchScalarField ( @@ -216,20 +207,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new fanPressureFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxExtrapolatedPressure/fixedFluxExtrapolatedPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxExtrapolatedPressure/fixedFluxExtrapolatedPressureFvPatchScalarField.H index 719b4ab426..121f4e763d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxExtrapolatedPressure/fixedFluxExtrapolatedPressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxExtrapolatedPressure/fixedFluxExtrapolatedPressureFvPatchScalarField.H @@ -108,15 +108,6 @@ public: const fixedFluxExtrapolatedPressureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new fixedFluxExtrapolatedPressureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference fixedFluxExtrapolatedPressureFvPatchScalarField ( @@ -124,16 +115,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new fixedFluxExtrapolatedPressureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } }; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.H index cddfa8aa34..1fae7a7f37 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.H @@ -117,15 +117,6 @@ public: const fixedFluxPressureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new fixedFluxPressureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference fixedFluxPressureFvPatchScalarField ( @@ -133,16 +124,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new fixedFluxPressureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedInternalValueFvPatchField/fixedInternalValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedInternalValueFvPatchField/fixedInternalValueFvPatchField.H index d36397c073..c5a7a2e1d2 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedInternalValueFvPatchField/fixedInternalValueFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedInternalValueFvPatchField/fixedInternalValueFvPatchField.H @@ -116,15 +116,6 @@ public: const fixedInternalValueFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new fixedInternalValueFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference fixedInternalValueFvPatchField ( @@ -132,16 +123,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new fixedInternalValueFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.H index ee758e5928..f9e340bbcc 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.H @@ -147,15 +147,6 @@ public: const fixedJumpFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new fixedJumpFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference fixedJumpFvPatchField ( @@ -163,16 +154,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new fixedJumpFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.H index d25ef22b01..a6656c937b 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.H @@ -133,15 +133,6 @@ public: const fixedJumpAMIFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new fixedJumpAMIFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference fixedJumpAMIFvPatchField ( @@ -149,16 +140,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new fixedJumpAMIFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedMean/fixedMeanFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedMean/fixedMeanFvPatchField.H index 855401aa13..5240397df9 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedMean/fixedMeanFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedMean/fixedMeanFvPatchField.H @@ -123,15 +123,6 @@ public: const fixedMeanFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new fixedMeanFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference fixedMeanFvPatchField ( @@ -139,16 +130,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new fixedMeanFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedMeanOutletInlet/fixedMeanOutletInletFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedMeanOutletInlet/fixedMeanOutletInletFvPatchField.H index 1be8a7d1cc..ae5b90eaac 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedMeanOutletInlet/fixedMeanOutletInletFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedMeanOutletInlet/fixedMeanOutletInletFvPatchField.H @@ -131,15 +131,6 @@ public: const fixedMeanOutletInletFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new fixedMeanOutletInletFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference fixedMeanOutletInletFvPatchField ( @@ -147,16 +138,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new fixedMeanOutletInletFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.H index 0ebb2f934e..ed03178de3 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.H @@ -159,15 +159,6 @@ public: const fixedNormalInletOutletVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new fixedNormalInletOutletVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference fixedNormalInletOutletVelocityFvPatchVectorField ( @@ -175,16 +166,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new fixedNormalInletOutletVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.H index d811f125f5..7fe1f59490 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.H @@ -147,15 +147,6 @@ public: const fixedNormalSlipFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new fixedNormalSlipFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference fixedNormalSlipFvPatchField ( @@ -163,16 +154,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new fixedNormalSlipFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedPressureCompressibleDensity/fixedPressureCompressibleDensityFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedPressureCompressibleDensity/fixedPressureCompressibleDensityFvPatchScalarField.H index 7ccabdb43c..e9c7cbcb46 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedPressureCompressibleDensity/fixedPressureCompressibleDensityFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedPressureCompressibleDensity/fixedPressureCompressibleDensityFvPatchScalarField.H @@ -138,15 +138,6 @@ public: const fixedPressureCompressibleDensityFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new fixedPressureCompressibleDensityFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference fixedPressureCompressibleDensityFvPatchScalarField ( @@ -154,20 +145,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new fixedPressureCompressibleDensityFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedProfile/fixedProfileFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedProfile/fixedProfileFvPatchField.H index 49a7e611a4..2093f34e67 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedProfile/fixedProfileFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedProfile/fixedProfileFvPatchField.H @@ -172,15 +172,6 @@ public: const fixedProfileFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new fixedProfileFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference fixedProfileFvPatchField ( @@ -188,16 +179,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new fixedProfileFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.H index b85605dd3f..e34a34d94d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.H @@ -182,15 +182,6 @@ public: const flowRateInletVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new flowRateInletVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference flowRateInletVelocityFvPatchVectorField ( @@ -198,16 +189,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new flowRateInletVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/flowRateOutletVelocity/flowRateOutletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/flowRateOutletVelocity/flowRateOutletVelocityFvPatchVectorField.H index 1e88968065..0a459a4ea6 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/flowRateOutletVelocity/flowRateOutletVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/flowRateOutletVelocity/flowRateOutletVelocityFvPatchVectorField.H @@ -173,15 +173,6 @@ public: const flowRateOutletVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new flowRateOutletVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference flowRateOutletVelocityFvPatchVectorField ( @@ -189,16 +180,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new flowRateOutletVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.H index 00eb4a1321..3756b435a7 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.H @@ -140,15 +140,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new fluxCorrectedVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference fluxCorrectedVelocityFvPatchVectorField ( @@ -156,16 +147,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new fluxCorrectedVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.H index 76f5707391..5f10812910 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.H @@ -146,15 +146,6 @@ public: const freestreamFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new freestreamFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference freestreamFvPatchField ( @@ -162,16 +153,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new freestreamFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.H index 1922113c0b..832380193d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.H @@ -128,15 +128,6 @@ public: const freestreamPressureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new freestreamPressureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference freestreamPressureFvPatchScalarField ( @@ -144,16 +135,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new freestreamPressureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/freestreamVelocity/freestreamVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/freestreamVelocity/freestreamVelocityFvPatchVectorField.H index aadeeb81c2..259a223027 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/freestreamVelocity/freestreamVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/freestreamVelocity/freestreamVelocityFvPatchVectorField.H @@ -122,15 +122,6 @@ public: const freestreamVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new freestreamVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference freestreamVelocityFvPatchVectorField ( @@ -138,16 +129,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new freestreamVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.H index fbf117c729..f33a7ffbe4 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.H @@ -135,15 +135,6 @@ public: const inletOutletFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new inletOutletFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference inletOutletFvPatchField ( @@ -151,16 +142,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new inletOutletFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.H index edeaff00c0..62e239cb73 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.H @@ -140,15 +140,6 @@ public: const inletOutletTotalTemperatureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new inletOutletTotalTemperatureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference inletOutletTotalTemperatureFvPatchScalarField ( @@ -156,16 +147,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new inletOutletTotalTemperatureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/interfaceCompression/interfaceCompressionFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/interfaceCompression/interfaceCompressionFvPatchScalarField.H index 485f5cdf90..e196f9618e 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/interfaceCompression/interfaceCompressionFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/interfaceCompression/interfaceCompressionFvPatchScalarField.H @@ -104,15 +104,6 @@ public: const interfaceCompressionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new interfaceCompressionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference interfaceCompressionFvPatchScalarField ( @@ -120,16 +111,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new interfaceCompressionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/interstitialInletVelocity/interstitialInletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/interstitialInletVelocity/interstitialInletVelocityFvPatchVectorField.H index 6deeb490ce..e1ff6e4beb 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/interstitialInletVelocity/interstitialInletVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/interstitialInletVelocity/interstitialInletVelocityFvPatchVectorField.H @@ -112,15 +112,6 @@ public: const interstitialInletVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new interstitialInletVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference interstitialInletVelocityFvPatchVectorField ( @@ -128,16 +119,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new interstitialInletVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedFieldFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedFieldFvPatchField.H index 72cae77cd4..ac9e129260 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedFieldFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedFieldFvPatchField.H @@ -158,18 +158,6 @@ public: const mappedFieldFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new mappedFieldFvPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference mappedFieldFvPatchField ( @@ -177,20 +165,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new mappedFieldFvPatchField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedMixedFieldFvPatchField/mappedMixedFieldFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedMixedFieldFvPatchField/mappedMixedFieldFvPatchField.H index 3b6ec90354..401f48c942 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedMixedFieldFvPatchField/mappedMixedFieldFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedMixedFieldFvPatchField/mappedMixedFieldFvPatchField.H @@ -152,18 +152,6 @@ public: const mappedMixedFieldFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new mappedMixedFieldFvPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference mappedMixedFieldFvPatchField ( @@ -171,20 +159,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new mappedMixedFieldFvPatchField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.H index f303e56317..925a4bc149 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.H @@ -127,15 +127,6 @@ public: const mappedFixedInternalValueFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new mappedFixedInternalValueFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference mappedFixedInternalValueFvPatchField ( @@ -143,16 +134,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new mappedFixedInternalValueFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedPushedInternalValue/mappedFixedPushedInternalValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedPushedInternalValue/mappedFixedPushedInternalValueFvPatchField.H index 12e2c1f77d..397c423905 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedPushedInternalValue/mappedFixedPushedInternalValueFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedPushedInternalValue/mappedFixedPushedInternalValueFvPatchField.H @@ -128,18 +128,6 @@ public: const mappedFixedPushedInternalValueFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new mappedFixedPushedInternalValueFvPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference mappedFixedPushedInternalValueFvPatchField ( @@ -147,20 +135,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new mappedFixedPushedInternalValueFvPatchField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedValue/mappedFixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedValue/mappedFixedValueFvPatchField.H index fdf0ce6f7b..b2ef9bd073 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedValue/mappedFixedValueFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedValue/mappedFixedValueFvPatchField.H @@ -142,15 +142,6 @@ public: const mappedFixedValueFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new mappedFixedValueFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference mappedFixedValueFvPatchField ( @@ -158,16 +149,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new mappedFixedValueFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedFlowRate/mappedFlowRateFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/mappedFlowRate/mappedFlowRateFvPatchVectorField.H index 3a3dad2722..daf5066f3c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/mappedFlowRate/mappedFlowRateFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedFlowRate/mappedFlowRateFvPatchVectorField.H @@ -133,15 +133,6 @@ public: const mappedFlowRateFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new mappedFlowRateFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference mappedFlowRateFvPatchVectorField ( @@ -149,22 +140,24 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new mappedFlowRateFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } // Member functions - //- Update the coefficients associated with the patch field virtual void updateCoeffs(); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedMixed/mappedMixedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/mappedMixed/mappedMixedFvPatchField.H index 3da0a9e034..d3ee964ed1 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/mappedMixed/mappedMixedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedMixed/mappedMixedFvPatchField.H @@ -150,18 +150,6 @@ public: const mappedMixedFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new mappedMixedFvPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference mappedMixedFvPatchField ( @@ -169,20 +157,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new mappedMixedFvPatchField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.H index 255dd6cb58..867d1032c7 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.H @@ -131,15 +131,6 @@ public: const mappedVelocityFluxFixedValueFvPatchField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new mappedVelocityFluxFixedValueFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference mappedVelocityFluxFixedValueFvPatchField ( @@ -147,16 +138,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new mappedVelocityFluxFixedValueFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/matchedFlowRateOutletVelocity/matchedFlowRateOutletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/matchedFlowRateOutletVelocity/matchedFlowRateOutletVelocityFvPatchVectorField.H index e1af7fb531..20ef53876e 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/matchedFlowRateOutletVelocity/matchedFlowRateOutletVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/matchedFlowRateOutletVelocity/matchedFlowRateOutletVelocityFvPatchVectorField.H @@ -141,15 +141,6 @@ public: const matchedFlowRateOutletVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new matchedFlowRateOutletVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference matchedFlowRateOutletVelocityFvPatchVectorField ( @@ -157,16 +148,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new matchedFlowRateOutletVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/movingWallVelocity/movingWallVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/movingWallVelocity/movingWallVelocityFvPatchVectorField.H index 9b5b05cd7e..7dca9f95e7 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/movingWallVelocity/movingWallVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/movingWallVelocity/movingWallVelocityFvPatchVectorField.H @@ -110,15 +110,6 @@ public: const movingWallVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new movingWallVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference movingWallVelocityFvPatchVectorField ( @@ -126,16 +117,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new movingWallVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/noSlip/noSlipFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/noSlip/noSlipFvPatchVectorField.H index faa7b11eb8..3590a2aeb9 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/noSlip/noSlipFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/noSlip/noSlipFvPatchVectorField.H @@ -107,15 +107,6 @@ public: const noSlipFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new noSlipFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference noSlipFvPatchVectorField ( @@ -123,16 +114,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new noSlipFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.H index 1f7e51e3c8..0996ffc75f 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.H @@ -135,15 +135,6 @@ public: const outletInletFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new outletInletFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference outletInletFvPatchField ( @@ -151,16 +142,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new outletInletFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/outletMappedUniformInlet/outletMappedUniformInletFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/outletMappedUniformInlet/outletMappedUniformInletFvPatchField.H index 53b98b9149..8a1f3a588b 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/outletMappedUniformInlet/outletMappedUniformInletFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/outletMappedUniformInlet/outletMappedUniformInletFvPatchField.H @@ -209,15 +209,6 @@ public: const outletMappedUniformInletFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new outletMappedUniformInletFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference outletMappedUniformInletFvPatchField ( @@ -225,16 +216,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new outletMappedUniformInletFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.H index ddb64980d5..ccc47baa74 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.H @@ -130,15 +130,6 @@ public: const outletPhaseMeanVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new outletPhaseMeanVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference outletPhaseMeanVelocityFvPatchVectorField ( @@ -146,20 +137,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new outletPhaseMeanVelocityFvPatchVectorField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H index c9b3f27834..eb5ed46922 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H @@ -135,15 +135,6 @@ public: const partialSlipFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new partialSlipFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference partialSlipFvPatchField ( @@ -151,16 +142,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new partialSlipFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.H index ca1f4c4d2d..948c0c4c0f 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.H @@ -155,15 +155,6 @@ public: const phaseHydrostaticPressureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new phaseHydrostaticPressureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference phaseHydrostaticPressureFvPatchScalarField ( @@ -171,16 +162,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new phaseHydrostaticPressureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.H index 0ca0a76e91..27a87d229c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.H @@ -219,15 +219,6 @@ public: const plenumPressureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new plenumPressureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference plenumPressureFvPatchScalarField ( @@ -235,16 +226,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new plenumPressureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.H index 85bf2b931d..00fd8eae9d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.H @@ -140,18 +140,6 @@ public: const pressureDirectedInletOutletVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new pressureDirectedInletOutletVelocityFvPatchVectorField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference pressureDirectedInletOutletVelocityFvPatchVectorField ( @@ -159,20 +147,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new pressureDirectedInletOutletVelocityFvPatchVectorField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletVelocity/pressureDirectedInletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletVelocity/pressureDirectedInletVelocityFvPatchVectorField.H index 080c250af7..fe3cae1316 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletVelocity/pressureDirectedInletVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletVelocity/pressureDirectedInletVelocityFvPatchVectorField.H @@ -139,15 +139,6 @@ public: const pressureDirectedInletVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new pressureDirectedInletVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference pressureDirectedInletVelocityFvPatchVectorField ( @@ -155,20 +146,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new pressureDirectedInletVelocityFvPatchVectorField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.H index f4f52f7c22..fff0d47336 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.H @@ -136,18 +136,6 @@ public: const pressureInletOutletParSlipVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new pressureInletOutletParSlipVelocityFvPatchVectorField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference pressureInletOutletParSlipVelocityFvPatchVectorField ( @@ -155,20 +143,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new pressureInletOutletParSlipVelocityFvPatchVectorField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.H index 766c68b026..d4acd6a0d8 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.H @@ -133,15 +133,6 @@ public: const pressureInletOutletVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new pressureInletOutletVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference pressureInletOutletVelocityFvPatchVectorField ( @@ -149,16 +140,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new pressureInletOutletVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletUniformVelocity/pressureInletUniformVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletUniformVelocity/pressureInletUniformVelocityFvPatchVectorField.H index e4af130ac2..96b8cd2ecb 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletUniformVelocity/pressureInletUniformVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletUniformVelocity/pressureInletUniformVelocityFvPatchVectorField.H @@ -108,15 +108,6 @@ public: const pressureInletUniformVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new pressureInletUniformVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference pressureInletUniformVelocityFvPatchVectorField ( @@ -124,16 +115,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new pressureInletUniformVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.H index 3db2a464eb..4f03a78572 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.H @@ -126,15 +126,6 @@ public: const pressureInletVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new pressureInletVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference pressureInletVelocityFvPatchVectorField ( @@ -142,16 +133,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new pressureInletVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.H index 1ea26624f3..54a0923c47 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.H @@ -135,18 +135,6 @@ public: const pressureNormalInletOutletVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new pressureNormalInletOutletVelocityFvPatchVectorField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference pressureNormalInletOutletVelocityFvPatchVectorField ( @@ -154,20 +142,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new pressureNormalInletOutletVelocityFvPatchVectorField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorField.H index c879dfcb14..bc019c970c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorField.H @@ -225,18 +225,6 @@ public: const pressurePIDControlInletVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new pressurePIDControlInletVelocityFvPatchVectorField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference pressurePIDControlInletVelocityFvPatchVectorField ( @@ -244,20 +232,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new pressurePIDControlInletVelocityFvPatchVectorField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressurePermeableAlphaInletOutletVelocity/pressurePermeableAlphaInletOutletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/pressurePermeableAlphaInletOutletVelocity/pressurePermeableAlphaInletOutletVelocityFvPatchVectorField.H index d09ab668d9..7b99e7752d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressurePermeableAlphaInletOutletVelocity/pressurePermeableAlphaInletOutletVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressurePermeableAlphaInletOutletVelocity/pressurePermeableAlphaInletOutletVelocityFvPatchVectorField.H @@ -156,18 +156,6 @@ public: const pressurePermeableAlphaInletOutletVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new pressurePermeableAlphaInletOutletVelocityFvPatchVectorField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference pressurePermeableAlphaInletOutletVelocityFvPatchVectorField ( @@ -175,20 +163,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new pressurePermeableAlphaInletOutletVelocityFvPatchVectorField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghPermeableAlphaTotalPressure/prghPermeableAlphaTotalPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/prghPermeableAlphaTotalPressure/prghPermeableAlphaTotalPressureFvPatchScalarField.H index ca4f952ceb..65bc81e11a 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/prghPermeableAlphaTotalPressure/prghPermeableAlphaTotalPressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/prghPermeableAlphaTotalPressure/prghPermeableAlphaTotalPressureFvPatchScalarField.H @@ -175,16 +175,6 @@ public: const prghPermeableAlphaTotalPressureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new - prghPermeableAlphaTotalPressureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference prghPermeableAlphaTotalPressureFvPatchScalarField ( @@ -192,21 +182,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new - prghPermeableAlphaTotalPressureFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.H index 257091063b..aff0983a27 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.H @@ -142,15 +142,6 @@ public: const prghPressureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new prghPressureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference prghPressureFvPatchScalarField ( @@ -158,16 +149,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new prghPressureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalHydrostaticPressure/prghTotalHydrostaticPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalHydrostaticPressure/prghTotalHydrostaticPressureFvPatchScalarField.H index e46cca0a0d..f1f468fd60 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalHydrostaticPressure/prghTotalHydrostaticPressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalHydrostaticPressure/prghTotalHydrostaticPressureFvPatchScalarField.H @@ -150,15 +150,6 @@ public: const prghTotalHydrostaticPressureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new prghTotalHydrostaticPressureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference prghTotalHydrostaticPressureFvPatchScalarField ( @@ -166,16 +157,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new prghTotalHydrostaticPressureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.H index 01d9755d12..e8b1ff1000 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.H @@ -153,15 +153,6 @@ public: const prghTotalPressureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new prghTotalPressureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference prghTotalPressureFvPatchScalarField ( @@ -169,16 +160,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new prghTotalPressureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.H index 1fa82f8fdf..89f0183fdf 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.H @@ -144,15 +144,6 @@ public: const rotatingPressureInletOutletVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new rotatingPressureInletOutletVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference rotatingPressureInletOutletVelocityFvPatchVectorField ( @@ -160,20 +151,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new rotatingPressureInletOutletVelocityFvPatchVectorField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/rotatingTotalPressure/rotatingTotalPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/rotatingTotalPressure/rotatingTotalPressureFvPatchScalarField.H index 15ca55838f..c0a0e7a088 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/rotatingTotalPressure/rotatingTotalPressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/rotatingTotalPressure/rotatingTotalPressureFvPatchScalarField.H @@ -136,15 +136,6 @@ public: const rotatingTotalPressureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new rotatingTotalPressureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference rotatingTotalPressureFvPatchScalarField ( @@ -152,16 +143,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new rotatingTotalPressureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/rotatingWallVelocity/rotatingWallVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/rotatingWallVelocity/rotatingWallVelocityFvPatchVectorField.H index 247dfa882b..2aa4597254 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/rotatingWallVelocity/rotatingWallVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/rotatingWallVelocity/rotatingWallVelocityFvPatchVectorField.H @@ -132,15 +132,6 @@ public: const rotatingWallVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new rotatingWallVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference rotatingWallVelocityFvPatchVectorField ( @@ -148,18 +139,20 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone - ( - const DimensionedField& iF - ) const + //- Return a clone + virtual tmp> clone() const { - return tmp - ( - new rotatingWallVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this); } + //- Clone with an internal field reference + virtual tmp> clone + ( + const DimensionedField& iF + ) const + { + return fvPatchField::Clone(*this, iF); + } // Member functions diff --git a/src/finiteVolume/fields/fvPatchFields/derived/scaledFixedValue/scaledFixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/scaledFixedValue/scaledFixedValueFvPatchField.H index 43c95445d2..bc8898d43d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/scaledFixedValue/scaledFixedValueFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/scaledFixedValue/scaledFixedValueFvPatchField.H @@ -138,15 +138,6 @@ public: //- Construct as copy scaledFixedValueFvPatchField(const scaledFixedValueFvPatchField&); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new scaledFixedValueFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference scaledFixedValueFvPatchField ( @@ -154,16 +145,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new scaledFixedValueFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/slip/slipFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/slip/slipFvPatchField.H index 952a0abba0..467dbae410 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/slip/slipFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/slip/slipFvPatchField.H @@ -104,15 +104,6 @@ public: const slipFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new slipFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference slipFvPatchField ( @@ -120,16 +111,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new slipFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.H index 65725e53fe..c19e260426 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.H @@ -153,15 +153,6 @@ public: const supersonicFreestreamFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new supersonicFreestreamFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference supersonicFreestreamFvPatchVectorField ( @@ -169,16 +160,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new supersonicFreestreamFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.H index 66fd1e5d34..e3f7711909 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.H @@ -130,15 +130,6 @@ public: const surfaceNormalFixedValueFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new surfaceNormalFixedValueFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference surfaceNormalFixedValueFvPatchVectorField ( @@ -146,20 +137,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new surfaceNormalFixedValueFvPatchVectorField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/swirlFanVelocity/swirlFanVelocityFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/swirlFanVelocity/swirlFanVelocityFvPatchField.H index 5f8ef1e830..b3b9c50867 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/swirlFanVelocity/swirlFanVelocityFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/swirlFanVelocity/swirlFanVelocityFvPatchField.H @@ -220,15 +220,6 @@ public: const swirlFanVelocityFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new swirlFanVelocityFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference swirlFanVelocityFvPatchField ( @@ -236,16 +227,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new swirlFanVelocityFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.H index 6ad4679298..bee6cb1822 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.H @@ -154,15 +154,6 @@ public: const swirlFlowRateInletVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new swirlFlowRateInletVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference swirlFlowRateInletVelocityFvPatchVectorField ( @@ -170,16 +161,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new swirlFlowRateInletVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/swirlInletVelocity/swirlInletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/swirlInletVelocity/swirlInletVelocityFvPatchVectorField.H index 6d7bec1320..b61afa01cc 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/swirlInletVelocity/swirlInletVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/swirlInletVelocity/swirlInletVelocityFvPatchVectorField.H @@ -147,15 +147,6 @@ public: const swirlInletVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new swirlInletVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference swirlInletVelocityFvPatchVectorField ( @@ -163,16 +154,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new swirlInletVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/syringePressure/syringePressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/syringePressure/syringePressureFvPatchScalarField.H index fe09ee3903..42ce5e7d03 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/syringePressure/syringePressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/syringePressure/syringePressureFvPatchScalarField.H @@ -180,15 +180,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new syringePressureFvPatchScalarField(*this) - ); - } - //- Construct as copy syringePressureFvPatchScalarField ( @@ -202,16 +193,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new syringePressureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.H index 5924157ad2..4b74e3dfce 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.H @@ -138,15 +138,6 @@ public: const timeVaryingMappedFixedValueFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new timeVaryingMappedFixedValueFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference timeVaryingMappedFixedValueFvPatchField ( @@ -154,16 +145,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new timeVaryingMappedFixedValueFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.H index 7803e42942..b62dfc4bb1 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.H @@ -199,15 +199,6 @@ public: const totalPressureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new totalPressureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference totalPressureFvPatchScalarField ( @@ -215,16 +206,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new totalPressureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.H index 87fa9cab6a..a74bba4a97 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.H @@ -135,15 +135,6 @@ public: const totalTemperatureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new totalTemperatureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference totalTemperatureFvPatchScalarField ( @@ -151,16 +142,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new totalTemperatureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/translatingWallVelocity/translatingWallVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/translatingWallVelocity/translatingWallVelocityFvPatchVectorField.H index 3a481a799d..0d64f42ee4 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/translatingWallVelocity/translatingWallVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/translatingWallVelocity/translatingWallVelocityFvPatchVectorField.H @@ -124,15 +124,6 @@ public: const translatingWallVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new translatingWallVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference translatingWallVelocityFvPatchVectorField ( @@ -140,16 +131,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( - const DimensionedField& iF + const DimensionedField& iF ) const { - return tmp - ( - new translatingWallVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.H index 25a6c57105..862684eb1e 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.H @@ -326,15 +326,6 @@ public: const turbulentDFSEMInletFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new turbulentDFSEMInletFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference turbulentDFSEMInletFvPatchVectorField ( @@ -342,16 +333,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new turbulentDFSEMInletFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDigitalFilterInlet/turbulentDigitalFilterInletFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDigitalFilterInlet/turbulentDigitalFilterInletFvPatchField.H index 683968c256..a45207389a 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDigitalFilterInlet/turbulentDigitalFilterInletFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDigitalFilterInlet/turbulentDigitalFilterInletFvPatchField.H @@ -299,15 +299,6 @@ public: const turbulentDigitalFilterInletFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new turbulentDigitalFilterInletFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference turbulentDigitalFilterInletFvPatchField ( @@ -315,16 +306,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new turbulentDigitalFilterInletFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.H index 9119b7e2db..06214fcbf1 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.H @@ -176,15 +176,6 @@ public: const turbulentInletFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new turbulentInletFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference turbulentInletFvPatchField ( @@ -192,16 +183,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new turbulentInletFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.H index c9a0c14967..29f4c23c8b 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.H @@ -141,18 +141,6 @@ public: const turbulentIntensityKineticEnergyInletFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new turbulentIntensityKineticEnergyInletFvPatchScalarField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference turbulentIntensityKineticEnergyInletFvPatchScalarField ( @@ -160,20 +148,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new turbulentIntensityKineticEnergyInletFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.H index a4d53e3748..7671f1dbac 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.H @@ -140,15 +140,6 @@ public: const uniformDensityHydrostaticPressureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new uniformDensityHydrostaticPressureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference uniformDensityHydrostaticPressureFvPatchScalarField ( @@ -156,20 +147,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new uniformDensityHydrostaticPressureFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.H index 8b0cb4129b..648b421e0b 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.H @@ -140,15 +140,6 @@ public: const uniformFixedGradientFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new uniformFixedGradientFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference uniformFixedGradientFvPatchField ( @@ -156,16 +147,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new uniformFixedGradientFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.H index 68e8e90021..fddecf96db 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.H @@ -140,15 +140,6 @@ public: const uniformFixedValueFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new uniformFixedValueFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference uniformFixedValueFvPatchField ( @@ -156,16 +147,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new uniformFixedValueFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.H index fc2bca0339..f100fed3b6 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.H @@ -138,15 +138,6 @@ public: const uniformInletOutletFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new uniformInletOutletFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference uniformInletOutletFvPatchField ( @@ -154,16 +145,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new uniformInletOutletFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.H index f54cc9139c..09be775aed 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.H @@ -137,15 +137,6 @@ public: const uniformJumpFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new uniformJumpFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference uniformJumpFvPatchField ( @@ -153,16 +144,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new uniformJumpFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.H index 13f3cf4c27..f986f2e17f 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.H @@ -136,15 +136,6 @@ public: const uniformJumpAMIFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new uniformJumpAMIFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference uniformJumpAMIFvPatchField ( @@ -152,16 +143,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new uniformJumpAMIFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformMixed/uniformMixedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/uniformMixed/uniformMixedFvPatchField.H index 9d1bdd8954..f3533c0da7 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformMixed/uniformMixedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformMixed/uniformMixedFvPatchField.H @@ -163,15 +163,6 @@ public: const uniformMixedFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new uniformMixedFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference uniformMixedFvPatchField ( @@ -179,16 +170,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new uniformMixedFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformNormalFixedValue/uniformNormalFixedValueFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/uniformNormalFixedValue/uniformNormalFixedValueFvPatchVectorField.H index 2600e37a0c..2cc2a43b3d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformNormalFixedValue/uniformNormalFixedValueFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformNormalFixedValue/uniformNormalFixedValueFvPatchVectorField.H @@ -133,15 +133,6 @@ public: const uniformNormalFixedValueFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new uniformNormalFixedValueFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference uniformNormalFixedValueFvPatchVectorField ( @@ -149,20 +140,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new uniformNormalFixedValueFvPatchVectorField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.H index ef1fd0578d..ed5696a1f3 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.H @@ -145,15 +145,6 @@ public: const uniformTotalPressureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new uniformTotalPressureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference uniformTotalPressureFvPatchScalarField ( @@ -161,16 +152,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new uniformTotalPressureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.H index b127f9f94e..3e52da8949 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.H @@ -139,15 +139,6 @@ public: const variableHeightFlowRateFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new variableHeightFlowRateFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference variableHeightFlowRateFvPatchScalarField ( @@ -155,16 +146,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new variableHeightFlowRateFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.H index ef71bf6ca3..39f3a95cc4 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.H @@ -138,15 +138,6 @@ public: const variableHeightFlowRateInletVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new variableHeightFlowRateInletVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference variableHeightFlowRateInletVelocityFvPatchVectorField ( @@ -154,20 +145,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new variableHeightFlowRateInletVelocityFvPatchVectorField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.H index 4140db8be0..521cc7dc58 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.H @@ -165,15 +165,6 @@ public: const waveSurfacePressureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new waveSurfacePressureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference waveSurfacePressureFvPatchScalarField ( @@ -181,16 +172,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new waveSurfacePressureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.H index 94862dabe9..37330328c1 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.H @@ -146,15 +146,6 @@ public: const waveTransmissiveFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new waveTransmissiveFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference waveTransmissiveFvPatchField ( @@ -162,16 +153,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new waveTransmissiveFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H index 1d993b178b..9056467691 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H @@ -459,23 +459,43 @@ public: const DimensionedField& ); - //- Construct and return a clone + //- Clone patch field with its own internal field reference virtual tmp> clone() const { - return tmp>::New(*this); + return tmp> + ( + new fvPatchField(*this, this->internalField_) + ); } - //- Construct and return a clone setting internal field reference + //- Clone patch field with given internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp>::New(*this, iF); + return tmp> + ( + new fvPatchField(*this, iF) + ); } - // Selectors + // Factory Methods + + //- Clone a patch field, optionally with internal field reference etc. + template + static tmp> Clone + ( + const DerivedPatchField& pf, + Args&&... args + ) + { + return tmp> + ( + new DerivedPatchField(pf, std::forward(args)...) + ); + } //- Return a pointer to a new patchField created on freestore given // patch and internal field @@ -522,15 +542,15 @@ public: // freestore without setting patchField values static tmp> NewCalculatedType ( - const fvPatch& + const fvPatch& p ); //- Return a pointer to a new calculatedFvPatchField created on // freestore without setting patchField values - template + template static tmp> NewCalculatedType ( - const fvPatchField& + const fvPatchField& pf ); diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C index 443ab350aa..ed1536312c 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C @@ -120,11 +120,11 @@ Foam::fvsPatchField::NewCalculatedType template -template +template Foam::tmp> Foam::fvsPatchField::NewCalculatedType ( - const fvsPatchField& pf + const fvsPatchField& pf ) { return NewCalculatedType(pf.patch()); diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.H index 56982775be..bd8b64db01 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.H @@ -91,15 +91,6 @@ public: const calculatedFvsPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new calculatedFvsPatchField(*this) - ); - } - //- Construct as copy setting internal field reference calculatedFvsPatchField ( @@ -107,16 +98,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return fvsPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new calculatedFvsPatchField(*this, iF) - ); + return fvsPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.H index e1eaf8355f..221630943f 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.H @@ -101,9 +101,6 @@ public: const coupledFvsPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const = 0; - //- Construct as copy setting internal field reference coupledFvsPatchField ( @@ -111,6 +108,9 @@ public: const DimensionedField& ); + //- Return clone + virtual tmp> clone() const = 0; + //- Construct and return a clone virtual tmp> clone ( diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.H index 463444a94d..ab5ec9dc42 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.H @@ -100,32 +100,25 @@ public: const fixedValueFvsPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new fixedValueFvsPatchField(*this) - ); - } - - //- Construct as copy setting internal field reference fixedValueFvsPatchField ( const fixedValueFvsPatchField&, const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return fvsPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new fixedValueFvsPatchField(*this, iF) - ); + return fvsPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.C index 239814c185..08179b72e8 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.C @@ -111,47 +111,14 @@ Foam::slicedFvsPatchField::slicedFvsPatchField } -template -Foam::tmp> -Foam::slicedFvsPatchField::clone() const -{ - return tmp> - ( - new slicedFvsPatchField(*this) - ); -} - - template Foam::slicedFvsPatchField::slicedFvsPatchField ( const slicedFvsPatchField& ptf ) : - fvsPatchField - ( - ptf.patch(), - ptf.internalField(), - Field() - ) -{ - // Transfer the slice from the argument - UList::shallowCopy(ptf); -} - - -template -Foam::tmp> -Foam::slicedFvsPatchField::clone -( - const DimensionedField& iF -) const -{ - return tmp> - ( - new slicedFvsPatchField(*this, iF) - ); -} + slicedFvsPatchField(ptf, ptf.internalField()) +{} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.H index 64aeaeb486..42c92679d9 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.H @@ -109,9 +109,6 @@ public: //- Construct as copy slicedFvsPatchField(const slicedFvsPatchField&); - //- Construct and return a clone - virtual tmp> clone() const; - //- Construct as copy setting internal field reference slicedFvsPatchField ( @@ -119,11 +116,20 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return fvsPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF - ) const; + ) const + { + return fvsPatchField::Clone(*this, iF); + } //- Destructor diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclic/cyclicFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclic/cyclicFvsPatchField.H index 7da4cccf0c..c609d02df9 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclic/cyclicFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclic/cyclicFvsPatchField.H @@ -98,15 +98,6 @@ public: const cyclicFvsPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new cyclicFvsPatchField(*this) - ); - } - //- Construct as copy setting internal field reference cyclicFvsPatchField ( @@ -114,16 +105,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return fvsPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new cyclicFvsPatchField(*this, iF) - ); + return fvsPatchField::Clone(*this, iF); } }; diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.H index dbb056325b..da9480eb7f 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.H @@ -98,15 +98,6 @@ public: const cyclicACMIFvsPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new cyclicACMIFvsPatchField(*this) - ); - } - //- Construct as copy setting internal field reference cyclicACMIFvsPatchField ( @@ -114,24 +105,26 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return fvsPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new cyclicACMIFvsPatchField(*this, iF) - ); + return fvsPatchField::Clone(*this, iF); } - // Member functions - // Access + // Member Functions - //- Return true if running parallel - virtual bool coupled() const; + //- Return true if running parallel + virtual bool coupled() const; }; diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchField.H index 4846360f89..2550303c73 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchField.H @@ -98,15 +98,6 @@ public: const cyclicAMIFvsPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new cyclicAMIFvsPatchField(*this) - ); - } - //- Construct as copy setting internal field reference cyclicAMIFvsPatchField ( @@ -114,25 +105,26 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return fvsPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new cyclicAMIFvsPatchField(*this, iF) - ); + return fvsPatchField::Clone(*this, iF); } - // Member functions - // Access - - //- Return true if running parallel - virtual bool coupled() const; + // Member Functions + //- Return true if running parallel + virtual bool coupled() const; }; diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicSlip/cyclicSlipFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicSlip/cyclicSlipFvsPatchField.H index 45da7b0fd7..09833a088e 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicSlip/cyclicSlipFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicSlip/cyclicSlipFvsPatchField.H @@ -93,15 +93,6 @@ public: const cyclicSlipFvsPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new cyclicSlipFvsPatchField(*this) - ); - } - //- Construct as copy setting internal field reference cyclicSlipFvsPatchField ( @@ -109,16 +100,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return fvsPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new cyclicSlipFvsPatchField(*this, iF) - ); + return fvsPatchField::Clone(*this, iF); } }; diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/empty/emptyFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/empty/emptyFvsPatchField.H index 1d96c1c568..7641321852 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/empty/emptyFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/empty/emptyFvsPatchField.H @@ -92,15 +92,6 @@ public: const emptyFvsPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new emptyFvsPatchField(*this) - ); - } - //- Construct as copy setting internal field reference emptyFvsPatchField ( @@ -108,16 +99,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return fvsPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new emptyFvsPatchField(*this, iF) - ); + return fvsPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchField.H index dce9f785da..6f5fdd7d71 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchField.H @@ -94,15 +94,6 @@ public: const nonuniformTransformCyclicFvsPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new nonuniformTransformCyclicFvsPatchField(*this) - ); - } - //- Construct as copy setting internal field reference nonuniformTransformCyclicFvsPatchField ( @@ -110,16 +101,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return fvsPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new nonuniformTransformCyclicFvsPatchField(*this, iF) - ); + return fvsPatchField::Clone(*this, iF); } }; diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.H index 481d1aac6a..dd96291ee6 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.H @@ -103,15 +103,6 @@ public: //- Construct as copy processorFvsPatchField(const processorFvsPatchField&); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new processorFvsPatchField(*this) - ); - } - //- Construct as copy setting internal field reference processorFvsPatchField ( @@ -119,16 +110,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return fvsPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new processorFvsPatchField(*this, iF) - ); + return fvsPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.H index 59c762dfb1..4368b03621 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.H @@ -104,15 +104,6 @@ public: //- Construct as copy processorCyclicFvsPatchField(const processorCyclicFvsPatchField&); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new processorCyclicFvsPatchField(*this) - ); - } - //- Construct as copy setting internal field reference processorCyclicFvsPatchField ( @@ -120,16 +111,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return fvsPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new processorCyclicFvsPatchField(*this, iF) - ); + return fvsPatchField::Clone(*this, iF); } diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.H index 9b97484efe..4fa95f9680 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.H @@ -93,15 +93,6 @@ public: const symmetryFvsPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new symmetryFvsPatchField(*this) - ); - } - //- Construct as copy setting internal field reference symmetryFvsPatchField ( @@ -109,16 +100,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return fvsPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new symmetryFvsPatchField(*this, iF) - ); + return fvsPatchField::Clone(*this, iF); } }; diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.H index 54abdbfbd2..cf3f253e05 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.H @@ -94,15 +94,6 @@ public: const symmetryPlaneFvsPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new symmetryPlaneFvsPatchField(*this) - ); - } - //- Construct as copy setting internal field reference symmetryPlaneFvsPatchField ( @@ -110,16 +101,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return fvsPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new symmetryPlaneFvsPatchField(*this, iF) - ); + return fvsPatchField::Clone(*this, iF); } }; diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.H index 861dfc45a1..9c5ce9eb72 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.H @@ -93,15 +93,6 @@ public: const wedgeFvsPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new wedgeFvsPatchField(*this) - ); - } - //- Construct as copy setting internal field reference wedgeFvsPatchField ( @@ -109,16 +100,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return fvsPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new wedgeFvsPatchField(*this, iF) - ); + return fvsPatchField::Clone(*this, iF); } }; diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H index d4b9ff1c18..26f2f4beb5 100644 --- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H @@ -372,23 +372,43 @@ public: const DimensionedField& ); - //- Construct and return a clone + //- Clone patch field with its own internal field reference virtual tmp> clone() const { - return tmp>::New(*this); + return tmp> + ( + new fvsPatchField(*this, this->internalField_) + ); } - //- Construct and return a clone setting internal field reference + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp>::New(*this, iF); + return tmp> + ( + new fvsPatchField(*this, iF) + ); } - // Selectors + // Factory Methods + + //- Clone a patch field, optionally with internal field reference etc. + template + static tmp> Clone + ( + const DerivedPatchField& pf, + Args&&... args + ) + { + return tmp> + ( + new DerivedPatchField(pf, std::forward(args)...) + ); + } //- Return a pointer to a new patchField created on freestore given // patch and internal field @@ -435,15 +455,15 @@ public: // freestore without setting patchField values static tmp> NewCalculatedType ( - const fvPatch& + const fvPatch& p ); //- Return a pointer to a new calculatedFvsPatchField created on // freestore without setting patchField values - template + template static tmp> NewCalculatedType ( - const fvsPatchField& + const fvsPatchField& pf ); diff --git a/src/functionObjects/field/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchField.H b/src/functionObjects/field/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchField.H index bfe1071a3b..090cc3f8fd 100644 --- a/src/functionObjects/field/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchField.H +++ b/src/functionObjects/field/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchField.H @@ -118,15 +118,6 @@ public: const externalCoupledMixedFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new externalCoupledMixedFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference externalCoupledMixedFvPatchField ( @@ -134,16 +125,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new externalCoupledMixedFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/functionObjects/field/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H b/src/functionObjects/field/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H index c82d23b4db..55dbcd2bc9 100644 --- a/src/functionObjects/field/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H +++ b/src/functionObjects/field/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H @@ -205,15 +205,6 @@ public: const externalCoupledTemperatureMixedFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new externalCoupledTemperatureMixedFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference externalCoupledTemperatureMixedFvPatchScalarField ( @@ -221,20 +212,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new externalCoupledTemperatureMixedFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/fvMotionSolver/fvPatchFields/derived/cellMotion/cellMotionFvPatchField.H b/src/fvMotionSolver/fvPatchFields/derived/cellMotion/cellMotionFvPatchField.H index 17ef20543a..b175af60ee 100644 --- a/src/fvMotionSolver/fvPatchFields/derived/cellMotion/cellMotionFvPatchField.H +++ b/src/fvMotionSolver/fvPatchFields/derived/cellMotion/cellMotionFvPatchField.H @@ -94,15 +94,6 @@ public: const cellMotionFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new cellMotionFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference cellMotionFvPatchField ( @@ -110,16 +101,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new cellMotionFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/fvMotionSolver/fvPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementFvPatchField.H b/src/fvMotionSolver/fvPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementFvPatchField.H index b94b01d537..4afd37a988 100644 --- a/src/fvMotionSolver/fvPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementFvPatchField.H +++ b/src/fvMotionSolver/fvPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementFvPatchField.H @@ -108,15 +108,6 @@ public: slipFvPatchField(ptf) {} - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new surfaceSlipDisplacementFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference surfaceSlipDisplacementFvPatchField ( @@ -127,18 +118,22 @@ public: slipFvPatchField(ptf, iF) {} - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new surfaceSlipDisplacementFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } + virtual void write(Ostream& os) const { slipFvPatchField::write(os); diff --git a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.H b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.H index fe7841d377..47bd75de50 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.H +++ b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.H @@ -95,18 +95,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new angularOscillatingDisplacementPointPatchVectorField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference angularOscillatingDisplacementPointPatchVectorField ( @@ -114,20 +102,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new angularOscillatingDisplacementPointPatchVectorField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.H b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.H index b73fab2a6d..cb5b72d83a 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.H +++ b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.H @@ -95,18 +95,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new angularOscillatingVelocityPointPatchVectorField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference angularOscillatingVelocityPointPatchVectorField ( @@ -114,20 +102,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new angularOscillatingVelocityPointPatchVectorField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.H b/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.H index f77cec2353..c3865b1dc1 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.H +++ b/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.H @@ -90,18 +90,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new oscillatingDisplacementPointPatchVectorField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference oscillatingDisplacementPointPatchVectorField ( @@ -109,20 +97,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new oscillatingDisplacementPointPatchVectorField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.H b/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.H index bacd84bc1e..ca9628e2ac 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.H +++ b/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.H @@ -92,18 +92,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new oscillatingVelocityPointPatchVectorField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference oscillatingVelocityPointPatchVectorField ( @@ -111,20 +99,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new oscillatingVelocityPointPatchVectorField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.H b/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.H index 0c39ddc7d2..7e78583f80 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.H +++ b/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.H @@ -169,18 +169,6 @@ public: const surfaceDisplacementPointPatchVectorField& ); - //- Construct and return a clone - virtual autoPtr clone() const - { - return autoPtr - ( - new surfaceDisplacementPointPatchVectorField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference surfaceDisplacementPointPatchVectorField ( @@ -188,22 +176,22 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference - virtual autoPtr clone + virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr - ( - new surfaceDisplacementPointPatchVectorField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } + // Member Functions //- Surface to follow. Demand loads surfaceNames. diff --git a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.H b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.H index 2a46c18454..8fa5889ebe 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.H +++ b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.H @@ -159,18 +159,6 @@ public: const surfaceSlipDisplacementPointPatchVectorField& ); - //- Construct and return a clone - virtual autoPtr clone() const - { - return autoPtr - ( - new surfaceSlipDisplacementPointPatchVectorField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference surfaceSlipDisplacementPointPatchVectorField ( @@ -178,22 +166,22 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference - virtual autoPtr clone + virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr - ( - new surfaceSlipDisplacementPointPatchVectorField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } + // Member Functions //- Surface to follow. Demand loads surfaceNames. diff --git a/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.H b/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.H index 2dedce3d91..18804b5fc0 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.H +++ b/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.H @@ -161,15 +161,6 @@ public: const timeVaryingMappedFixedValuePointPatchField& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new timeVaryingMappedFixedValuePointPatchField(*this) - ); - } - //- Construct as copy setting internal field reference timeVaryingMappedFixedValuePointPatchField ( @@ -177,16 +168,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new timeVaryingMappedFixedValuePointPatchField(*this, iF) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/fvMotionSolver/pointPatchFields/derived/uniformInterpolatedDisplacement/uniformInterpolatedDisplacementPointPatchVectorField.H b/src/fvMotionSolver/pointPatchFields/derived/uniformInterpolatedDisplacement/uniformInterpolatedDisplacementPointPatchVectorField.H index e8105cd39d..d591e49894 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/uniformInterpolatedDisplacement/uniformInterpolatedDisplacementPointPatchVectorField.H +++ b/src/fvMotionSolver/pointPatchFields/derived/uniformInterpolatedDisplacement/uniformInterpolatedDisplacementPointPatchVectorField.H @@ -129,18 +129,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new uniformInterpolatedDisplacementPointPatchVectorField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference uniformInterpolatedDisplacementPointPatchVectorField ( @@ -148,20 +136,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new uniformInterpolatedDisplacementPointPatchVectorField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.H b/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.H index 284ad8e84c..7449a20367 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.H +++ b/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.H @@ -91,18 +91,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new waveDisplacementPointPatchVectorField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference waveDisplacementPointPatchVectorField ( @@ -110,20 +98,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new waveDisplacementPointPatchVectorField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/genericPatchFields/genericFaPatchField/genericFaPatchField.H b/src/genericPatchFields/genericFaPatchField/genericFaPatchField.H index 7ad03942e7..49d24ad289 100644 --- a/src/genericPatchFields/genericFaPatchField/genericFaPatchField.H +++ b/src/genericPatchFields/genericFaPatchField/genericFaPatchField.H @@ -97,15 +97,6 @@ public: const faPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new genericFaPatchField(*this) - ); - } - //- Default construct genericFaPatchField(const genericFaPatchField&) = default; @@ -116,16 +107,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new genericFaPatchField(*this, iF) - ); + return faPatchField::Clone(*this, iF); } diff --git a/src/genericPatchFields/genericFaePatchField/genericFaePatchField.H b/src/genericPatchFields/genericFaePatchField/genericFaePatchField.H index 48c6cc59ce..d02442f483 100644 --- a/src/genericPatchFields/genericFaePatchField/genericFaePatchField.H +++ b/src/genericPatchFields/genericFaePatchField/genericFaePatchField.H @@ -99,15 +99,6 @@ public: //- Default copy construct genericFaePatchField(const genericFaePatchField&) = default; - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new genericFaePatchField(*this) - ); - } - //- Construct as copy setting internal field reference genericFaePatchField ( @@ -115,16 +106,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return faePatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new genericFaePatchField(*this, iF) - ); + return faePatchField::Clone(*this, iF); } diff --git a/src/genericPatchFields/genericFvPatchField/genericFvPatchField.H b/src/genericPatchFields/genericFvPatchField/genericFvPatchField.H index f74273dcee..59a55e2570 100644 --- a/src/genericPatchFields/genericFvPatchField/genericFvPatchField.H +++ b/src/genericPatchFields/genericFvPatchField/genericFvPatchField.H @@ -97,15 +97,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new genericFvPatchField(*this) - ); - } - //- Default copy construct genericFvPatchField(const genericFvPatchField&) = default; @@ -116,16 +107,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new genericFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/genericPatchFields/genericFvsPatchField/genericFvsPatchField.H b/src/genericPatchFields/genericFvsPatchField/genericFvsPatchField.H index 0447dd9971..637129c0fd 100644 --- a/src/genericPatchFields/genericFvsPatchField/genericFvsPatchField.H +++ b/src/genericPatchFields/genericFvsPatchField/genericFvsPatchField.H @@ -96,15 +96,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new genericFvsPatchField(*this) - ); - } - //- Default copy construct genericFvsPatchField(const genericFvsPatchField&) = default; @@ -115,16 +106,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return clone + virtual tmp> clone() const + { + return fvsPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new genericFvsPatchField(*this, iF) - ); + return fvsPatchField::Clone(*this, iF); } diff --git a/src/genericPatchFields/genericPointPatchField/genericPointPatchField.H b/src/genericPatchFields/genericPointPatchField/genericPointPatchField.H index c91f40202f..1f68de1bf4 100644 --- a/src/genericPatchFields/genericPointPatchField/genericPointPatchField.H +++ b/src/genericPatchFields/genericPointPatchField/genericPointPatchField.H @@ -93,18 +93,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new genericPointPatchField - ( - *this - ) - ); - } - //- Default copy construct genericPointPatchField(const genericPointPatchField&) = default; @@ -115,20 +103,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new genericPointPatchField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/lumpedPointMotion/pointPatchFields/lumpedPointDisplacementPointPatchVectorField.H b/src/lumpedPointMotion/pointPatchFields/lumpedPointDisplacementPointPatchVectorField.H index 0afd14f059..0ce5845796 100644 --- a/src/lumpedPointMotion/pointPatchFields/lumpedPointDisplacementPointPatchVectorField.H +++ b/src/lumpedPointMotion/pointPatchFields/lumpedPointDisplacementPointPatchVectorField.H @@ -138,18 +138,6 @@ public: const pointPatchFieldMapper& mapper ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new lumpedPointDisplacementPointPatchVectorField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference lumpedPointDisplacementPointPatchVectorField ( @@ -157,20 +145,19 @@ public: const DimensionedField& iF ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new lumpedPointDisplacementPointPatchVectorField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.H b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.H index 41862edb7b..15379495a2 100644 --- a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.H +++ b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.H @@ -99,18 +99,6 @@ public: const zeroFixedValuePointPatchField& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new zeroFixedValuePointPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference zeroFixedValuePointPatchField ( @@ -118,6 +106,11 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } //- Construct and return a clone setting internal field reference virtual autoPtr> clone @@ -125,14 +118,7 @@ public: const DimensionedField& iF ) const { - return autoPtr> - ( - new zeroFixedValuePointPatchField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } }; diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.H b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.H index 17755d5295..6c618a9747 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.H +++ b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.H @@ -138,18 +138,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new cyclicACMIPointPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference cyclicACMIPointPatchField ( @@ -157,19 +145,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new cyclicACMIPointPatchField - ( - *this, iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.H b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.H index 5840a30269..f6ffa116bb 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.H +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.H @@ -138,18 +138,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new cyclicAMIPointPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference cyclicAMIPointPatchField ( @@ -157,19 +145,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new cyclicAMIPointPatchField - ( - *this, iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/meshTools/fields/pointPatchFields/uniformFixedValue/uniformFixedValuePointPatchField.H b/src/meshTools/fields/pointPatchFields/uniformFixedValue/uniformFixedValuePointPatchField.H index c98e567de3..9cf2a5c27e 100644 --- a/src/meshTools/fields/pointPatchFields/uniformFixedValue/uniformFixedValuePointPatchField.H +++ b/src/meshTools/fields/pointPatchFields/uniformFixedValue/uniformFixedValuePointPatchField.H @@ -130,18 +130,6 @@ public: const uniformFixedValuePointPatchField& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new uniformFixedValuePointPatchField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference uniformFixedValuePointPatchField ( @@ -150,20 +138,19 @@ public: ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new uniformFixedValuePointPatchField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointFarFieldPressure/adjointFarFieldPressureFvPatchScalarField.H b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointFarFieldPressure/adjointFarFieldPressureFvPatchScalarField.H index 97406ef979..085e282dca 100644 --- a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointFarFieldPressure/adjointFarFieldPressureFvPatchScalarField.H +++ b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointFarFieldPressure/adjointFarFieldPressureFvPatchScalarField.H @@ -90,15 +90,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new adjointFarFieldPressureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference adjointFarFieldPressureFvPatchScalarField ( @@ -106,16 +97,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new adjointFarFieldPressureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointFarFieldVelocity/adjointFarFieldVelocityFvPatchVectorField.H b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointFarFieldVelocity/adjointFarFieldVelocityFvPatchVectorField.H index 1f61a89d7a..68ccdf27d1 100644 --- a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointFarFieldVelocity/adjointFarFieldVelocityFvPatchVectorField.H +++ b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointFarFieldVelocity/adjointFarFieldVelocityFvPatchVectorField.H @@ -90,15 +90,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new adjointFarFieldVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference adjointFarFieldVelocityFvPatchVectorField ( @@ -106,16 +97,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new adjointFarFieldVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointInletVelocity/adjointInletVelocityFvPatchVectorField.H b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointInletVelocity/adjointInletVelocityFvPatchVectorField.H index 04d4891f09..b760aac747 100644 --- a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointInletVelocity/adjointInletVelocityFvPatchVectorField.H +++ b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointInletVelocity/adjointInletVelocityFvPatchVectorField.H @@ -90,15 +90,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new adjointInletVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference adjointInletVelocityFvPatchVectorField ( @@ -106,16 +97,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new adjointInletVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointOutletPressure/adjointOutletPressureFvPatchScalarField.H b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointOutletPressure/adjointOutletPressureFvPatchScalarField.H index ad035cc6ff..8765168bd1 100644 --- a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointOutletPressure/adjointOutletPressureFvPatchScalarField.H +++ b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointOutletPressure/adjointOutletPressureFvPatchScalarField.H @@ -90,15 +90,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new adjointOutletPressureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference adjointOutletPressureFvPatchScalarField ( @@ -106,16 +97,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new adjointOutletPressureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.H b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.H index 95c57078aa..1932066698 100644 --- a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.H +++ b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.H @@ -100,15 +100,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new adjointOutletVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference adjointOutletVelocityFvPatchVectorField ( @@ -116,20 +107,22 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new adjointOutletVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } - // Member functions //- Return true: Allow adjoint solvers to obtain the outlet phia diff --git a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointOutletVelocityFlux/adjointOutletVelocityFluxFvPatchVectorField.H b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointOutletVelocityFlux/adjointOutletVelocityFluxFvPatchVectorField.H index 160da9dd95..af2402bf0f 100644 --- a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointOutletVelocityFlux/adjointOutletVelocityFluxFvPatchVectorField.H +++ b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointOutletVelocityFlux/adjointOutletVelocityFluxFvPatchVectorField.H @@ -97,15 +97,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new adjointOutletVelocityFluxFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference adjointOutletVelocityFluxFvPatchVectorField ( @@ -113,20 +104,22 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new adjointOutletVelocityFluxFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } - // Member functions //- Return true: Allow adjoint solvers to obtain the outlet phia diff --git a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointRotatingWallVelocity/adjointRotatingWallVelocityFvPatchVectorField.H b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointRotatingWallVelocity/adjointRotatingWallVelocityFvPatchVectorField.H index 382ffa5baa..e76012d5ee 100644 --- a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointRotatingWallVelocity/adjointRotatingWallVelocityFvPatchVectorField.H +++ b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointRotatingWallVelocity/adjointRotatingWallVelocityFvPatchVectorField.H @@ -104,15 +104,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new adjointRotatingWallVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference adjointRotatingWallVelocityFvPatchVectorField ( @@ -120,16 +111,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new adjointRotatingWallVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointWallVelocity/adjointWallVelocityFvPatchVectorField.H b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointWallVelocity/adjointWallVelocityFvPatchVectorField.H index 7ead8328d5..5597759c1f 100644 --- a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointWallVelocity/adjointWallVelocityFvPatchVectorField.H +++ b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointWallVelocity/adjointWallVelocityFvPatchVectorField.H @@ -112,15 +112,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new adjointWallVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference adjointWallVelocityFvPatchVectorField ( @@ -128,16 +119,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new adjointWallVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointWallVelocityLowRe/adjointWallVelocityLowReFvPatchVectorField.H b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointWallVelocityLowRe/adjointWallVelocityLowReFvPatchVectorField.H index 30a1752191..399b8f8829 100644 --- a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointWallVelocityLowRe/adjointWallVelocityLowReFvPatchVectorField.H +++ b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointWallVelocityLowRe/adjointWallVelocityLowReFvPatchVectorField.H @@ -90,15 +90,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new adjointWallVelocityLowReFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference adjointWallVelocityLowReFvPatchVectorField ( @@ -106,16 +97,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new adjointWallVelocityLowReFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointZeroInlet/adjointZeroInletFvPatchField.H b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointZeroInlet/adjointZeroInletFvPatchField.H index 62b1dc4e8c..055493c628 100644 --- a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointZeroInlet/adjointZeroInletFvPatchField.H +++ b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointZeroInlet/adjointZeroInletFvPatchField.H @@ -90,15 +90,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new adjointZeroInletFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference adjointZeroInletFvPatchField ( @@ -106,16 +97,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new adjointZeroInletFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointFarFieldNuaTilda/adjointFarFieldNuaTildaFvPatchScalarField.H b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointFarFieldNuaTilda/adjointFarFieldNuaTildaFvPatchScalarField.H index 65d801600c..178d8d22ba 100644 --- a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointFarFieldNuaTilda/adjointFarFieldNuaTildaFvPatchScalarField.H +++ b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointFarFieldNuaTilda/adjointFarFieldNuaTildaFvPatchScalarField.H @@ -89,15 +89,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new adjointFarFieldNuaTildaFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference adjointFarFieldNuaTildaFvPatchScalarField ( @@ -105,16 +96,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new adjointFarFieldNuaTildaFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointFarFieldTMVar1/adjointFarFieldTMVar1FvPatchScalarField.H b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointFarFieldTMVar1/adjointFarFieldTMVar1FvPatchScalarField.H index 291ea991b0..6e80cc55fd 100644 --- a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointFarFieldTMVar1/adjointFarFieldTMVar1FvPatchScalarField.H +++ b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointFarFieldTMVar1/adjointFarFieldTMVar1FvPatchScalarField.H @@ -88,15 +88,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new adjointFarFieldTMVar1FvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference adjointFarFieldTMVar1FvPatchScalarField ( @@ -104,16 +95,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new adjointFarFieldTMVar1FvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointFarFieldTMVar2/adjointFarFieldTMVar2FvPatchScalarField.H b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointFarFieldTMVar2/adjointFarFieldTMVar2FvPatchScalarField.H index 99d5674c26..b3affc40f4 100644 --- a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointFarFieldTMVar2/adjointFarFieldTMVar2FvPatchScalarField.H +++ b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointFarFieldTMVar2/adjointFarFieldTMVar2FvPatchScalarField.H @@ -88,15 +88,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new adjointFarFieldTMVar2FvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference adjointFarFieldTMVar2FvPatchScalarField ( @@ -104,16 +95,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new adjointFarFieldTMVar2FvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointInletNuaTilda/adjointInletNuaTildaFvPatchScalarField.H b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointInletNuaTilda/adjointInletNuaTildaFvPatchScalarField.H index 06482f8889..dfc89cb325 100644 --- a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointInletNuaTilda/adjointInletNuaTildaFvPatchScalarField.H +++ b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointInletNuaTilda/adjointInletNuaTildaFvPatchScalarField.H @@ -92,15 +92,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new adjointInletNuaTildaFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference adjointInletNuaTildaFvPatchScalarField ( @@ -108,16 +99,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new adjointInletNuaTildaFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointOutletFlux/adjointOutletFluxFvPatchField.H b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointOutletFlux/adjointOutletFluxFvPatchField.H index 888ce70940..3e8ed6f4d7 100644 --- a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointOutletFlux/adjointOutletFluxFvPatchField.H +++ b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointOutletFlux/adjointOutletFluxFvPatchField.H @@ -88,15 +88,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new adjointOutletFluxFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference adjointOutletFluxFvPatchField ( @@ -104,16 +95,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new adjointOutletFluxFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointOutletKa/adjointOutletKaFvPatchScalarField.H b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointOutletKa/adjointOutletKaFvPatchScalarField.H index ae73acd7c3..2ce51e82e2 100644 --- a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointOutletKa/adjointOutletKaFvPatchScalarField.H +++ b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointOutletKa/adjointOutletKaFvPatchScalarField.H @@ -88,15 +88,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new adjointOutletKaFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference adjointOutletKaFvPatchScalarField ( @@ -104,16 +95,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new adjointOutletKaFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointOutletNuaTilda/adjointOutletNuaTildaFvPatchScalarField.H b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointOutletNuaTilda/adjointOutletNuaTildaFvPatchScalarField.H index 8f20dcb0ea..4a03b1af85 100644 --- a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointOutletNuaTilda/adjointOutletNuaTildaFvPatchScalarField.H +++ b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointOutletNuaTilda/adjointOutletNuaTildaFvPatchScalarField.H @@ -89,15 +89,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new adjointOutletNuaTildaFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference adjointOutletNuaTildaFvPatchScalarField ( @@ -105,16 +96,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new adjointOutletNuaTildaFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointOutletNuaTildaFlux/adjointOutletNuaTildaFluxFvPatchScalarField.H b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointOutletNuaTildaFlux/adjointOutletNuaTildaFluxFvPatchScalarField.H index 246a33a557..ace90b07d0 100644 --- a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointOutletNuaTildaFlux/adjointOutletNuaTildaFluxFvPatchScalarField.H +++ b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointOutletNuaTildaFlux/adjointOutletNuaTildaFluxFvPatchScalarField.H @@ -90,15 +90,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new adjointOutletNuaTildaFluxFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference adjointOutletNuaTildaFluxFvPatchScalarField ( @@ -106,16 +97,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new adjointOutletNuaTildaFluxFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointOutletWa/adjointOutletWaFvPatchScalarField.H b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointOutletWa/adjointOutletWaFvPatchScalarField.H index dd04e830f3..93fb25d2d9 100644 --- a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointOutletWa/adjointOutletWaFvPatchScalarField.H +++ b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/adjointOutletWa/adjointOutletWaFvPatchScalarField.H @@ -88,15 +88,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new adjointOutletWaFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference adjointOutletWaFvPatchScalarField ( @@ -104,16 +95,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new adjointOutletWaFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/kaqRWallFunction/kaqRWallFunctionFvPatchScalarField.H b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/kaqRWallFunction/kaqRWallFunctionFvPatchScalarField.H index 7f93602416..0c549f6a5b 100644 --- a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/kaqRWallFunction/kaqRWallFunctionFvPatchScalarField.H +++ b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/kaqRWallFunction/kaqRWallFunctionFvPatchScalarField.H @@ -94,15 +94,6 @@ public: const kaqRWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new kaqRWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference kaqRWallFunctionFvPatchScalarField ( @@ -110,16 +101,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new kaqRWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/waWallFunction/waWallFunctionFvPatchScalarField.H b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/waWallFunction/waWallFunctionFvPatchScalarField.H index c1e95db2aa..f4ed962fba 100644 --- a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/waWallFunction/waWallFunctionFvPatchScalarField.H +++ b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/derivedFvPatchFields/waWallFunction/waWallFunctionFvPatchScalarField.H @@ -102,15 +102,6 @@ public: const waWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new waWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference waWallFunctionFvPatchScalarField ( @@ -118,16 +109,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new waWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/overset/oversetPolyPatch/oversetFvPatchField.H b/src/overset/oversetPolyPatch/oversetFvPatchField.H index f681a9cd64..cb22fb6726 100644 --- a/src/overset/oversetPolyPatch/oversetFvPatchField.H +++ b/src/overset/oversetPolyPatch/oversetFvPatchField.H @@ -132,15 +132,6 @@ public: //- Construct as copy oversetFvPatchField(const oversetFvPatchField&); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new oversetFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference oversetFvPatchField ( @@ -148,16 +139,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new oversetFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/derivedFvPatchFields/alphaContactAngle/alphaContactAngleFvPatchScalarField.H b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/derivedFvPatchFields/alphaContactAngle/alphaContactAngleFvPatchScalarField.H index a9fac35aa3..c48dbed861 100644 --- a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/derivedFvPatchFields/alphaContactAngle/alphaContactAngleFvPatchScalarField.H +++ b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/derivedFvPatchFields/alphaContactAngle/alphaContactAngleFvPatchScalarField.H @@ -167,15 +167,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new alphaContactAngleFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference alphaContactAngleFvPatchScalarField ( @@ -183,16 +174,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new alphaContactAngleFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/phaseSystemModels/multiphaseInter/phasesSystem/derivedFvPatchFields/timeVaryingMassSorption/timeVaryingMassSorptionFvPatchScalarField.H b/src/phaseSystemModels/multiphaseInter/phasesSystem/derivedFvPatchFields/timeVaryingMassSorption/timeVaryingMassSorptionFvPatchScalarField.H index e054fd12db..de01803baf 100644 --- a/src/phaseSystemModels/multiphaseInter/phasesSystem/derivedFvPatchFields/timeVaryingMassSorption/timeVaryingMassSorptionFvPatchScalarField.H +++ b/src/phaseSystemModels/multiphaseInter/phasesSystem/derivedFvPatchFields/timeVaryingMassSorption/timeVaryingMassSorptionFvPatchScalarField.H @@ -175,15 +175,6 @@ public: const timeVaryingMassSorptionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new timeVaryingMassSorptionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference timeVaryingMassSorptionFvPatchScalarField ( @@ -191,16 +182,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new timeVaryingMassSorptionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/alphaContactAngle/alphaContactAngleFvPatchScalarField.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/alphaContactAngle/alphaContactAngleFvPatchScalarField.H index a28a4e5f54..4c3ca140aa 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/alphaContactAngle/alphaContactAngleFvPatchScalarField.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/alphaContactAngle/alphaContactAngleFvPatchScalarField.H @@ -204,15 +204,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new alphaContactAngleFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference alphaContactAngleFvPatchScalarField ( @@ -220,16 +211,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new alphaContactAngleFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.H index dbf31cc0e8..7b89c0446f 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.H @@ -151,18 +151,6 @@ public: const alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField ( @@ -170,20 +158,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H index 03bb661c89..88d9a5418f 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H @@ -182,18 +182,6 @@ public: const alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField ( @@ -201,20 +189,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H index e00efd3634..3040f6566c 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H @@ -460,15 +460,6 @@ public: const alphatWallBoilingWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new alphatWallBoilingWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference alphatWallBoilingWallFunctionFvPatchScalarField ( @@ -476,16 +467,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new alphatWallBoilingWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.H index 6c07141c7c..97c4c47b84 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.H @@ -127,15 +127,6 @@ 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 ( @@ -143,16 +134,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new copiedFixedValueFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.H index 7ec3dd8f9b..28f6b789c5 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.H @@ -145,15 +145,6 @@ 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 ( @@ -161,16 +152,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new fixedMultiPhaseHeatFluxFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.H b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.H index 77fb64736f..49f5bde9e4 100644 --- a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.H +++ b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.H @@ -112,15 +112,6 @@ public: const JohnsonJacksonParticleSlipFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new JohnsonJacksonParticleSlipFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference JohnsonJacksonParticleSlipFvPatchVectorField ( @@ -128,16 +119,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new JohnsonJacksonParticleSlipFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.H b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.H index cb4690bb41..6396cdf9b6 100644 --- a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.H +++ b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.H @@ -115,15 +115,6 @@ public: const JohnsonJacksonParticleThetaFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new JohnsonJacksonParticleThetaFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference JohnsonJacksonParticleThetaFvPatchScalarField ( @@ -131,16 +122,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new JohnsonJacksonParticleThetaFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.H b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.H index 6068281e18..45c49e2bf4 100644 --- a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.H +++ b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.H @@ -113,15 +113,6 @@ public: const JohnsonJacksonParticleSlipFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new JohnsonJacksonParticleSlipFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference JohnsonJacksonParticleSlipFvPatchVectorField ( @@ -129,16 +120,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new JohnsonJacksonParticleSlipFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.H b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.H index bdad64bd4e..cff941c9ef 100644 --- a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.H +++ b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.H @@ -116,15 +116,6 @@ public: const JohnsonJacksonParticleThetaFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new JohnsonJacksonParticleThetaFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference JohnsonJacksonParticleThetaFvPatchScalarField ( @@ -132,16 +123,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new JohnsonJacksonParticleThetaFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/regionFaModels/derivedFvPatchFields/filmShell/velocityFilmShellFvPatchVectorField.H b/src/regionFaModels/derivedFvPatchFields/filmShell/velocityFilmShellFvPatchVectorField.H index 56c805024d..d9ae1a1e5d 100644 --- a/src/regionFaModels/derivedFvPatchFields/filmShell/velocityFilmShellFvPatchVectorField.H +++ b/src/regionFaModels/derivedFvPatchFields/filmShell/velocityFilmShellFvPatchVectorField.H @@ -181,15 +181,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new velocityFilmShellFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference velocityFilmShellFvPatchVectorField ( @@ -197,16 +188,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new velocityFilmShellFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/regionFaModels/derivedFvPatchFields/thermalShell/thermalShellFvPatchScalarField.H b/src/regionFaModels/derivedFvPatchFields/thermalShell/thermalShellFvPatchScalarField.H index 1ee34af3e3..e5f98883e2 100644 --- a/src/regionFaModels/derivedFvPatchFields/thermalShell/thermalShellFvPatchScalarField.H +++ b/src/regionFaModels/derivedFvPatchFields/thermalShell/thermalShellFvPatchScalarField.H @@ -138,15 +138,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new thermalShellFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference thermalShellFvPatchScalarField ( @@ -154,16 +145,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new thermalShellFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/regionFaModels/derivedFvPatchFields/vibrationShell/vibrationShellFvPatchScalarField.H b/src/regionFaModels/derivedFvPatchFields/vibrationShell/vibrationShellFvPatchScalarField.H index af184d2aea..f1720546d8 100644 --- a/src/regionFaModels/derivedFvPatchFields/vibrationShell/vibrationShellFvPatchScalarField.H +++ b/src/regionFaModels/derivedFvPatchFields/vibrationShell/vibrationShellFvPatchScalarField.H @@ -127,15 +127,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new vibrationShellFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference vibrationShellFvPatchScalarField ( @@ -143,16 +134,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new vibrationShellFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.H b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.H index 3b2c76c1e5..ea90811c9b 100644 --- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.H +++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.H @@ -183,18 +183,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new filmPyrolysisRadiativeCoupledMixedFvPatchScalarField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference filmPyrolysisRadiativeCoupledMixedFvPatchScalarField ( @@ -202,20 +190,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new filmPyrolysisRadiativeCoupledMixedFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.H b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.H index 3cc10f5ce6..94e43f4ea8 100644 --- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.H +++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.H @@ -124,15 +124,6 @@ public: const filmPyrolysisTemperatureCoupledFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new filmPyrolysisTemperatureCoupledFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference filmPyrolysisTemperatureCoupledFvPatchScalarField ( @@ -140,16 +131,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new filmPyrolysisTemperatureCoupledFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.H b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.H index 6bbd16709e..d8a77ee110 100644 --- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.H +++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.H @@ -125,15 +125,6 @@ public: const filmPyrolysisVelocityCoupledFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new filmPyrolysisVelocityCoupledFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference filmPyrolysisVelocityCoupledFvPatchVectorField ( @@ -141,16 +132,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new filmPyrolysisVelocityCoupledFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.H b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.H index 91b6940c3b..7327c991a2 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.H +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.H @@ -147,15 +147,6 @@ public: const filmHeightInletVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new filmHeightInletVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference filmHeightInletVelocityFvPatchVectorField ( @@ -163,16 +154,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new filmHeightInletVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.H b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.H index 39bb8a36ad..8012c12ace 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.H +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.H @@ -110,15 +110,6 @@ public: const inclinedFilmNusseltHeightFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new inclinedFilmNusseltHeightFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference inclinedFilmNusseltHeightFvPatchScalarField ( @@ -126,16 +117,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new inclinedFilmNusseltHeightFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.H b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.H index cd5d357264..eadaf40e35 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.H +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.H @@ -110,15 +110,6 @@ public: const inclinedFilmNusseltInletVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new inclinedFilmNusseltInletVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference inclinedFilmNusseltInletVelocityFvPatchVectorField ( @@ -126,19 +117,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new inclinedFilmNusseltInletVelocityFvPatchVectorField - ( - *this, iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.H b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.H index 18f448f15f..9f1cff6ee5 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.H +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.H @@ -162,15 +162,6 @@ public: const alphatFilmWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new alphatFilmWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference alphatFilmWallFunctionFvPatchScalarField ( @@ -178,16 +169,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new alphatFilmWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.H b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.H index d7ebbf2c45..0b4099ec0e 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.H +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.H @@ -158,15 +158,6 @@ public: const nutkFilmWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new nutkFilmWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference nutkFilmWallFunctionFvPatchScalarField ( @@ -174,16 +165,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new nutkFilmWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.H b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.H index 26fdc2cf27..0402f973e0 100644 --- a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.H +++ b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.H @@ -301,16 +301,6 @@ public: const fvPatchFieldMapper& ); - - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new thermalBaffleFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference thermalBaffleFvPatchScalarField ( @@ -318,16 +308,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new thermalBaffleFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.H b/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.H index e67f00ff6a..8102ff9bd1 100644 --- a/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.H +++ b/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.H @@ -122,18 +122,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new sixDoFRigidBodyDisplacementPointPatchVectorField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference sixDoFRigidBodyDisplacementPointPatchVectorField ( @@ -141,20 +129,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new sixDoFRigidBodyDisplacementPointPatchVectorField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/sixDoFRigidBodyMotion/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.H b/src/sixDoFRigidBodyMotion/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.H index 9bc259d00e..670ad02a3e 100644 --- a/src/sixDoFRigidBodyMotion/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.H +++ b/src/sixDoFRigidBodyMotion/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.H @@ -97,18 +97,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField ( @@ -116,20 +104,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); } diff --git a/src/thermoTools/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.H b/src/thermoTools/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.H index 836ce9249b..9e7fcd048e 100644 --- a/src/thermoTools/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.H +++ b/src/thermoTools/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.H @@ -143,15 +143,6 @@ public: const convectiveHeatTransferFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new convectiveHeatTransferFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference convectiveHeatTransferFvPatchScalarField ( @@ -159,16 +150,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new convectiveHeatTransferFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermoTools/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H b/src/thermoTools/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H index bad3c6db95..b711dbd2ae 100644 --- a/src/thermoTools/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H +++ b/src/thermoTools/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H @@ -224,15 +224,6 @@ public: const externalWallHeatFluxTemperatureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new externalWallHeatFluxTemperatureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference externalWallHeatFluxTemperatureFvPatchScalarField ( @@ -240,16 +231,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new externalWallHeatFluxTemperatureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermoTools/derivedFvPatchFields/fixedIncidentRadiation/fixedIncidentRadiationFvPatchScalarField.H b/src/thermoTools/derivedFvPatchFields/fixedIncidentRadiation/fixedIncidentRadiationFvPatchScalarField.H index cb4aae6c51..5ae31ccddd 100644 --- a/src/thermoTools/derivedFvPatchFields/fixedIncidentRadiation/fixedIncidentRadiationFvPatchScalarField.H +++ b/src/thermoTools/derivedFvPatchFields/fixedIncidentRadiation/fixedIncidentRadiationFvPatchScalarField.H @@ -134,19 +134,6 @@ public: const fixedIncidentRadiationFvPatchScalarField& ); - - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new fixedIncidentRadiationFvPatchScalarField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference fixedIncidentRadiationFvPatchScalarField ( @@ -154,27 +141,25 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new fixedIncidentRadiationFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } // Member functions - - // Mapping functions + // Mapping functions //- Map (and resize as needed) from self given a mapping object virtual void autoMap(const fvPatchFieldMapper&); diff --git a/src/thermoTools/derivedFvPatchFields/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.H b/src/thermoTools/derivedFvPatchFields/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.H index 64cfd0f070..dba84d973b 100644 --- a/src/thermoTools/derivedFvPatchFields/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.H +++ b/src/thermoTools/derivedFvPatchFields/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.H @@ -332,18 +332,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new humidityTemperatureCoupledMixedFvPatchScalarField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference humidityTemperatureCoupledMixedFvPatchScalarField ( @@ -351,20 +339,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new humidityTemperatureCoupledMixedFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermoTools/derivedFvPatchFields/lumpedMassWallTemperature/lumpedMassWallTemperatureFvPatchScalarField.H b/src/thermoTools/derivedFvPatchFields/lumpedMassWallTemperature/lumpedMassWallTemperatureFvPatchScalarField.H index c657b4cc72..5d961e010c 100644 --- a/src/thermoTools/derivedFvPatchFields/lumpedMassWallTemperature/lumpedMassWallTemperatureFvPatchScalarField.H +++ b/src/thermoTools/derivedFvPatchFields/lumpedMassWallTemperature/lumpedMassWallTemperatureFvPatchScalarField.H @@ -135,15 +135,6 @@ public: const lumpedMassWallTemperatureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new lumpedMassWallTemperatureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference lumpedMassWallTemperatureFvPatchScalarField ( @@ -151,16 +142,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new lumpedMassWallTemperatureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermoTools/derivedFvPatchFields/outletMachNumberPressure/outletMachNumberPressureFvPatchScalarField.H b/src/thermoTools/derivedFvPatchFields/outletMachNumberPressure/outletMachNumberPressureFvPatchScalarField.H index ea0a8ed59d..ad4cf26abf 100644 --- a/src/thermoTools/derivedFvPatchFields/outletMachNumberPressure/outletMachNumberPressureFvPatchScalarField.H +++ b/src/thermoTools/derivedFvPatchFields/outletMachNumberPressure/outletMachNumberPressureFvPatchScalarField.H @@ -216,15 +216,6 @@ public: const outletMachNumberPressureFvPatchScalarField& tppsf ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new outletMachNumberPressureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference outletMachNumberPressureFvPatchScalarField ( @@ -232,16 +223,19 @@ public: const DimensionedField& iF ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new outletMachNumberPressureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermoTools/derivedFvPatchFields/outletMappedUniformInletHeatAddition/outletMappedUniformInletHeatAdditionFvPatchField.H b/src/thermoTools/derivedFvPatchFields/outletMappedUniformInletHeatAddition/outletMappedUniformInletHeatAdditionFvPatchField.H index 0640c2a39e..844000f904 100644 --- a/src/thermoTools/derivedFvPatchFields/outletMappedUniformInletHeatAddition/outletMappedUniformInletHeatAdditionFvPatchField.H +++ b/src/thermoTools/derivedFvPatchFields/outletMappedUniformInletHeatAddition/outletMappedUniformInletHeatAdditionFvPatchField.H @@ -142,15 +142,6 @@ public: const outletMappedUniformInletHeatAdditionFvPatchField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new outletMappedUniformInletHeatAdditionFvPatchField(*this) - ); - } - //- Construct as copy setting internal field reference outletMappedUniformInletHeatAdditionFvPatchField ( @@ -158,16 +149,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new outletMappedUniformInletHeatAdditionFvPatchField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermoTools/derivedFvPatchFields/semiPermeableBaffle/semiPermeableBaffleMassFraction/semiPermeableBaffleMassFractionFvPatchScalarField.H b/src/thermoTools/derivedFvPatchFields/semiPermeableBaffle/semiPermeableBaffleMassFraction/semiPermeableBaffleMassFractionFvPatchScalarField.H index db2c6292bc..58ae15b2c4 100644 --- a/src/thermoTools/derivedFvPatchFields/semiPermeableBaffle/semiPermeableBaffleMassFraction/semiPermeableBaffleMassFractionFvPatchScalarField.H +++ b/src/thermoTools/derivedFvPatchFields/semiPermeableBaffle/semiPermeableBaffleMassFraction/semiPermeableBaffleMassFractionFvPatchScalarField.H @@ -143,15 +143,6 @@ public: const semiPermeableBaffleMassFractionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new semiPermeableBaffleMassFractionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference semiPermeableBaffleMassFractionFvPatchScalarField ( @@ -159,20 +150,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new semiPermeableBaffleMassFractionFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermoTools/derivedFvPatchFields/semiPermeableBaffle/semiPermeableBaffleVelocity/semiPermeableBaffleVelocityFvPatchVectorField.H b/src/thermoTools/derivedFvPatchFields/semiPermeableBaffle/semiPermeableBaffleVelocity/semiPermeableBaffleVelocityFvPatchVectorField.H index 72824c12d8..56e08da2f2 100644 --- a/src/thermoTools/derivedFvPatchFields/semiPermeableBaffle/semiPermeableBaffleVelocity/semiPermeableBaffleVelocityFvPatchVectorField.H +++ b/src/thermoTools/derivedFvPatchFields/semiPermeableBaffle/semiPermeableBaffleVelocity/semiPermeableBaffleVelocityFvPatchVectorField.H @@ -126,15 +126,6 @@ public: const semiPermeableBaffleVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new semiPermeableBaffleVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference semiPermeableBaffleVelocityFvPatchVectorField ( @@ -142,20 +133,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new semiPermeableBaffleVelocityFvPatchVectorField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermoTools/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H b/src/thermoTools/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H index 075b9dc26d..69c61b466e 100644 --- a/src/thermoTools/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H +++ b/src/thermoTools/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H @@ -198,15 +198,6 @@ public: const thermalBaffle1DFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new thermalBaffle1DFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference thermalBaffle1DFvPatchScalarField ( @@ -214,16 +205,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new thermalBaffle1DFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermoTools/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.H b/src/thermoTools/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.H index 4a6faa495e..d59c2bda69 100644 --- a/src/thermoTools/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.H +++ b/src/thermoTools/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.H @@ -107,16 +107,6 @@ public: const totalFlowRateAdvectiveDiffusiveFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new - totalFlowRateAdvectiveDiffusiveFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference totalFlowRateAdvectiveDiffusiveFvPatchScalarField ( @@ -124,28 +114,24 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new - totalFlowRateAdvectiveDiffusiveFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } // Member functions - - // Mapping functions //- Map (and resize as needed) from self given a mapping object diff --git a/src/thermoTools/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H b/src/thermoTools/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H index 7de8e9d7a3..e4e621a55c 100644 --- a/src/thermoTools/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H +++ b/src/thermoTools/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H @@ -170,18 +170,6 @@ public: const turbulentTemperatureCoupledBaffleMixedFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new turbulentTemperatureCoupledBaffleMixedFvPatchScalarField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference turbulentTemperatureCoupledBaffleMixedFvPatchScalarField ( @@ -189,20 +177,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new turbulentTemperatureCoupledBaffleMixedFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermoTools/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.H b/src/thermoTools/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.H index 44a721daa2..0fc48788c6 100644 --- a/src/thermoTools/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.H +++ b/src/thermoTools/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.H @@ -270,18 +270,6 @@ public: const turbulentTemperatureRadCoupledMixedFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new turbulentTemperatureRadCoupledMixedFvPatchScalarField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference turbulentTemperatureRadCoupledMixedFvPatchScalarField ( @@ -289,20 +277,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new turbulentTemperatureRadCoupledMixedFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermoTools/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H b/src/thermoTools/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H index 9a35d35a78..ed6a596d40 100644 --- a/src/thermoTools/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H +++ b/src/thermoTools/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H @@ -171,15 +171,6 @@ public: const alphatJayatillekeWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new alphatJayatillekeWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference alphatJayatillekeWallFunctionFvPatchScalarField ( @@ -187,20 +178,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new alphatJayatillekeWallFunctionFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermoTools/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H b/src/thermoTools/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H index ae11c223a6..611c6ae15a 100644 --- a/src/thermoTools/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H +++ b/src/thermoTools/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H @@ -146,15 +146,6 @@ public: const alphatWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new alphatWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference alphatWallFunctionFvPatchScalarField ( @@ -162,16 +153,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new alphatWallFunctionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermoTools/derivedFvPatchFields/wallFunctions/sorptionWallFunction/sorptionWallFunctionFvPatchScalarField.H b/src/thermoTools/derivedFvPatchFields/wallFunctions/sorptionWallFunction/sorptionWallFunctionFvPatchScalarField.H index bcc7c2522e..0f069a3df2 100644 --- a/src/thermoTools/derivedFvPatchFields/wallFunctions/sorptionWallFunction/sorptionWallFunctionFvPatchScalarField.H +++ b/src/thermoTools/derivedFvPatchFields/wallFunctions/sorptionWallFunction/sorptionWallFunctionFvPatchScalarField.H @@ -251,15 +251,6 @@ public: const sorptionWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new sorptionWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference sorptionWallFunctionFvPatchScalarField ( @@ -267,20 +258,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new sorptionWallFunctionFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermoTools/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H b/src/thermoTools/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H index 356273dc7d..09ffb7826c 100644 --- a/src/thermoTools/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H +++ b/src/thermoTools/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H @@ -121,15 +121,6 @@ public: const wallHeatTransferFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new wallHeatTransferFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference wallHeatTransferFvPatchScalarField ( @@ -137,16 +128,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new wallHeatTransferFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJump/energyJumpFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJump/energyJumpFvPatchScalarField.H index 86bd3df4ab..674eebcfa8 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJump/energyJumpFvPatchScalarField.H +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJump/energyJumpFvPatchScalarField.H @@ -100,15 +100,6 @@ public: const energyJumpFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new energyJumpFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference energyJumpFvPatchScalarField ( @@ -116,16 +107,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new energyJumpFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.H index 8164adca40..023632aaab 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.H +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.H @@ -100,15 +100,6 @@ public: const energyJumpAMIFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp> clone() const - { - return tmp> - ( - new energyJumpAMIFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference energyJumpAMIFvPatchScalarField ( @@ -116,16 +107,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp> - ( - new energyJumpAMIFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.H index 6f6572a40d..86afb41ab8 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.H +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.H @@ -108,15 +108,6 @@ public: const fixedEnergyFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new fixedEnergyFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference fixedEnergyFvPatchScalarField ( @@ -124,16 +115,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new fixedEnergyFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.H index bf84e88d0b..8e8c2a61dc 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.H +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.H @@ -123,15 +123,6 @@ public: const gradientEnergyFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new gradientEnergyFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference gradientEnergyFvPatchScalarField ( @@ -139,16 +130,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new gradientEnergyFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.H index 918300f68f..e7b01cf743 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.H +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.H @@ -99,15 +99,6 @@ public: const mixedEnergyFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new mixedEnergyFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference mixedEnergyFvPatchScalarField ( @@ -115,16 +106,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new mixedEnergyFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.H b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.H index 0f7e73da03..2fde200cf8 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.H +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.H @@ -127,15 +127,6 @@ public: const MarshakRadiationFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new MarshakRadiationFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference MarshakRadiationFvPatchScalarField ( @@ -143,16 +134,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new MarshakRadiationFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiationFixedTemperature/MarshakRadiationFixedTemperatureFvPatchScalarField.H b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiationFixedTemperature/MarshakRadiationFixedTemperatureFvPatchScalarField.H index 71da65c388..ea58358624 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiationFixedTemperature/MarshakRadiationFixedTemperatureFvPatchScalarField.H +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiationFixedTemperature/MarshakRadiationFixedTemperatureFvPatchScalarField.H @@ -127,15 +127,6 @@ public: const MarshakRadiationFixedTemperatureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new MarshakRadiationFixedTemperatureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference MarshakRadiationFixedTemperatureFvPatchScalarField ( @@ -143,20 +134,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new MarshakRadiationFixedTemperatureFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.H b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.H index bab8764802..c66e6fabbc 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.H +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.H @@ -151,15 +151,6 @@ public: const greyDiffusiveRadiationMixedFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new greyDiffusiveRadiationMixedFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference greyDiffusiveRadiationMixedFvPatchScalarField ( @@ -167,16 +158,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new greyDiffusiveRadiationMixedFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveViewFactor/greyDiffusiveViewFactorFixedValueFvPatchScalarField.H b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveViewFactor/greyDiffusiveViewFactorFixedValueFvPatchScalarField.H index c99ce057cd..b8cd2bfd7c 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveViewFactor/greyDiffusiveViewFactorFixedValueFvPatchScalarField.H +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveViewFactor/greyDiffusiveViewFactorFixedValueFvPatchScalarField.H @@ -125,15 +125,6 @@ public: const greyDiffusiveViewFactorFixedValueFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new greyDiffusiveViewFactorFixedValueFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference greyDiffusiveViewFactorFixedValueFvPatchScalarField ( @@ -141,20 +132,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new greyDiffusiveViewFactorFixedValueFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/specularRadiation/specularRadiationMixedFvPatchScalarField.H b/src/thermophysicalModels/radiation/derivedFvPatchFields/specularRadiation/specularRadiationMixedFvPatchScalarField.H index bc456ae4fe..3fd12a61d7 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/specularRadiation/specularRadiationMixedFvPatchScalarField.H +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/specularRadiation/specularRadiationMixedFvPatchScalarField.H @@ -169,15 +169,6 @@ public: const specularRadiationMixedFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp > clone() const - { - return tmp > - ( - new specularRadiationMixedFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference specularRadiationMixedFvPatchScalarField ( @@ -185,16 +176,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp > clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp > - ( - new specularRadiationMixedFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.H b/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.H index 112aa9610f..baf4640efa 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.H +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.H @@ -116,15 +116,6 @@ public: const wideBandDiffusiveRadiationMixedFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new wideBandDiffusiveRadiationMixedFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference wideBandDiffusiveRadiationMixedFvPatchScalarField ( @@ -132,23 +123,24 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new wideBandDiffusiveRadiationMixedFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } // Member functions - - // Evaluation functions //- Update the coefficients associated with the patch field diff --git a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/enthalpySorption/enthalpySorptionFvPatchScalarField.H b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/enthalpySorption/enthalpySorptionFvPatchScalarField.H index f232c79c71..87dde766df 100644 --- a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/enthalpySorption/enthalpySorptionFvPatchScalarField.H +++ b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/enthalpySorption/enthalpySorptionFvPatchScalarField.H @@ -210,15 +210,6 @@ public: const enthalpySorptionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new enthalpySorptionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference enthalpySorptionFvPatchScalarField ( @@ -226,16 +217,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new enthalpySorptionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.H b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.H index e996cfcb5a..9ff483132a 100644 --- a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.H +++ b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.H @@ -95,15 +95,6 @@ public: const fixedUnburntEnthalpyFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new fixedUnburntEnthalpyFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference fixedUnburntEnthalpyFvPatchScalarField ( @@ -111,16 +102,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new fixedUnburntEnthalpyFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.H b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.H index 2ca2ef4321..99573406a2 100644 --- a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.H +++ b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.H @@ -95,15 +95,6 @@ public: const gradientUnburntEnthalpyFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new gradientUnburntEnthalpyFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference gradientUnburntEnthalpyFvPatchScalarField ( @@ -111,16 +102,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new gradientUnburntEnthalpyFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/mixedUnburntEnthalpy/mixedUnburntEnthalpyFvPatchScalarField.H b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/mixedUnburntEnthalpy/mixedUnburntEnthalpyFvPatchScalarField.H index c4f6c10172..8398602019 100644 --- a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/mixedUnburntEnthalpy/mixedUnburntEnthalpyFvPatchScalarField.H +++ b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/mixedUnburntEnthalpy/mixedUnburntEnthalpyFvPatchScalarField.H @@ -95,15 +95,6 @@ public: const mixedUnburntEnthalpyFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new mixedUnburntEnthalpyFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference mixedUnburntEnthalpyFvPatchScalarField ( @@ -111,16 +102,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new mixedUnburntEnthalpyFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/speciesSorption/speciesSorptionFvPatchScalarField.H b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/speciesSorption/speciesSorptionFvPatchScalarField.H index 140492c752..0608a84820 100644 --- a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/speciesSorption/speciesSorptionFvPatchScalarField.H +++ b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/speciesSorption/speciesSorptionFvPatchScalarField.H @@ -245,15 +245,6 @@ public: const speciesSorptionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new speciesSorptionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference speciesSorptionFvPatchScalarField ( @@ -261,16 +252,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new speciesSorptionFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/transportModels/twoPhaseProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.H b/src/transportModels/twoPhaseProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.H index 72dea9c83c..74325b5d1e 100644 --- a/src/transportModels/twoPhaseProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.H +++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.H @@ -103,15 +103,6 @@ public: const constantAlphaContactAngleFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new constantAlphaContactAngleFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference constantAlphaContactAngleFvPatchScalarField ( @@ -119,16 +110,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new constantAlphaContactAngleFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/transportModels/twoPhaseProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.H b/src/transportModels/twoPhaseProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.H index 29f6444350..97619869a1 100644 --- a/src/transportModels/twoPhaseProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.H +++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.H @@ -109,15 +109,6 @@ public: const dynamicAlphaContactAngleFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new dynamicAlphaContactAngleFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference dynamicAlphaContactAngleFvPatchScalarField ( @@ -125,16 +116,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new dynamicAlphaContactAngleFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/transportModels/twoPhaseProperties/alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.H b/src/transportModels/twoPhaseProperties/alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.H index 8817bd35bf..4193eeb257 100644 --- a/src/transportModels/twoPhaseProperties/alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.H +++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.H @@ -128,18 +128,6 @@ public: const temperatureDependentAlphaContactAngleFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new temperatureDependentAlphaContactAngleFvPatchScalarField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference temperatureDependentAlphaContactAngleFvPatchScalarField ( @@ -147,20 +135,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new temperatureDependentAlphaContactAngleFvPatchScalarField - ( - *this, - iF - ) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/transportModels/twoPhaseProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.H b/src/transportModels/twoPhaseProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.H index 97ffe14331..b6167db801 100644 --- a/src/transportModels/twoPhaseProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.H +++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.H @@ -96,15 +96,6 @@ public: const fvPatchFieldMapper& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new timeVaryingAlphaContactAngleFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference timeVaryingAlphaContactAngleFvPatchScalarField ( @@ -112,16 +103,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new timeVaryingAlphaContactAngleFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/transportModels/twoPhaseProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.H b/src/transportModels/twoPhaseProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.H index 555939fda0..11f4ed7ada 100644 --- a/src/transportModels/twoPhaseProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.H +++ b/src/transportModels/twoPhaseProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.H @@ -97,15 +97,6 @@ public: const alphaFixedPressureFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new alphaFixedPressureFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference alphaFixedPressureFvPatchScalarField ( @@ -113,16 +104,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new alphaFixedPressureFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/waveModels/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.H b/src/waveModels/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.H index ce5855721f..419aba0d1e 100644 --- a/src/waveModels/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.H +++ b/src/waveModels/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.H @@ -117,15 +117,6 @@ public: const waveAlphaFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new waveAlphaFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference waveAlphaFvPatchScalarField ( @@ -133,16 +124,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new waveAlphaFvPatchScalarField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/waveModels/derivedFvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.H b/src/waveModels/derivedFvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.H index 6e3860fefe..de82730c32 100644 --- a/src/waveModels/derivedFvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.H +++ b/src/waveModels/derivedFvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.H @@ -117,15 +117,6 @@ public: const waveVelocityFvPatchVectorField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new waveVelocityFvPatchVectorField(*this) - ); - } - //- Construct as copy setting internal field reference waveVelocityFvPatchVectorField ( @@ -133,16 +124,19 @@ public: const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone + //- Return a clone + virtual tmp> clone() const + { + return fvPatchField::Clone(*this); + } + + //- Clone with an internal field reference + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp - ( - new waveVelocityFvPatchVectorField(*this, iF) - ); + return fvPatchField::Clone(*this, iF); } diff --git a/src/waveModels/derivedPointPatchFields/waveMaker/waveMakerPointPatchVectorField.H b/src/waveModels/derivedPointPatchFields/waveMaker/waveMakerPointPatchVectorField.H index e71e9044ef..b82a92ccca 100644 --- a/src/waveModels/derivedPointPatchFields/waveMaker/waveMakerPointPatchVectorField.H +++ b/src/waveModels/derivedPointPatchFields/waveMaker/waveMakerPointPatchVectorField.H @@ -248,18 +248,6 @@ public: const pointPatchFieldMapper& ); - //- Construct and return a clone - virtual autoPtr> clone() const - { - return autoPtr> - ( - new waveMakerPointPatchVectorField - ( - *this - ) - ); - } - //- Construct as copy setting internal field reference waveMakerPointPatchVectorField ( @@ -267,20 +255,19 @@ public: const DimensionedField& ); + //- Return a clone + virtual autoPtr> clone() const + { + return pointPatchField::Clone(*this); + } + //- Construct and return a clone setting internal field reference virtual autoPtr> clone ( const DimensionedField& iF ) const { - return autoPtr> - ( - new waveMakerPointPatchVectorField - ( - *this, - iF - ) - ); + return pointPatchField::Clone(*this, iF); }