You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 usedt2
to locate points along two edges of the triangle, generated aSegment
between them, and then returnssegment(t1)
as the desiredPoint
. The replacement version simply calculates the equivalent barycentric coordinates(u, v)
for the samePoint
and then callstriangle(u, v)
.The current formulation for
_parametric(::Tetrahedron)
similarly usest3
to locate three points on the edges of the tetrahedron to form a triangularcross_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 andtetrahedron(u, v, w)
is returned, we can expect to see a similarly impressive performance boost for integrals of tetrahedra.The text was updated successfully, but these errors were encountered: