Skip to content

Commit e1ca1fa

Browse files
committed
tidy - clean up for release
1 parent 0c28b08 commit e1ca1fa

30 files changed

+1317
-966
lines changed

.Style.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ using JuliaFormatter
99
# run JuliaFormatter
1010
# ------------------------------------------------------------------------------
1111

12-
format(["src", "test", "examples", "docs"])
12+
format(["src", "test", "examples", "docs"], format_docstrings = true)
1313

1414
# ------------------------------------------------------------------------------

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
cff-version: 1.1.0
22
title: "LFAToolkit.jl"
33
message: "Please cite the following works when using this software."
4-
version: 0.5.0
5-
date-released: 2022-01-05
4+
version: 0.6.0
5+
date-released: 2022-10-18
66
license: BSD-2-Clause
77
authors:
88
- family-names: Thompson

Project.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
name = "LFAToolkit"
22
uuid = "3f92b583-c0aa-4596-8bdf-f02f6c0a52df"
3-
authors = ["Jeremy L Thompson <thompson.jeremy.luke@gmail.com>"]
4-
version = "0.5.0"
3+
authors = [
4+
"Jed Brown <jed@jedbrown.org>",
5+
"Adeleke Bankoe <AdelekeBankole@colorado.edu>",
6+
"Jeremy L Thompson <thompson.jeremy.luke@gmail.com>",
7+
]
8+
version = "0.6.0"
59

610
[deps]
711
FastGaussQuadrature = "442a2c76-b920-505d-bb47-c5924d526838"
@@ -12,6 +16,8 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1216

1317
[compat]
1418
julia = "1.3"
19+
Polynomials = "2.0.25"
20+
FastGaussQuadrature = "0.4.9"
1521

1622
[extras]
1723
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

docs/Project.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
34
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
4-
FastGaussQuadrature = "442a2c76-b920-505d-bb47-c5924d526838"
55
LFAToolkit = "3f92b583-c0aa-4596-8bdf-f02f6c0a52df"
66

77
[compat]
8-
Documenter = "=0.25.2"
9-
DocumenterTools = "=0.1.6"
8+
Documenter = "0.27.23"
9+
DocumenterCitations = "0.2.12"
10+
DocumenterTools = "0.1.16"

docs/make.jl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ------------------------------------------------------------------------------
22
# documentation
33
# ------------------------------------------------------------------------------
4-
using Documenter, DocumenterTools, Markdown, LFAToolkit
4+
using Documenter, DocumenterCitations, DocumenterTools, Markdown, LFAToolkit
55
DocMeta.setdocmeta!(LFAToolkit, :DocTestSetup, :(using LFAToolkit); recursive = true)
66

