diff --git a/applications/utilities/mesh/manipulation/setSet/setSet.C b/applications/utilities/mesh/manipulation/setSet/setSet.C index 7f90522630061743a87778721e52362c968bc3e2..e0baf6d3fd7efcdc1e4d8ac8bb9d227ec22aab3f 100644 --- a/applications/utilities/mesh/manipulation/setSet/setSet.C +++ b/applications/utilities/mesh/manipulation/setSet/setSet.C @@ -45,7 +45,6 @@ Description #include "pointSet.H" #include "topoSetSource.H" #include "Fstream.H" -#include "demandDrivenData.H" #include "foamVtkWriteTopoSet.H" #include "IOobjectList.H" #include "cellZoneSet.H" diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatch.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatch.C index 6214d4a94920c36ab59546bd2ca6c602be6acfec..1025a998fc9f1c1a190201313c728fde364f9191 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatch.C +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatch.C @@ -29,7 +29,6 @@ License #include "facePointPatch.H" #include "pointBoundaryMesh.H" #include "pointMesh.H" -#include "demandDrivenData.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C index a2e7974aa585a0009382c833141eca80766f2fdf..5c11df4cdd302d8a3c4720b7c1d3eb030f7be700 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C @@ -1310,13 +1310,13 @@ const Foam::globalMeshData& Foam::polyMesh::globalData() const } -Foam::label Foam::polyMesh::comm() const +Foam::label Foam::polyMesh::comm() const noexcept { return comm_; } -Foam::label& Foam::polyMesh::comm() +Foam::label& Foam::polyMesh::comm() noexcept { return comm_; } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.H b/src/OpenFOAM/meshes/polyMesh/polyMesh.H index 940de593311b1840f0230372e03c1667e2b3cdc6..cedcb558d3d7e632c6436fa6fad4b15b005dad94 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.H @@ -478,19 +478,19 @@ public: const indexedOctree<treeDataCell>& cellTree() const; //- Return point zone mesh - const pointZoneMesh& pointZones() const + const pointZoneMesh& pointZones() const noexcept { return pointZones_; } //- Return face zone mesh - const faceZoneMesh& faceZones() const + const faceZoneMesh& faceZones() const noexcept { return faceZones_; } //- Return cell zone mesh - const cellZoneMesh& cellZones() const + const cellZoneMesh& cellZones() const noexcept { return cellZones_; } @@ -499,13 +499,13 @@ public: const globalMeshData& globalData() const; //- Return communicator used for parallel communication - label comm() const; + label comm() const noexcept; //- Return communicator used for parallel communication - label& comm(); + label& comm() noexcept; //- Return the object registry - const objectRegistry& thisDb() const + const objectRegistry& thisDb() const noexcept { return *this; } @@ -520,37 +520,37 @@ public: } //- Is mesh moving - bool moving() const + bool moving() const noexcept { return moving_; } //- Set the mesh to be moving - bool moving(const bool m) + bool moving(const bool on) noexcept { - bool m0 = moving_; - moving_ = m; - return m0; + bool old(moving_); + moving_ = on; + return old; } //- Is mesh topology changing - bool topoChanging() const + bool topoChanging() const noexcept { return topoChanging_; } //- Set the mesh topology to be changing - bool topoChanging(const bool c) + bool topoChanging(const bool on) noexcept { - bool c0 = topoChanging_; - topoChanging_ = c; - return c0; + bool old(topoChanging_); + topoChanging_ = on; + return old; } //- Is mesh changing (topology changing and/or moving) - bool changing() const + bool changing() const noexcept { - return moving()||topoChanging(); + return (moving() || topoChanging()); } //- Move points, returns volumes swept by faces in motion @@ -563,19 +563,19 @@ public: // Topological change //- Return non-const access to the pointZones - pointZoneMesh& pointZones() + pointZoneMesh& pointZones() noexcept { return pointZones_; } //- Return non-const access to the faceZones - faceZoneMesh& faceZones() + faceZoneMesh& faceZones() noexcept { return faceZones_; } //- Return non-const access to the cellZones - cellZoneMesh& cellZones() + cellZoneMesh& cellZones() noexcept { return cellZones_; } @@ -669,6 +669,9 @@ public: void removeFiles() const; + bool hasTetBasePtIs() const { return bool(tetBasePtIsPtr_); } + + // Geometric checks. Selectively override primitiveMesh functionality. //- Check non-orthogonality diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshClear.C b/src/OpenFOAM/meshes/polyMesh/polyMeshClear.C index 323053ddd7bc6a8b0b1841648cb6d6e45aa1642a..e657ee38a610361a9b473a16f178aba565667b44 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshClear.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshClear.C @@ -92,7 +92,7 @@ void Foam::polyMesh::updateGeomPoints << exit(FatalError); } - // Clear all geometric mesh objects that are not 'moveable' + // Clear all geometric mesh objects that are not 'movable' meshObject::clearUpto < pointMesh, @@ -143,7 +143,7 @@ void Foam::polyMesh::updateGeomPoints geometricD_ = Zero; solutionD_ = Zero; - // Update all 'moveable' objects + // Update all 'movable' objects meshObject::movePoints<polyMesh>(*this); meshObject::movePoints<pointMesh>(*this); } diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C index 29289ad3d6a2eed73eae9d6db7e0268c7f26e2a3..26f114c46bd6f84f9e87ad6ca9d19287fcd63b77 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C @@ -30,7 +30,6 @@ License #include "addToRunTimeSelectionTable.H" #include "polyBoundaryMesh.H" #include "polyMesh.H" -#include "demandDrivenData.H" #include "OFstream.H" #include "patchZones.H" #include "matchPoints.H" diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C index 46b2792a76a2a431ff7a9db421654a7a00ab7069..27cda877c0e0111ece7d88c3acdc7ca75ae9cecf 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C @@ -30,7 +30,6 @@ License #include "addToRunTimeSelectionTable.H" #include "dictionary.H" #include "SubField.H" -#include "demandDrivenData.H" #include "matchPoints.H" #include "OFstream.H" #include "polyMesh.H" diff --git a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H index d96de5d2715fa75ebf2bc1ce4860a0a9da968d9b..25f99e1fed1d3a9390d91a4af31670a25f5215b0 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H @@ -249,13 +249,6 @@ public: //- Set/add group with zones void setGroup(const word& groupName, const labelUList& zoneIDs); - - //- Clear addressing - void clearAddressing(); - - //- Clear the zones - void clear(); - //- Check zone definition. Return true if in error. bool checkDefinition(const bool report = false) const; @@ -267,6 +260,17 @@ public: void movePoints(const pointField& pts); + // Storage Management + + //- Clear addressing + void clearAddressing(); + + //- Clear the zones + void clear(); + + bool hasFaceAreas() const { return bool(zoneMapPtr_); } + + // Member Operators //- Return const and non-const reference to zone by index. diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H index 5bd1dfe87c0806f050a1e1861d116b4a0237cf87..3999b7449b52296c7aeea8facdcea8bf8fd2be8a 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H +++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H @@ -297,13 +297,13 @@ public: // Access //- Return reference to global points - const Field<point_type>& points() const + const Field<point_type>& points() const noexcept { return points_; } //- Number of faces in the patch - label nFaces() const + label nFaces() const noexcept { return FaceList::size(); } diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C index 2f3cb10efc22cf13d1759f68cfc2f9a1d6dab865..1b468aa414891c01902faedc9da40f48fbe4d448 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C @@ -26,7 +26,6 @@ License \*---------------------------------------------------------------------------*/ #include "primitiveMesh.H" -#include "demandDrivenData.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H index ecbcbe277a53c4de78e62cd8f0f1721faf003ad9..f807041e4970f6c6da4fdf4d274a4531b03806ce 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H @@ -69,7 +69,7 @@ SourceFiles namespace Foam { -// Forward declarations +// Forward Declarations class bitSet; /*---------------------------------------------------------------------------*\ @@ -484,28 +484,28 @@ public: // Mesh size parameters //- Number of mesh points - inline label nPoints() const; + inline label nPoints() const noexcept; //- Number of mesh edges inline label nEdges() const; //- Number of mesh faces - inline label nFaces() const; + inline label nFaces() const noexcept; //- Number of mesh cells - inline label nCells() const; + inline label nCells() const noexcept; //- Number of internal faces - inline label nInternalFaces() const; + inline label nInternalFaces() const noexcept; //- Number of boundary faces (== nFaces - nInternalFaces) - inline label nBoundaryFaces() const; + inline label nBoundaryFaces() const noexcept; // If points are ordered (nInternalPoints != -1): //- Points not on boundary - inline label nInternalPoints() const; + inline label nInternalPoints() const noexcept; //- Internal edges (i.e. not on boundary face) using //- no boundary point @@ -607,7 +607,7 @@ public: //- Return true if given face label is internal to the mesh - inline bool isInternalFace(const label faceIndex) const; + inline bool isInternalFace(const label faceIndex) const noexcept; // Topological checks @@ -795,23 +795,23 @@ public: void printAllocated() const; // Per storage whether allocated - inline bool hasCellShapes() const; - inline bool hasEdges() const; - inline bool hasCellCells() const; - inline bool hasEdgeCells() const; - inline bool hasPointCells() const; - inline bool hasCells() const; - inline bool hasEdgeFaces() const; - inline bool hasPointFaces() const; - inline bool hasCellEdges() const; - inline bool hasFaceEdges() const; - inline bool hasPointEdges() const; - inline bool hasPointPoints() const; - inline bool hasCellPoints() const; - inline bool hasCellCentres() const; - inline bool hasFaceCentres() const; - inline bool hasCellVolumes() const; - inline bool hasFaceAreas() const; + inline bool hasCellShapes() const noexcept; + inline bool hasEdges() const noexcept; + inline bool hasCellCells() const noexcept; + inline bool hasEdgeCells() const noexcept; + inline bool hasPointCells() const noexcept; + inline bool hasCells() const noexcept; + inline bool hasEdgeFaces() const noexcept; + inline bool hasPointFaces() const noexcept; + inline bool hasCellEdges() const noexcept; + inline bool hasFaceEdges() const noexcept; + inline bool hasPointEdges() const noexcept; + inline bool hasPointPoints() const noexcept; + inline bool hasCellPoints() const noexcept; + inline bool hasCellCentres() const noexcept; + inline bool hasFaceCentres() const noexcept; + inline bool hasCellVolumes() const noexcept; + inline bool hasFaceAreas() const noexcept; // On-the-fly addressing calculation. These functions return either // a reference to the full addressing (if already calculated) or diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshI.H b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshI.H index fa182d339cacb1a004305dcecf45bbf1c935cc2a..5bca7075b86f091f9fc68bbc24df33c6cf792be1 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshI.H +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshI.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -28,13 +28,13 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -inline Foam::label Foam::primitiveMesh::nInternalPoints() const +inline Foam::label Foam::primitiveMesh::nInternalPoints() const noexcept { return nInternalPoints_; } -inline Foam::label Foam::primitiveMesh::nPoints() const +inline Foam::label Foam::primitiveMesh::nPoints() const noexcept { return nPoints_; } @@ -75,133 +75,136 @@ inline Foam::label Foam::primitiveMesh::nEdges() const } -inline Foam::label Foam::primitiveMesh::nInternalFaces() const +inline Foam::label Foam::primitiveMesh::nInternalFaces() const noexcept { return nInternalFaces_; } -inline Foam::label Foam::primitiveMesh::nBoundaryFaces() const +inline Foam::label Foam::primitiveMesh::nBoundaryFaces() const noexcept { return (nFaces_ - nInternalFaces_); } -inline Foam::label Foam::primitiveMesh::nFaces() const +inline Foam::label Foam::primitiveMesh::nFaces() const noexcept { return nFaces_; } -inline Foam::label Foam::primitiveMesh::nCells() const +inline Foam::label Foam::primitiveMesh::nCells() const noexcept { return nCells_; } -inline bool Foam::primitiveMesh::isInternalFace(const label faceIndex) const +inline bool Foam::primitiveMesh::isInternalFace +( + const label faceIndex +) const noexcept { return faceIndex < nInternalFaces_; } -inline bool Foam::primitiveMesh::hasCellShapes() const +inline bool Foam::primitiveMesh::hasCellShapes() const noexcept { return cellShapesPtr_; } -inline bool Foam::primitiveMesh::hasEdges() const +inline bool Foam::primitiveMesh::hasEdges() const noexcept { return edgesPtr_; } -inline bool Foam::primitiveMesh::hasCellCells() const +inline bool Foam::primitiveMesh::hasCellCells() const noexcept { return ccPtr_; } -inline bool Foam::primitiveMesh::hasEdgeCells() const +inline bool Foam::primitiveMesh::hasEdgeCells() const noexcept { return ecPtr_; } -inline bool Foam::primitiveMesh::hasPointCells() const +inline bool Foam::primitiveMesh::hasPointCells() const noexcept { return pcPtr_; } -inline bool Foam::primitiveMesh::hasCells() const +inline bool Foam::primitiveMesh::hasCells() const noexcept { return cfPtr_; } -inline bool Foam::primitiveMesh::hasEdgeFaces() const +inline bool Foam::primitiveMesh::hasEdgeFaces() const noexcept { return efPtr_; } -inline bool Foam::primitiveMesh::hasPointFaces() const +inline bool Foam::primitiveMesh::hasPointFaces() const noexcept { return pfPtr_; } -inline bool Foam::primitiveMesh::hasCellEdges() const +inline bool Foam::primitiveMesh::hasCellEdges() const noexcept { return cePtr_; } -inline bool Foam::primitiveMesh::hasFaceEdges() const +inline bool Foam::primitiveMesh::hasFaceEdges() const noexcept { return fePtr_; } -inline bool Foam::primitiveMesh::hasPointEdges() const +inline bool Foam::primitiveMesh::hasPointEdges() const noexcept { return pePtr_; } -inline bool Foam::primitiveMesh::hasPointPoints() const +inline bool Foam::primitiveMesh::hasPointPoints() const noexcept { return ppPtr_; } -inline bool Foam::primitiveMesh::hasCellPoints() const +inline bool Foam::primitiveMesh::hasCellPoints() const noexcept { return cpPtr_; } -inline bool Foam::primitiveMesh::hasCellCentres() const +inline bool Foam::primitiveMesh::hasCellCentres() const noexcept { return cellCentresPtr_; } -inline bool Foam::primitiveMesh::hasFaceCentres() const +inline bool Foam::primitiveMesh::hasFaceCentres() const noexcept { return faceCentresPtr_; } -inline bool Foam::primitiveMesh::hasCellVolumes() const +inline bool Foam::primitiveMesh::hasCellVolumes() const noexcept { return cellVolumesPtr_; } -inline bool Foam::primitiveMesh::hasFaceAreas() const +inline bool Foam::primitiveMesh::hasFaceAreas() const noexcept { return faceAreasPtr_; } diff --git a/src/conversion/ccm/reader/ccmReader.C b/src/conversion/ccm/reader/ccmReader.C index 838b5d234f1635939deeac6aa662b96ac925f255..baa5b19b7cced1501041cf0e586cd21ed6a3b54f 100644 --- a/src/conversion/ccm/reader/ccmReader.C +++ b/src/conversion/ccm/reader/ccmReader.C @@ -28,7 +28,6 @@ License #include "ccmReader.H" #include "IFstream.H" #include "IOdictionary.H" -#include "demandDrivenData.H" #include "ccmInternal.H" // include last to avoid any strange interactions diff --git a/src/conversion/ccm/writer/ccmWriter.C b/src/conversion/ccm/writer/ccmWriter.C index 33f12e1f56e209a609e4ca86d8c5c2ce7319eb86..b690752f421d322194a120b4b4e61ec2678f29a4 100644 --- a/src/conversion/ccm/writer/ccmWriter.C +++ b/src/conversion/ccm/writer/ccmWriter.C @@ -27,7 +27,7 @@ License #include "ccmWriter.H" #include "cellModel.H" -#include "demandDrivenData.H" + #include "ccmInternal.H" // include last to avoid any strange interactions // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/dynamicMesh/fvMeshSubset/fvMeshSubset.C b/src/dynamicMesh/fvMeshSubset/fvMeshSubset.C index 71b6bb229f4131c46912f29e20649a611ec2e472..305f4515ea7b966033e48cf751ce7b296c1d9752 100644 --- a/src/dynamicMesh/fvMeshSubset/fvMeshSubset.C +++ b/src/dynamicMesh/fvMeshSubset/fvMeshSubset.C @@ -32,7 +32,6 @@ License #include "pointIndList.H" #include "Pstream.H" #include "emptyPolyPatch.H" -#include "demandDrivenData.H" #include "cyclicPolyPatch.H" #include "removeCells.H" #include "polyTopoChange.H" diff --git a/src/dynamicMesh/slidingInterface/slidingInterfaceAttachedAddressing.C b/src/dynamicMesh/slidingInterface/slidingInterfaceAttachedAddressing.C index 1015e60c589e6f2fcf443206556c4a6c73f76228..f7e43abc3439b8119d7f8971712f51124c675705 100644 --- a/src/dynamicMesh/slidingInterface/slidingInterfaceAttachedAddressing.C +++ b/src/dynamicMesh/slidingInterface/slidingInterfaceAttachedAddressing.C @@ -30,7 +30,6 @@ License #include "polyMesh.H" #include "mapPolyMesh.H" #include "polyTopoChanger.H" -#include "demandDrivenData.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/src/finiteArea/faMatrices/faMatrix/faMatrix.C b/src/finiteArea/faMatrices/faMatrix/faMatrix.C index 01cd2e88124d79a2b5fe83b03598e813ff554448..2d646e7851661fac309bb630c131e7f4eaff8ac8 100644 --- a/src/finiteArea/faMatrices/faMatrix/faMatrix.C +++ b/src/finiteArea/faMatrices/faMatrix/faMatrix.C @@ -308,10 +308,7 @@ Foam::faMatrix<Type>::faMatrix template<class Type> Foam::tmp<Foam::faMatrix<Type>> Foam::faMatrix<Type>::clone() const { - return tmp<faMatrix<Type>> - ( - new faMatrix<Type>(*this) - ); + return tmp<faMatrix<Type>>::New(*this); } diff --git a/src/finiteArea/faMatrices/faMatrix/faMatrix.H b/src/finiteArea/faMatrices/faMatrix/faMatrix.H index f51ebd80b3b5e809886989ab6ed071e2ff9f47f1..dcee88c439179894e2dcfa0b643cb7c75ef78df9 100644 --- a/src/finiteArea/faMatrices/faMatrix/faMatrix.H +++ b/src/finiteArea/faMatrices/faMatrix/faMatrix.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 Wikki Ltd - Copyright (C) 2020 OpenCFD Ltd. + Copyright (C) 2020-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -74,11 +74,28 @@ class faMatrix public refCount, public lduMatrix { +public: + + // Public Types + + //- Field type for psi + typedef + GeometricField<Type, faPatchField, areaMesh> + psiFieldType; + + //- Field type for face flux (for non-orthogonal correction) + typedef + GeometricField<Type, faePatchField, edgeMesh> + faceFluxFieldType; + + +private: + // Private Data //- Const reference to field // Converted into a non-const reference at the point of solution. - const GeometricField<Type, faPatchField, areaMesh>& psi_; + const psiFieldType& psi_; //- Dimension set dimensionSet dimensions_; @@ -95,8 +112,7 @@ class faMatrix FieldField<Field, Type> boundaryCoeffs_; //- Face flux field for non-orthogonal correction - mutable GeometricField<Type, faePatchField, edgeMesh> - *faceFluxCorrectionPtr_; + mutable faceFluxFieldType* faceFluxCorrectionPtr_; protected: @@ -285,17 +301,22 @@ public: return boundaryCoeffs_; } - //- Declare return type of the faceFluxCorrectionPtr() function typedef GeometricField<Type, faePatchField, edgeMesh> - *edgeTypeFieldPtr; + *faceFluxFieldPtrType; //- Return pointer to face-flux non-orthogonal correction field - edgeTypeFieldPtr& faceFluxCorrectionPtr() + faceFluxFieldPtrType& faceFluxCorrectionPtr() { return faceFluxCorrectionPtr_; } + //- True if face-flux non-orthogonal correction field exists + bool hasFaceFluxCorrection() const noexcept + { + return bool(faceFluxCorrectionPtr_); + } + // Operations diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C index 2320fc25c957be6f2af1c9f0482e20e59cc820ce..03e6518cc87ead72549e959613d51db5be6feb11 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C @@ -27,7 +27,6 @@ License #include "processorCyclicFvPatchField.H" #include "processorCyclicFvPatch.H" -#include "demandDrivenData.H" #include "transformField.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index 96b3ff6c9f858433d36e7d61783b569c66add00d..8720efd95f00843b84e0d6ea819e466a88caeab4 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -528,10 +528,7 @@ Foam::fvMatrix<Type>::fvMatrix template<class Type> Foam::tmp<Foam::fvMatrix<Type>> Foam::fvMatrix<Type>::clone() const { - return tmp<fvMatrix<Type>> - ( - new fvMatrix<Type>(*this) - ); + return tmp<fvMatrix<Type>>::New(*this); } diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H index a98074244a3b1b631e7eea5cabc6d8eb8dc35420..33c42a978adb71680de5aaf4f2e086e26f4ff034 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H @@ -121,11 +121,27 @@ class fvMatrix public refCount, public lduMatrix { +public: + + // Public Types + + //- Field type for psi + typedef + GeometricField<Type, fvPatchField, volMesh> + psiFieldType; + + //- Field type for face flux (for non-orthogonal correction) + typedef + GeometricField<Type, fvsPatchField, surfaceMesh> + faceFluxFieldType; + +private: + // Private Data //- Const reference to field // Converted into a non-const reference at the point of solution. - const GeometricField<Type, fvPatchField, volMesh>& psi_; + const psiFieldType& psi_; //- Originating fvMatrices when assembling matrices. Empty if not used. PtrList<fvMatrix<Type>> subMatrices_; @@ -154,8 +170,7 @@ class fvMatrix FieldField<Field, Type> boundaryCoeffs_; //- Face flux field for non-orthogonal correction - mutable GeometricField<Type, fvsPatchField, surfaceMesh> - *faceFluxCorrectionPtr_; + mutable faceFluxFieldType* faceFluxCorrectionPtr_; protected: @@ -468,14 +483,20 @@ public: //- Declare return type of the faceFluxCorrectionPtr() function typedef GeometricField<Type, fvsPatchField, surfaceMesh> - *surfaceTypeFieldPtr; + *faceFluxFieldPtrType; //- Return pointer to face-flux non-orthogonal correction field - surfaceTypeFieldPtr& faceFluxCorrectionPtr() + faceFluxFieldPtrType& faceFluxCorrectionPtr() { return faceFluxCorrectionPtr_; } + //- True if face-flux non-orthogonal correction field exists + bool hasFaceFluxCorrection() const noexcept + { + return bool(faceFluxCorrectionPtr_); + } + // Operations diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C index 98d14998c1d1a622ad1a7e4ba2e6ec1c64b95ec0..9200d9c1fd0bb5fe6ff71a7cca5b47e994194bcc 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C @@ -30,7 +30,6 @@ License #include "fvMesh.H" #include "volFields.H" #include "pointFields.H" -#include "demandDrivenData.H" #include "pointConstraints.H" #include "surfaceFields.H" #include "processorPointPatch.H" diff --git a/src/meshTools/algorithms/MeshWave/FaceCellWave.H b/src/meshTools/algorithms/MeshWave/FaceCellWave.H index b03cc805bd4dee0ec9e04618ca9d10137909e535..f3eefe65f82565f3eafeba62896f89836c851b6b 100644 --- a/src/meshTools/algorithms/MeshWave/FaceCellWave.H +++ b/src/meshTools/algorithms/MeshWave/FaceCellWave.H @@ -83,7 +83,7 @@ class FaceCellWave protected: //- Information tagged with a source or destination id. - // With std::pair as lightweight, moveable container. + // With std::pair as lightweight, movable container. typedef std::pair<label,Type> taggedInfoType; diff --git a/src/meshTools/meshSearch/meshSearch.C b/src/meshTools/meshSearch/meshSearch.C index ed0017ba9fae4f3269de46b72c4c19a5fd6c47ad..2f840ac26d3273c0ec54a4f1adee8b4f352baa19 100644 --- a/src/meshTools/meshSearch/meshSearch.C +++ b/src/meshTools/meshSearch/meshSearch.C @@ -30,7 +30,6 @@ License #include "polyMesh.H" #include "indexedOctree.H" #include "DynamicList.H" -#include "demandDrivenData.H" #include "treeDataCell.H" #include "treeDataFace.H" diff --git a/src/sampling/sampledSurface/sampledSurface/sampledSurface.C b/src/sampling/sampledSurface/sampledSurface/sampledSurface.C index 333a8a8e563ba86c6b2ecb93e52ef0468ba94601..9d9fd19cec8de33c4b758cdfbce8dd0a776ef167 100644 --- a/src/sampling/sampledSurface/sampledSurface/sampledSurface.C +++ b/src/sampling/sampledSurface/sampledSurface/sampledSurface.C @@ -28,7 +28,6 @@ License #include "sampledSurface.H" #include "polyMesh.H" -#include "demandDrivenData.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/sampling/sampledSurface/sampledSurface/sampledSurfaceRegister.C b/src/sampling/sampledSurface/sampledSurface/sampledSurfaceRegister.C index 0045bebeb5d5bc73fa46c12691a60e0328ffc649..4bb0eaecff9465e8af835f9bc389857d0872b0e2 100644 --- a/src/sampling/sampledSurface/sampledSurface/sampledSurfaceRegister.C +++ b/src/sampling/sampledSurface/sampledSurface/sampledSurfaceRegister.C @@ -28,7 +28,6 @@ License #include "sampledSurface.H" #include "fvMesh.H" #include "MeshedSurface.H" -#include "demandDrivenData.H" // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //