-
Notifications
You must be signed in to change notification settings - Fork 16
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Feature Description
Functions in diffgeo do not support parallel computation. For example, to calculate the gradient of several functions using tria_compute_gradient requires repeated calls to the function. This requires repeated computation of the normals, which is a large part of this function's cost (similarly for tria_compute_divergence).
Motivation
This pattern is a larger issue in functions like tria_compute_geodesic_f -- here, every call requires a new Solver object to be created.
Alternatives
There are a few options for speeding up the computation:
- Allow arrays of size
(n_vertices, n_functions)to be input intotria_compute_gradient, and streamline the edge calculations to be able to work with 2D data. - Store the face normals/face areas/unit normals within the TriaMesh objects (eg using
@cached_property). - Store objects like
splu(stiffness_matrix)orsplu(heat_matrix)within Solver objects.
Additional Context
I would be happy to work on this and submit it as a PR in future. But please let me know if you don't want this done (I won't spam your repo) or if there are any design considerations you have. Thanks.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers