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

Implement ability to pass meshkernel refinement parameters #723

Open
RuudHurkmans opened this issue Dec 17, 2024 · 0 comments
Open

Implement ability to pass meshkernel refinement parameters #723

RuudHurkmans opened this issue Dec 17, 2024 · 0 comments
Labels
type: enhancement Improvements to existing functionality

Comments

@RuudHurkmans
Copy link
Collaborator

RuudHurkmans commented Dec 17, 2024

In net/models.py a function is defined to pass refinement parameter to Meshkernel:

def refine(self, polygon: mk.GeometryList, level: int, min_edge_size: float = 10.0):
"""Refine the mesh within a polygon, by a number of steps (level)

 parameters = mk.MeshRefinementParameters(
        refine_intersected=True,
        use_mass_center_when_refining=False,
        min_edge_size=min_edge_size,
        refinement_type=1,
        connect_hanging_nodes=True,
        account_for_samples_outside_face=False,
        max_refinement_iterations=level,
    )

However, it's not possible to pass most of the parameters from an external function. Is it possible to add 'refine_intersected', "use_mass_center_when_refining", "refinement_type","connect_hanging_nodes" and "account_for_samples_outside_face" as arguments to two functions:

Mesh2d.refine() and Network.mesh2d_refine_mesh()? This enables setting the parameters from hydrolib. Especially "use_mass_center_when_refining" gives much better results.

@RuudHurkmans RuudHurkmans added the type: enhancement Improvements to existing functionality label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improvements to existing functionality
Projects
None yet
Development

No branches or pull requests

1 participant