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

Rewrite functions that use loops instead of numpy array #53

Open
JulienLefevreMars opened this issue Dec 17, 2020 · 2 comments
Open

Rewrite functions that use loops instead of numpy array #53

JulienLefevreMars opened this issue Dec 17, 2020 · 2 comments

Comments

@JulienLefevreMars
Copy link
Collaborator

From what I can see, there are several candidate functions in at least the following modules:

  • differential_geometry.py : gradient, triangle_gradient
  • curvature.py
@alexpron
Copy link
Collaborator

alexpron commented Jul 6, 2021

Ty @JulienLefevreMars for pointing that out ! From what i see in the github tree you started the optimization process, thank you very much for that :). What would be the function to optimize first according to your needs?

@JulienLefevreMars
Copy link
Collaborator Author

Yep, it's solved for gradient (the gain is huge, as expected).
In curvature.py there are two functions:

  • compute_curvature
  • curvature_fit

Quite similar pattern in the two cases with a for loop on the vertices and in each step a linear algebra operation. In curvature_fit it is a bit more complicated because the size of the matrix depends on the size of the neighborhood. It should be possible to use a compact expression with sparse matrices describing the vertex/vertices or vertex/faces relationships. We need to formalize that as soon as we have 1H and a blackboard :-)

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

No branches or pull requests

2 participants