diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.C index faf6e0018d..71324652b2 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2019 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -28,22 +29,6 @@ License #include "valuePointPatchField.H" #include "pointPatchFieldMapper.H" -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template -void Foam::valuePointPatchField::checkFieldSize() const -{ - if (this->size() != this->patch().size()) - { - FatalErrorInFunction - << "field does not correspond to patch. " << endl - << "Field size: " << size() << " patch size: " - << this->patch().size() - << abort(FatalError); - } -} - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * // template @@ -84,7 +69,7 @@ Foam::valuePointPatchField::valuePointPatchField else { FatalIOErrorInFunction(dict) - << "Essential entry 'value' missing" + << "Essential entry 'value' missing on patch " << p.name() << exit(FatalIOError); } } diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H index f3eb55ee19..23336a4fe3 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H @@ -54,11 +54,6 @@ class valuePointPatchField public pointPatchField, public Field { - // Private Member Functions - - void checkFieldSize() const; - - public: //- Runtime type information diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatch.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatch.C index ca121c7655..6214d4a949 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatch.C +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatch.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2019 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -31,55 +32,54 @@ License #include "demandDrivenData.H" #include "addToRunTimeSelectionTable.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { + defineTypeNameAndDebug(facePointPatch, 0); + defineRunTimeSelectionTable(facePointPatch, polyPatch); -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + addToRunTimeSelectionTable + ( + facePointPatch, + facePointPatch, + polyPatch + ); -defineTypeNameAndDebug(facePointPatch, 0); -defineRunTimeSelectionTable(facePointPatch, polyPatch); - -addToRunTimeSelectionTable -( - facePointPatch, - facePointPatch, - polyPatch -); +} // End namespace Foam // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // -void facePointPatch::initGeometry(PstreamBuffers&) +void Foam::facePointPatch::initGeometry(PstreamBuffers&) {} -void facePointPatch::calcGeometry(PstreamBuffers&) +void Foam::facePointPatch::calcGeometry(PstreamBuffers&) {} -void facePointPatch::initMovePoints(PstreamBuffers&, const pointField&) +void Foam::facePointPatch::initMovePoints(PstreamBuffers&, const pointField&) {} -void facePointPatch::movePoints(PstreamBuffers&, const pointField&) +void Foam::facePointPatch::movePoints(PstreamBuffers&, const pointField&) {} -void facePointPatch::initUpdateMesh(PstreamBuffers& pBufs) +void Foam::facePointPatch::initUpdateMesh(PstreamBuffers& pBufs) { facePointPatch::initGeometry(pBufs); } -void facePointPatch::updateMesh(PstreamBuffers&) +void Foam::facePointPatch::updateMesh(PstreamBuffers&) {} // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -facePointPatch::facePointPatch +Foam::facePointPatch::facePointPatch ( const polyPatch& p, const pointBoundaryMesh& bm @@ -90,8 +90,4 @@ facePointPatch::facePointPatch {} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatch.H index b55f6903a7..539f2901a0 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatch.H +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatch.H @@ -52,7 +52,7 @@ class processorPointPatch; class cyclicPointPatch; /*---------------------------------------------------------------------------*\ - Class facePointPatch Declaration + Class facePointPatch Declaration \*---------------------------------------------------------------------------*/ class facePointPatch @@ -88,10 +88,6 @@ protected: virtual void updateMesh(PstreamBuffers&); -private: - - // Private Member Functions - //- No copy construct facePointPatch(const facePointPatch&) = delete; @@ -125,11 +121,11 @@ public: // Constructors - //- Construct from polyPatch + //- Construct from polyPatch and boundary mesh facePointPatch ( - const polyPatch&, - const pointBoundaryMesh& + const polyPatch& p, + const pointBoundaryMesh& pm ); @@ -150,7 +146,7 @@ public: // Member Functions //- Return the polyPatch - const polyPatch& patch() const + virtual const polyPatch& patch() const { return polyPatch_; } @@ -185,14 +181,12 @@ public: return polyPatch_.meshPoints(); } - //- Return pointField of points in patch virtual const pointField& localPoints() const { return polyPatch_.localPoints(); } - //- Return point unit normals virtual const vectorField& pointNormals() const { diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/pointPatch/pointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/pointPatch/pointPatch.H index 04a9c96be6..933e4ad1d6 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/pointPatch/pointPatch.H +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/pointPatch/pointPatch.H @@ -47,8 +47,7 @@ SourceFiles namespace Foam { -// Forward declaration of classes - +// Forward Declarations class pointBoundaryMesh; class pointConstraint; class PstreamBuffers; @@ -59,26 +58,16 @@ class PstreamBuffers; class pointPatch { - // Private data + // Private Data //- Reference to boundary mesh const pointBoundaryMesh& boundaryMesh_; - - // Private Member Functions - - //- No copy construct - pointPatch(const pointPatch&) = delete; - - //- No copy assignment - void operator=(const pointPatch&) = delete; - - protected: // Protected Member Functions - // The pointPatch geometry initialisation is called by pointBoundaryMesh + // The geometry initialisation is called by pointBoundaryMesh friend class pointBoundaryMesh; //- Initialise the calculation of the patch geometry @@ -106,6 +95,13 @@ protected: {} + //- No copy construct + pointPatch(const pointPatch&) = delete; + + //- No copy assignment + void operator=(const pointPatch&) = delete; + + public: //- Runtime type information @@ -114,10 +110,8 @@ public: // Constructor - pointPatch - ( - const pointBoundaryMesh& bm - ) + //- Construct from boundary mesh + explicit pointPatch(const pointBoundaryMesh& bm) : boundaryMesh_(bm) {} diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C index 53effd4712..c45b738ed3 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C @@ -129,7 +129,7 @@ Foam::fvPatchField::fvPatchField else { FatalIOErrorInFunction(dict) - << "Essential entry 'value' missing" + << "Essential entry 'value' missing on patch " << p.name() << nl << exit(FatalIOError); } } diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C index 4278dea799..28f1c05a19 100644 --- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C @@ -98,7 +98,7 @@ Foam::fvsPatchField::fvsPatchField else { FatalIOErrorInFunction(dict) - << "essential 'value' entry not provided" + << "Essential entry 'value' missing on patch " << p.name() << nl << exit(FatalIOError); } }