Skip to content

Commit c098388

Browse files
committed
GRIDEDIT-1531 Changes after code review
1 parent 88babc5 commit c098388

File tree

2 files changed

+111
-111
lines changed

2 files changed

+111
-111
lines changed

libs/MeshKernel/include/MeshKernel/CasulliDeRefinement.hpp

+30-30
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ namespace meshkernel
7070
/// Enumeration values and comments are from the original Fortran code.
7171
enum class ElementType
7272
{
73-
WasNodeFirst = 1, //< front, 'A' cell (used to be node, delete it): 1
74-
WasEdgeFirst = 2, //< front, 'B' cell (used to be link, keep it): 2
75-
WasCell = 3, //< 'C' cell (used to be cell, keep it): 3
76-
WasNodeAfter = -1, //< not in front, 'A' cell: -1
77-
WasEdgeAfter = -2, //< not in front, 'B' cell: -2
73+
WasNodeFirst = 1, //< front, 'A' face (used to be node, delete it): 1
74+
WasEdgeFirst = 2, //< front, 'B' face (used to be edge, keep it): 2
75+
WasFace = 3, //< 'C' face (used to be face, keep it): 3
76+
WasNodeAfter = -1, //< not in front, 'A' face: -1
77+
WasEdgeAfter = -2, //< not in front, 'B' face: -2
7878
Unassigned = 0 //< not assigned a value 0
7979
};
8080

@@ -96,64 +96,64 @@ namespace meshkernel
9696
const std::vector<int>& nodeTypes);
9797

