You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/quadrature.jl
+27-4Lines changed: 27 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,21 @@ abstract type QuadratureRule{T <: Real, ET <: AbstractElementGeometry} end
19
19
"""
20
20
$(TYPEDEF)
21
21
22
-
A struct that contains the name of the quadrature rule, the reference points and the weights for the parameter-determined element geometry.
22
+
A concrete quadrature rule for a given element geometry and number type.
23
+
24
+
It represents a set of quadrature (integration) points and weights for a specific reference element geometry (such as an interval, triangle, quadrilateral, tetrahedron, or hexahedron) and number type.
25
+
26
+
# Fields
27
+
- `name::String`: A descriptive name for the quadrature rule (e.g., "midpoint rule", "Gauss rule order 3").
28
+
- `xref::Vector{Vector{T}}`: Reference coordinates of the quadrature points, given as a vector of coordinate vectors (one per point, each of length `dim`).
29
+
- `w::Vector{T}`: Weights associated with each quadrature point, typically summing to the measure of the reference element.
30
+
31
+
# Type Parameters
32
+
- `T <: Real`: Number type for coordinates and weights (e.g., `Float64`, `Rational{Int}`).
33
+
- `ET <: AbstractElementGeometry`: The reference element geometry type (e.g., `Edge1D`, `Triangle2D`).
34
+
- `dim`: The topological dimension of the element geometry.
35
+
- `npoints`: The number of quadrature points.
36
+
23
37
"""
24
38
struct SQuadratureRule{T <:Real, ET <:AbstractElementGeometry, dim, npoints} <:QuadratureRule{T, ET}
25
39
name::String
@@ -61,9 +75,18 @@ end
61
75
"""
62
76
$(TYPEDSIGNATURES)
63
77
64
-
sets up a quadrature rule that evaluates at vertices of element geometry;
65
-
not optimal from quadrature point of view, but helpful when interpolating.
66
-
Note, that order of xref matches dof order of H1Pk element
78
+
Constructs a quadrature rule that evaluates at the vertices of the reference element geometry `ET`.
79
+
80
+
This rule is not optimal for numerical integration, but is especially useful for nodal interpolation, visualization, and extracting nodal values in finite element computations. The order parameter determines the inclusion of higher-order nodes (e.g., edge, face or cell nodes for higher-order Lagrange elements).
81
+
82
+
# Arguments
83
+
- `ET::Type{<:AbstractElementGeometry}`: The reference element geometry (e.g., `Edge1D`, `Triangle2D`, `Parallelogram2D`, `Tetrahedron3D`, `Parallelepiped3D`).
84
+
- `order::Integer`: Polynomial order of the finite element (default: `1`). Higher orders include additional points corresponding to edge, face, or cell dofs.
85
+
- `T`: Number type for the coordinates and weights (default: `Float64`).
86
+
87
+
# Returns
88
+
- A quadrature rule containing the nodal points (`xref`) and equal weights (`w`), matching the dof structure of the corresponding Lagrange element.
89
+
67
90
"""
68
91
functionVertexRule(ET::Type{Edge1D}, order =1; T = Float64)
0 commit comments