-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/gridedit 777 casulli refinement #283
Conversation
…7_casulli_refinement
/// | ||
/// Returns 0 when the node is at the start of the edge, 1 when it is at the end | ||
/// and the null value when the edge is not connected to the node. | ||
UInt IsStartOrEnd(const UInt edgeId, const UInt nodeId) const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in entities there is a function OtherNodeOfEdge, shall we move OtherNodeOfEdge also in mesh2d class?
/// @brief Find the id of the element that is common to both edges. | ||
/// | ||
/// If no such element can be found then the null value will be returned. | ||
UInt FindCommonElement(const UInt edge1, const UInt edge2) const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FindCommonFace, for keeping the implementation consistent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add doc for the parameters of all methods.
static void ConnectNewNodes(Mesh2D& mesh, const std::vector<EdgeNodes>& newNodes, const UInt numNodes, const UInt numEdges, const UInt numFaces, std::vector<NodeMask>& nodeMask); | ||
|
||
/// @brief Add newly generated nodes to the newNodes list. | ||
static void StoreNewNode(const Mesh2D& mesh, const UInt nodeId, const UInt edge1Index, const UInt edge2Index, const UInt newNodeId, std::vector<EdgeNodes>& newNodes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have each parameter on a separate line for better readability (Also in the source file).
@@ -160,6 +160,11 @@ namespace meshkernel | |||
/// @return If the face is on boundary | |||
[[nodiscard]] bool IsFaceOnBoundary(UInt face) const; | |||
|
|||
/// @brief Get the local index of the node belong to a face. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing param doc
void meshkernel::CasulliRefinement::Compute(Mesh2D& mesh) | ||
{ | ||
Polygons emptyPolygon; | ||
Compute(mesh, emptyPolygon); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can pass a Polygons constructor here
|
||
std::vector<meshkernel::CasulliRefinement::NodeMask> meshkernel::CasulliRefinement::InitialiseNodeMask(const Mesh2D& mesh, const Polygons& polygon) | ||
{ | ||
std::vector<NodeMask> nodeMask(10 * mesh.GetNumNodes(), NodeMask::Unassigned); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm...
UInt node1 = mesh.m_edges[i].first; | ||
UInt node2 = mesh.m_edges[i].second; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can us e structured binding. Either way please make const.
UInt elementId = mesh.m_edgesFaces[edge1][0]; | ||
UInt nodeCount = mesh.m_numFacesNodes[elementId]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const
No description provided.