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

Possible to speed up _parametric(::Tetrahedron) #145

Closed
mikeingold opened this issue Dec 2, 2024 · 0 comments · Fixed by #159
Closed

Possible to speed up _parametric(::Tetrahedron) #145

mikeingold opened this issue Dec 2, 2024 · 0 comments · Fixed by #159
Labels
enhancement New feature or request

Comments

@mikeingold
Copy link
Collaborator

Background

I found in #139 that the performance of _parametric(::Triangle) improved by an order-of-magnitude by re-formulating the calculation to use fewer calls to Meshes.jl parametric functions. The original version used t2 to locate points along two edges of the triangle, generated a Segment between them, and then returns segment(t1) as the desired Point. The replacement version simply calculates the equivalent barycentric coordinates (u, v) for the same Point and then calls triangle(u, v).

The current formulation for _parametric(::Tetrahedron) similarly uses t3 to locate three points on the edges of the tetrahedron to form a triangular cross_section, then calls _parametric(cross_section::Triangle)(t1, t2) on it.

Idea

If we can implement something similar for Tetrahedron where the barycentric coordinates (u, v, w) are calculate directly and tetrahedron(u, v, w) is returned, we can expect to see a similarly impressive performance boost for integrals of tetrahedra.

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 a pull request may close this issue.

1 participant