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

DRAFT: Build_edge_from_nodes method #394

Closed
wants to merge 8 commits into from

Conversation

aaronzedwick
Copy link
Member

Closes #349

Overview

Added a function that takes in only nodes and builds the edges using that information. It uses either Delaunay Triangulation or
Voronoi Diagram to achieve this.

Expected Usage

import uxarray as ux

exodus = current_path / "meshfiles" / "exodus" / "outCSne8" / "outCSne8.g"

grid= ux.open_grid(exodus)
grid.build_edge_from_nodes(grid_type='delaunay')

PR Checklist

General

  • An issue is linked created and linked
  • Add appropriate labels
  • Filled out Overview and Expected Usage (if applicable) sections

Testing

  • Adequate tests are created if there is new functionality
  • Tests cover all possible logical paths in your function
  • Tests are not too basic (such as simply calling a function and nothing else)

Documentation

  • Docstrings have been added to all new functions
  • Docstrings have updated with any function changes
  • Internal functions have a preceding underscore (_) and have been added to docs/internal_api/index.rst
  • User functions have been added to docs/user_api/index.rst

@aaronzedwick
Copy link
Member Author

aaronzedwick commented Jul 24, 2023

@philipc2 This is the starting idea I have for the implementation. It seems to work from what I can see on everything but MPAS files. I am not completely confident on why, but if I remember correctly doesn't MPAS have both Delaunay and Voronoi? I am not sure if that would cause the problem but any thoughts are much appreciated.

@aaronzedwick aaronzedwick added the new feature New feature or request label Jul 24, 2023
@aaronzedwick aaronzedwick self-assigned this Jul 24, 2023
@philipc2
Copy link
Member

This is the starting idea I have for the implementation

This is right along the lines of the implementation I was considering also. I have a few comments regarding the design of the implementation and a few considerations. I'll add those as a review.

I am not completely confident on why, but if I remember correctly doesn't MPAS have both Delaunay and Voronoi?

It does! By default, constructing an MPAS UXarray Grid object represents the Primal (Voronoi) Mesh. Obtaining the Dual (Triangular) mesh is done by passing through use_dual=True into the initialization. I believe our usage example showcases how to do this.

@aaronzedwick aaronzedwick changed the title Build_edge_from_nodes method DRAFT: Build_edge_from_nodes method Jul 25, 2023
@aaronzedwick
Copy link
Member Author

Tackling in another PR #442

@erogluorhan erogluorhan deleted the zedwick/edges_from_nodes branch September 11, 2023 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Construct a grid from points
2 participants