diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C index 1ced04106f405721d2441e827f056e717ef2e238..304e524ecd81a366dea0a5489eec83285c5c6502 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C @@ -243,7 +243,7 @@ Foam::GAMGAgglomeration::GAMGAgglomeration const dictionary& controlDict ) : - MeshObject<lduMesh, Foam::GeometricMeshObject, GAMGAgglomeration>(mesh), + MeshObject_type(mesh), maxLevels_(50), diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.H b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.H index 65112a50d992eb9b50e32a6bd777592d582e6c27..8fdd75235f38246a03efd45738e0a7723680d8f4 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.H +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.H @@ -67,9 +67,19 @@ class GAMGAgglomeration : public MeshObject<lduMesh, GeometricMeshObject, GAMGAgglomeration> { + // Private Typedefs + + typedef MeshObject + < + lduMesh, + GeometricMeshObject, + GAMGAgglomeration + > MeshObject_type; + + protected: - // Protected data + // Protected Data //- Max number of levels const label maxLevels_; diff --git a/src/OpenFOAM/meshes/pointMesh/pointMesh.C b/src/OpenFOAM/meshes/pointMesh/pointMesh.C index fec7502d4bdcc57e0864069f7a94540851fca30c..3f36c56332a6f6130742e649b9b97a357f2fcd32 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointMesh.C +++ b/src/OpenFOAM/meshes/pointMesh/pointMesh.C @@ -37,9 +37,10 @@ License namespace Foam { -defineTypeNameAndDebug(pointMesh, 0); + defineTypeNameAndDebug(pointMesh, 0); } + // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void Foam::pointMesh::mapFields(const mapPolyMesh& mpm) @@ -72,7 +73,7 @@ void Foam::pointMesh::mapFields(const mapPolyMesh& mpm) Foam::pointMesh::pointMesh(const polyMesh& pMesh) : - MeshObject<polyMesh, Foam::UpdateableMeshObject, pointMesh>(pMesh), + MeshObject_type(pMesh), GeoMesh<polyMesh>(pMesh), boundary_(*this, pMesh.boundaryMesh()) { diff --git a/src/OpenFOAM/meshes/pointMesh/pointMesh.H b/src/OpenFOAM/meshes/pointMesh/pointMesh.H index e28905ea80e653f03f0013f36b9644dbdb918e01..58462132078c368185b71681c61b17bd3ce6a2bf 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointMesh.H +++ b/src/OpenFOAM/meshes/pointMesh/pointMesh.H @@ -54,6 +54,16 @@ class pointMesh public MeshObject<polyMesh, UpdateableMeshObject, pointMesh>, public GeoMesh<polyMesh> { + // Private Typedefs + + typedef MeshObject + < + polyMesh, + UpdateableMeshObject, + pointMesh + > MeshObject_type; + + // Permanent Data //- Boundary mesh diff --git a/src/fileFormats/common/manifoldCellsMeshObject.C b/src/fileFormats/common/manifoldCellsMeshObject.C index 3810334129924f737ef4dbf2f416128cad0f4ecb..8bc6714bffa15b99049378ce3c6f9d937145bebc 100644 --- a/src/fileFormats/common/manifoldCellsMeshObject.C +++ b/src/fileFormats/common/manifoldCellsMeshObject.C @@ -166,7 +166,7 @@ Foam::refPtr<Foam::cellList> Foam::manifoldCellsMeshObject::filter Foam::manifoldCellsMeshObject::manifoldCellsMeshObject(const polyMesh& mesh) : - MeshObject<polyMesh, UpdateableMeshObject, manifoldCellsMeshObject>(mesh), + MeshObject_type(mesh), cellsPtr_(nullptr), nCorrected_(-1) {} diff --git a/src/fileFormats/common/manifoldCellsMeshObject.H b/src/fileFormats/common/manifoldCellsMeshObject.H index b063576102dfc7f301280c7420f278329e232bbf..57aebd52b24c9cf4ec921170f57feaf7a1eb83ca 100644 --- a/src/fileFormats/common/manifoldCellsMeshObject.H +++ b/src/fileFormats/common/manifoldCellsMeshObject.H @@ -55,6 +55,16 @@ class manifoldCellsMeshObject : public MeshObject<polyMesh, UpdateableMeshObject, manifoldCellsMeshObject> { + // Private Typedefs + + typedef MeshObject + < + polyMesh, + UpdateableMeshObject, + manifoldCellsMeshObject + > MeshObject_type; + + // Private Data //- The adjusted cells list @@ -90,7 +100,7 @@ public: // Constructors //- Construct from mesh - manifoldCellsMeshObject(const polyMesh& mesh); + explicit manifoldCellsMeshObject(const polyMesh& mesh); //- Destructor diff --git a/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.C b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.C index f0718e17e182ead406236680cf5822aac5ee5c72..44288ccf84bf2d91da1db62f437c47f77b55a6e8 100644 --- a/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.C +++ b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.C @@ -29,7 +29,6 @@ License #include "leastSquaresFaVectors.H" #include "edgeFields.H" #include "areaFields.H" -#include "demandDrivenData.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -43,7 +42,7 @@ namespace Foam Foam::leastSquaresFaVectors::leastSquaresFaVectors(const faMesh& mesh) : - MeshObject<faMesh, Foam::MoveableMeshObject, leastSquaresFaVectors>(mesh) + MeshObject_type(mesh) {} diff --git a/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.H b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.H index 701dcf29aead100f6f3d3237791eee7b3af92f4d..2e24f7d6aa6e3650abfc714d7dcfe8b9ddbf3211 100644 --- a/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.H +++ b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.H @@ -55,8 +55,18 @@ namespace Foam class leastSquaresFaVectors : - public MeshObject<faMesh, Foam::MoveableMeshObject, leastSquaresFaVectors> + public MeshObject<faMesh, MoveableMeshObject, leastSquaresFaVectors> { + // Private Typedefs + + typedef MeshObject + < + faMesh, + MoveableMeshObject, + leastSquaresFaVectors + > MeshObject_type; + + // Private Data //- Least-squares gradient vectors diff --git a/src/finiteVolume/cfdTools/general/meshObjects/gravity/gravityMeshObject.C b/src/finiteVolume/cfdTools/general/meshObjects/gravity/gravityMeshObject.C index d0de1e97ec27e52c21030e8b2f68a76825f90220..e33603a1d369ee3df775e13c47e430002a28655c 100644 --- a/src/finiteVolume/cfdTools/general/meshObjects/gravity/gravityMeshObject.C +++ b/src/finiteVolume/cfdTools/general/meshObjects/gravity/gravityMeshObject.C @@ -42,7 +42,7 @@ namespace meshObjects Foam::meshObjects::gravity::gravity(const word& name, const Time& runTime) : - MeshObject<Time, TopologicalMeshObject, gravity>(name, runTime), + MeshObject_type(name, runTime), uniformDimensionedVectorField ( IOobject @@ -50,7 +50,7 @@ Foam::meshObjects::gravity::gravity(const word& name, const Time& runTime) name, runTime.constant(), runTime, - IOobject::MUST_READ_IF_MODIFIED, + IOobject::READ_MODIFIED, IOobject::NO_WRITE, IOobject::NO_REGISTER // Already registered by MeshObject ) diff --git a/src/finiteVolume/cfdTools/general/meshObjects/gravity/gravityMeshObject.H b/src/finiteVolume/cfdTools/general/meshObjects/gravity/gravityMeshObject.H index fc84e49a628500d425ed2f370cb3d51184b328a2..87784ab73b39bf999188580dbbb1b9d0da7736c8 100644 --- a/src/finiteVolume/cfdTools/general/meshObjects/gravity/gravityMeshObject.H +++ b/src/finiteVolume/cfdTools/general/meshObjects/gravity/gravityMeshObject.H @@ -60,10 +60,19 @@ class gravity < Time, TopologicalMeshObject, - gravity + meshObjects::gravity >, public uniformDimensionedVectorField { + // Private Typedefs + + typedef MeshObject + < + Time, + TopologicalMeshObject, + meshObjects::gravity + > MeshObject_type; + public: //- Run-time type information @@ -72,12 +81,10 @@ public: // Constructors - //- Construct with given name on Time from \c constant - //- (MUST_READ_IF_MODIFIED) + //- Construct with given name on Time from \c constant (READ_MODIFIED) gravity(const word& name, const Time& runTime); - //- Construct "g" field on Time from \c constant - //- (MUST_READ_IF_MODIFIED) + //- Construct "g" field on Time from \c constant (READ_MODIFIED) explicit gravity(const Time& runTime) : gravity("g", runTime) @@ -86,20 +93,13 @@ public: //- Return named gravity field cached or construct on Time static const gravity& New(const word& name, const Time& runTime) { - return MeshObject<Time, TopologicalMeshObject, gravity>::New - ( - name, - runTime - ); + return MeshObject_type::New(name, runTime); } //- Return gravity "g" field cached or construct on Time static const gravity& New(const Time& runTime) { - return MeshObject<Time, TopologicalMeshObject, gravity>::New - ( - runTime - ); + return MeshObject_type::New(runTime); } diff --git a/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.C index f050487a2ceb69bb1c595e29382308b1e8c07cdb..ca6edf267e5744362a1e84c77f2f7f4131649cfa 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.C @@ -36,7 +36,7 @@ Foam::fv::LeastSquaresVectors<Stencil>::LeastSquaresVectors const fvMesh& mesh ) : - MeshObject<fvMesh, Foam::MoveableMeshObject, LeastSquaresVectors>(mesh), + MeshObject_type(mesh), vectors_(mesh.nCells()) { calcLeastSquaresVectors(); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.H b/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.H index 50127f2919a9f05324d7e09c235f8688644187ae..c6d9309c0a4cbf2368fd56ef67d0114e5270339a 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.H +++ b/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.H @@ -63,6 +63,16 @@ class LeastSquaresVectors : public MeshObject<fvMesh, MoveableMeshObject, LeastSquaresVectors<Stencil>> { + // Private Typedefs + + typedef MeshObject + < + fvMesh, + MoveableMeshObject, + LeastSquaresVectors<Stencil> + > MeshObject_type; + + // Private Data //- Least-squares gradient vectors @@ -84,17 +94,14 @@ public: // Constructors //- Construct given an fvMesh and the minimum determinant criterion - LeastSquaresVectors - ( - const fvMesh& - ); + explicit LeastSquaresVectors(const fvMesh& mesh); //- Destructor virtual ~LeastSquaresVectors(); - // Member functions + // Member Functions //- Return const reference to the stencil const extendedCentredCellToCellStencil& stencil() const diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C index 584968db7d3fcbda94907c84a69e3f2a384eb850..a86dfe7d728c77188aaa4e1ad57acabc8818eb18 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C @@ -41,7 +41,7 @@ namespace Foam Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh) : - MeshObject<fvMesh, Foam::MoveableMeshObject, leastSquaresVectors>(mesh), + MeshObject_type(mesh), pVectors_ ( IOobject diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C index c8f5b010511ed8372bc579ace2b020645988d932..5085e0c54313ca814fafe58351ef3900d38a9cb1 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C @@ -41,7 +41,7 @@ namespace Foam Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh) : - MeshObject<fvMesh, Foam::MoveableMeshObject, leastSquaresVectors>(mesh), + MeshObject_type(mesh), pVectors_ ( IOobject diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.H b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.H index 858d6f337e37304a355eca61fef90cd8fcea03c5..bc394099c59b84c01b46438430e1ae9e9ecfefb3 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.H +++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.H @@ -55,6 +55,16 @@ class leastSquaresVectors : public MeshObject<fvMesh, MoveableMeshObject, leastSquaresVectors> { + // Private Typedefs + + typedef MeshObject + < + fvMesh, + MoveableMeshObject, + leastSquaresVectors + > MeshObject_type; + + // Private Data //- Owner least-squares gradient vectors diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C index c19c1ba86b29734578404c0cbe4e4bd0336acbc8..3ff39ce10c83d75cc5e3ae7a85df34c6cd37303a 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C @@ -41,7 +41,7 @@ namespace Foam Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh) : - MeshObject<fvMesh, Foam::MoveableMeshObject, leastSquaresVectors>(mesh), + MeshObject_type(mesh), pVectors_ ( IOobject diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/MeshObjects/centredCECCellToCellStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/MeshObjects/centredCECCellToCellStencilObject.H index fa7ca9300aca8f89e5fc3e670c04efc8391b712e..a2d3e95c364852d9cd678c48360510241e641c4a 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/MeshObjects/centredCECCellToCellStencilObject.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/MeshObjects/centredCECCellToCellStencilObject.H @@ -59,6 +59,14 @@ class centredCECCellToCellStencilObject >, public extendedCentredCellToCellStencil { + // Private Typedefs + + typedef MeshObject + < + fvMesh, + TopologicalMeshObject, + centredCECCellToCellStencilObject + > MeshObject_type; public: @@ -72,12 +80,7 @@ public: const fvMesh& mesh ) : - MeshObject - < - fvMesh, - Foam::TopologicalMeshObject, - centredCECCellToCellStencilObject - >(mesh), + MeshObject_type(mesh), extendedCentredCellToCellStencil(CECCellToCellStencil(mesh)) {} diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/MeshObjects/centredCFCCellToCellStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/MeshObjects/centredCFCCellToCellStencilObject.H index 2f40ed966c27d7fc34d3faa674bfb3c919f70958..714aa57ad1bf7d09dc899c21ac51fe7295ce4809 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/MeshObjects/centredCFCCellToCellStencilObject.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/MeshObjects/centredCFCCellToCellStencilObject.H @@ -59,6 +59,14 @@ class centredCFCCellToCellStencilObject >, public extendedCentredCellToCellStencil { + // Private Typedefs + + typedef MeshObject + < + fvMesh, + TopologicalMeshObject, + centredCFCCellToCellStencilObject + > MeshObject_type; public: @@ -72,12 +80,7 @@ public: const fvMesh& mesh ) : - MeshObject - < - fvMesh, - Foam::TopologicalMeshObject, - centredCFCCellToCellStencilObject - >(mesh), + MeshObject_type(mesh), extendedCentredCellToCellStencil(CFCCellToCellStencil(mesh)) {} diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/MeshObjects/centredCPCCellToCellStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/MeshObjects/centredCPCCellToCellStencilObject.H index 4ce941cd889715646bd603ff0f928eace88aaff3..3bb38e4b5665eda632180ad8fcfd4445954e10ce 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/MeshObjects/centredCPCCellToCellStencilObject.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/MeshObjects/centredCPCCellToCellStencilObject.H @@ -59,11 +59,20 @@ class centredCPCCellToCellStencilObject >, public extendedCentredCellToCellStencil { + // Private Typedefs + + typedef MeshObject + < + fvMesh, + TopologicalMeshObject, + centredCPCCellToCellStencilObject + > MeshObject_type; public: TypeName("centredCPCCellToCellStencil"); + // Constructors //- Construct from uncompacted cell stencil @@ -72,12 +81,7 @@ public: const fvMesh& mesh ) : - MeshObject - < - fvMesh, - Foam::TopologicalMeshObject, - centredCPCCellToCellStencilObject - >(mesh), + MeshObject_type(mesh), extendedCentredCellToCellStencil(CPCCellToCellStencil(mesh)) {} diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCECCellToFaceStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCECCellToFaceStencilObject.H index ab7190817d2c4d215a9bcdcfeaed475bfc5f8851..b3d89d29d930fb630d5107e29bb7853b565f67a0 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCECCellToFaceStencilObject.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCECCellToFaceStencilObject.H @@ -59,11 +59,20 @@ class centredCECCellToFaceStencilObject >, public extendedCentredCellToFaceStencil { + // Private Typedefs + + typedef MeshObject + < + fvMesh, + TopologicalMeshObject, + centredCECCellToFaceStencilObject + > MeshObject_type; public: TypeName("centredCECCellToFaceStencil"); + // Constructors //- Construct from uncompacted face stencil @@ -72,12 +81,7 @@ public: const fvMesh& mesh ) : - MeshObject - < - fvMesh, - Foam::TopologicalMeshObject, - centredCECCellToFaceStencilObject - >(mesh), + MeshObject_type(mesh), extendedCentredCellToFaceStencil(CECCellToFaceStencil(mesh)) { if (extendedCellToFaceStencil::debug) diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCFCCellToFaceStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCFCCellToFaceStencilObject.H index d370746fb174c94eb457a381ee57556084730189..121f618aaf84b2fa227bd74fc18d236ff4e5a5f1 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCFCCellToFaceStencilObject.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCFCCellToFaceStencilObject.H @@ -59,11 +59,20 @@ class centredCFCCellToFaceStencilObject >, public extendedCentredCellToFaceStencil { + // Private Typedefs + + typedef MeshObject + < + fvMesh, + TopologicalMeshObject, + centredCFCCellToFaceStencilObject + > MeshObject_type; public: TypeName("centredCFCCellToFaceStencil"); + // Constructors //- Construct from uncompacted face stencil @@ -72,12 +81,7 @@ public: const fvMesh& mesh ) : - MeshObject - < - fvMesh, - Foam::TopologicalMeshObject, - centredCFCCellToFaceStencilObject - >(mesh), + MeshObject_type(mesh), extendedCentredCellToFaceStencil(CFCCellToFaceStencil(mesh)) { if (extendedCellToFaceStencil::debug) diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCPCCellToFaceStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCPCCellToFaceStencilObject.H index 97dc251d17bbc899e8168ba1325ce67aaa35c4e3..2c5b869bedc3fd91513942f1f0c19c1705b21b9c 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCPCCellToFaceStencilObject.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCPCCellToFaceStencilObject.H @@ -59,11 +59,20 @@ class centredCPCCellToFaceStencilObject >, public extendedCentredCellToFaceStencil { + // Private Typedefs + + typedef MeshObject + < + fvMesh, + TopologicalMeshObject, + centredCPCCellToFaceStencilObject + > MeshObject_type; public: TypeName("centredCPCCellToFaceStencil"); + // Constructors //- Construct from uncompacted face stencil @@ -72,12 +81,7 @@ public: const fvMesh& mesh ) : - MeshObject - < - fvMesh, - Foam::TopologicalMeshObject, - centredCPCCellToFaceStencilObject - >(mesh), + MeshObject_type(mesh), extendedCentredCellToFaceStencil(CPCCellToFaceStencil(mesh)) { if (extendedCellToFaceStencil::debug) diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredFECCellToFaceStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredFECCellToFaceStencilObject.H index 417c38026caae071cef9cc428fb3f5ff1355fbb8..05e68c6b3e2a50d1ad297bfbe59a9d9279284c9d 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredFECCellToFaceStencilObject.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredFECCellToFaceStencilObject.H @@ -59,11 +59,20 @@ class centredFECCellToFaceStencilObject >, public extendedCentredCellToFaceStencil { + // Private Typedefs + + typedef MeshObject + < + fvMesh, + TopologicalMeshObject, + centredFECCellToFaceStencilObject + > MeshObject_type; public: TypeName("centredFECCellToFaceStencil"); + // Constructors //- Construct from uncompacted face stencil @@ -72,12 +81,7 @@ public: const fvMesh& mesh ) : - MeshObject - < - fvMesh, - Foam::TopologicalMeshObject, - centredFECCellToFaceStencilObject - >(mesh), + MeshObject_type(mesh), extendedCentredCellToFaceStencil(FECCellToFaceStencil(mesh)) { if (extendedCellToFaceStencil::debug) diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/pureUpwindCFCCellToFaceStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/pureUpwindCFCCellToFaceStencilObject.H index 878c77b476b6ab95c280007de7c16a07246eea05..0cc9542fb58219f81958fffb6ff305e05c49d396 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/pureUpwindCFCCellToFaceStencilObject.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/pureUpwindCFCCellToFaceStencilObject.H @@ -59,11 +59,20 @@ class pureUpwindCFCCellToFaceStencilObject >, public extendedUpwindCellToFaceStencil { + // Private Typedefs + + typedef MeshObject + < + fvMesh, + TopologicalMeshObject, + pureUpwindCFCCellToFaceStencilObject + > MeshObject_type; public: TypeName("pureUpwindCFCCellToFaceStencil"); + // Constructors //- Construct from uncompacted face stencil @@ -72,12 +81,7 @@ public: const fvMesh& mesh ) : - MeshObject - < - fvMesh, - Foam::TopologicalMeshObject, - pureUpwindCFCCellToFaceStencilObject - >(mesh), + MeshObject_type(mesh), extendedUpwindCellToFaceStencil(CFCCellToFaceStencil(mesh)) { if (extendedCellToFaceStencil::debug) diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCECCellToFaceStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCECCellToFaceStencilObject.H index 0eb9db494ba10fd25bd6e58b459bc232081b737c..701d1698f69daf413cbb2f0f4bcfa44794758c7a 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCECCellToFaceStencilObject.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCECCellToFaceStencilObject.H @@ -59,11 +59,20 @@ class upwindCECCellToFaceStencilObject >, public extendedUpwindCellToFaceStencil { + // Private Typedefs + + typedef MeshObject + < + fvMesh, + TopologicalMeshObject, + upwindCECCellToFaceStencilObject + > MeshObject_type; public: TypeName("upwindCECCellToFaceStencil"); + // Constructors //- Construct from uncompacted face stencil @@ -74,12 +83,7 @@ public: const scalar minOpposedness ) : - MeshObject - < - fvMesh, - Foam::TopologicalMeshObject, - upwindCECCellToFaceStencilObject - >(mesh), + MeshObject_type(mesh), extendedUpwindCellToFaceStencil ( CECCellToFaceStencil(mesh), diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCFCCellToFaceStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCFCCellToFaceStencilObject.H index c3505df95ae28f0dec2eda84b9896283beb0041d..a3cea19277cce346e50abeb3e855f36a18298ddb 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCFCCellToFaceStencilObject.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCFCCellToFaceStencilObject.H @@ -59,11 +59,21 @@ class upwindCFCCellToFaceStencilObject >, public extendedUpwindCellToFaceStencil { + // Private Typedefs + + typedef MeshObject + < + fvMesh, + TopologicalMeshObject, + upwindCFCCellToFaceStencilObject + > MeshObject_type; + public: TypeName("upwindCFCCellToFaceStencil"); + // Constructors //- Construct from uncompacted face stencil @@ -74,12 +84,7 @@ public: const scalar minOpposedness ) : - MeshObject - < - fvMesh, - Foam::TopologicalMeshObject, - upwindCFCCellToFaceStencilObject - >(mesh), + MeshObject_type(mesh), extendedUpwindCellToFaceStencil ( CFCCellToFaceStencil(mesh), diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCPCCellToFaceStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCPCCellToFaceStencilObject.H index f2757a76627f24664a8d4bd4d5e1aec197422075..985ae89956145fa8512bec10c2695ed254d1f257 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCPCCellToFaceStencilObject.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCPCCellToFaceStencilObject.H @@ -59,11 +59,20 @@ class upwindCPCCellToFaceStencilObject >, public extendedUpwindCellToFaceStencil { + // Private Typedefs + + typedef MeshObject + < + fvMesh, + TopologicalMeshObject, + upwindCPCCellToFaceStencilObject + > MeshObject_type; public: TypeName("upwindCPCCellToFaceStencil"); + // Constructors //- Construct from uncompacted face stencil @@ -74,12 +83,7 @@ public: const scalar minOpposedness ) : - MeshObject - < - fvMesh, - Foam::TopologicalMeshObject, - upwindCPCCellToFaceStencilObject - >(mesh), + MeshObject_type(mesh), extendedUpwindCellToFaceStencil ( CPCCellToFaceStencil(mesh), diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindFECCellToFaceStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindFECCellToFaceStencilObject.H index 8468e763080623e6b314173e5b65f88ee6908014..97f69a1812601250ff1df45f1446f959d013d285 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindFECCellToFaceStencilObject.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindFECCellToFaceStencilObject.H @@ -59,6 +59,14 @@ class upwindFECCellToFaceStencilObject >, public extendedUpwindCellToFaceStencil { + // Private Typedefs + + typedef MeshObject + < + fvMesh, + TopologicalMeshObject, + upwindFECCellToFaceStencilObject + > MeshObject_type; public: @@ -74,12 +82,7 @@ public: const scalar minOpposedness ) : - MeshObject - < - fvMesh, - Foam::TopologicalMeshObject, - upwindFECCellToFaceStencilObject - >(mesh), + MeshObject_type(mesh), extendedUpwindCellToFaceStencil ( FECCellToFaceStencil(mesh), diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/MeshObjects/centredCFCFaceToCellStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/MeshObjects/centredCFCFaceToCellStencilObject.H index 4250e2e73e293951933863bf45ebf8d89f1c584c..8b04035ed1141ae66d76bd58db0b32a9ff57b08c 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/MeshObjects/centredCFCFaceToCellStencilObject.H +++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/MeshObjects/centredCFCFaceToCellStencilObject.H @@ -59,11 +59,20 @@ class centredCFCFaceToCellStencilObject >, public extendedCentredFaceToCellStencil { + // Private Typedefs + + typedef MeshObject + < + fvMesh, + TopologicalMeshObject, + centredCFCFaceToCellStencilObject + > MeshObject_type; public: TypeName("centredCFCFaceToCellStencil"); + // Constructors //- Construct from uncompacted face stencil @@ -72,12 +81,7 @@ public: const fvMesh& mesh ) : - MeshObject - < - fvMesh, - Foam::TopologicalMeshObject, - centredCFCFaceToCellStencilObject - >(mesh), + MeshObject_type(mesh), extendedCentredFaceToCellStencil(CFCFaceToCellStencil(mesh)) {} diff --git a/src/finiteVolume/fvMesh/fvGeometryScheme/highAspectRatio/cellAspectRatio.C b/src/finiteVolume/fvMesh/fvGeometryScheme/highAspectRatio/cellAspectRatio.C index bfb3ebe215db8d565b2b03aaf51d451d181a81ec..efa5a01fd9e89b68d8fd6ff6bf206445476cf7aa 100644 --- a/src/finiteVolume/fvMesh/fvGeometryScheme/highAspectRatio/cellAspectRatio.C +++ b/src/finiteVolume/fvMesh/fvGeometryScheme/highAspectRatio/cellAspectRatio.C @@ -39,7 +39,7 @@ namespace Foam Foam::cellAspectRatio::cellAspectRatio(const polyMesh& mesh) : - MeshObject<polyMesh, Foam::MoveableMeshObject, cellAspectRatio>(mesh) + MeshObject_type(mesh) { calcAspectRatio(); } diff --git a/src/finiteVolume/fvMesh/fvGeometryScheme/highAspectRatio/cellAspectRatio.H b/src/finiteVolume/fvMesh/fvGeometryScheme/highAspectRatio/cellAspectRatio.H index ed0dd9ab3e5737b064970991027424c76d7750fc..071ac186cf8621804e32500534a6272b67291621 100644 --- a/src/finiteVolume/fvMesh/fvGeometryScheme/highAspectRatio/cellAspectRatio.H +++ b/src/finiteVolume/fvMesh/fvGeometryScheme/highAspectRatio/cellAspectRatio.H @@ -54,6 +54,16 @@ class cellAspectRatio public MeshObject<polyMesh, MoveableMeshObject, cellAspectRatio>, public scalarField { + // Private Typedefs + + typedef MeshObject + < + polyMesh, + MoveableMeshObject, + cellAspectRatio + > MeshObject_type; + + // Private Member Functions //- Construct aspect ratio diff --git a/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C b/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C index 458efc2e2dfb175d19825cb8848a5521a2a2871c..5e960a8489f118b06186d5a0a95af3435401ce8a 100644 --- a/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C +++ b/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C @@ -90,7 +90,7 @@ Foam::wallDist::wallDist const word& patchTypeName ) : - MeshObject<fvMesh, Foam::UpdateableMeshObject, wallDist>(mesh), + MeshObject_type(mesh), patchIDs_(patchIDs), patchTypeName_(patchTypeName), dict_ @@ -154,6 +154,22 @@ Foam::wallDist::~wallDist() {} +// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * // + +bool Foam::wallDist::try_movePoints(const fvMesh& mesh) +{ + auto* ptr = + mesh.getObjectPtr<UpdateableMeshObject<fvMesh>>("wallDist"); + + if (ptr) + { + return ptr->movePoints(); + } + + return false; +} + + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // const Foam::volVectorField& Foam::wallDist::n() const diff --git a/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.H b/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.H index d2dfa391b60d3fd967c728cac163e378ef9abb26..b1938be2bcf3600f7e77ea9e6e30d8836910dcc1 100644 --- a/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.H +++ b/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.H @@ -77,7 +77,17 @@ class wallDist : public MeshObject<fvMesh, UpdateableMeshObject, wallDist> { - // Private data + // Private Typedefs + + typedef MeshObject + < + fvMesh, + UpdateableMeshObject, + wallDist + > MeshObject_type; + + + // Private Data //- Set of patch IDs const labelHashSet patchIDs_; @@ -157,6 +167,13 @@ public: virtual ~wallDist(); + // Static Member Functions + + //- Trigger update of y-field for the "wallDist" MeshObject on the + //- given mesh. A no-op if the wallDist is not found. + static bool try_movePoints(const fvMesh& mesh); + + // Member Functions //- Return the patchIDs diff --git a/src/finiteVolume/fvMesh/wallDist/wallDistAddressing/wallDistAddressing.C b/src/finiteVolume/fvMesh/wallDist/wallDistAddressing/wallDistAddressing.C index e7f21e66b2cefb03937037f2fbb4d0551474f860..653079e98e37454552460084d2af398b5fb2768f 100644 --- a/src/finiteVolume/fvMesh/wallDist/wallDistAddressing/wallDistAddressing.C +++ b/src/finiteVolume/fvMesh/wallDist/wallDistAddressing/wallDistAddressing.C @@ -387,7 +387,7 @@ Foam::wallDistAddressing::wallDistAddressing ) : // Register as "wallDistAddressing" - MeshObject<fvMesh, Foam::UpdateableMeshObject, wallDistAddressing>(mesh), + MeshObject_type(mesh), cellDistFuncs(mesh), patchIDs_(mesh.boundaryMesh().findPatchIDs<wallPolyPatch>().sortedToc()), patchTypeName_("wall"), @@ -420,11 +420,7 @@ Foam::wallDistAddressing::wallDistAddressing const label updateInterval ) : - MeshObject<fvMesh, Foam::UpdateableMeshObject, wallDistAddressing> - ( - patchTypeName, - mesh - ), + MeshObject_type(patchTypeName, mesh), cellDistFuncs(mesh), patchIDs_(patchIDs), patchTypeName_(patchTypeName), diff --git a/src/finiteVolume/fvMesh/wallDist/wallDistAddressing/wallDistAddressing.H b/src/finiteVolume/fvMesh/wallDist/wallDistAddressing/wallDistAddressing.H index 4bc5855b19b9b6a73244188329aab5939185149a..a1e2034297131e22d2547e8330bf672530252a29 100644 --- a/src/finiteVolume/fvMesh/wallDist/wallDistAddressing/wallDistAddressing.H +++ b/src/finiteVolume/fvMesh/wallDist/wallDistAddressing/wallDistAddressing.H @@ -114,8 +114,19 @@ class wallDistAddressing public MeshObject<fvMesh, UpdateableMeshObject, wallDistAddressing>, public cellDistFuncs { + // Private Typedefs + + typedef MeshObject + < + fvMesh, + UpdateableMeshObject, + wallDistAddressing + > MeshObject_type; + + //- Use fvMesh& instead of cellDistFuncs polyMesh& - using MeshObject<fvMesh, UpdateableMeshObject, wallDistAddressing>::mesh_; + using MeshObject_type::mesh_; + protected: diff --git a/src/finiteVolume/fvMesh/zoneDistribute/zoneDistribute.C b/src/finiteVolume/fvMesh/zoneDistribute/zoneDistribute.C index aae092a6d0d9411541756a9e7388dffe452527c3..0aa301237de437bcec7adde3cda676ce13bedaa9 100644 --- a/src/finiteVolume/fvMesh/zoneDistribute/zoneDistribute.C +++ b/src/finiteVolume/fvMesh/zoneDistribute/zoneDistribute.C @@ -40,7 +40,7 @@ namespace Foam Foam::zoneDistribute::zoneDistribute(const fvMesh& mesh) : - MeshObject<fvMesh, Foam::TopologicalMeshObject, zoneDistribute>(mesh), + MeshObject_type(mesh), stencil_(zoneCPCStencil::New(mesh)), globalNumbering_(stencil_.globalNumbering()), send_(UPstream::nProcs()), diff --git a/src/finiteVolume/fvMesh/zoneDistribute/zoneDistribute.H b/src/finiteVolume/fvMesh/zoneDistribute/zoneDistribute.H index 3b0e182a582260ef1b3d114ecd74e7736aad8490..dce29d9f868ae380206abfaf205793d43ec8fd49 100644 --- a/src/finiteVolume/fvMesh/zoneDistribute/zoneDistribute.H +++ b/src/finiteVolume/fvMesh/zoneDistribute/zoneDistribute.H @@ -82,6 +82,16 @@ class zoneDistribute : public MeshObject<fvMesh, TopologicalMeshObject, zoneDistribute> { + // Private Typedefs + + typedef MeshObject + < + fvMesh, + TopologicalMeshObject, + zoneDistribute + > MeshObject_type; + + // Private Data //- Reference to the zone stencil diff --git a/src/finiteVolume/fvMesh/zoneDistribute/zoneStencils/zoneCPCStencil.C b/src/finiteVolume/fvMesh/zoneDistribute/zoneStencils/zoneCPCStencil.C index 8f6ae13f09801fc4ee4f6bec286fe1d2be6764fc..1fb210d0b32ff2d3f4515ced421114abf0bf5eac 100644 --- a/src/finiteVolume/fvMesh/zoneDistribute/zoneStencils/zoneCPCStencil.C +++ b/src/finiteVolume/fvMesh/zoneDistribute/zoneStencils/zoneCPCStencil.C @@ -123,7 +123,7 @@ void Foam::zoneCPCStencil::calcPointBoundaryData Foam::zoneCPCStencil::zoneCPCStencil(const fvMesh& mesh) : - MeshObject<fvMesh, Foam::TopologicalMeshObject, zoneCPCStencil>(mesh), + MeshObject_type(mesh), zoneCellStencils(mesh), nonEmptyBoundaryPoints_(nonEmptyFacesPatch()().meshPoints()), uptodate_(mesh.nCells(), false) diff --git a/src/finiteVolume/fvMesh/zoneDistribute/zoneStencils/zoneCPCStencil.H b/src/finiteVolume/fvMesh/zoneDistribute/zoneStencils/zoneCPCStencil.H index 23fcb624c4aa45b537573eb522e5f5d38a833d9b..37437a00694f891f3e8f602ccf324f263a71cd11 100644 --- a/src/finiteVolume/fvMesh/zoneDistribute/zoneStencils/zoneCPCStencil.H +++ b/src/finiteVolume/fvMesh/zoneDistribute/zoneStencils/zoneCPCStencil.H @@ -66,6 +66,16 @@ class zoneCPCStencil >, public zoneCellStencils { + // Private Typedefs + + typedef MeshObject + < + fvMesh, + TopologicalMeshObject, + zoneCPCStencil + > MeshObject_type; + + // Private Data labelList nonEmptyBoundaryPoints_; @@ -120,6 +130,7 @@ public: //- Construct from all cells and boundary faces explicit zoneCPCStencil(const fvMesh&); + // Selectors static zoneCPCStencil& New(const fvMesh&); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C index 5c7b100d839a85cc7133bf24e802a7314b192c1a..ac471eddce0500f8c54fa8e53d9da99577571272 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C @@ -42,7 +42,7 @@ Foam::FitData<Form, ExtendedStencil, Polynomial>::FitData const scalar centralWeight ) : - MeshObject<fvMesh, Foam::MoveableMeshObject, Form>(mesh), + MeshObject_type(mesh), stencil_(stencil), linearCorrection_(linearCorrection), linearLimitFactor_(linearLimitFactor), diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.H index d30ff69179ce7aa44a66d912c8d9bfae258a2928..05bfed4f6e1930b2b2223cc1992ea30c43c91615 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.H @@ -59,7 +59,17 @@ class FitData : public MeshObject<fvMesh, MoveableMeshObject, FitDataType> { - // Private data + // Private Typedefs + + typedef MeshObject + < + fvMesh, + MoveableMeshObject, + FitDataType + > MeshObject_type; + + + // Private Data //- The stencil the fit is based on const ExtendedStencil& stencil_; diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.C index 673f7d9e9727d9bc725cac394442472edfdbcad9..83719a793151b8d2e28ba598cf05e6f3f3c95711 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.C @@ -41,7 +41,7 @@ namespace Foam Foam::skewCorrectionVectors::skewCorrectionVectors(const fvMesh& mesh) : - MeshObject<fvMesh, Foam::MoveableMeshObject, skewCorrectionVectors>(mesh), + MeshObject_type(mesh), skew_(false), skewCorrectionVectors_ ( diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.H index 0c621b10dcff6ca21cd77ea0cf37e2895ee43c93..aebf0ddfd484fab4736855d64141aff2410cb87d 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.H @@ -46,6 +46,7 @@ SourceFiles namespace Foam { +// Forward Declarations class fvMesh; /*---------------------------------------------------------------------------*\ @@ -56,7 +57,17 @@ class skewCorrectionVectors : public MeshObject<fvMesh, MoveableMeshObject, skewCorrectionVectors> { - // Private data + // Private Typedefs + + typedef MeshObject + < + fvMesh, + MoveableMeshObject, + skewCorrectionVectors + > MeshObject_type; + + + // Private Data //- Is mesh skew bool skew_; @@ -75,6 +86,7 @@ public: // Constructors + //- Construct given fvMesh explicit skewCorrectionVectors(const fvMesh& mesh); @@ -82,7 +94,7 @@ public: virtual ~skewCorrectionVectors(); - // Member functions + // Member Functions //- Return whether mesh is skew or not bool skew() const diff --git a/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.C b/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.C index efbbaa7140f2d834bc40dfef4e1c1947b53f989e..f5bcdc8abdc1176a46f192e2efa41e6ca682f3cc 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.C @@ -354,7 +354,7 @@ void Foam::pointConstraints::makePatchPatchAddressing() Foam::pointConstraints::pointConstraints(const pointMesh& pm) : - MeshObject<pointMesh, Foam::UpdateableMeshObject, pointConstraints>(pm) + MeshObject_type(pm) { if (debug) { diff --git a/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.H b/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.H index 1bf5005fac375bc70f51c127494f4faadcf527e7..bcd904598e9a736e78ce83692a1b9c561a179eae 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.H +++ b/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.H @@ -55,6 +55,7 @@ SourceFiles namespace Foam { +// Forward Declarations class pointMesh; class polyMesh; @@ -66,7 +67,17 @@ class pointConstraints : public MeshObject<pointMesh, UpdateableMeshObject, pointConstraints> { - // Private data + // Private Typedefs + + typedef MeshObject + < + pointMesh, + UpdateableMeshObject, + pointConstraints + > MeshObject_type; + + + // Private Data // Patch-patch constraints diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C index 9b2dd90aadf7d0c1b59031585916ebc4ce6d00fe..31f4f9f0a47f839a3111953a55ec5b96d93221e4 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C @@ -473,7 +473,7 @@ void Foam::volPointInterpolation::makeWeights() Foam::volPointInterpolation::volPointInterpolation(const fvMesh& vm) : - MeshObject<fvMesh, Foam::UpdateableMeshObject, volPointInterpolation>(vm), + MeshObject_type(vm), hasSeparated_(hasSeparated(pointMesh::New(vm))) { makeWeights(); diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.H b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.H index 724a838673eb9994973c64513192976ea44af9ab..a51725b38299ba6d6587cd6f330793c6bb80c328 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.H +++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.H @@ -50,6 +50,7 @@ SourceFiles namespace Foam { +// Forward Declarations class fvMesh; class pointMesh; @@ -61,7 +62,17 @@ class volPointInterpolation : public MeshObject<fvMesh, UpdateableMeshObject, volPointInterpolation> { - // Private data + // Private Typedefs + + typedef MeshObject + < + fvMesh, + UpdateableMeshObject, + volPointInterpolation + > MeshObject_type; + + + // Private Data //- Interpolation scheme weighting factor array. scalarListList pointWeights_; @@ -150,7 +161,7 @@ public: // Constructors - //- Constructor given fvMesh and pointMesh. + //- Construct given fvMesh explicit volPointInterpolation(const fvMesh&); diff --git a/src/meshTools/matrices/lduMatrix/preconditioners/distributedDILUPreconditioner/processorColour.C b/src/meshTools/matrices/lduMatrix/preconditioners/distributedDILUPreconditioner/processorColour.C index c1a3888b2b78a3b7eeef518d0dfb5ffa3005b384..9406b83b0f72bc57b9695bb4b59639889fe0a08f 100644 --- a/src/meshTools/matrices/lduMatrix/preconditioners/distributedDILUPreconditioner/processorColour.C +++ b/src/meshTools/matrices/lduMatrix/preconditioners/distributedDILUPreconditioner/processorColour.C @@ -330,7 +330,7 @@ Foam::label Foam::processorColour::cellColour Foam::processorColour::processorColour(const lduMesh& mesh) : - MeshObject<lduMesh, Foam::MoveableMeshObject, processorColour>(mesh) + MeshObject_type(mesh) { nColours_ = colour(mesh, *this); } diff --git a/src/meshTools/matrices/lduMatrix/preconditioners/distributedDILUPreconditioner/processorColour.H b/src/meshTools/matrices/lduMatrix/preconditioners/distributedDILUPreconditioner/processorColour.H index e4fe4857cae1ad66ac70385ea4e95d4817e393e7..b7b85d70af118ba29379ee838879ee27658e0963 100644 --- a/src/meshTools/matrices/lduMatrix/preconditioners/distributedDILUPreconditioner/processorColour.H +++ b/src/meshTools/matrices/lduMatrix/preconditioners/distributedDILUPreconditioner/processorColour.H @@ -58,6 +58,25 @@ class processorColour public MeshObject<lduMesh, MoveableMeshObject, processorColour>, public labelList { + // Private Typedefs + + typedef MeshObject + < + lduMesh, + MoveableMeshObject, + processorColour + > MeshObject_type; + + + // Private Member Functions + + //- No copy construct + processorColour(const processorColour&) = delete; + + //- No copy assignment + void operator=(const processorColour&) = delete; + + protected: // Protected data @@ -75,16 +94,6 @@ protected: labelList& cellColour ); - -private: - - //- No copy construct - processorColour(const processorColour&) = delete; - - //- No copy assignment - void operator=(const processorColour&) = delete; - - public: //- Runtime type information @@ -94,7 +103,7 @@ public: // Constructors //- Construct given mesh - processorColour(const lduMesh& mesh); + explicit processorColour(const lduMesh& mesh); // Selectors diff --git a/src/meshTools/meshSearch/meshSearchFACE_CENTRE_TRISMeshObject.C b/src/meshTools/meshSearch/meshSearchFACE_CENTRE_TRISMeshObject.C index fe6fe7502edd081b387bfcedc0ae984c55be7c73..22b1bffc6b627b202959fe55a04dd7ae99dc02d6 100644 --- a/src/meshTools/meshSearch/meshSearchFACE_CENTRE_TRISMeshObject.C +++ b/src/meshTools/meshSearch/meshSearchFACE_CENTRE_TRISMeshObject.C @@ -35,21 +35,4 @@ namespace Foam } -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::meshSearchFACE_CENTRE_TRISMeshObject::meshSearchFACE_CENTRE_TRISMeshObject -( - const polyMesh& mesh -) -: - MeshObject - < - polyMesh, - Foam::GeometricMeshObject, - meshSearchFACE_CENTRE_TRISMeshObject - >(mesh), - meshSearch(mesh, polyMesh::FACE_CENTRE_TRIS) -{} - - // ************************************************************************* // diff --git a/src/meshTools/meshSearch/meshSearchFACE_CENTRE_TRISMeshObject.H b/src/meshTools/meshSearch/meshSearchFACE_CENTRE_TRISMeshObject.H index 1b80305ba8f11522a1cb1c0838d1b93132c3aa13..bdeb3e46374bb4f5c0be31ea367c896ae64a73d6 100644 --- a/src/meshTools/meshSearch/meshSearchFACE_CENTRE_TRISMeshObject.H +++ b/src/meshTools/meshSearch/meshSearchFACE_CENTRE_TRISMeshObject.H @@ -59,6 +59,14 @@ class meshSearchFACE_CENTRE_TRISMeshObject >, public meshSearch { + // Private Typedefs + + typedef MeshObject + < + polyMesh, + GeometricMeshObject, + meshSearchFACE_CENTRE_TRISMeshObject + > MeshObject_type; public: @@ -68,8 +76,13 @@ public: // Constructors - //- Constructor given polyMesh - explicit meshSearchFACE_CENTRE_TRISMeshObject(const polyMesh& mesh); + //- Construct given polyMesh + explicit meshSearchFACE_CENTRE_TRISMeshObject(const polyMesh& mesh) + : + MeshObject_type(mesh), + meshSearch(mesh, polyMesh::FACE_CENTRE_TRIS) + {} + //- Destructor virtual ~meshSearchFACE_CENTRE_TRISMeshObject() = default; diff --git a/src/meshTools/meshSearch/meshSearchMeshObject.C b/src/meshTools/meshSearch/meshSearchMeshObject.C index 0782d9aaa0b914e116c59049c6395f990369c7e6..e979ffc142626505b8b6743894f7af76e832296d 100644 --- a/src/meshTools/meshSearch/meshSearchMeshObject.C +++ b/src/meshTools/meshSearch/meshSearchMeshObject.C @@ -35,13 +35,4 @@ namespace Foam } -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::meshSearchMeshObject::meshSearchMeshObject(const polyMesh& mesh) -: - MeshObject<polyMesh, Foam::GeometricMeshObject, meshSearchMeshObject>(mesh), - meshSearch(mesh) -{} - - // ************************************************************************* // diff --git a/src/meshTools/meshSearch/meshSearchMeshObject.H b/src/meshTools/meshSearch/meshSearchMeshObject.H index 81e3359ea950087f27960363d5a8035a9ec0092c..65b31a4ce242314ba8bf966e12023f3ee4cd3acf 100644 --- a/src/meshTools/meshSearch/meshSearchMeshObject.H +++ b/src/meshTools/meshSearch/meshSearchMeshObject.H @@ -54,6 +54,14 @@ class meshSearchMeshObject public MeshObject<polyMesh, GeometricMeshObject, meshSearchMeshObject>, public meshSearch { + // Private Typedefs + + typedef MeshObject + < + polyMesh, + GeometricMeshObject, + meshSearchMeshObject + > MeshObject_type; public: @@ -63,8 +71,13 @@ public: // Constructors - //- Constructor given polyMesh - explicit meshSearchMeshObject(const polyMesh& mesh); + //- Construct given polyMesh + explicit meshSearchMeshObject(const polyMesh& mesh) + : + MeshObject_type(mesh), + meshSearch(mesh) + {} + //- Destructor virtual ~meshSearchMeshObject() = default; diff --git a/src/meshTools/multiWorld/multiWorldConnectionsObject.C b/src/meshTools/multiWorld/multiWorldConnectionsObject.C index 0e5c9e14b3d4a2b9f069d8c8205aefe5c727ce70..caa05034311033daf93bf28f3ab78a446d49f24e 100644 --- a/src/meshTools/multiWorld/multiWorldConnectionsObject.C +++ b/src/meshTools/multiWorld/multiWorldConnectionsObject.C @@ -181,7 +181,7 @@ Foam::label Foam::multiWorldConnections::createCommunicator(const edge& worlds) Foam::multiWorldConnections::multiWorldConnections(const Time& runTime) : - MeshObjectType(runTime) + MeshObject_type(runTime) {} @@ -190,16 +190,10 @@ Foam::multiWorldConnections::multiWorldConnections(const Time& runTime) const Foam::multiWorldConnections& Foam::multiWorldConnections::New(const Time& runTime) { - return MeshObjectType::New(runTime); + return MeshObject_type::New(runTime); } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::multiWorldConnections::~multiWorldConnections() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // bool Foam::multiWorldConnections::empty() const noexcept diff --git a/src/meshTools/multiWorld/multiWorldConnectionsObject.H b/src/meshTools/multiWorld/multiWorldConnectionsObject.H index d0c0bb7616cda260c44bc06dce2c2a6dd1000eda..5f69f2398e2326ada9f03c184c169d116818571d 100644 --- a/src/meshTools/multiWorld/multiWorldConnectionsObject.H +++ b/src/meshTools/multiWorld/multiWorldConnectionsObject.H @@ -69,7 +69,7 @@ class multiWorldConnections Time, TopologicalMeshObject, multiWorldConnections - > MeshObjectType; + > MeshObject_type; // Private Data @@ -111,7 +111,7 @@ public: //- Destructor - ~multiWorldConnections(); + ~multiWorldConnections() = default; // Member Functions diff --git a/src/meshTools/regionSplit/regionSplit.C b/src/meshTools/regionSplit/regionSplit.C index 9e02486ed5311437ed85e0cc12f1e6ceb967b221..7c0005a5820593169fd5b9ce20fc217b6af55608 100644 --- a/src/meshTools/regionSplit/regionSplit.C +++ b/src/meshTools/regionSplit/regionSplit.C @@ -385,7 +385,7 @@ Foam::regionSplit::regionSplit const bool doGlobalRegions ) : - MeshObject<polyMesh, Foam::TopologicalMeshObject, regionSplit>(mesh), + MeshObject_type(mesh), labelList(mesh.nCells(), UNASSIGNED), globalNumbering_() { @@ -432,7 +432,7 @@ Foam::regionSplit::regionSplit const bool doGlobalRegions ) : - MeshObject<polyMesh, Foam::TopologicalMeshObject, regionSplit>(mesh), + MeshObject_type(mesh), labelList(mesh.nCells(), UNASSIGNED), globalNumbering_() { diff --git a/src/meshTools/regionSplit/regionSplit.H b/src/meshTools/regionSplit/regionSplit.H index 8e0d28e348d3de085ee5d64fa38f0c200fb8ffa9..9ad158fc356fbfb91751c3fc13ee89a1360117e6 100644 --- a/src/meshTools/regionSplit/regionSplit.H +++ b/src/meshTools/regionSplit/regionSplit.H @@ -143,6 +143,16 @@ class regionSplit public MeshObject<polyMesh, TopologicalMeshObject, regionSplit>, public labelList { + // Private Typedefs + + typedef MeshObject + < + polyMesh, + TopologicalMeshObject, + regionSplit + > MeshObject_type; + + // Private Data //- Indexing into the regions @@ -157,7 +167,6 @@ class regionSplit // Private Class - //- Simple wrapper for handling test() on bitSet or boolList //- without a templating layer or lambda expresssion. class bitSetOrBoolList diff --git a/src/meshTools/twoDPointCorrector/twoDPointCorrector.C b/src/meshTools/twoDPointCorrector/twoDPointCorrector.C index 29fcae294fab799a20039f92b627d00c42428442..827faa279cb9189632598d19fe9e5db8e08c2971 100644 --- a/src/meshTools/twoDPointCorrector/twoDPointCorrector.C +++ b/src/meshTools/twoDPointCorrector/twoDPointCorrector.C @@ -199,7 +199,7 @@ void Foam::twoDPointCorrector::snapToWedge Foam::twoDPointCorrector::twoDPointCorrector(const polyMesh& mesh) : - MeshObject<polyMesh, Foam::UpdateableMeshObject, twoDPointCorrector>(mesh), + MeshObject_type(mesh), required_(mesh_.nGeometricD() == 2), planeNormalPtr_(nullptr), normalEdgeIndicesPtr_(nullptr), @@ -209,7 +209,6 @@ Foam::twoDPointCorrector::twoDPointCorrector(const polyMesh& mesh) {} - // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::twoDPointCorrector::~twoDPointCorrector() diff --git a/src/meshTools/twoDPointCorrector/twoDPointCorrector.H b/src/meshTools/twoDPointCorrector/twoDPointCorrector.H index b7c7d831ffb7174d2ebee3d431d484795ccc5c37..ff9c6195f05c8d17977d9692a644be7126a1c06c 100644 --- a/src/meshTools/twoDPointCorrector/twoDPointCorrector.H +++ b/src/meshTools/twoDPointCorrector/twoDPointCorrector.H @@ -54,7 +54,7 @@ SourceFiles namespace Foam { -// Forward class declarations +// Forward Declarations class polyMesh; /*---------------------------------------------------------------------------*\ @@ -65,7 +65,17 @@ class twoDPointCorrector : public MeshObject<polyMesh, UpdateableMeshObject, twoDPointCorrector> { - // Private data + // Private Typedefs + + typedef MeshObject + < + polyMesh, + UpdateableMeshObject, + twoDPointCorrector + > MeshObject_type; + + + // Private Data //- Is 2D correction required, i.e. is the mesh bool required_; diff --git a/src/optimisation/adjointOptimisation/adjoint/interpolation/pointVolInterpolation/pointVolInterpolation.H b/src/optimisation/adjointOptimisation/adjoint/interpolation/pointVolInterpolation/pointVolInterpolation.H index 642b3062e10fdf2271a71e405e788079ce16a93a..b3372d82baa69b4fe567d961dd0ca4ba0a38517c 100644 --- a/src/optimisation/adjointOptimisation/adjoint/interpolation/pointVolInterpolation/pointVolInterpolation.H +++ b/src/optimisation/adjointOptimisation/adjoint/interpolation/pointVolInterpolation/pointVolInterpolation.H @@ -53,6 +53,7 @@ SourceFiles namespace Foam { +// Forward Declarations class fvMesh; class pointMesh; @@ -62,7 +63,7 @@ class pointMesh; class pointVolInterpolation { - // Private data + // Private Data const pointMesh& pointMesh_; const fvMesh& fvMesh_; @@ -110,13 +111,12 @@ public: // Constructors - //- Constructor given pointMesh and fvMesh. + //- Construct given pointMesh and fvMesh. pointVolInterpolation(const pointMesh&, const fvMesh&); - // Destructor - - ~pointVolInterpolation(); + //- Destructor + ~pointVolInterpolation(); // Member functions diff --git a/src/optimisation/adjointOptimisation/adjoint/interpolation/volPointInterpolation/volPointInterpolationAdjoint.C b/src/optimisation/adjointOptimisation/adjoint/interpolation/volPointInterpolation/volPointInterpolationAdjoint.C index 63e07ae5266317080b92e899a5ffba5afe4507e0..0d63d8cff345d7562d95a7bed048c6cda7c50b93 100644 --- a/src/optimisation/adjointOptimisation/adjoint/interpolation/volPointInterpolation/volPointInterpolationAdjoint.C +++ b/src/optimisation/adjointOptimisation/adjoint/interpolation/volPointInterpolation/volPointInterpolationAdjoint.C @@ -297,10 +297,7 @@ void Foam::volPointInterpolationAdjoint::makeWeights() Foam::volPointInterpolationAdjoint::volPointInterpolationAdjoint(const fvMesh& vm) : - MeshObject<fvMesh, Foam::UpdateableMeshObject, volPointInterpolationAdjoint> - ( - vm - ) + MeshObject_type(vm) { makeWeights(); } diff --git a/src/optimisation/adjointOptimisation/adjoint/interpolation/volPointInterpolation/volPointInterpolationAdjoint.H b/src/optimisation/adjointOptimisation/adjoint/interpolation/volPointInterpolation/volPointInterpolationAdjoint.H index 78225457b8ba34b3a8a826df5bb05f2cc5954272..7d6c7339790dd54e7fea51a5f719b8f5a9b8b706 100644 --- a/src/optimisation/adjointOptimisation/adjoint/interpolation/volPointInterpolation/volPointInterpolationAdjoint.H +++ b/src/optimisation/adjointOptimisation/adjoint/interpolation/volPointInterpolation/volPointInterpolationAdjoint.H @@ -50,6 +50,7 @@ SourceFiles namespace Foam { +// Forward Declarations class fvMesh; class pointMesh; @@ -59,8 +60,23 @@ class pointMesh; class volPointInterpolationAdjoint : - public MeshObject<fvMesh, UpdateableMeshObject, volPointInterpolationAdjoint> + public MeshObject + < + fvMesh, + UpdateableMeshObject, + volPointInterpolationAdjoint + > { + // Private Typedefs + + typedef MeshObject + < + fvMesh, + UpdateableMeshObject, + volPointInterpolationAdjoint + > MeshObject_type; + + protected: // Protected data @@ -128,7 +144,7 @@ public: // Constructors - //- Constructor given fvMesh and pointMesh. + //- Construct given fvMesh explicit volPointInterpolationAdjoint(const fvMesh&); diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/designVariables/levelSet/levelSetDesignVariables.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/designVariables/levelSet/levelSetDesignVariables.C index 3d9d41c561f6c701abdc9f27e6c30a16e41b39b6..ea00083fed9ee9f277c699719421123218060db9 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/designVariables/levelSet/levelSetDesignVariables.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/designVariables/levelSet/levelSetDesignVariables.C @@ -417,11 +417,8 @@ void levelSetDesignVariables::update(scalarField& correction) // Though the mesh is kept constant, the distance from wall may change // due to fvOptions depending on beta. Trick wallDist into updating it - if (mesh_.foundObject<UpdateableMeshObject<fvMesh>>("wallDist")) - { - mesh_.lookupObjectRef<UpdateableMeshObject<fvMesh>>("wallDist"). - movePoints(); - } + + wallDist::try_movePoints(mesh_); } diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/designVariables/topODesignVariables/topODesignVariables.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/designVariables/topODesignVariables/topODesignVariables.C index 9b7b1416289014e1b998d014552b5efdd106fc68..5aa934df68d82bdf1446a0842f9265afcdffd3fa 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/designVariables/topODesignVariables/topODesignVariables.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/designVariables/topODesignVariables/topODesignVariables.C @@ -28,7 +28,7 @@ License #include "localIOdictionary.H" #include "topODesignVariables.H" -#include "MeshObject.H" +#include "wallDist.H" #include "wallFvPatch.H" #include "cutFaceIso.H" #include "cutCellIso.H" @@ -452,11 +452,9 @@ void Foam::topODesignVariables::update(scalarField& correction) // if the method computing it includes fvOptions that depend on the // indicator field. // Trick wallDist into updating it - if (mesh_.foundObject<UpdateableMeshObject<fvMesh>>("wallDist")) - { - mesh_.lookupObjectRef<UpdateableMeshObject<fvMesh>>("wallDist"). - movePoints(); - } + + wallDist::try_movePoints(mesh_); + // Write the 0.5 beta iso-line to files, as an indication of the // fluid-solid interface diff --git a/src/optimisation/adjointOptimisation/adjoint/parameterization/NURBS/NURBS3DVolume/volBSplinesBase/volBSplinesBase.C b/src/optimisation/adjointOptimisation/adjoint/parameterization/NURBS/NURBS3DVolume/volBSplinesBase/volBSplinesBase.C index 4ff3278479ba6b193774eda72d3e993dd8bdc5ae..2e38bb25a9148b0e0ec98e1454ff49b5220214a2 100644 --- a/src/optimisation/adjointOptimisation/adjoint/parameterization/NURBS/NURBS3DVolume/volBSplinesBase/volBSplinesBase.C +++ b/src/optimisation/adjointOptimisation/adjoint/parameterization/NURBS/NURBS3DVolume/volBSplinesBase/volBSplinesBase.C @@ -45,7 +45,7 @@ volBSplinesBase::volBSplinesBase const fvMesh& mesh ) : - MeshObject<fvMesh, UpdateableMeshObject, volBSplinesBase>(mesh), + MeshObject_type(mesh), volume_(0), activeDesignVariables_(0) { @@ -58,7 +58,7 @@ volBSplinesBase::volBSplinesBase "dynamicMeshDict", mesh.time().constant(), mesh, - IOobject::MUST_READ_IF_MODIFIED, + IOobject::MUST_READ, IOobject::NO_WRITE, IOobject::NO_REGISTER ) diff --git a/src/optimisation/adjointOptimisation/adjoint/parameterization/NURBS/NURBS3DVolume/volBSplinesBase/volBSplinesBase.H b/src/optimisation/adjointOptimisation/adjoint/parameterization/NURBS/NURBS3DVolume/volBSplinesBase/volBSplinesBase.H index 93e03929f00b37d123dc221a5ec0413053eef6f9..01a0244b11c2e4a50c81b55de7221cbaf9861b20 100644 --- a/src/optimisation/adjointOptimisation/adjoint/parameterization/NURBS/NURBS3DVolume/volBSplinesBase/volBSplinesBase.H +++ b/src/optimisation/adjointOptimisation/adjoint/parameterization/NURBS/NURBS3DVolume/volBSplinesBase/volBSplinesBase.H @@ -61,20 +61,16 @@ class volBSplinesBase : public MeshObject<fvMesh, UpdateableMeshObject, volBSplinesBase> { -protected: - - // Protected data - - //- List with volumetric B-splines boxes. - // No overlapping is supported - PtrList<NURBS3DVolume> volume_; + // Private Typedefs - //- Active design variables numbering for all boxes - labelList activeDesignVariables_; + typedef MeshObject + < + fvMesh, + UpdateableMeshObject, + volBSplinesBase + > MeshObject_type; -private: - // Private Member Functions //- No copy construct @@ -84,6 +80,18 @@ private: void operator=(const volBSplinesBase&) = delete; +protected: + + // Protected Data + + //- List with volumetric B-splines boxes. + // No overlapping is supported + PtrList<NURBS3DVolume> volume_; + + //- Active design variables numbering for all boxes + labelList activeDesignVariables_; + + public: //- Runtime type information @@ -93,7 +101,7 @@ public: // Constructors //- Construct from components - volBSplinesBase(const fvMesh& mesh); + explicit volBSplinesBase(const fvMesh& mesh); //- Destructor diff --git a/src/overset/cellCellStencil/cellCellStencil/cellCellStencilObject.H b/src/overset/cellCellStencil/cellCellStencil/cellCellStencilObject.H index 4ecd06006f32abbd229512b4c3ab1004ca98eb55..911cb661021bd61ea150b8f33cba15b4c1509be9 100644 --- a/src/overset/cellCellStencil/cellCellStencil/cellCellStencilObject.H +++ b/src/overset/cellCellStencil/cellCellStencil/cellCellStencilObject.H @@ -32,8 +32,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef cellCellStencilObject_H -#define cellCellStencilObject_H +#ifndef Foam_cellCellStencilObject_H +#define Foam_cellCellStencilObject_H #include "cellCellStencil.H" #include "MeshObject.H" @@ -43,13 +43,10 @@ SourceFiles namespace Foam { +// Typedefs class cellCellStencilObject; -typedef MeshObject -< - fvMesh, - Foam::MoveableMeshObject, - cellCellStencilObject -> Stencil; +typedef MeshObject<fvMesh, MoveableMeshObject, cellCellStencilObject> Stencil; + /*---------------------------------------------------------------------------*\ Class cellCellStencilObject Declaration @@ -57,10 +54,20 @@ typedef MeshObject class cellCellStencilObject : - public Stencil, + public MeshObject<fvMesh, MoveableMeshObject, cellCellStencilObject>, public cellCellStencil { - // Private data + // Private Typedefs + + typedef MeshObject + < + fvMesh, + MoveableMeshObject, + cellCellStencilObject + > MeshObject_type; + + + // Private Data autoPtr<cellCellStencil> stencilPtr_; @@ -69,6 +76,7 @@ public: TypeName("cellCellStencilObject"); + // Constructors //- Construct with mesh @@ -78,12 +86,8 @@ public: const bool update = true ) : - MeshObject - < - fvMesh, - Foam::MoveableMeshObject, - cellCellStencilObject - >(mesh), + MeshObject_type(mesh), + cellCellStencil(mesh), stencilPtr_ ( diff --git a/src/parallel/decompose/decompose/decompositionModel.C b/src/parallel/decompose/decompose/decompositionModel.C index 074e83c6f2e04449521c2179df65bb672581f9a1..63d7d0902d7a4d6747322f07c16cb431f49e8d10 100644 --- a/src/parallel/decompose/decompose/decompositionModel.C +++ b/src/parallel/decompose/decompose/decompositionModel.C @@ -49,12 +49,8 @@ Foam::decompositionModel::decompositionModel const dictionary* fallback ) : - MeshObject - < - polyMesh, - Foam::UpdateableMeshObject, - decompositionModel - >(mesh), + MeshObject_type(mesh), + IOdictionary ( IOobject::selectIO @@ -86,13 +82,7 @@ const Foam::decompositionModel& Foam::decompositionModel::New const dictionary* content ) { - return - MeshObject - < - polyMesh, - Foam::UpdateableMeshObject, - decompositionModel - >::New(mesh, decompDictFile, content); + return MeshObject_type::New(mesh, decompDictFile, content); } diff --git a/src/parallel/decompose/decompose/decompositionModel.H b/src/parallel/decompose/decompose/decompositionModel.H index 2624219caf1e6dc95da1c12157e62c96b4d2f1e1..2068bcd978e73b59cd84aa97852b1ef9eb8a761b 100644 --- a/src/parallel/decompose/decompose/decompositionModel.H +++ b/src/parallel/decompose/decompose/decompositionModel.H @@ -65,6 +65,16 @@ class decompositionModel >, public IOdictionary { + // Private Typedefs + + typedef MeshObject + < + polyMesh, + UpdateableMeshObject, + decompositionModel + > MeshObject_type; + + // Private Data mutable autoPtr<decompositionMethod> decomposerPtr_; diff --git a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.C b/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.C index 7092f15b49ff477ed3ea53ed5356859dfec25328..5b0b68f18a1c53368def465d2cd9905b106deb99 100644 --- a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.C +++ b/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.C @@ -46,12 +46,8 @@ Foam::radiation::boundaryRadiationProperties::boundaryRadiationProperties const fvMesh& mesh ) : - MeshObject - < - fvMesh, - Foam::GeometricMeshObject, - boundaryRadiationProperties - >(mesh), + MeshObject_type(mesh), + radBoundaryPropertiesPtrList_(mesh.boundary().size()), radZonePropertiesPtrList_(mesh.faceZones().size()) { diff --git a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.H b/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.H index 69dd3973d5b4d2640222e149043adfc330a202a2..ef88f79d6fe8934f140d1289b2eb09cb939bc844 100644 --- a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.H +++ b/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.H @@ -34,8 +34,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef boundaryRadiationProperties_H -#define boundaryRadiationProperties_H +#ifndef Foam_boundaryRadiationProperties_H +#define Foam_boundaryRadiationProperties_H #include "MeshObject.H" #include "boundaryRadiationPropertiesPatch.H" @@ -45,6 +45,7 @@ SourceFiles namespace Foam { +// Forward Declarations class fvMesh; namespace radiation @@ -59,10 +60,20 @@ class boundaryRadiationProperties public MeshObject < fvMesh, - Foam::GeometricMeshObject, + GeometricMeshObject, boundaryRadiationProperties > { + // Private Typedefs + + typedef MeshObject + < + fvMesh, + GeometricMeshObject, + boundaryRadiationProperties + > MeshObject_type; + + // Private Data //- Per patch the boundaryRadiationProperties @@ -83,7 +94,7 @@ public: // Constructors //- Construct given fvMesh - explicit boundaryRadiationProperties(const fvMesh&); + explicit boundaryRadiationProperties(const fvMesh& mesh); // Member Functions