Skip to content

Mesh geometry utils #135

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

Open
wants to merge 18 commits into
base: develop
Choose a base branch
from
Open

Mesh geometry utils #135

wants to merge 18 commits into from

Conversation

pabloyesteb
Copy link
Collaborator

Implemented functions for computing the cells connectivity and edge normals. Added an example. The functions have been ckecked to properly compute the claimed data in ParaView.

@pabloyesteb pabloyesteb force-pushed the mesh-geometry-utils-117 branch from e83632c to 671e8f1 Compare March 22, 2025 11:36
@ArnauMiro ArnauMiro changed the title Mesh geometry utils 117 Mesh geometry utils Mar 24, 2025
@ArnauMiro
Copy link
Owner

closes #117

@ArnauMiro ArnauMiro linked an issue Mar 24, 2025 that may be closed by this pull request
@ArnauMiro ArnauMiro added the enhancement New feature or request label Mar 24, 2025
@ArnauMiro ArnauMiro mentioned this pull request Apr 8, 2025
Copy link
Owner

@ArnauMiro ArnauMiro left a comment

Choose a reason for hiding this comment

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

@pabloyesteb also ensure that your new functions within the Mesh class are properly documented. We will improve the documentation of the whole class soon.

@ArnauMiro
Copy link
Owner

@pabloyesteb also check that the new implementation of edge_normals is coherent and gives appropriate results. I tried to get rid of the appended list for performance.

Once these check out, I'll finish implementing the compiled versions of these functions and we will be ready for a final test and merge.

@pabloyesteb
Copy link
Collaborator Author

I've checked the edge_normals implementation in ParaView and everything is alright. Also, I've checked the documentation of my functions in mesh.py and everything seems to be in order to me. ¿Do you have any specific suggestions?

Copy link
Owner

@ArnauMiro ArnauMiro left a comment

Choose a reason for hiding this comment

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

@pabloyesteb can you check that the new compiled version of your routines produce the same expected result as the non compiled version?


@cr('math.fix_coherence')
def fix_normals_coherence(normals, connectivity):
'''
Copy link
Owner

Choose a reason for hiding this comment

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

Fix docstring

@cython.cdivision(True) # turn off zero division check
def fix_normals_coherence(real[:,:] normals, object edge_dict, object adjacency, int num_cells):
'''
Copy link
Owner

Choose a reason for hiding this comment

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

Fix docstring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mesh geometry utils
2 participants