Skip to content

Commit dfdeaff

Browse files
committed
improved docstrings in quadrature, updated changelog
1 parent b701db7 commit dfdeaff

2 files changed

Lines changed: 33 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# CHANGES
22

3-
## v1.2.0 June 24, 2025
4-
- major documentation overhaul
3+
## v1.2.0 June 25, 2025
4+
- major documentation and docstring overhaul
5+
- improved show functions and constructors for FEMatrix, FEVector
6+
- added range check in getindex functions for FEVector
7+
- added slice views for FEVectorBlocks
8+
- added Array conversions for FEVector and FEVectorBlock
59

610
## v1.1.1 June 16, 2025
711
- docstring improvements

src/quadrature.jl

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,21 @@ abstract type QuadratureRule{T <: Real, ET <: AbstractElementGeometry} end
1919
"""
2020
$(TYPEDEF)
2121
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+
2337
"""
2438
struct SQuadratureRule{T <: Real, ET <: AbstractElementGeometry, dim, npoints} <: QuadratureRule{T, ET}
2539
name::String
@@ -61,9 +75,18 @@ end
6175
"""
6276
$(TYPEDSIGNATURES)
6377
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+
6790
"""
6891
function VertexRule(ET::Type{Edge1D}, order = 1; T = Float64)
6992
if order == 0

0 commit comments

Comments
 (0)