diff --git a/docs/src/ReferenceFEs.md b/docs/src/ReferenceFEs.md index 430b3cb4f..9cf114fbf 100644 --- a/docs/src/ReferenceFEs.md +++ b/docs/src/ReferenceFEs.md @@ -4,7 +4,162 @@ CurrentModule = Gridap.ReferenceFEs # Gridap.ReferenceFEs -```@autodocs -Modules = [ReferenceFEs,] +## Polytopes + +```@docs +Polytope +Base.== +test_polytope +``` + +### Polytope Geometry + +```@docs +get_edge_tangent +get_facet_normal +get_facet_orientations +get_vertex_coordinates +get_face_coordinates +get_bounding_box +``` + +### Polytope Topology + +```@docs +num_dims +num_faces +num_facets +num_edges +num_vertices +get_faces +get_dimranges +get_dimrange +get_facedims +get_reffaces +get_face_dimranges +get_face_type +get_face_vertices +get_face_vertex_permutations +get_vertex_permutations +get_offsets +get_offset +is_n_cube +is_simplex +simplexify ``` +### Extrusion Polytopes + +```@docs +ExtrusionPolytope +get_extrusion +HEX_AXIS +TET_AXIS +VERTEX +SEGMENT +TRI +QUAD +TET +HEX +WEDGE +PYRAMID +next_corner! +``` + +### General Polytopes + +```@docs +GeneralPolytope +Polygon +Polyhedron +get_graph +get_metadata +isopen +isactive +check_polytope_graph +simplexify_interior +simplexify_surface +``` + +## Quadratures + +```@docs +Quadrature +get_coordinates +get_weights +get_name +num_points +num_point_dims +num_dims +test_quadratures +GenericQuadrature +``` + +### Available Quadratures + +```@docs +TensorProduct +Duffy +Strang +XiaoGimbutas +``` + +## ReferenceFEs + +```@docs +ReferenceFE +ReferenceFEName +GenericReferenceFE +num_dims +num_cell_dims +num_point_dims +num_faces +num_vertices +num_edges +num_facets +num_dofs +get_polytope +get_prebasis +get_shapefuns +get_dof_basis +compute_shapefuns +compute_dofs +Conformity +get_face_dofs +get_face_own_dofs +get_face_own_dofs_permutations +test_reference_fe +``` + +### Nodal ReferenceFEs + +```@docs +LagrangianRefFE +is_first_order +is_P +is_Q +is_S +compute_monomial_basis +compute_own_nodes +compute_face_orders +compute_nodes +compute_own_nodes_permutations +compute_lagrangian_reffaces +VERTEX1 +SEG2 +QUAD4 +TRI3 +TET4 +HEX8 +``` + +### Moment-Based ReferenceFEs + +```@docs +MomentBasedReferenceFE +RaviartThomasRefFE +NedelecRefFE +BDMRefFE +ArnoldWintherRefFE +MardalTaiWintherRefFE +``` diff --git a/src/ReferenceFEs/DuffyQuadratures.jl b/src/ReferenceFEs/DuffyQuadratures.jl index ffe444007..c7f3796d4 100644 --- a/src/ReferenceFEs/DuffyQuadratures.jl +++ b/src/ReferenceFEs/DuffyQuadratures.jl @@ -1,4 +1,14 @@ +""" + struct Duffy <: QuadratureName + +Duffy quadrature rule for simplices, obtained as the mapped +tensor product of 1d Gauss-Jacobi and Gauss-Legendre quadratures. + +# Constructor: + + Quadrature(p::Polytope,duffy,degree::Integer;T::Type{<:AbstractFloat}=Float64) +""" struct Duffy <: QuadratureName end const duffy = Duffy() diff --git a/src/ReferenceFEs/StrangQuadratures.jl b/src/ReferenceFEs/StrangQuadratures.jl index dc3054fe9..999640f16 100644 --- a/src/ReferenceFEs/StrangQuadratures.jl +++ b/src/ReferenceFEs/StrangQuadratures.jl @@ -1,5 +1,15 @@ +""" + struct Strang <: QuadratureName + +Strang quadrature rule for simplices. + +# Constructor: + + Quadrature(p::Polytope,strang,degree::Integer;T::Type{<:AbstractFloat}=Float64) +""" struct Strang <: QuadratureName end + const strang = Strang() function Quadrature(p::Polytope,::Strang,degree::Integer;T::Type{<:AbstractFloat}=Float64) diff --git a/src/ReferenceFEs/TensorProductQuadratures.jl b/src/ReferenceFEs/TensorProductQuadratures.jl index 2b47fbdfc..b8a731c62 100644 --- a/src/ReferenceFEs/TensorProductQuadratures.jl +++ b/src/ReferenceFEs/TensorProductQuadratures.jl @@ -1,4 +1,14 @@ +""" + struct TensorProduct <: QuadratureName + +Tensor product quadrature rule for n-cubes, obtained as the +tensor product of 1d Gauss-Legendre quadratures. + +# Constructor: + + Quadrature(p::Polytope{D},tensor_product,degrees::Union{Integer,NTuple{D,Integer}};T::Type{<:AbstractFloat}=Float64) where D +""" struct TensorProduct <: QuadratureName end const tensor_product = TensorProduct() diff --git a/src/ReferenceFEs/XiaoGimbutasQuadratures.jl b/src/ReferenceFEs/XiaoGimbutasQuadratures.jl index 7fd185d28..21be9a1f3 100644 --- a/src/ReferenceFEs/XiaoGimbutasQuadratures.jl +++ b/src/ReferenceFEs/XiaoGimbutasQuadratures.jl @@ -1,18 +1,30 @@ +""" + struct XiaoGimbutas <: QuadratureName end + +Xiao-Gimbutas symmetric quadrature rule for simplices. + +# Constructor: + + `Quadrature(p::Polytope,xiao_gimbutas::XiaoGimbutas,degree::Integer;T::Type{<:AbstractFloat}=Float64)` + +# Reference: + + `A numerical algorithm for the construction of efficient quadrature rules in two and higher dimensions`, + Hong Xiao, Zydrunas Gimbutas, Computers & Mathematics with Applications, (2010), + DOI : https://doi.org/10.1016/j.camwa.2009.10.027 + +Adapted from: https://github.com/FEniCS/basix/blob/main/cpp/basix/quadrature.cpp +""" struct XiaoGimbutas <: QuadratureName end + const xiao_gimbutas = XiaoGimbutas() -# Reference: -# `A numerical algorithm for the construction of efficient quadrature rules in two and higher dimensions`, -# Hong Xiao, Zydrunas Gimbutas, Computers & Mathematics with Applications, (2010) -# DOI : https://doi.org/10.1016/j.camwa.2009.10.027 -# Adapted from: -# https://github.com/FEniCS/basix/blob/main/cpp/basix/quadrature.cpp function Quadrature( p::Polytope,::XiaoGimbutas,degree::Integer;T::Type{<:AbstractFloat}=Float64 ) msg = """\n - `strang` quadrature rule only available for simplices. + `xiao_gimbutas` quadrature rule only available for simplices. Use `tensor_product` for n-cubes. """ @assert is_simplex(p) msg @@ -24,7 +36,7 @@ function Quadrature( x, w = _xiaogimbutas_quad_tet(degree) else msg = """\n - `strang` quadrature rule only available for tris and tets. + `xiao_gimbutas` quadrature rule only available for tris and tets. Use `duffy` for other simplices. """ @unreachable msg