JuliaGeometry / MeshIntegrals.jl

Numerical integration over Meshes.jl geometry domains
https://juliageometry.github.io/MeshIntegrals.jl/
MIT License
28 stars 4 forks source link

Possible to cache Gauss-Legendre nodes and weights #148

Closed mikeingold closed 4 hours ago

mikeingold commented 1 day ago

When integrating using a GaussLegendre rule, we calculate nodes and weights using FastGaussQuadrature.gausslegendre(::Int) -> Tuple{Vector, Vector}.

For geometries that need to be decomposed prior to integration, e.g. Rope -> Segment, the same nodes and weights will be re-calculated for each component of the domain. It might be beneficial, instead, to calculate them once and then pass them through as an optional or keyword argument to _integral.

mikeingold commented 1 day ago

Better idea: store them in the GaussLegendre object itself.