Ferrite.jl icon indicating copy to clipboard operation
Ferrite.jl copied to clipboard

Document custom quadrature rules

Open fredrikekre opened this issue 3 years ago • 3 comments

From https://github.com/Ferrite-FEM/Ferrite.jl/pull/482#issuecomment-1272555611 (cc @edljk)

it could perhaps be an easier way to extend quadrature rules in Ferrite.

It is actually pretty easy to do this already -- you can construct your own quadrature rule by:

julia> weights = [2.0, 2.0];

julia> points = [Vec{2}((-0.5, 0.0)), Vec{2}((0.5, 0.0))];

julia> qr = QuadratureRule{2,RefTetrahedron,Float64}(weights, points)
QuadratureRule{2, RefTetrahedron, Float64}([2.0, 2.0], Vec{2, Float64}[[-0.5, 0.0], [0.5, 0.0]])

It would be nice to i) document this and ii) add a constructor QuadratureRule{dim,shape}(weights, points) that doesn't require specifying the element type (Float64 in the example above).

fredrikekre avatar Oct 09 '22 21:10 fredrikekre

I can start to work on this.

00krishna avatar Oct 09 '22 21:10 00krishna

I think https://github.com/JuliaApproximation/FastGaussQuadrature.jl is a solid addition for tensor product elements

termi-official avatar Oct 09 '22 21:10 termi-official

Ferrite used to use that package directly in the past (https://github.com/Ferrite-FEM/Ferrite.jl/pull/136) but it was removed since compile times where extremely bad back then.

fredrikekre avatar Oct 13 '22 07:10 fredrikekre