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

Support for minimal interacter networks (2D network with 1D topology) #578

Open
4 tasks
veenstrajelmer opened this issue Nov 2, 2023 · 0 comments
Open
4 tasks
Labels
domain: mesh type: bug Something isn't working

Comments

@veenstrajelmer
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
The minimal FM files as written by interacter have a 1D topology. Since the face_node_connectivity can be derived internally, this could still represent a 2D grid. A testcase for reading such a grid without faces was added in #515. However, the example file has a 1D topology, but instead the topology_dimension attribute is set to 2 instead of 1. This means it is read as a 2D grid, automatically filled with face_node_connectivity by meshkernel since the update in #574. This is however not a grid that interacter would create and it is also corrupt since a network with a 2D topology should already contain this face_node_connectivity.

Describe the solution you'd like

  • consider prevent reading this corrupt grid. This can be done by passing the face_node_connectivity from the grid to meshkernel. In that case it will crash. And probably set the face_node_connectivity attribute back to non-optional.
  • replace the file with a file with topology_dimension=1. This converts the testcase in what it was meant for, reading an interacter-style network.
  • In that case the grid should be read as mesh1d by hydrolib-core. However, this will currently not happen since NCExplorer._retrieve_1d_keys checks also for coordinate_space attribute which is not present in this network. The is_mesh1d test should only depend on the topology_dimension. coordinate_space should instead be a property of the resulting mesh1d class.
  • Decide whether we want hydrolib-core to read the minimal network as mesh1d or mesh2d. If 1d, reading and writing (as ugrid) will convert the network to 1D from an interacter/FM point of view, this is not desireable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: mesh type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants