-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add cell_nodes property to TensorMesh #333
Conversation
Add a new `cell_nodes` property to `TensorMesh` that mimics the one of `TreeMesh` returning the indices of the nodes that correspond to each cell in the mesh. Add tests for the new feature.
Codecov Report
@@ Coverage Diff @@
## main #333 +/- ##
==========================================
+ Coverage 85.46% 85.47% +0.01%
==========================================
Files 39 39
Lines 11990 12001 +11
==========================================
+ Hits 10247 10258 +11
Misses 1743 1743
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation looks good!
The only thing would be that we should likely add a detail to the docstring (both here and in the TreeMesh
while were at it) about the ordering of the nodes returned by the list, i.e.
2 -- 3
| |
0 -- 1
For a 2D mesh.
Add a note illustrating the order in which the indices of the nodes for each cell are returned.
@jcapriot I just added some notes about the order of the nodes for each cell. Let me know if you like it.
I just copied and pasted your implementation from the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good to me know!
Add a new
cell_nodes
property toTensorMesh
that mimics the one ofTreeMesh
returning the indices of the nodes that correspond to each cell in the mesh. Add tests for the new feature.