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
* A small shift in notation
* Docs: Clarify ex2-surface mathematical description
* Refactor \boldsymbol -> \bm
* Refactor \mathbf -> \bm
* Sphinx: clear html_static_path
This is needed to avoid the 'html_static_path entry '_static' does not exist' warning
readthedocs/readthedocs.org#1776
* Fix some incosistencies
* Invert inner products (u,v) -> (v,u)
* Add SVG figure for coordinates on the sphere
* doc: use dirhtml on readthedocs
* Improve caption of sphere coords figure
* Add reference to figure in the bps on the cubed-sphere section
Co-authored-by: Jed Brown <[email protected]>
Copy file name to clipboardExpand all lines: examples/ceed/index.rst
+18-14
Original file line number
Diff line number
Diff line change
@@ -13,25 +13,27 @@ Ex1-Volume
13
13
14
14
This example is located in the subdirectory :file:`examples/ceed`. It illustrates a
15
15
simple usage of libCEED to compute the volume of a given body using a matrix-free
16
-
application of the mass operator. Arbitrary mesh and solution orders in 1D, 2D and 3D
16
+
application of the mass operator. Arbitrary mesh and solution orders in 1D, 2D, and 3D
17
17
are supported from the same code.
18
18
19
19
This example shows how to compute line/surface/volume integrals of a 1D, 2D, or 3D
20
20
domain :math:`\Omega` respectively, by applying the mass operator to a vector of
21
-
:math:`\mathbf{1}`\s. It computes:
21
+
:math:`1`\s. It computes:
22
22
23
23
.. math::
24
-
I = \int_{\Omega} \mathbf{1} \, dV .
24
+
I = \int_{\Omega} 1 \, dV .
25
25
:label: eq-ex1-volume
26
26
27
27
Using the same notation as in :ref:`Theoretical Framework`, we write here the vector
28
-
:math:`u(\mathbf{x})\equiv\mathbf{1}` in the Galerkin approximation,
28
+
:math:`u(x)\equiv1` in the Galerkin approximation,
29
29
and find the volume of :math:`\Omega` as
30
30
31
31
.. math::
32
-
\sum_e \int_{\Omega_e} v(x) \cdot\mathbf{1} \, dV
32
+
:label: volume-sum
33
33
34
-
with :math:`v(x) \in\mathcal{V}_p = \{ v \in H^{1}(\Omega_e) \,|\, v \in P_p(\boldsymbol{I}), e=1,\ldots,N_e \}`,
34
+
\sum_e \int_{\Omega_e} v(x) 1 \, dV
35
+
36
+
with :math:`v(x) \in\mathcal{V}_p = \{ v \in H^{1}(\Omega_e) \,|\, v \in P_p(\bm{I}), e=1,\ldots,N_e \}`,
35
37
the test functions.
36
38
37
39
@@ -42,25 +44,27 @@ Ex2-Surface
42
44
43
45
This example is located in the subdirectory :file:`examples/ceed`. It computes the
44
46
surface area of a given body using matrix-free application of a diffusion operator.
45
-
Arbitrary mesh and solution orders in 1D, 2D and 3D are supported from the same code.
46
-
47
-
Similarly to :ref:`Ex1-Volume`, it computes:
47
+
Similar to :ref:`Ex1-Volume`, arbitrary mesh and solution orders in 1D, 2D, and 3D
48
+
are supported from the same code. It computes:
48
49
49
50
.. math::
50
-
I = \int_{\partial\Omega} \mathbf{1} \, dS .
51
+
I = \int_{\partial\Omega} 1 \, dS ,
51
52
:label: eq-ex2-surface
52
53
53
-
but this time by applying the divergence theorem using a Laplacian.
54
+
by applying the divergence theorem.
54
55
In particular, we select :math:`u(\bm x) = x_0 + x_1 + x_2`, for which :math:`\nabla u = [1, 1, 1]^T`, and thus :math:`\nabla u \cdot\hat{\bm n} = 1`.
55
56
56
57
Given Laplace's equation,
57
58
58
59
.. math::
59
-
-\nabla\cdot\nabla u = 0, \textrm{ for } \mathbf{x} \in\Omega
60
+
\nabla\cdot\nabla u = 0, \textrm{ for } \bm{x} \in\Omega
60
61
61
-
multiply by a test function :math:`v` and integrate by parts to obtain
62
+
let us multiply by a test function :math:`v` and integrate by parts to obtain
62
63
63
64
.. math::
64
65
\int_\Omega\nabla v \cdot\nabla u \, dV - \int_{\partial\Omega} v \nabla u \cdot\hat{\bm n}\, dS = 0 .
65
66
66
-
Since we have chosen :math:`u` such that the boundary integrand is :math:`v 1`, we may evaluate the surface integral by applying the volumetric Laplacian and summing the result.
67
+
Since we have chosen :math:`u` such that :math:`\nabla u \cdot\hat{\bm n} = 1`, the boundary integrand is :math:`v 1\equiv v`. Hence, similar to :math:numref:`volume-sum`, we can evaluate the surface integral by applying the volumetric Laplacian as follows
68
+
69
+
.. math::
70
+
\int_\Omega\nabla v \cdot\nabla u \, dV \approx\sum_e \int_{\partial\Omega_e} v(x) 1 \, dS .
0 commit comments