diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C index 4920b30e52..367389c0e2 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C @@ -608,19 +608,19 @@ Foam::List Foam::polyBoundaryMesh::patchRanges() const } -Foam::label Foam::polyBoundaryMesh::start() const +Foam::label Foam::polyBoundaryMesh::start() const noexcept { return mesh_.nInternalFaces(); } -Foam::label Foam::polyBoundaryMesh::nFaces() const +Foam::label Foam::polyBoundaryMesh::nFaces() const noexcept { return mesh_.nBoundaryFaces(); } -Foam::labelRange Foam::polyBoundaryMesh::range() const +Foam::labelRange Foam::polyBoundaryMesh::range() const noexcept { return labelRange(mesh_.nInternalFaces(), mesh_.nBoundaryFaces()); } diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H index 8dcf87f41d..ebc6b1ea51 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2018-2021 OpenCFD Ltd. + Copyright (C) 2018-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -36,8 +36,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef polyBoundaryMesh_H -#define polyBoundaryMesh_H +#ifndef Foam_polyBoundaryMesh_H +#define Foam_polyBoundaryMesh_H #include "polyPatchList.H" #include "regIOobject.H" @@ -188,17 +188,17 @@ public: //- Return a list of patch ranges List patchRanges() const; - //- The start label of the boundary faces in the polyMesh face list - // Same as mesh.nInternalFaces() - label start() const; + //- The start label of boundary faces in the polyMesh face list + // Same as polyMesh::nInternalFaces() + label start() const noexcept; //- The number of boundary faces in the underlying mesh - // Same as mesh.nBoundaryFaces() - label nFaces() const; + // Same as polyMesh::nBoundaryFaces() + label nFaces() const noexcept; //- The face range for all boundary faces // Spans [nInternalFaces, nFaces) of the underlying mesh - labelRange range() const; + labelRange range() const noexcept; //- Return the range used for boundary faces on patchi. // Always returns an empty range for negative values of patchi, diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H index 3999b7449b..13e198de3a 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H +++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H @@ -128,62 +128,62 @@ private: //- Edges of the patch; address into local point list; // sorted with internal edges first in upper-triangular order // and external edges last. - mutable unique_ptr edgesPtr_; + mutable std::unique_ptr edgesPtr_; //- Which part of edgesPtr_ is internal edges. mutable label nInternalEdges_; //- Boundary point labels, addressing into local point list - mutable unique_ptr boundaryPointsPtr_; + mutable std::unique_ptr boundaryPointsPtr_; //- Face-face addressing - mutable unique_ptr faceFacesPtr_; + mutable std::unique_ptr faceFacesPtr_; //- Edge-face addressing - mutable unique_ptr edgeFacesPtr_; + mutable std::unique_ptr edgeFacesPtr_; //- Face-edge addressing - mutable unique_ptr faceEdgesPtr_; + mutable std::unique_ptr faceEdgesPtr_; //- Point-edge addressing - mutable unique_ptr pointEdgesPtr_; + mutable std::unique_ptr pointEdgesPtr_; //- Point-face addressing - mutable unique_ptr pointFacesPtr_; + mutable std::unique_ptr pointFacesPtr_; //- Faces addressing into local point list - mutable unique_ptr> localFacesPtr_; + mutable std::unique_ptr> localFacesPtr_; //- Labels of mesh points - mutable unique_ptr meshPointsPtr_; + mutable std::unique_ptr meshPointsPtr_; //- Mesh point map. Given the global point index find its //- location in the patch - mutable unique_ptr> meshPointMapPtr_; + mutable std::unique_ptr> meshPointMapPtr_; //- Outside edge loops - mutable unique_ptr edgeLoopsPtr_; + mutable std::unique_ptr edgeLoopsPtr_; //- Points local to patch - mutable unique_ptr> localPointsPtr_; + mutable std::unique_ptr> localPointsPtr_; //- Local point order for most efficient search - mutable unique_ptr localPointOrderPtr_; + mutable std::unique_ptr localPointOrderPtr_; //- Face centres - mutable unique_ptr> faceCentresPtr_; + mutable std::unique_ptr> faceCentresPtr_; //- Face area vectors - mutable unique_ptr> faceAreasPtr_; + mutable std::unique_ptr> faceAreasPtr_; //- Mag face area - mutable unique_ptr> magFaceAreasPtr_; + mutable std::unique_ptr> magFaceAreasPtr_; //- Face unit normals - mutable unique_ptr> faceNormalsPtr_; + mutable std::unique_ptr> faceNormalsPtr_; //- Point unit normals - mutable unique_ptr> pointNormalsPtr_; + mutable std::unique_ptr> pointNormalsPtr_; // Private Member Functions diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshI.H b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshI.H index 5bca7075b8..e3e70b2394 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshI.H +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshI.H @@ -110,103 +110,103 @@ inline bool Foam::primitiveMesh::isInternalFace inline bool Foam::primitiveMesh::hasCellShapes() const noexcept { - return cellShapesPtr_; + return bool(cellShapesPtr_); } inline bool Foam::primitiveMesh::hasEdges() const noexcept { - return edgesPtr_; + return bool(edgesPtr_); } inline bool Foam::primitiveMesh::hasCellCells() const noexcept { - return ccPtr_; + return bool(ccPtr_); } inline bool Foam::primitiveMesh::hasEdgeCells() const noexcept { - return ecPtr_; + return bool(ecPtr_); } inline bool Foam::primitiveMesh::hasPointCells() const noexcept { - return pcPtr_; + return bool(pcPtr_); } inline bool Foam::primitiveMesh::hasCells() const noexcept { - return cfPtr_; + return bool(cfPtr_); } inline bool Foam::primitiveMesh::hasEdgeFaces() const noexcept { - return efPtr_; + return bool(efPtr_); } inline bool Foam::primitiveMesh::hasPointFaces() const noexcept { - return pfPtr_; + return bool(pfPtr_); } inline bool Foam::primitiveMesh::hasCellEdges() const noexcept { - return cePtr_; + return bool(cePtr_); } inline bool Foam::primitiveMesh::hasFaceEdges() const noexcept { - return fePtr_; + return bool(fePtr_); } inline bool Foam::primitiveMesh::hasPointEdges() const noexcept { - return pePtr_; + return bool(pePtr_); } inline bool Foam::primitiveMesh::hasPointPoints() const noexcept { - return ppPtr_; + return bool(ppPtr_); } inline bool Foam::primitiveMesh::hasCellPoints() const noexcept { - return cpPtr_; + return bool(cpPtr_); } inline bool Foam::primitiveMesh::hasCellCentres() const noexcept { - return cellCentresPtr_; + return bool(cellCentresPtr_); } inline bool Foam::primitiveMesh::hasFaceCentres() const noexcept { - return faceCentresPtr_; + return bool(faceCentresPtr_); } inline bool Foam::primitiveMesh::hasCellVolumes() const noexcept { - return cellVolumesPtr_; + return bool(cellVolumesPtr_); } inline bool Foam::primitiveMesh::hasFaceAreas() const noexcept { - return faceAreasPtr_; + return bool(faceAreasPtr_); }