Skip to content

Commit

Permalink
improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jlchan committed Apr 25, 2024
1 parent afb7558 commit 0200f50
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
15 changes: 13 additions & 2 deletions src/RefElemData.jl
Original file line number Diff line number Diff line change
Expand Up @@ -207,21 +207,32 @@ 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

"""
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
Expand Down
4 changes: 3 additions & 1 deletion src/RefElemData_polynomial.jl
Original file line number Diff line number Diff line change
@@ -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},
Expand Down
6 changes: 4 additions & 2 deletions src/explicit_timestep_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 0200f50

Please sign in to comment.