diff --git a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.C b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.C index 6b26992fbc..b29ccc1191 100644 --- a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.C +++ b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014 OpenFOAM Foundation + Copyright (C) 2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -27,43 +28,35 @@ License #include "zeroFixedValuePointPatchField.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * // template -zeroFixedValuePointPatchField:: -zeroFixedValuePointPatchField +Foam::zeroFixedValuePointPatchField::zeroFixedValuePointPatchField ( const pointPatch& p, const DimensionedField& iF ) : - fixedValuePointPatchField(p, iF) + // Field is zero + fixedValuePointPatchField(p, iF, Type(Zero)) {} template -zeroFixedValuePointPatchField:: -zeroFixedValuePointPatchField +Foam::zeroFixedValuePointPatchField::zeroFixedValuePointPatchField ( const pointPatch& p, const DimensionedField& iF, const dictionary& dict ) : - fixedValuePointPatchField(p, iF, dict, false) -{ - fixedValuePointPatchField::operator=(Type(Zero)); -} + // Field is zero + fixedValuePointPatchField(p, iF, Type(Zero)) +{} template -zeroFixedValuePointPatchField:: -zeroFixedValuePointPatchField +Foam::zeroFixedValuePointPatchField::zeroFixedValuePointPatchField ( const zeroFixedValuePointPatchField& ptf, const pointPatch& p, @@ -71,27 +64,26 @@ zeroFixedValuePointPatchField const pointPatchFieldMapper& mapper ) : - fixedValuePointPatchField(ptf, p, iF, mapper) -{ - // For safety re-evaluate - fixedValuePointPatchField::operator=(Type(Zero)); -} + // Field is zero : no mapping needed + fixedValuePointPatchField(p, iF, Type(Zero)) +{} template -zeroFixedValuePointPatchField:: -zeroFixedValuePointPatchField +Foam::zeroFixedValuePointPatchField::zeroFixedValuePointPatchField ( const zeroFixedValuePointPatchField& ptf ) : fixedValuePointPatchField(ptf) -{} +{ + // Field is zero. For safety, re-assign + valuePointPatchField::operator=(Type(Zero)); +} template -zeroFixedValuePointPatchField:: -zeroFixedValuePointPatchField +Foam::zeroFixedValuePointPatchField::zeroFixedValuePointPatchField ( const zeroFixedValuePointPatchField& ptf, const DimensionedField& iF @@ -99,13 +91,9 @@ zeroFixedValuePointPatchField : fixedValuePointPatchField(ptf, iF) { - // For safety re-evaluate - fixedValuePointPatchField::operator=(Type(Zero)); + // Field is zero. For safety, re-assign + valuePointPatchField::operator=(Type(Zero)); } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.H b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.H index 8b52d2d10e..41862edb7b 100644 --- a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.H +++ b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.H @@ -42,8 +42,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef zeroFixedValuePointPatchField_H -#define zeroFixedValuePointPatchField_H +#ifndef Foam_zeroFixedValuePointPatchField_H +#define Foam_zeroFixedValuePointPatchField_H #include "fixedValuePointPatchField.H" @@ -53,7 +53,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class zeroFixedValuePointPatchField Declaration + Class zeroFixedValuePointPatchField Declaration \*---------------------------------------------------------------------------*/ template @@ -61,7 +61,6 @@ class zeroFixedValuePointPatchField : public fixedValuePointPatchField { - public: //- Runtime type information @@ -135,7 +134,6 @@ public: ) ); } - };