Skip to content
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 1548 casulli refinement depths #390

Open
wants to merge 50 commits into
base: master
Choose a base branch
from

Conversation

BillSenior
Copy link
Contributor

No description provided.

@BillSenior BillSenior force-pushed the feature/GRIDEDIT-1548_casulli_refinement_depths branch from 52fde8f to c38c831 Compare December 16, 2024 16:47
Comment on lines +47 to +92

double searchRadiusSquared = 1.0e5;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did this number (1e5) come from?

Comment on lines +139 to +153
std::map<int, std::unique_ptr<PropertyCalculator>> allocatePropertyCalculators()
{
std::map<int, std::unique_ptr<PropertyCalculator>> propertyMap;

int propertyId = static_cast<int>(meshkernel::Mesh2D::Property::Orthogonality);
propertyMap.emplace(propertyId, std::make_unique<OrthogonalityPropertyCalculator>());

propertyId = static_cast<int>(meshkernel::Mesh2D::Property::EdgeLength);
propertyMap.emplace(propertyId, std::make_unique<EdgeLengthPropertyCalculator>());

return propertyMap;
}

/// @brief Map of property calculators, from an property identifier to the calculator.
static std::map<int, std::unique_ptr<PropertyCalculator>> propertyCalculators = allocatePropertyCalculators();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be implemented as a singlton rather than a static global variable

libs/MeshKernel/include/MeshKernel/Definitions.hpp Outdated Show resolved Hide resolved

/// @brief A simple bounded array
template <const UInt Dimension>
class BoundedArray
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the dimension in known at compile time, can we use an std::array ?

libs/MeshKernel/include/MeshKernel/MeshTriangulation.hpp Outdated Show resolved Hide resolved
libs/MeshKernel/include/MeshKernel/CasulliRefinement.hpp Outdated Show resolved Hide resolved
libs/MeshKernel/include/MeshKernel/Utilities/Utilities.hpp Outdated Show resolved Hide resolved
libs/MeshKernel/src/CasulliRefinement.cpp Outdated Show resolved Hide resolved
libs/MeshKernel/src/MeshTriangulation.cpp Outdated Show resolved Hide resolved
{
m_elementCentreRTree->SearchNearestPoint(pnt);

if (m_elementCentreRTree->HasQueryResults())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider early returning instead

libs/MeshKernel/tests/src/MeshRefinementTests.cpp Outdated Show resolved Hide resolved
@BillSenior BillSenior force-pushed the feature/GRIDEDIT-1548_casulli_refinement_depths branch from 018ba63 to 16ab4cb Compare January 6, 2025 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants