From 00f499d71430481f4364e944aeb8434615fb5dc3 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 27 Feb 2023 13:01:08 +0100 Subject: [PATCH] ENH: more noexcept methods for edge, avoid some intermediates STYLE: document edge parameters as 'vertex' (not point) - edge is also used for graph edges or connection edges etc. --- src/OpenFOAM/meshes/meshShapes/edge/edge.H | 105 ++++++++++-------- src/OpenFOAM/meshes/meshShapes/edge/edgeI.H | 58 +++++----- src/OpenFOAM/meshes/meshShapes/face/face.C | 12 +- src/OpenFOAM/meshes/meshShapes/face/face.H | 24 ++-- src/OpenFOAM/meshes/meshShapes/face/faceI.H | 4 +- .../meshes/meshShapes/face/faceIntersection.C | 7 +- .../meshes/meshShapes/triFace/triFace.H | 28 ++--- .../meshes/meshShapes/triFace/triFaceI.H | 4 +- 8 files changed, 125 insertions(+), 117 deletions(-) diff --git a/src/OpenFOAM/meshes/meshShapes/edge/edge.H b/src/OpenFOAM/meshes/meshShapes/edge/edge.H index 5557ce4045..c479af2217 100644 --- a/src/OpenFOAM/meshes/meshShapes/edge/edge.H +++ b/src/OpenFOAM/meshes/meshShapes/edge/edge.H @@ -28,13 +28,13 @@ Class Foam::edge Description - An edge is a list of two point labels. The functionality it provides - supports the discretisation on a 2-D flat mesh. + An edge is a list of two vertex labels. + This can correspond to a directed graph edge or an edge on a mesh. The edge is implemented as a Pair/FixedList of labels. As well as geometrically relevant methods, it also provides methods similar to HashSet for additional convenience. - Valid point labels are always non-negative (since they correspond to + Valid vertex labels are always non-negative (eg, since they correspond to addressing within the mesh). The value '-1' is used to tag invalid point labels that correspond conceptually to open 'slots', which can be filled with a HashSet-like functionality. @@ -69,30 +69,31 @@ public: // Static Data Members + //- The typeName ("edge") static const char* const typeName; // Constructors - //- Default construct, with invalid point labels (-1) + //- Default construct, with invalid vertex labels (-1) inline edge(); - //- Construct from two point labels + //- Construct from two vertex labels inline edge(const label from, const label to); - //- Construct from pair of point labels + //- Construct from pair of vertex labels inline edge(const labelPair& pair); - //- Construct from list of point labels + //- Construct from list of vertex labels inline edge(const FixedList& list); - //- Construct from two point labels, sorted with first less-than second + //- Construct from two vertex labels, sorted with first less-than second inline edge(const label from, const label to, const bool doSort); //- Construct from list, sorted with first less-than second inline edge(const FixedList& list, const bool doSort); - //- Copy construct from a subset of point labels + //- Copy construct from a subset of vertex labels inline edge ( const UList