Skip to content

Commit

Permalink
add tensor product quadrature options for tri, tet, pyr
Browse files Browse the repository at this point in the history
  • Loading branch information
jlchan committed Jun 29, 2024
1 parent 8a27d8d commit 60bbc25
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/RefElemData_polynomial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ RefElemData(elem::Line, approx_type::Polynomial{<:TensorProductQuadrature}, N; k
RefElemData(elem, Polynomial{MultidimensionalQuadrature}(), N;
quad_rule_vol=approx_type.data.quad_rule_1D, kwargs...)

function RefElemData(elem::Union{Tri, Tet, Wedge, Pyr},
function RefElemData(elem::Union{Wedge},
approx_type::Polynomial{<:TensorProductQuadrature},
N; kwargs...)
error("Tensor product quadrature constructors not yet implemented " *
"for Tri, Tet, Wedge, Pyr elements.")
"for Wedge elements.")
end

"""
Expand Down Expand Up @@ -473,6 +473,13 @@ function tensor_product_quadrature(::Union{Tet, Hex}, r1D, w1D)
return rq, sq, tq, wq
end

function RefElemData(elem::Union{Tri, Tet, Pyr}, approx_type::Polynomial{<:TensorProductQuadrature}, N; kwargs...)
rd = RefElemData(elem, Polynomial{MultidimensionalQuadrature}(), N;
quad_rule_vol=stroud_quad_nodes(elem, 2 * N), kwargs...)
@set rd.approximation_type = approx_type
return rd
end

"""
RefElemData(elem::Union{Line, Quad, Hex}, approximation_type::Polynomial{Gauss}, N)
Expand Down

0 comments on commit 60bbc25

Please sign in to comment.