Skip to content

Commit 972b7b7

Browse files
authored
some documentation fixes (#42)
supported by github copilot
1 parent 2c88ed8 commit 972b7b7

File tree

5 files changed

+45
-28
lines changed

5 files changed

+45
-28
lines changed

docs/src/interpolations.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ The qpinfo argument communicates vast information of the current quadrature poin
1313
| qpinfo.x | Vector{Real} | space coordinates of quadrature point |
1414
| qpinfo.time | Real | current time |
1515
| qpinfo.item | Integer | current item that contains qpinfo.x |
16+
| qpinfo.cell | Integer | cell number (when reasonable) |
1617
| qpinfo.region | Integer | region number of item |
1718
| qpinfo.xref | Vector{Real} | reference coordinates within item of qpinfo.x |
1819
| qpinfo.volume | Real | volume of item |
20+
| qpinfo.normal | Vector{Real} | normal vector (when reasonable) |
1921
| qpinfo.params | Vector{Any} | parameters that can be transferred via keyword arguments |
22+
| qpinfo.grid | ExtendableGrid | full access to grid |
2023

2124

2225
## Standard Interpolations

examples/Example205_LowLevelSpaceTimePoisson.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#=
22
3-
# 205 : Space-Time FEM for Poisson Problem
3+
# 205 : Space-Time FEM for Heat Equation
44
([source code](@__SOURCE_URL__))
55
66
This example computes the solution ``u`` of the

examples/Example210_LowLevelNavierStokes.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
# 210 : Navier-Stokes Problem
44
([source code](@__SOURCE_URL__))
55
6-
Consider the Navier-Stokes problem that seeks ``u`` and ``p`` such that
6+
Consider the Navier-Stokes problem that seeks ``\mathbf{u}`` and ``p`` such that
77
```math
88
\begin{aligned}
9-
- \mu \Delta u + (u \cdot \nabla) u + \nabla p &= f\\
10-
\mathrm{div}(u) & = 0.
9+
- \mu \Delta \mathbf{u} + (\mathbf{u} \cdot \nabla) \mathbf{u} + \nabla p &= \mathbf{f} \\
10+
\mathrm{div}(\mathbf{u}) & = 0.
1111
\end{aligned}
1212
```
1313
14-
The weak formulation seeks ``u \in V := H^1_0(\Omega)`` and ``p \in Q := L^2_0(\Omega)`` such that
14+
The weak formulation seeks ``\mathbf{u} \in V := H^1_0(\Omega)^2`` and ``p \in Q := L^2_0(\Omega)`` such that
1515
```math
1616
\begin{aligned}
17-
\mu (\nabla u, \nabla v) + ((u \cdot \nabla) u, v) - (p, \mathrm{div}(v)) & = (f, v)
18-
& \text{for all } v \in V\\
19-
(q, \mathrm{div}(u)) & = 0
20-
& \text{for all } q \in Q\\
17+
\mu (\nabla \mathbf{u}, \nabla \mathbf{v}) + ((\mathbf{u} \cdot \nabla) \mathbf{u}, \mathbf{v}) - (p, \mathrm{div}(\mathbf{v})) & = (\mathbf{f}, \mathbf{v})
18+
& \text{for all } \mathbf{v} \in V\\
19+
(q, \mathrm{div}(\mathbf{u})) & = 0
20+
& \text{for all } q \in Q\\
2121
\end{aligned}
2222
```
2323
This example computes a planar lattice flow with inhomogeneous Dirichlet boundary conditions

src/feevaluator.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ A `FEEvaluator` object that can efficiently evaluate (and cache) the values of t
5858
# Notes
5959
6060
- For matrix-valued operators (e.g., `Gradient`), the result is stored as a long vector in component-wise order.
61-
- The evaluator is designed for high performance in assembly loops and supports both scalar and vector-valued elements and operators.
62-
- For advanced use, the evaluator exposes internal fields for basis values, derivatives, and transformation matrices.
6361
6462
# Example
6563
@@ -69,6 +67,7 @@ for cell in 1:ncells
6967
update_basis!(FEB, cell)
7068
# Access FEB.cvals for basis gradients at quadrature points
7169
end
70+
```
7271
"""
7372
function FEEvaluator(
7473
FE::FESpace{TvG, TiG, FEType, FEAPT},

src/point_evaluator.jl

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,33 +22,34 @@ default_peval_kwargs() = Dict{Symbol, Tuple{Any, String}}(
2222

2323

2424
"""
25-
````
26-
function Pointevaluator(
27-
[kernel!::Function],
28-
oa_args::Array{<:Tuple{<:Any, DataType},1}
29-
sol = nothing;
30-
kwargs...)
31-
````
25+
$(TYPEDSIGNATURES)
3226
33-
Constructs a `PointEvaluator` object for evaluating operator expressions at arbitrary points in a finite element space.
27+
Construct a `PointEvaluator` object for evaluating operator expressions at arbitrary points in a finite element space.
3428
35-
A `PointEvaluator` can be used to evaluate one or more operator evaluations (e.g., function values, gradients) at arbitrary points, optionally postprocessed by a user-supplied kernel function. The evaluation is performed with respect to a given solution and finite element basis.
36-
37-
If a kernel function is provided, it must have the interface:
38-
kernel!(result, eval_args, qpinfo)
39-
where `result` is the output buffer, `eval_args` contains the operator evaluations, and `qpinfo` provides information about the current evaluation point.
40-
41-
Operator evaluations are specified as tuples pairing a tag (to identify the unknown or vector position) with a `FunctionOperator`.
29+
A `PointEvaluator` can be used to evaluate one or more operator evaluations (e.g., function values, gradients) at arbitrary points, optionally postprocessed by a user-supplied kernel function. The evaluation is performed with respect to a given solution and its finite element basis.
4230
4331
After construction, the `PointEvaluator` must be initialized with a solution using `initialize!`. Evaluation at a point is then performed using `evaluate!` or `evaluate_bary!`.
4432
4533
# Arguments
46-
- `kernel!` (optional): Postprocessing function for operator evaluations.
47-
- `oa_args: Array of operator argument tuples (source block tag, operator type).
34+
- `kernel!` (optional): Postprocessing function for operator evaluations. Should have the form `kernel!(result, eval_args, qpinfo)`.
35+
- `oa_args`: Array of operator argument tuples `(source block tag, operator type)`.
4836
- `sol` (optional): Solution object for immediate initialization.
4937
5038
# Keyword arguments:
5139
$(_myprint(default_peval_kwargs()))
40+
41+
# Kernel Function Interface
42+
43+
kernel!(result, eval_args, qpinfo)
44+
45+
- `result`: Preallocated array to store the kernel output.
46+
- `eval_args`: Array of operator evaluations at the current evaluation point.
47+
- `qpinfo`: `QPInfos` struct with information about the current evaluation point.
48+
49+
# Usage
50+
51+
After construction, call `initialize!` to prepare the evaluator for a given solution, then use `evaluate!` or `evaluate_bary!` to perform point evaluations.
52+
5253
"""
5354
function PointEvaluator(kernel, u_args, ops_args, sol = nothing; Tv = Float64, kwargs...)
5455
parameters = Dict{Symbol, Any}(k => v[1] for (k, v) in default_peval_kwargs())
@@ -93,6 +94,20 @@ This function prepares the `PointEvaluator` for evaluation by associating it wit
9394
- `time`: (default: `0`) Time value to be passed to the quadrature point info structure.
9495
$(_myprint(default_peval_kwargs()))
9596
97+
# Notes
98+
- This function must be called before using `evaluate!` or `evaluate_bary!` with the `PointEvaluator`.
99+
Initializes the given `PointEvaluator` for a specified solution (FEVector or vector of FEVectorBlocks).
100+
101+
This function prepares the `PointEvaluator` for evaluation by associating it with the provided solution vector. It sets up the necessary finite element basis evaluators, local-to-global transformations, and cell finder structures for the underlying grid.
102+
103+
# Arguments
104+
- `O::PointEvaluator`: The `PointEvaluator` instance to initialize.
105+
- `sol`: The solution object (e.g., array of FEVectorBlocks) to be used for evaluations.
106+
107+
# Keyword Arguments
108+
- `time`: (default: `0`) Time value to be passed to the quadrature point info structure.
109+
$(_myprint(default_peval_kwargs()))
110+
96111
# Notes
97112
- This function must be called before using `evaluate!` or `evaluate_bary!` with the `PointEvaluator`.
98113
"""

0 commit comments

Comments
 (0)