mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: add std:: qualifier to unique_ptr for additional clarity, noexcept
This commit is contained in:
@ -608,19 +608,19 @@ Foam::List<Foam::labelRange> Foam::polyBoundaryMesh::patchRanges() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::label Foam::polyBoundaryMesh::start() const
|
Foam::label Foam::polyBoundaryMesh::start() const noexcept
|
||||||
{
|
{
|
||||||
return mesh_.nInternalFaces();
|
return mesh_.nInternalFaces();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::label Foam::polyBoundaryMesh::nFaces() const
|
Foam::label Foam::polyBoundaryMesh::nFaces() const noexcept
|
||||||
{
|
{
|
||||||
return mesh_.nBoundaryFaces();
|
return mesh_.nBoundaryFaces();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::labelRange Foam::polyBoundaryMesh::range() const
|
Foam::labelRange Foam::polyBoundaryMesh::range() const noexcept
|
||||||
{
|
{
|
||||||
return labelRange(mesh_.nInternalFaces(), mesh_.nBoundaryFaces());
|
return labelRange(mesh_.nInternalFaces(), mesh_.nBoundaryFaces());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2018-2021 OpenCFD Ltd.
|
Copyright (C) 2018-2022 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -36,8 +36,8 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef polyBoundaryMesh_H
|
#ifndef Foam_polyBoundaryMesh_H
|
||||||
#define polyBoundaryMesh_H
|
#define Foam_polyBoundaryMesh_H
|
||||||
|
|
||||||
#include "polyPatchList.H"
|
#include "polyPatchList.H"
|
||||||
#include "regIOobject.H"
|
#include "regIOobject.H"
|
||||||
@ -188,17 +188,17 @@ public:
|
|||||||
//- Return a list of patch ranges
|
//- Return a list of patch ranges
|
||||||
List<labelRange> patchRanges() const;
|
List<labelRange> patchRanges() const;
|
||||||
|
|
||||||
//- The start label of the boundary faces in the polyMesh face list
|
//- The start label of boundary faces in the polyMesh face list
|
||||||
// Same as mesh.nInternalFaces()
|
// Same as polyMesh::nInternalFaces()
|
||||||
label start() const;
|
label start() const noexcept;
|
||||||
|
|
||||||
//- The number of boundary faces in the underlying mesh
|
//- The number of boundary faces in the underlying mesh
|
||||||
// Same as mesh.nBoundaryFaces()
|
// Same as polyMesh::nBoundaryFaces()
|
||||||
label nFaces() const;
|
label nFaces() const noexcept;
|
||||||
|
|
||||||
//- The face range for all boundary faces
|
//- The face range for all boundary faces
|
||||||
// Spans [nInternalFaces, nFaces) of the underlying mesh
|
// Spans [nInternalFaces, nFaces) of the underlying mesh
|
||||||
labelRange range() const;
|
labelRange range() const noexcept;
|
||||||
|
|
||||||
//- Return the range used for boundary faces on patchi.
|
//- Return the range used for boundary faces on patchi.
|
||||||
// Always returns an empty range for negative values of patchi,
|
// Always returns an empty range for negative values of patchi,
|
||||||
|
|||||||
@ -128,62 +128,62 @@ private:
|
|||||||
//- Edges of the patch; address into local point list;
|
//- Edges of the patch; address into local point list;
|
||||||
// sorted with internal edges first in upper-triangular order
|
// sorted with internal edges first in upper-triangular order
|
||||||
// and external edges last.
|
// and external edges last.
|
||||||
mutable unique_ptr<edgeList> edgesPtr_;
|
mutable std::unique_ptr<edgeList> edgesPtr_;
|
||||||
|
|
||||||
//- Which part of edgesPtr_ is internal edges.
|
//- Which part of edgesPtr_ is internal edges.
|
||||||
mutable label nInternalEdges_;
|
mutable label nInternalEdges_;
|
||||||
|
|
||||||
//- Boundary point labels, addressing into local point list
|
//- Boundary point labels, addressing into local point list
|
||||||
mutable unique_ptr<labelList> boundaryPointsPtr_;
|
mutable std::unique_ptr<labelList> boundaryPointsPtr_;
|
||||||
|
|
||||||
//- Face-face addressing
|
//- Face-face addressing
|
||||||
mutable unique_ptr<labelListList> faceFacesPtr_;
|
mutable std::unique_ptr<labelListList> faceFacesPtr_;
|
||||||
|
|
||||||
//- Edge-face addressing
|
//- Edge-face addressing
|
||||||
mutable unique_ptr<labelListList> edgeFacesPtr_;
|
mutable std::unique_ptr<labelListList> edgeFacesPtr_;
|
||||||
|
|
||||||
//- Face-edge addressing
|
//- Face-edge addressing
|
||||||
mutable unique_ptr<labelListList> faceEdgesPtr_;
|
mutable std::unique_ptr<labelListList> faceEdgesPtr_;
|
||||||
|
|
||||||
//- Point-edge addressing
|
//- Point-edge addressing
|
||||||
mutable unique_ptr<labelListList> pointEdgesPtr_;
|
mutable std::unique_ptr<labelListList> pointEdgesPtr_;
|
||||||
|
|
||||||
//- Point-face addressing
|
//- Point-face addressing
|
||||||
mutable unique_ptr<labelListList> pointFacesPtr_;
|
mutable std::unique_ptr<labelListList> pointFacesPtr_;
|
||||||
|
|
||||||
//- Faces addressing into local point list
|
//- Faces addressing into local point list
|
||||||
mutable unique_ptr<List<face_type>> localFacesPtr_;
|
mutable std::unique_ptr<List<face_type>> localFacesPtr_;
|
||||||
|
|
||||||
//- Labels of mesh points
|
//- Labels of mesh points
|
||||||
mutable unique_ptr<labelList> meshPointsPtr_;
|
mutable std::unique_ptr<labelList> meshPointsPtr_;
|
||||||
|
|
||||||
//- Mesh point map. Given the global point index find its
|
//- Mesh point map. Given the global point index find its
|
||||||
//- location in the patch
|
//- location in the patch
|
||||||
mutable unique_ptr<Map<label>> meshPointMapPtr_;
|
mutable std::unique_ptr<Map<label>> meshPointMapPtr_;
|
||||||
|
|
||||||
//- Outside edge loops
|
//- Outside edge loops
|
||||||
mutable unique_ptr<labelListList> edgeLoopsPtr_;
|
mutable std::unique_ptr<labelListList> edgeLoopsPtr_;
|
||||||
|
|
||||||
//- Points local to patch
|
//- Points local to patch
|
||||||
mutable unique_ptr<Field<point_type>> localPointsPtr_;
|
mutable std::unique_ptr<Field<point_type>> localPointsPtr_;
|
||||||
|
|
||||||
//- Local point order for most efficient search
|
//- Local point order for most efficient search
|
||||||
mutable unique_ptr<labelList> localPointOrderPtr_;
|
mutable std::unique_ptr<labelList> localPointOrderPtr_;
|
||||||
|
|
||||||
//- Face centres
|
//- Face centres
|
||||||
mutable unique_ptr<Field<point_type>> faceCentresPtr_;
|
mutable std::unique_ptr<Field<point_type>> faceCentresPtr_;
|
||||||
|
|
||||||
//- Face area vectors
|
//- Face area vectors
|
||||||
mutable unique_ptr<Field<point_type>> faceAreasPtr_;
|
mutable std::unique_ptr<Field<point_type>> faceAreasPtr_;
|
||||||
|
|
||||||
//- Mag face area
|
//- Mag face area
|
||||||
mutable unique_ptr<Field<scalar>> magFaceAreasPtr_;
|
mutable std::unique_ptr<Field<scalar>> magFaceAreasPtr_;
|
||||||
|
|
||||||
//- Face unit normals
|
//- Face unit normals
|
||||||
mutable unique_ptr<Field<point_type>> faceNormalsPtr_;
|
mutable std::unique_ptr<Field<point_type>> faceNormalsPtr_;
|
||||||
|
|
||||||
//- Point unit normals
|
//- Point unit normals
|
||||||
mutable unique_ptr<Field<point_type>> pointNormalsPtr_;
|
mutable std::unique_ptr<Field<point_type>> pointNormalsPtr_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|||||||
@ -110,103 +110,103 @@ inline bool Foam::primitiveMesh::isInternalFace
|
|||||||
|
|
||||||
inline bool Foam::primitiveMesh::hasCellShapes() const noexcept
|
inline bool Foam::primitiveMesh::hasCellShapes() const noexcept
|
||||||
{
|
{
|
||||||
return cellShapesPtr_;
|
return bool(cellShapesPtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::primitiveMesh::hasEdges() const noexcept
|
inline bool Foam::primitiveMesh::hasEdges() const noexcept
|
||||||
{
|
{
|
||||||
return edgesPtr_;
|
return bool(edgesPtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::primitiveMesh::hasCellCells() const noexcept
|
inline bool Foam::primitiveMesh::hasCellCells() const noexcept
|
||||||
{
|
{
|
||||||
return ccPtr_;
|
return bool(ccPtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::primitiveMesh::hasEdgeCells() const noexcept
|
inline bool Foam::primitiveMesh::hasEdgeCells() const noexcept
|
||||||
{
|
{
|
||||||
return ecPtr_;
|
return bool(ecPtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::primitiveMesh::hasPointCells() const noexcept
|
inline bool Foam::primitiveMesh::hasPointCells() const noexcept
|
||||||
{
|
{
|
||||||
return pcPtr_;
|
return bool(pcPtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::primitiveMesh::hasCells() const noexcept
|
inline bool Foam::primitiveMesh::hasCells() const noexcept
|
||||||
{
|
{
|
||||||
return cfPtr_;
|
return bool(cfPtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::primitiveMesh::hasEdgeFaces() const noexcept
|
inline bool Foam::primitiveMesh::hasEdgeFaces() const noexcept
|
||||||
{
|
{
|
||||||
return efPtr_;
|
return bool(efPtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::primitiveMesh::hasPointFaces() const noexcept
|
inline bool Foam::primitiveMesh::hasPointFaces() const noexcept
|
||||||
{
|
{
|
||||||
return pfPtr_;
|
return bool(pfPtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::primitiveMesh::hasCellEdges() const noexcept
|
inline bool Foam::primitiveMesh::hasCellEdges() const noexcept
|
||||||
{
|
{
|
||||||
return cePtr_;
|
return bool(cePtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::primitiveMesh::hasFaceEdges() const noexcept
|
inline bool Foam::primitiveMesh::hasFaceEdges() const noexcept
|
||||||
{
|
{
|
||||||
return fePtr_;
|
return bool(fePtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::primitiveMesh::hasPointEdges() const noexcept
|
inline bool Foam::primitiveMesh::hasPointEdges() const noexcept
|
||||||
{
|
{
|
||||||
return pePtr_;
|
return bool(pePtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::primitiveMesh::hasPointPoints() const noexcept
|
inline bool Foam::primitiveMesh::hasPointPoints() const noexcept
|
||||||
{
|
{
|
||||||
return ppPtr_;
|
return bool(ppPtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::primitiveMesh::hasCellPoints() const noexcept
|
inline bool Foam::primitiveMesh::hasCellPoints() const noexcept
|
||||||
{
|
{
|
||||||
return cpPtr_;
|
return bool(cpPtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::primitiveMesh::hasCellCentres() const noexcept
|
inline bool Foam::primitiveMesh::hasCellCentres() const noexcept
|
||||||
{
|
{
|
||||||
return cellCentresPtr_;
|
return bool(cellCentresPtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::primitiveMesh::hasFaceCentres() const noexcept
|
inline bool Foam::primitiveMesh::hasFaceCentres() const noexcept
|
||||||
{
|
{
|
||||||
return faceCentresPtr_;
|
return bool(faceCentresPtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::primitiveMesh::hasCellVolumes() const noexcept
|
inline bool Foam::primitiveMesh::hasCellVolumes() const noexcept
|
||||||
{
|
{
|
||||||
return cellVolumesPtr_;
|
return bool(cellVolumesPtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::primitiveMesh::hasFaceAreas() const noexcept
|
inline bool Foam::primitiveMesh::hasFaceAreas() const noexcept
|
||||||
{
|
{
|
||||||
return faceAreasPtr_;
|
return bool(faceAreasPtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user