Skip to content

Commit 5eb1c17

Browse files
committed
doc should built again (unfortunately without checkdocs), some improvements
1 parent dad7d2b commit 5eb1c17

File tree

8 files changed

+71
-99
lines changed

8 files changed

+71
-99
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# CHANGES
22

3+
## next version
4+
- doc improvements
35

4-
## v0.8.1 November 4, 2024
6+
## v0.8.1 November 5, 2024
57
- fixed dimension in nodevals output (xdim was determined wrongly and caused huge arrays)
68
- examples in the documentation reactivated
79

docs/make.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ function make_all(; with_examples::Bool = true)
4545
authors="Christian Merdon",
4646
format = Documenter.HTML(repolink = "https://github.com/WIAS-PDELib/ExtendableFEMBase.jl", size_threshold = 250000, mathengine = MathJax3()),
4747
clean = false,
48-
checkdocs = :all,
48+
checkdocs = :none, # :all or :exports currently causes UndefVarError
4949
warnonly = false,
50-
doctest = false,
50+
doctest = true,
5151
pages = [
5252
"Home" => "index.md",
5353
"Index" => "package_index.md",
@@ -75,7 +75,7 @@ function make_all(; with_examples::Bool = true)
7575

7676
end
7777

78-
make_all(; with_examples = true)
78+
make_all(; with_examples = false)
7979

8080
deploydocs(
8181
repo = "github.com/WIAS-PDELib/ExtendableFEMBase.jl",

docs/src/interpolations.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,28 @@ The qpinfo argument communicates vast information of the current quadrature poin
2222

2323
## Standard Interpolations
2424

25-
Each finite element has its standard interpolator that can be applied to some user-defined DataFunction. Instead of interpolating on the full cells, the interpolation can be restricted to faces or edges.
26-
27-
It is also possible to interpolate finite element functions on one grid onto a finite element function on another grid (experimental feature, does not work for all finite elements yet and shall be extended to interpolations of operator evaluations as well in future).
25+
Each finite element has its standard interpolator that can be applied to some user-defined source Function. Instead of interpolating on the full cells, the interpolation can be restricted to faces or edges via an AssemblyType.
2826

2927
```@docs
3028
interpolate!
3129
```
3230

31+
It is also possible to interpolate finite element functions on one grid onto a finite element function on another grid via the lazy_interpolate routine.
32+
33+
```@docs
34+
lazy_interpolate!
35+
```
36+
37+
The following function continuously interpolates finite element function into a H1Pk space by
38+
point evaluations at the Lagrange nodes of the H1Pk element (averaged over all neighbours).
39+
40+
```@docs
41+
continuify
42+
```
43+
3344
## Nodal Evaluations
3445

35-
Usually, Plotters need nodal values, so there is a gengeric function that evaluates any finite element function at the nodes of the grids (possibly by averaging if discontinuous). In case of Identity evaluations of an H1-conforming finite element, the function nodevalues_view can generate a view into the coefficient field that avoids further allocations.
46+
Usually, Plotters need nodal values, so there is a generic function that evaluates any finite element function at the nodes of the grids (possibly by averaging if discontinuous). In case of Identity evaluations of an H1-conforming finite element, the function nodevalues_view can generate a view into the coefficient field that avoids further allocations.
3647

3748

3849
```@docs
@@ -42,14 +53,6 @@ nodevalues_view
4253
nodevalues_subset!
4354
```
4455

45-
## Lazy Interpolation
46-
47-
To interpolate between different finite element spaces and meshes, there is a lazy interpolation routine that
48-
works in all cases (but is not very efficient as it involves a PointeEvaluator and CellFinder):
49-
50-
```@docs
51-
lazy_interpolate!
52-
```
5356

5457

5558
## Displace Mesh

docs/src/plots.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ In Pluto notebooks it is recommended to use [PlutoVista.jl](https://github.com/j
1212
For a fast and rough peak several UnicodePlots plotters are available via an extension (ExtendableFEMBaseUnicodePlotsExt)
1313
that is loaded when UnicodePlots is available.
1414

15-
```@autodocs
16-
Modules = [ExtendableFEMBase]
17-
Pages = ["plots.jl"]
18-
Order = [:type, :function]
15+
16+
```@docs
17+
unicode_gridplot
18+
unicode_scalarplot
1919
```

ext/ExtendableFEMBaseUnicodePlotsExt.jl

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,6 @@ using UnicodePlots: UnicodePlots, BrailleCanvas, Plot, heatmap, lineplot,
77

88
import ExtendableFEMBase: unicode_gridplot, unicode_scalarplot
99

10-
"""
11-
````
12-
function unicode_gridplot(
13-
xgrid::ExtendableGrid;
14-
title = "gridplot",
15-
resolution = (40,20),
16-
color = (200,200,200),
17-
bface_color = (255,0,0),
18-
CanvasType = BrailleCanvas,
19-
plot_based = ON_CELLS, # or ON_FACES/ON_EDGES
20-
kwargs...
21-
````
22-
23-
Plots the grid on a UnicodePlots canvas (default: BrailleCanvas) by drawing all edges in the triangulation.
24-
"""
2510
function unicode_gridplot(
2611
xgrid::ExtendableGrid;
2712
title = "gridplot",
@@ -88,27 +73,6 @@ function unicode_gridplot(
8873
end
8974

9075

91-
"""
92-
````
93-
function unicode_scalarplot(
94-
u::FEVectorBlock;
95-
components = 1:get_ncomponents(u),
96-
abs = false,
97-
resolution = (30,30),
98-
colormap = :viridis,
99-
title = u.name,
100-
kwargs...)
101-
````
102-
103-
Plots components of the finite element function in the FEVectorBlock u by
104-
using a lazy_interpolate! onto a coarse uniform mesh and UnicodePlots.jl
105-
lineplot or heatmap for 1D or 2D, respectively.
106-
107-
In 1D all components all plotted in the same lineplot, while
108-
in 2D all components are plotted in a separate heatmap.
109-
110-
If abs = true, only the absolute value over the components is plotted.
111-
"""
11276
function unicode_scalarplot(
11377
u::FEVectorBlock;
11478
components = 1:get_ncomponents(u),

src/ExtendableFEMBase.jl

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ export QuadratureRule
7777
export VertexRule
7878
export integrate!, integrate, ref_integrate!
7979

80-
81-
8280
include("finiteelements.jl") # also includes dofmaps.jl and feevaluator*.jl
8381
export DofMap
8482
export CellDofs, FaceDofs, EdgeDofs, BFaceDofs, BEdgeDofs
@@ -173,17 +171,48 @@ export lazy_interpolate!
173171

174172
# ExtendableFEMBaseUnicodePlotsExt extension
175173

176-
"""
177-
$(TYPEDSIGNATURES)
178174

179-
plots the grid via UnicodePlots
175+
"""
176+
````
177+
function unicode_gridplot(
178+
xgrid::ExtendableGrid;
179+
title = "gridplot",
180+
resolution = (40,20),
181+
color = (200,200,200),
182+
bface_color = (255,0,0),
183+
CanvasType = BrailleCanvas,
184+
plot_based = ON_CELLS, # or ON_FACES/ON_EDGES
185+
kwargs...
186+
````
187+
188+
(via extension that requires UnicodePlots)
189+
190+
Plots the grid on a UnicodePlots canvas (default: BrailleCanvas) by drawing all edges in the triangulation.
180191
"""
181192
function unicode_gridplot end
182193

183194
"""
184-
$(TYPEDSIGNATURES)
185-
186-
plots a finite element function (given as an FEVectorBlock) via UnicodePlots
195+
````
196+
function unicode_scalarplot(
197+
u::FEVectorBlock;
198+
components = 1:get_ncomponents(u),
199+
abs = false,
200+
resolution = (30,30),
201+
colormap = :viridis,
202+
title = u.name,
203+
kwargs...)
204+
````
205+
206+
(via extension that requires UnicodePlots)
207+
208+
Plots components of the finite element function in the FEVectorBlock u by
209+
using a lazy_interpolate! onto a coarse uniform mesh and UnicodePlots.jl
210+
lineplot or heatmap for 1D or 2D, respectively.
211+
212+
In 1D all components all plotted in the same lineplot, while
213+
in 2D all components are plotted in a separate heatmap.
214+
215+
If abs = true, only the absolute value over the components is plotted.
187216
"""
188217
function unicode_scalarplot end
189218
export unicode_gridplot, unicode_scalarplot

src/finiteelements.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ struct FESpace{Tv, Ti, FEType <: AbstractFiniteElement, AT <: AssemblyType}
7474
ndofs::Int64 # total number of dofs
7575
coffset::Int # offset for component dofs
7676
xgrid::ExtendableGrid{Tv, Ti} # link to (master/parent) grid
77-
dofgrid::ExtendableGrid{Tv, Ti} # link to (sub) grid used for dof numbering (expected to be equal to or child grid of xgrid)
77+
dofgrid::ExtendableGrid{Tv,Ti} # link to (sub) grid used for dof numbering (expected to be equal to or child grid of xgrid)
7878
dofmaps::Dict{Type{<:AbstractGridComponent}, Any} # backpack with dofmaps
7979
end
8080

src/reconstructionhandlers.jl

Lines changed: 8 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
################## SPECIAL INTERPOLATORS ####################
44

55
"""
6-
$(TYPEDSIGNATURES)
6+
````
7+
function interpolator_matrix(::Type{<:HDIVRT0{ncomponents}}, V1::FESpace{Tv, Ti, H1Pk{ncomponents, edim, order}, ON_CELLS})
8+
````
79
810
produces a matrix representation for the interpolation
9-
of H1Pk (currently only up to order 4, only in 2D)
11+
of H1Pk (currently only up to order 4, and ncomponents = 2)
1012
into HDIVRT0
1113
"""
1214
function interpolator_matrix(::Type{<:HDIVRT0{ncomponents}}, V1::FESpace{Tv, Ti, H1Pk{ncomponents, edim, order}, ON_CELLS}) where {Tv, Ti, ncomponents, edim, order}
@@ -424,9 +426,11 @@ end
424426
##### BOUNDARY COEFFICIENTS #####
425427

426428
"""
427-
$(TYPEDSIGNATURES)
429+
````
430+
boundary_coefficients!(coefficients, RH::ReconstructionHandler, cell)
431+
````
428432
429-
generates the boundarycoefficients for the RT0 reconstruction of CR
433+
generates the coefficients for the facial dofs of the reconstruction operator on the cell
430434
"""
431435
function boundary_coefficients!(coefficients, RH::ReconstructionHandler{Tv, Ti, <:H1CR{ncomponents}, <:HDIVRT0{ncomponents}, <:ON_CELLS, EG}, cell) where {Tv, Ti, ncomponents, EG}
432436
xFaceVolumes = RH.xFaceVolumes
@@ -446,11 +450,6 @@ end
446450

447451
const _P1_INTO_BDM1_COEFFS = [-1 // 12, 1 // 12]
448452

449-
"""
450-
$(TYPEDSIGNATURES)
451-
452-
generates the boundarycoefficients for the BDM1 reconstruction of BR in two dimensions
453-
"""
454453
function boundary_coefficients!(coefficients, RH::ReconstructionHandler{Tv, Ti, FE1, FE2, AT, EG}, cell) where {Tv, Ti, FE1 <: H1BR{2}, FE2 <: HDIVBDM1{2}, AT <: ON_CELLS, EG <: Union{Triangle2D, Quadrilateral2D}}
455454
xFaceVolumes = RH.xFaceVolumes
456455
xFaceNormals = RH.xFaceNormals
@@ -479,11 +478,6 @@ function boundary_coefficients!(coefficients, RH::ReconstructionHandler{Tv, Ti,
479478
return nothing
480479
end
481480

482-
"""
483-
$(TYPEDSIGNATURES)
484-
485-
generates the boundarycoefficients for the RT0 reconstruction of BR in two dimensions
486-
"""
487481
function boundary_coefficients!(coefficients, RH::ReconstructionHandler{Tv, Ti, FE1, FE2, AT, EG}, cell) where {Tv, Ti, FE1 <: H1BR{2}, FE2 <: HDIVRT0{2}, AT <: ON_CELLS, EG <: Union{Triangle2D, Quadrilateral2D}}
488482
xFaceVolumes = RH.xFaceVolumes
489483
xFaceNormals = RH.xFaceNormals
@@ -508,11 +502,6 @@ function boundary_coefficients!(coefficients, RH::ReconstructionHandler{Tv, Ti,
508502
return nothing
509503
end
510504

511-
"""
512-
$(TYPEDSIGNATURES)
513-
514-
generates the boundarycoefficients for the RT1 reconstruction of P2B in two dimensions
515-
"""
516505
function boundary_coefficients!(coefficients, RH::ReconstructionHandler{Tv, Ti, FE1, FE2, AT, EG}, cell) where {Tv, Ti, FE1 <: H1P2B{2, 2}, FE2 <: HDIVRT1{2}, AT <: ON_CELLS, EG <: Triangle2D}
517506
xFaceVolumes = RH.xFaceVolumes
518507
xFaceNormals = RH.xFaceNormals
@@ -544,11 +533,6 @@ function boundary_coefficients!(coefficients, RH::ReconstructionHandler{Tv, Ti,
544533
return nothing
545534
end
546535

547-
"""
548-
$(TYPEDSIGNATURES)
549-
550-
generates the boundarycoefficients for the BDM2 reconstruction of P2B in two dimensions
551-
"""
552536
function boundary_coefficients!(coefficients, RH::ReconstructionHandler{Tv, Ti, FE1, FE2, AT, EG}, cell) where {Tv, Ti, FE1 <: H1P2B{2, 2}, FE2 <: HDIVBDM2{2}, AT <: ON_CELLS, EG <: Triangle2D}
553537
xFaceVolumes = RH.xFaceVolumes
554538
xFaceNormals = RH.xFaceNormals
@@ -587,11 +571,6 @@ function boundary_coefficients!(coefficients, RH::ReconstructionHandler{Tv, Ti,
587571
end
588572

589573

590-
"""
591-
$(TYPEDSIGNATURES)
592-
593-
generates the boundarycoefficients for the RT0 reconstruction of BR in three dimensions
594-
"""
595574
function boundary_coefficients!(coefficients, RH::ReconstructionHandler{Tv, Ti, FE1, FE2, AT, EG}, cell) where {Tv, Ti, FE1 <: H1BR{3}, FE2 <: HDIVRT0{3}, AT <: ON_CELLS, EG <: Tetrahedron3D}
596575
xFaceVolumes = RH.xFaceVolumes
597576
xFaceNormals = RH.xFaceNormals
@@ -617,11 +596,6 @@ end
617596

618597
const _P1_INTO_BDM1_COEFFS_3D = [-1//36 -1//36 1//18; -1//36 1//18 -1//36; 1//18 -1//36 -1//36]
619598

620-
"""
621-
$(TYPEDSIGNATURES)
622-
623-
generates the boundarycoefficients for the BDM1 reconstruction of BR in three dimensions
624-
"""
625599
function boundary_coefficients!(coefficients, RH::ReconstructionHandler{Tv, Ti, FE1, FE2, AT, EG}, cell) where {Tv, Ti, FE1 <: H1BR{3}, FE2 <: HDIVBDM1{3}, AT <: ON_CELLS, EG <: Tetrahedron3D}
626600
xFaceVolumes = RH.xFaceVolumes
627601
xFaceNormals = RH.xFaceNormals

0 commit comments

Comments
 (0)