Skip to content

Commit

Permalink
GRIDEDIT-1502 Reduced cyclomatic complexity of functions in Mesh2D
Browse files Browse the repository at this point in the history
  • Loading branch information
BillSenior committed Oct 31, 2024
1 parent 796c56d commit 6a565f9
Show file tree
Hide file tree
Showing 2 changed files with 233 additions and 90 deletions.
32 changes: 32 additions & 0 deletions libs/MeshKernel/include/MeshKernel/Mesh2D.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,38 @@ namespace meshkernel
/// @brief Perform complete administration
/// @param[in,out] undoAction if not null then collect any undo actions generated during the administration.
void DoAdministration(CompoundUndoAction* undoAction = nullptr);

/// @brief Initialise the node type array for nodes that lie on the boudnary

Check failure on line 511 in libs/MeshKernel/include/MeshKernel/Mesh2D.hpp

View workflow job for this annotation

GitHub Actions / Codespell Check

boudnary ==> boundary
void InitialiseBoundaryNodeClassification();

/// @brief Classify a single node
void ClassifyNode(const UInt nodeId);

/// @brief Count the number of value edge in list
UInt CountNumberOfValidEdges(const std::vector<UInt>& edgesNumFaces, const UInt numNodes) const;

/// @brief Compute mid point and normal of polygon segment
void ComputeMidPointsAndNormals(const std::vector<Point>& polygon,
const std::vector<UInt>& edgesNumFaces,
const UInt numNodes,
std::array<Point, m_maximumNumberOfNodesPerFace>& middlePoints,
std::array<Point, m_maximumNumberOfNodesPerFace>& normals,
UInt& pointCount) const;

/// @brief Compute circumcentre of face
Point ComputeCircumCentre(const Point& centerOfMass,
const UInt pointCount,
const std::array<Point, m_maximumNumberOfNodesPerFace>& middlePoints,
const std::array<Point, m_maximumNumberOfNodesPerFace>& normals) const;

void ComputeAverageFlowEdgesLength(std::vector<double>& edgesLength,
std::vector<double>& averageFlowEdgesLength) const;

void ComputeAverageEdgeLength(const std::vector<double>& edgesLength,
const std::vector<double>& averageFlowEdgesLength,
std::vector<bool>& curvilinearGridIndicator,
std::vector<std::array<double, 2>>& averageEdgesLength,
std::vector<double>& aspectRatios) const;
};

} // namespace meshkernel
Loading

0 comments on commit 6a565f9

Please sign in to comment.