diff --git a/src/RefElemData.jl b/src/RefElemData.jl index 144e51a2..ed1b9084 100644 --- a/src/RefElemData.jl +++ b/src/RefElemData.jl @@ -207,7 +207,12 @@ Polynomial{T}() where {T} = Polynomial(T()) MultidimensionalQuadrature A type parameter for `Polynomial` indicating that the quadrature -has no specific structure. +has no specific structure. Example usage: +```julia +# these are both equivalent +approximation_type = Polynomial{MultidimensionalQuadrature}() +approximation_type = Polynomial(MultidimensionalQuadrature()) +``` """ struct MultidimensionalQuadrature end @@ -215,13 +220,19 @@ struct MultidimensionalQuadrature end TensorProductQuadrature{T} A type parameter to `Polynomial` indicating that the quadrature has a tensor -product structure. +product structure. Example usage: +```julia +# these are both equivalent +approximation_type = Polynomial{TensorProductQuadrature}(gauss_quad(0, 0, 1)) +approximation_type = Polynomial(TensorProductQuadrature(gauss_quad(0, 0, 1))) +``` """ struct TensorProductQuadrature{T} quad_rule_1D::T # 1D quadrature nodes and weights (rq, wq) end TensorProductQuadrature(args...) = TensorProductQuadrature(args) +Polynomial{TensorProductQuadrature}(args) = Polynomial(TensorProductQuadrature(args)) """ TensorProductGaussCollocation diff --git a/src/RefElemData_polynomial.jl b/src/RefElemData_polynomial.jl index 0e6c89c1..f3cf5165 100644 --- a/src/RefElemData_polynomial.jl +++ b/src/RefElemData_polynomial.jl @@ -1,4 +1,6 @@ -# The following functions determine what default quadrature type to use +# The following functions determine what default quadrature type to use for each element. +# For tensor product elements, we default to TensorProductQuadrature. +# For simplices, wedges, and pyramids, we default to MultidimensionalQuadrature # simplices and pyramids default to multidimensional quadrature RefElemData(elem::Union{Line, Tri, Tet, Wedge, Pyr}, diff --git a/src/explicit_timestep_utils.jl b/src/explicit_timestep_utils.jl index 77382a77..be915750 100644 --- a/src/explicit_timestep_utils.jl +++ b/src/explicit_timestep_utils.jl @@ -6,8 +6,10 @@ Runge Kutta method. Coefficients evolve the residual, solution, and local time, # Example ```julia -res = rk4a[i]*res + dt*rhs # i = RK stage -@. u += rk4b[i]*res +for i in eachindex(rk4a, rk4b) + @. res = rk4a[i] * res + dt * rhs # i = RK stage + @. u += rk4b[i] * res +end ``` """ function ck45()