MeshKernel
Mesh2D.hpp
1 //---- GPL ---------------------------------------------------------------------
2 //
3 // Copyright (C) Stichting Deltares, 2011-2021.
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation version 3.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 //
17 // contact: delft3d.support@deltares.nl
18 // Stichting Deltares
19 // P.O. Box 177
20 // 2600 MH Delft, The Netherlands
21 //
22 // All indications and logos of, and references to, "Delft3D" and "Deltares"
23 // are registered trademarks of Stichting Deltares, and remain the property of
24 // Stichting Deltares. All rights reserved.
25 //
26 //------------------------------------------------------------------------------
27 
28 #pragma once
29 #include <array>
30 #include <ranges>
31 #include <utility>
32 #include <vector>
33 
34 #include "MeshKernel/Definitions.hpp"
35 #include <MeshKernel/Entities.hpp>
36 #include <MeshKernel/Mesh.hpp>
37 #include <MeshKernel/Polygon.hpp>
38 #include <MeshKernel/UndoActions/CompoundUndoAction.hpp>
39 #include <MeshKernel/UndoActions/SphericalCoordinatesOffsetAction.hpp>
40 #include <MeshKernel/UndoActions/UndoAction.hpp>
41 
44 namespace meshkernel
45 {
46  // Forward declarations
47  class CurvilinearGrid;
48  class Polygons;
49  class GeometryList;
50 
56  class Mesh2D final : public Mesh
57  {
58  public:
59  using Mesh::CommitAction;
60  using Mesh::RestoreAction;
61 
64  {
65  InsideNotIntersected = 0,
66  InsideAndIntersected = 1,
67  FacesWithIncludedCircumcenters = 2
68  };
69 
71  enum class Property
72  {
73  Orthogonality = 0,
74  EdgeLength = 1
75  };
76 
78  ~Mesh2D() override = default;
79 
81  Mesh2D();
82 
85  explicit Mesh2D(Projection projection);
86 
91  Mesh2D(const std::vector<Edge>& edges,
92  const std::vector<Point>& nodes,
93  Projection projection);
94 
101  Mesh2D(const std::vector<Edge>& edges,
102  const std::vector<Point>& nodes,
103  const std::vector<std::vector<UInt>>& faceNodes,
104  const std::vector<std::uint8_t>& numFaceNodes,
105  Projection projection);
106 
111  Mesh2D(const std::vector<Point>& nodes, const Polygons& polygons, Projection projection);
112 
114  void Administrate(CompoundUndoAction* undoAction = nullptr) override;
115 
117  void ComputeCircumcentersMassCentersAndFaceAreas(bool computeMassCenters = false);
118 
120  void FindFaces();
121 
125  void FindFacesGivenFaceNodesMapping(const std::vector<std::vector<UInt>>& faceNodes,
126  const std::vector<std::uint8_t>& numFaceNodes);
127 
131  [[nodiscard]] std::unique_ptr<SphericalCoordinatesOffsetAction> OffsetSphericalCoordinates(double minx, double maxx);
132 
134  void CommitAction(const SphericalCoordinatesOffsetAction& undoAction);
135 
139  void RestoreAction(const SphericalCoordinatesOffsetAction& undoAction);
140 
147  std::vector<Point>& polygonNodesCache,
148  std::vector<UInt>& localNodeIndicesCache,
149  std::vector<UInt>& globalEdgeIndicesCache) const;
150 
154  void ComputeFaceClosedPolygon(UInt faceIndex, std::vector<Point>& polygonNodesCache) const;
155 
160  [[nodiscard]] Point ComputeFaceCircumenter(std::vector<Point>& polygon,
161  const std::vector<UInt>& edgesNumFaces) const;
162 
165  [[nodiscard]] std::vector<Point> GetObtuseTrianglesCenters();
166 
170  [[nodiscard]] std::vector<UInt> GetEdgesCrossingSmallFlowEdges(double smallFlowEdgesThreshold);
171 
175  [[nodiscard]] std::vector<Point> GetFlowEdgesCenters(const std::vector<UInt>& edges) const;
176 
199  [[nodiscard]] std::unique_ptr<meshkernel::UndoAction> DeleteSmallFlowEdges(double smallFlowEdgesThreshold);
200 
218  [[nodiscard]] std::unique_ptr<UndoAction> DeleteSmallTrianglesAtBoundaries(double minFractionalAreaTriangles);
219 
221  void ComputeNodeNeighbours(std::vector<std::vector<UInt>>& nodesNodes, UInt& maxNumNeighbours) const;
222 
225  void ComputeAspectRatios(std::vector<double>& aspectRatios) const;
226 
228  void ClassifyNodes();
229 
231  MeshNodeType GetNodeType(const UInt nodeId) const { return m_nodesTypes[nodeId]; }
232 
234  void GetNodeTypes(std::vector<MeshNodeType>& nodeTypes) const { nodeTypes = m_nodesTypes; }
235 
237  [[nodiscard]] std::unique_ptr<UndoAction> DeleteDegeneratedTriangles();
238 
240  [[nodiscard]] std::unique_ptr<UndoAction> TriangulateFaces();
241 
247  void MakeDualFace(const std::span<const Point> edgeCentres,
248  UInt node,
249  double enlargementFactor,
250  std::vector<Point>& dualFace) const;
251 
255  [[nodiscard]] std::vector<UInt> SortedFacesAroundNode(UInt node) const;
256 
260  [[nodiscard]] std::vector<Point> ComputeBoundaryPolygons(const std::vector<Point>& polygon);
261 
267  void WalkBoundaryFromNode(const Polygon& polygon,
268  std::vector<bool>& isVisited,
269  UInt& currentNode,
270  std::vector<Point>& meshBoundaryPolygon) const;
271 
274  [[nodiscard]] std::vector<UInt> GetHangingEdges() const;
275 
277  [[nodiscard]] std::unique_ptr<UndoAction> DeleteHangingEdges();
278 
282  [[nodiscard]] std::vector<UInt> PointFaceIndices(const std::vector<Point>& points);
283 
289  [[nodiscard]] std::unique_ptr<UndoAction> DeleteMesh(const Polygons& polygon, DeleteMeshOptions deletionOption, bool invertDeletion);
290 
298  [[nodiscard]] std::vector<bool> FilterBasedOnMetric(Location location, Property property, double minValue, double maxValue) const;
299 
304  [[nodiscard]] std::tuple<UInt, UInt> IsSegmentCrossingABoundaryEdge(const Point& firstPoint, const Point& secondPoint) const;
305 
311  [[nodiscard]] std::vector<int> MaskEdgesOfFacesInPolygon(const Polygons& polygons, bool invertSelection, bool includeIntersected) const;
312 
316  [[nodiscard]] std::vector<int> NodeMaskFromEdgeMask(std::vector<int> const& edgeMask) const;
317 
322  [[nodiscard]] std::vector<int> NodeMaskFromPolygon(const Polygons& polygons, bool inside) const;
323 
327  UInt FindOppositeEdge(const UInt faceId, const UInt edgeId) const;
328 
333  UInt NextFace(const UInt faceId, const UInt edgeId) const;
334 
340  static std::unique_ptr<Mesh2D> Merge(const Mesh2D& mesh1, const Mesh2D& mesh2);
341 
343  static std::unique_ptr<Mesh2D> Merge(const std::span<const Point>& mesh1Nodes,
344  const std::span<const Edge>& mesh1Edges,
345  const std::span<const Point>& mesh2Nodes,
346  const std::span<const Edge>& mesh2Edges,
347  const Projection projection);
348 
352  [[nodiscard]] BoundingBox GetBoundingBox() const;
353 
357  [[nodiscard]] std::vector<BoundingBox> GetEdgesBoundingBoxes() const;
358 
363  void FindFacesConnectedToNode(UInt nodeIndex, std::vector<UInt>& sharedFaces) const;
364 
369  void GetConnectingNodes(UInt nodeIndex, std::vector<UInt>& connectedNodes) const;
370 
377  void FindNodesSharedByFaces(UInt nodeIndex, const std::vector<UInt>& sharedFaces, std::vector<UInt>& connectedNodes, std::vector<std::vector<UInt>>& faceNodeMapping) const;
378 
383  UInt IsStartOrEnd(const UInt edgeId, const UInt nodeId) const;
384 
389  UInt IsLeftOrRight(const UInt elementId, const UInt edgeId) const;
390 
394  UInt FindCommonFace(const UInt edge1, const UInt edge2) const;
395 
396  private:
397  // orthogonalization
398  static constexpr double m_minimumEdgeLength = 1e-4;
399  static constexpr double m_curvilinearToOrthogonalRatio = 0.5;
400  static constexpr double m_minimumCellArea = 1e-12;
401  static constexpr double m_weightCircumCenter = 1.0;
402  static constexpr UInt m_maximumNumberOfHangingNodesAlongEdge = 5;
403 
405  using HangingNodeIndexArray = std::array<UInt, m_maximumNumberOfHangingNodesAlongEdge>;
406 
408  void ComputeAverageAreOfNeighbouringFaces(const UInt faceId, UInt& numNonBoundaryFaces, double& averageOtherFacesArea) const;
409 
411  void FindSmallestCornerAngle(const UInt faceId,
412  double& minCosPhiSmallTriangle,
413  UInt& nodeToPreserve,
414  UInt& firstNodeToMerge,
415  UInt& secondNodeToMerge,
416  UInt& thirdEdgeSmallTriangle) const;
417 
419  void DeleteSmallTriangle(const UInt nodeToPreserve,
420  const UInt firstNodeToMerge,
421  const UInt secondNodeToMerge,
422  bool& nodesMerged,
423  CompoundUndoAction& undoAction);
424 
426  void FindNodesToDelete(const Polygons& polygon,
427  const bool invertDeletion,
428  std::vector<bool>& isNodeInsidePolygon,
429  std::vector<bool>& deleteNode) const;
430 
432  void DeletedMeshNodesAndEdges(const std::function<bool(UInt)>& excludedFace,
433  std::vector<bool>& deleteNode,
434  CompoundUndoAction& deleteMeshAction);
435 
437  std::vector<int> ComputeNodeMask(const Polygons& polygons) const;
438 
440  std::vector<int> ComputeEdgeMask(const std::vector<int>& nodeMask,
441  bool includeIntersected) const;
442 
444  void RemoveIntersected(const std::vector<int>& edgeMask,
445  std::vector<int>& secondEdgeMask) const;
446 
448  void InvertSelection(const std::vector<int>& edgeMask,
449  std::vector<int>& secondEdgeMask) const;
450 
452  std::vector<bool> FindFacesEntirelyInsidePolygon(const std::vector<bool>& isNodeInsidePolygon) const;
453 
458  [[nodiscard]] std::unique_ptr<UndoAction> DeleteMeshFaces(const Polygons& polygon, bool invertDeletion);
459 
470  void FindFacesRecursive(UInt startNode,
471  UInt node,
472  UInt previousEdge,
473  UInt numClosingEdges,
474  std::vector<UInt>& edges,
475  std::vector<UInt>& nodes,
476  std::vector<UInt>& sortedEdges,
477  std::vector<UInt>& sortedNodes,
478  std::vector<Point>& nodalValues);
479 
484  [[nodiscard]] bool HasTriangleNoAcuteAngles(const std::vector<UInt>& faceNodes, const std::vector<Point>& nodes) const;
485 
489  bool HasDuplicateNodes(const UInt numClosingEdges, const std::vector<UInt>& node, std::vector<UInt>& sortedNodes) const;
490 
494  bool HasDuplicateEdgeFaces(const UInt numClosingEdges, const std::vector<UInt>& edges, std::vector<UInt>& sortedEdgesFaces) const;
495 
497  void ResizeAndInitializeFaceVectors();
498 
502  void DoAdministrationGivenFaceNodesMapping(const std::vector<std::vector<UInt>>& faceNodes,
503  const std::vector<std::uint8_t>& numFaceNodes);
504 
507  void DoAdministration(CompoundUndoAction* undoAction = nullptr);
508 
510  void InitialiseBoundaryNodeClassification(std::vector<int>& intNodeType) const;
511 
513  MeshNodeType ClassifyNode(const UInt nodeId) const;
514 
516  UInt CountNumberOfValidEdges(const std::vector<UInt>& edgesNumFaces, const UInt numNodes) const;
517 
519  void ComputeMidPointsAndNormals(const std::vector<Point>& polygon,
520  const std::vector<UInt>& edgesNumFaces,
521  const UInt numNodes,
522  std::array<Point, m_maximumNumberOfNodesPerFace>& middlePoints,
523  std::array<Point, m_maximumNumberOfNodesPerFace>& normals,
524  UInt& pointCount) const;
525 
527  Point ComputeCircumCentre(const Point& centerOfMass,
528  const UInt pointCount,
529  const std::array<Point, m_maximumNumberOfNodesPerFace>& middlePoints,
530  const std::array<Point, m_maximumNumberOfNodesPerFace>& normals) const;
531 
533  void ComputeAverageFlowEdgesLength(std::vector<double>& edgesLength,
534  std::vector<double>& averageFlowEdgesLength) const;
535 
537  void ComputeAverageEdgeLength(const std::vector<double>& edgesLength,
538  const std::vector<double>& averageFlowEdgesLength,
539  std::vector<bool>& curvilinearGridIndicator,
540  std::vector<std::array<double, 2>>& averageEdgesLength,
541  std::vector<double>& aspectRatios) const;
542 
543  std::vector<MeshNodeType> m_nodesTypes;
544  };
545 
546 } // namespace meshkernel
meshkernel::Projection
Projection
Enumerator describing the supported projections.
Definition: Definitions.hpp:42
meshkernel::Mesh2D::DeleteHangingEdges
std::unique_ptr< UndoAction > DeleteHangingEdges()
Deletes the hanging edges.
meshkernel::Mesh2D::ComputeAspectRatios
void ComputeAspectRatios(std::vector< double > &aspectRatios) const
Gets the aspect ratios (the ratios edges lengths to flow edges lengths)
meshkernel::Mesh2D::IsLeftOrRight
UInt IsLeftOrRight(const UInt elementId, const UInt edgeId) const
Determine if the element lies on the left or right side of the edge.
meshkernel::Mesh2D::MakeDualFace
void MakeDualFace(const std::span< const Point > edgeCentres, UInt node, double enlargementFactor, std::vector< Point > &dualFace) const
Make a dual face around the node, enlarged by a factor.
meshkernel::Mesh2D::GetHangingEdges
std::vector< UInt > GetHangingEdges() const
Gets the hanging edges.
meshkernel::Mesh2D::TriangulateFaces
std::unique_ptr< UndoAction > TriangulateFaces()
Transform non-triangular faces in triangular faces.
meshkernel::Mesh::RestoreAction
void RestoreAction(const ResetNodeAction &undoAction)
Undo the reset node action.
meshkernel::Mesh2D::ComputeFaceCircumenter
Point ComputeFaceCircumenter(std::vector< Point > &polygon, const std::vector< UInt > &edgesNumFaces) const
For a closed polygon, compute the circumcenter of a face (getcircumcenter)
meshkernel::Mesh2D::DeleteDegeneratedTriangles
std::unique_ptr< UndoAction > DeleteDegeneratedTriangles()
Deletes coinciding triangles.
meshkernel::Mesh2D::DeleteMeshOptions
DeleteMeshOptions
Enumerator describing the different options to delete a mesh.
Definition: Mesh2D.hpp:63
meshkernel::Mesh2D::NextFace
UInt NextFace(const UInt faceId, const UInt edgeId) const
Get the next face adjacent to the edge on the opposite side.
meshkernel::Mesh2D
A class derived from Mesh, which describes unstructures 2d meshes.
Definition: Mesh2D.hpp:56
meshkernel::Mesh2D::ComputeNodeNeighbours
void ComputeNodeNeighbours(std::vector< std::vector< UInt >> &nodesNodes, UInt &maxNumNeighbours) const
Computes node neighbours.
meshkernel::BoundingBox
A class defining a bounding box.
Definition: BoundingBox.hpp:39
meshkernel::Mesh2D::GetNodeTypes
void GetNodeTypes(std::vector< MeshNodeType > &nodeTypes) const
Get the node type.
Definition: Mesh2D.hpp:234
meshkernel::Mesh2D::ComputeFaceClosedPolygon
void ComputeFaceClosedPolygon(UInt faceIndex, std::vector< Point > &polygonNodesCache) const
For a face create a closed polygon.
meshkernel::Mesh2D::FindNodesSharedByFaces
void FindNodesSharedByFaces(UInt nodeIndex, const std::vector< UInt > &sharedFaces, std::vector< UInt > &connectedNodes, std::vector< std::vector< UInt >> &faceNodeMapping) const
Find all unique nodes.
meshkernel::Point
A struct describing a point in a two-dimensional space.
Definition: Point.hpp:40
meshkernel::Location
Location
Mesh locations enumeration.
Definition: Definitions.hpp:75
meshkernel::Mesh2D::IsSegmentCrossingABoundaryEdge
std::tuple< UInt, UInt > IsSegmentCrossingABoundaryEdge(const Point &firstPoint, const Point &secondPoint) const
Inquire if a segment is crossing a face.
meshkernel::Mesh2D::CommitAction
void CommitAction(const SphericalCoordinatesOffsetAction &undoAction)
Apply the coordinate offset action.
meshkernel::Mesh2D::FindFacesConnectedToNode
void FindFacesConnectedToNode(UInt nodeIndex, std::vector< UInt > &sharedFaces) const
Find all faces that have the given node as a vertex.
meshkernel::Polygon
A closed polygon.
Definition: Polygon.hpp:45
meshkernel::Mesh2D::IsStartOrEnd
UInt IsStartOrEnd(const UInt edgeId, const UInt nodeId) const
Determine if the node is at the start or end of the edge.
meshkernel::Mesh2D::ClassifyNodes
void ClassifyNodes()
Classifies the nodes (makenetnodescoding)
meshkernel::Mesh2D::DeleteMesh
std::unique_ptr< UndoAction > DeleteMesh(const Polygons &polygon, DeleteMeshOptions deletionOption, bool invertDeletion)
Deletes a mesh in a polygon, using several options (delnet)
meshkernel::Mesh2D::DeleteSmallFlowEdges
std::unique_ptr< meshkernel::UndoAction > DeleteSmallFlowEdges(double smallFlowEdgesThreshold)
Deletes small flow edges (removesmallflowlinks, part 1)
meshkernel::Mesh2D::RestoreAction
void RestoreAction(const SphericalCoordinatesOffsetAction &undoAction)
Undo the coordinate offset action.
meshkernel::Mesh2D::MaskEdgesOfFacesInPolygon
std::vector< int > MaskEdgesOfFacesInPolygon(const Polygons &polygons, bool invertSelection, bool includeIntersected) const
Masks the edges of all faces entirely included in all polygons.
meshkernel::Mesh2D::FindFacesGivenFaceNodesMapping
void FindFacesGivenFaceNodesMapping(const std::vector< std::vector< UInt >> &faceNodes, const std::vector< std::uint8_t > &numFaceNodes)
Find remaining face information given the face nodes mapping.
meshkernel::Mesh2D::GetEdgesBoundingBoxes
std::vector< BoundingBox > GetEdgesBoundingBoxes() const
Get the bounding boxes of the mesh edges.
meshkernel::Mesh2D::GetObtuseTrianglesCenters
std::vector< Point > GetObtuseTrianglesCenters()
Gets the mass centers of obtuse triangles.
meshkernel::Mesh2D::GetNodeType
MeshNodeType GetNodeType(const UInt nodeId) const
Get the node type.
Definition: Mesh2D.hpp:231
meshkernel
Contains the logic of the C++ static library.
Definition: AveragingInterpolation.hpp:36
meshkernel::Mesh2D::Property
Property
Enumerator for different properties on a 2D mesh.
Definition: Mesh2D.hpp:71
meshkernel::Mesh2D::NodeMaskFromPolygon
std::vector< int > NodeMaskFromPolygon(const Polygons &polygons, bool inside) const
Mask all nodes included in all polygons.
meshkernel::Mesh2D::DeleteSmallTrianglesAtBoundaries
std::unique_ptr< UndoAction > DeleteSmallTrianglesAtBoundaries(double minFractionalAreaTriangles)
Deletes small triangles at the boundaries (removesmallflowlinks, part 2)
meshkernel::Mesh2D::OffsetSphericalCoordinates
std::unique_ptr< SphericalCoordinatesOffsetAction > OffsetSphericalCoordinates(double minx, double maxx)
Offset the x coordinates if m_projection is spherical.
meshkernel::Mesh2D::ComputeCircumcentersMassCentersAndFaceAreas
void ComputeCircumcentersMassCentersAndFaceAreas(bool computeMassCenters=false)
Compute face circumcenters.
meshkernel::Mesh2D::FindOppositeEdge
UInt FindOppositeEdge(const UInt faceId, const UInt edgeId) const
Find edge on the opposite side of the element.
meshkernel::UInt
std::uint32_t UInt
Integer type used when indexing mesh graph entities.
Definition: Definitions.hpp:39
meshkernel::Mesh2D::Administrate
void Administrate(CompoundUndoAction *undoAction=nullptr) override
Perform complete administration.
meshkernel::Mesh2D::GetBoundingBox
BoundingBox GetBoundingBox() const
Get the mesh bounding box.
meshkernel::Mesh2D::GetEdgesCrossingSmallFlowEdges
std::vector< UInt > GetEdgesCrossingSmallFlowEdges(double smallFlowEdgesThreshold)
Gets the edges crossing the small flow edges.
meshkernel::Mesh2D::Merge
static std::unique_ptr< Mesh2D > Merge(const Mesh2D &mesh1, const Mesh2D &mesh2)
Merges mesh connectivity.
meshkernel::Polygons
A class containing a list of polygonaly enclosed regions.
Definition: Polygons.hpp:44
meshkernel::Mesh2D::FindFaces
void FindFaces()
Constructs the face nodes mapping, face mass centers and areas.
meshkernel::Mesh2D::FindCommonFace
UInt FindCommonFace(const UInt edge1, const UInt edge2) const
Find the id of the element that is common to both edges.
meshkernel::Mesh2D::WalkBoundaryFromNode
void WalkBoundaryFromNode(const Polygon &polygon, std::vector< bool > &isVisited, UInt &currentNode, std::vector< Point > &meshBoundaryPolygon) const
Constructs a polygon from the meshboundary, by walking through the mesh.
meshkernel::Mesh2D::~Mesh2D
~Mesh2D() override=default
Default destructor.
meshkernel::Mesh2D::GetConnectingNodes
void GetConnectingNodes(UInt nodeIndex, std::vector< UInt > &connectedNodes) const
Get indices of all nodes that are connected directly to a give node along connected edges.
meshkernel::Mesh::CommitAction
void CommitAction(const ResetNodeAction &undoAction)
Apply the reset node action.
meshkernel::Mesh2D::PointFaceIndices
std::vector< UInt > PointFaceIndices(const std::vector< Point > &points)
For a collection of points, compute the face indices including them.
meshkernel::Mesh2D::GetFlowEdgesCenters
std::vector< Point > GetFlowEdgesCenters(const std::vector< UInt > &edges) const
Gets the flow edges centers from the crossing edges.
meshkernel::Mesh2D::ComputeBoundaryPolygons
std::vector< Point > ComputeBoundaryPolygons(const std::vector< Point > &polygon)
Convert all mesh boundaries to a vector of polygon nodes, including holes (copynetboundstopol)
meshkernel::Mesh2D::FilterBasedOnMetric
std::vector< bool > FilterBasedOnMetric(Location location, Property property, double minValue, double maxValue) const
This method generates a mask indicating which locations are within the specified range of the given m...
meshkernel::Mesh2D::SortedFacesAroundNode
std::vector< UInt > SortedFacesAroundNode(UInt node) const
Sorts the faces around a node, sorted in counter clock wise order.
meshkernel::Mesh
A class describing an unstructured mesh. This class contains the shared functionality between 1d or 2...
Definition: Mesh.hpp:98
meshkernel::Mesh2D::Mesh2D
Mesh2D()
Default constructor.
meshkernel::MeshNodeType
MeshNodeType
Possible unstructured node types.
Definition: Definitions.hpp:147
meshkernel::Mesh2D::ComputeFaceClosedPolygonWithLocalMappings
void ComputeFaceClosedPolygonWithLocalMappings(UInt faceIndex, std::vector< Point > &polygonNodesCache, std::vector< UInt > &localNodeIndicesCache, std::vector< UInt > &globalEdgeIndicesCache) const
For a face create a closed polygon and fill local mapping caches (get_cellpolygon)
meshkernel::Mesh2D::NodeMaskFromEdgeMask
std::vector< int > NodeMaskFromEdgeMask(std::vector< int > const &edgeMask) const
From the edge mask compute the node mask.