9898
/// @brief Find all elements that are connected along edges to elementId.
99-
static void FindDirectlyConnectedCells(const Mesh2D& mesh,
99+
static void FindDirectlyConnectedFaces(const Mesh2D& mesh,
100100
const UInt elementId,
101101
std::vector<UInt>& connected);
102102

103103
/// @brief Find all elements that are connected by nodes to elementId.
104-
static void FindIndirectlyConnectedCells(const Mesh2D& mesh,
104+
static void FindIndirectlyConnectedFaces(const Mesh2D& mesh,
105105
const UInt elementId,
106106
const std::vector<UInt>& directlyConnected,
107107
std::vector<UInt>& indirectlyConnected);
108108

109109
/// @brief Assign directly connected element indices
110110
static void AssignDirectlyConnected(const std::vector<UInt>& directlyConnected,
111-
std::array<int, 2>& kne,
111+
std::array<int, 2>& edgeFaces,
112112
UInt& neighbouringElementId);
113113

114114
/// @brief Assign indirectly connected element indices
115115
static void AssignIndirectlyConnected(const std::vector<UInt>& indirectlyConnected,
116-
std::array<int, 2>& kne,
116+
std::array<int, 2>& edgeFaces,
117117
const UInt neighbouringElementId);
118118

119119
/// @brief Find element id's
120-
static void FindAdjacentCells(const Mesh2D& mesh,
120+
static void FindAdjacentFaces(const Mesh2D& mesh,
121121
const std::vector<UInt>& directlyConnected,
122122
const std::vector<UInt>& indirectlyConnected,
123-
std::vector<std::array<int, 2>>& kne);
123+
std::vector<std::array<int, 2>>& edgeFaces);
124124

125125
/// @brief Find the elements that are connected to the elementId.
126-
static void FindSurroundingCells(const Mesh2D& mesh,
126+
static void FindSurroundingFaces(const Mesh2D& mesh,
127127
const UInt elementId,
128128
std::vector<UInt>& directlyConnected,
129129
std::vector<UInt>& indirectlyConnected,
130-
std::vector<std::array<int, 2>>& kne);
130+
std::vector<std::array<int, 2>>& edgeFaces);
131131

132-
/// @brief Update cell mask for directly connected elements
133-
static void UpdateCellMaskDirectlyConnectedNodeFirst(const std::vector<UInt>& directlyConnected,
132+
/// @brief Update face mask for directly connected elements
133+
static void UpdateFaceMaskDirectlyConnectedNodeFirst(const std::vector<UInt>& directlyConnected,
134134
const Mesh2D& mesh,
135135
const std::vector<UInt>& frontIndex,
136136
std::vector<UInt>& frontIndexCopy,
137-
std::vector<ElementType>& cellMask);
137+
std::vector<ElementType>& faceMask);
138138

139-
/// @brief Update cell mask for indirectly connected elements
140-
static void UpdateCellMaskIndirectlyConnectedNodeFirst(const std::vector<UInt>& directlyConnected,
139+
/// @brief Update face mask for indirectly connected elements
140+
static void UpdateFaceMaskIndirectlyConnectedNodeFirst(const std::vector<UInt>& directlyConnected,
141141
const Mesh2D& mesh,
142-
std::vector<ElementType>& cellMask);
142+
std::vector<ElementType>& faceMask);
143143

144-
/// @brief Update cell mask for directly connected elements
145-
static void UpdateCellMaskDirectlyConnectedEdgeFirst(const std::vector<UInt>& directlyConnected,
144+
/// @brief Update face mask for directly connected elements
145+
static void UpdateFaceMaskDirectlyConnectedEdgeFirst(const std::vector<UInt>& directlyConnected,
146146
const Mesh2D& mesh,
147147
const std::vector<UInt>& frontIndex,
148148
std::vector<UInt>& frontIndexCopy,
149-
std::vector<ElementType>& cellMask);
149+
std::vector<ElementType>& faceMask);
150150

151-
/// @brief Update cell mask for indirectly connected elements
152-
static void UpdateCellMaskIndirectlyConnectedEdgeFirst(const std::vector<UInt>& indirectlyConnected,
151+
/// @brief Update face mask for indirectly connected elements
152+
static void UpdateFaceMaskIndirectlyConnectedEdgeFirst(const std::vector<UInt>& indirectlyConnected,
153153
const Mesh2D& mesh,
154154
const std::vector<UInt>& frontIndex,
155155
std::vector<UInt>& frontIndexCopy,
156-
std::vector<ElementType>& cellMask);
156+
std::vector<ElementType>& faceMask);
157157

158158
/// @brief Initialise the element mask.
159159
static std::vector<ElementType> InitialiseElementType(const Mesh2D& mesh,
@@ -171,7 +171,7 @@ namespace meshkernel
171171
const UInt nodeId);
172172

173173
/// @brief Get the element index
174-
static UInt GetElementIndex(const std::array<int, 2>& kne,
174+
static UInt GetElementIndex(const std::array<int, 2>& edgeFaces,
175175
const UInt index);
176176

177177
/// @brief Find a common edge between elements
@@ -184,13 +184,13 @@ namespace meshkernel
184184
[[nodiscard]] static bool UpdateDirectlyConnectedElements(Mesh2D& mesh,
185185
const UInt elementId,
186186
const std::vector<UInt>& directlyConnected,
187-
const std::vector<std::array<int, 2>>& kne);
187+
const std::vector<std::array<int, 2>>& edgeFaces);
188188

189189
/// @brief Update the mesh members for the mesh description and connectivity for triangle elements
190190
static bool UpdateDirectlyConnectedTriangleElements(Mesh2D& mesh,
191191
const UInt index,
192192
const UInt connectedElementId,
193-
const std::vector<std::array<int, 2>>& kne);
193+
const std::vector<std::array<int, 2>>& edgeFaces);
194194

195195
/// @brief Update the mesh members for the mesh description and connectivity for non-triangle elements
196196
///
@@ -213,7 +213,7 @@ namespace meshkernel
213213
std::vector<UInt>& frontListCopy,
214214
const UInt elementId);
215215

216-
/// @brief Redirect nodes of connected cells, deactivate polygons of degree smaller than three
216+
/// @brief Redirect nodes of connected faces, deactivate polygons of degree smaller than three
217217
static void RedirectNodesOfConnectedElements(Mesh2D& mesh,
218218
const UInt elementId,
219219
const UInt nodeId,
@@ -242,7 +242,7 @@ namespace meshkernel
242242
const UInt elementId,
243243
const std::vector<UInt>& directlyConnected,
244244
const std::vector<UInt>& indirectlyConnected,
245-
const std::vector<std::array<int, 2>>& kne);
245+
const std::vector<std::array<int, 2>>& edgeFaces);
246246

247247
/// @brief Clean up the edge
248248
///

0 commit comments

Comments
 (0)