77
# The DOCSARGS environment variable can be used to pass additional arguments to make.jl.
@@ -16,8 +16,14 @@ end
1616
# ------------------------------------------------------------------------------
1717
# make
1818
# ------------------------------------------------------------------------------
19+
bib = CitationBibliography(joinpath(@__DIR__, "src/references.bib"))
1920
makedocs(
21+
bib,
2022
modules = [LFAToolkit],
23+
clean = false,
24+
strict = true,
25+
sitename = "LFAToolkit.jl",
26+
authors = "Jed Brown, Adeleke Bankole, and Jeremy L Thompson",
2127
format = Documenter.HTML(
2228
# Use clean URLs, unless built as a "local" build
2329
prettyurls = !("local" in ARGS),
@@ -33,10 +39,6 @@ makedocs(
3339
"Release Notes" => "release_notes.md",
3440
"References" => "references.md",
3541
],
36-
clean = false,
37-
sitename = "LFAToolkit.jl",
38-
authors = "Jeremy L Thompson",
39-
linkcheck = !("skiplinks" in ARGS),
4042
)
4143

4244
# ------------------------------------------------------------------------------

docs/src/background.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Mathematical Background
22

3-
Local Fourier Analysis (LFA) was first used by Brandt [1] to analyze the convergence of multi-level adaptive techniques for solving PDEs discretized with finite differences, but the technique has been adapted for multi-level and multi-grid techniques using finite element discretizations.
3+
Local Fourier Analysis (LFA) was first used in [brandt1977](@cite) to analyze the convergence of multi-level adaptive techniques for solving PDEs discretized with finite differences, but the technique has been adapted for multi-level and multi-grid techniques using finite element discretizations.
44
While this library focuses on the finite element discretizations, finite difference discretizations of PDEs can often be recovered from finite element formulations by using linear finite elements on a structured grid.
55
This fact makes LFAToolkit.jl an extremely flexible tool for LFA.
66

@@ -47,7 +47,7 @@ In this context, low frequencies are given by ``\theta \in T^{low} = \left[ - \p
4747

4848
## High Order Finite Elements
4949

50-
Consider the specific case of a Topeliz operator representing a scalar PDE in 1D with the weak formulation given by Brown in [2],
50+
Consider the specific case of a Topeliz operator representing a scalar PDE in 1D with the weak formulation given by [brown2010](@cite),
5151

5252
```math
5353
\int_{\Omega} v \cdot f_0 \left( u, \nabla u \right) + \nabla v : f_1 \left( u, \nabla u \right) = \int_{\Omega} f v, \forall v \in V
@@ -63,7 +63,7 @@ Selecting a finite element basis, we can discretize the weak form and produce
6363
A u = b.
6464
```
6565

66-
Using the algebraic representation of PDE operators discussed in [2], the PDE operator ``A`` is of the form
66+
Using the algebraic representation of PDE operators discussed in [brown2010](@cite), the PDE operator ``A`` is of the form
6767

6868
```math
6969
A = P^T A_e P
@@ -205,7 +205,7 @@ If multiple pre or post-smoothing passes are used, we have
205205
where ``\nu`` is the number of smoothing passes.
206206

207207
More sophisticated smoothers can be used, such as the Chebyshev semi-iterative method.
208-
For discussion of the error propegation of the Chebyshev semi-iteative method, see Gutknecht and Röllin [3].
208+
For discussion of the error propegation of the Chebyshev semi-iteative method, see [gutknecht2002](@cite).
209209
User defined smoothers are supported, where the user provides ``M^{-1}`` or a function computing ``M^{-1}`` based upon ``A``, and ``\tilde{M}^{-1}_h`` and ``\tilde{S}_h`` are automatically generated and used inside the multigrid symbol matrix.
210210

211211
### Grid Transfer Operators

docs/src/examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ This section documents the LFAToolkit examples.
66

77
```@contents
88
Pages = [
9+
"examples/diffusion.md",
910
"examples/advection.md",
1011
"examples/advection_supg.md",
11-
"examples/diffusion.md",
1212
"examples/linear_elasticity.md",
1313
"examples/hyperelasticity.md",
1414
]

docs/src/examples/advection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ In this weak formulation, boundary terms have been omitted, as they are not pres
2525
The advection operator is a classical test case to see dispersion spectrum inside LFAToolkit.
2626
Here we show the advection operator on a non-polynomial basis derived from the Hale-Trefethen strip transformation applied to a H1 Lagrange basis.
2727

28-
For understanding about nonpolynomial bases, see paper Hale and Trefethen (2008) New quadrature formulas from conformal maps. https://doi.org/10.1137/07068607X
28+
For further discussion on non-polynomial bases, see [hale2008](@cite).
2929

3030
````@eval
3131
using Markdown

docs/src/examples/advection_supg.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ for an appropriate test space ``V \subseteq H^1 \left( \Omega \right)`` on the d
2020
In this weak formulation, boundary terms have been omitted, as they are not present on the infinite grid for Local Fourier Analysis.
2121
The SUPG stabilization is controlled by the parameter ``τ``, where ``τ = 0`` gives the classical Galerkin formulation and ``τ = \dfrac{h}{2}`` gives a nodally exact solution to the steady advection equation with source when using linear elements (this can be extended to advection-diffusion with a further scaling that depends on the cell Péclet number).
2222

23+
For discussion on SUPG, see [hughes1979](@cite), [brooks1982](@cite), and [whiting2003](@cite).
24+
2325
### LFAToolkit code
2426

2527
The symbol of the continuous advection operator ``u_t + c u_x = 0`` applied to the Fourier mode ``e^{i\theta x}`` is ``i\theta``.
@@ -28,11 +30,6 @@ One may compare the continuous spectrum with the discrete symbol, which is neces
2830
To understand dispersion within the resolved frequencies, we instead plot the phase speed ``\lambda/\theta``, which should be very close to ``c`` through the resolved frequencies.
2931
Here we show the SUPG advection operator on ``H^1`` Lagrange basis.
3032

31-
For understanding about SUPG in this work, see papers by Hughes TJR, Brooks AN (1979, 1982) and C.H. Whiting
32-
A multi-dimensional upwind scheme with no crosswind diffusion. In: Hughes TJR, editor. Finite element methods for convection dominated flows, AMD-vol. 34. New York: ASME, (1979), pp. 19-35.
33-
Streamline upwind/Petrov–Galerkin formulations for convection dominated flows with particular emphasis on the incompressible Navier–Stokes equations. Comput Meth Appl Mech Eng, 32 (1982), pp. 199-259.
34-
Hierarchical basis for stabilized finite element methods for compressible flows. Comput. Methods Appl. Mech. Engrg. 192, (2003), pp. 5167-5185.
35-
3633
````@eval
3734
using Markdown
3835
Markdown.parse("""

docs/src/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ Pages = [
2323
"examples.md",
2424
"public.md",
2525
"private.md",
26-
"release_notes.md",
27-
"references.md"
26+
"release_notes.md"
2827
]
2928
Depth = 1
3029
```

docs/src/references.bib

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
@article{brandt1977,
2+
title = {Multi-level adaptive solutions to boundary-value problems},
3+
author = {Brandt, Achi},
4+
journal = {Mathematics of computation},
5+
volume = {31},
6+
number = {138},
7+
pages = {333--390},
8+
year = {1977}
9+
}
10+
11+
@article{brooks1982,
12+
title = {Streamline upwind/Petrov-Galerkin formulations for convection dominated flows with particular emphasis on the incompressible Navier-Stokes equations},
13+
author = {
14+
Brooks, Alexander N and
15+
Hughes, Thomas JR
16+
},
17+
journal = {Computer methods in applied mechanics and engineering},
18+
volume = {32},
19+
number = {1-3},
20+
pages = {199--259},
21+
year = {1982},
22+
publisher = {Elsevier}
23+
}
24+
25+
@article{brown2010,
26+
title = {Efficient nonlinear solvers for nodal high-order finite elements in 3D},
27+
author = {Brown, Jed},
28+
journal = {Journal of Scientific Computing},
29+
volume = {45},
30+
number = {1},
31+
pages = {48--63},
32+
year = {2010},
33+
publisher = {Springer}
34+
}
35+
36+
@article{gutknecht2002,
37+
title = {The Chebyshev iteration revisited},
38+
author = {
39+
Gutknecht, Martin H and
40+
Röllin, Stefan
41+
},
42+
journal = {Parallel Computing},
43+
volume = {28},
44+
number = {2},
45+
pages = {263--283},
46+
year = {2002},
47+
publisher = {Elsevier}
48+
}
49+
50+
@article{hale2008,
51+
title = {New quadrature formulas from conformal maps},
52+
author = {
53+
Hale, Nicholas and
54+
Trefethen, Lloyd N
55+
},
56+
journal = {SIAM Journal on Numerical Analysis},
57+
volume = {46},
58+
number = {2},
59+
pages = {930--948},
60+
year = {2008},
61+
publisher = {SIAM}
62+
}
63+
64+
@article{hughes1979,
65+
title = {A multidimentional upwind scheme with no crosswind diffusion},
66+
author = {Hughes, Thomas JR},
67+
journal = {Finite element methods for convection dominated flows},
68+
volume = {AMD 34},
69+
pages = {19--35},
70+
year = {1979},
71+
publisher = {ASME.}
72+
}
73+
74+
@article{melvin2012,
75+
title = {Dispersion analysis of the spectral element method},
76+
author = {
77+
Melvin, Thomas and
78+
Staniforth, Andrew and
79+
Thuburn, John
80+
},
81+
journal = {Quarterly Journal of the Royal Meteorological Society},
82+
volume = {138},
83+
number = {668},
84+
pages = {1934--1947},
85+
year = {2012},
86+
}
87+
88+
@article{whiting2003,
89+
title = {Hierarchical basis for stabilized finite element methods for compressible flows},
90+
author = {
91+
Whiting, Christian H and
92+
Jansen, Kenneth E and
93+
Dey, Saikat
94+
},
95+
journal = {Computer methods in applied mechanics and engineering},
96+
volume = {192},
97+
number = {47-48},
98+
pages = {5167--5185},
99+
year = {2003},
100+
publisher = {Elsevier}
101+
}

docs/src/references.md

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,4 @@
11
# References
22

3-
A. Brandt, *Multi-level adaptive solutions to boundary-value problems*, Math. Comp., 31(138) (1977), pp. 33-390.
4-
5-
A. N. Brooks and T. J. R. Hughes *Streamline upwind/Petrov–Galerkin formulations for convection dominated flows with particular emphasis on the incompressible Navier–Stokes equations*, Comput Meth Appl Mech Eng, 32 (1982), pp. 199-259.
6-
7-
J. Brown, *Efficient nonlinear solvers for nodal high-order finite elements in 3D*, Journal of Scientific Computing, 45 (2010), pp. 48-63.
8-
9-
M. Gutknecht and S. Röllin, *The Chebyshev iteration revisited*, Parallel Computing, 28 (2002), pp. 263-283.
10-
11-
N. Hale and L. N. Trefethen, [New quadrature formulas from conformal maps](https://doi.org/10.1137/07068607X), SIAM Journal on Numerical Analysis. Vol. 46, No. 2, (2008), pp. 930-948.
12-
13-
T. J. R. Hughes and A. N. Brooks *A multi-dimensional upwind scheme with no crosswind diffusion*, In: Hughes TJR, editor. Finite element methods for convection dominated flows, AMD-vol. 34. New York: ASME, (1979), pp. 19-35.
14-
15-
T. Melvin, A. Staniforth and J. Thuburn, *Dispersion analysis of the spectral element method*, Q.J.R. Meteorol. Soc. 138, (2012), pp. 1934-1947.
16-
17-
C. H. Whiting, K. E. Jansen and S. Dey, *Hierarchical basis for stabilized finite element methods for compressible flows*, Comput. Methods Appl. Mech. Engrg. 192, (2003), pp. 5167-5185.
3+
```@bibliography
4+
```

docs/src/release_notes.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@
44

55
Current development includes:
66

7+
## v0.6.0
8+
9+
This release includes conformal maps for bases, new operator convenience constructors, and small internal improvements.
10+
711
Enhancements:
812

913
* Added conformal maps `sausage_transformation`, `kosloff_talezer_transformation`, and `hale_trefethen_strip_transformation` for basis quadrature spaces.
10-
* Add advection operator convenience constructor and examples.
14+
* Add advection and SUPG advection operator convenience constructor and examples.
15+
* Switch to `FastGaussQuadrature` package for computing nodes, quadrature points, and quadrature weights.
1116

1217
Bugfixes:
1318

examples/ex011_advection_supg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ supgmass = Operator(
6363
supgmassweakform,
6464
mesh,
6565
[
66-
OperatorField(basis, [EvaluationMode.interpolation], "u_t"),
66+
OperatorField(basis, [EvaluationMode.interpolation], "uₜ"),
6767
OperatorField(basis, [EvaluationMode.quadratureweights], "quadrature weights"),
6868
],
6969
[OperatorField(basis, [EvaluationMode.interpolation, EvaluationMode.gradient])],

0 commit comments

Comments
 (0)