Skip to content

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

@mikeingold

Description

@mikeingold

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions