Skip to content

Commit 50b9726

Browse files
committed
doc fix
1 parent 3458cec commit 50b9726

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

docs/example1.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Meshes
1919
The first object we need to create is a mesh to support the finite element discretization.
2020
We start by construction a mesh for a square domain :math:`\Omega=[0, 1] \times [0, 1]` and refining it uniformly three times:
2121

22-
.. literalinclude:: ../drivers/example1.py
22+
.. literalinclude:: ../examples/example1.py
2323
:start-after: Get a mesh
2424
:end-before: #################
2525
:lineno-match:
@@ -41,7 +41,7 @@ In the next step, we create a finite element space on the mesh.
4141
By default, we assume a Dirichlet condition on the entire boundary of the domain.
4242
We build a piecewise linear finite element space.
4343

44-
.. literalinclude:: ../drivers/example1.py
44+
.. literalinclude:: ../examples/example1.py
4545
:start-after: Construct a finite element space
4646
:end-before: #################
4747
:lineno-match:
@@ -76,7 +76,7 @@ We assemble the right-hand side
7676
of the linear system by calling the ``assembleRHS`` method of the DoFMap object, and interpolate the exact solutions into the finite element space.
7777

7878

79-
.. literalinclude:: ../drivers/example1.py
79+
.. literalinclude:: ../examples/example1.py
8080
:start-after: Construct some simple functions
8181
:end-before: #################
8282
:lineno-match:
@@ -100,7 +100,7 @@ and the stiffness matrix associated with the Laplacian
100100
101101
\int_\Omega \nabla u \cdot \nabla v
102102
103-
.. literalinclude:: ../drivers/example1.py
103+
.. literalinclude:: ../examples/example1.py
104104
:start-after: Assemble mass
105105
:end-before: #######
106106
:lineno-match:
@@ -113,7 +113,7 @@ Solvers
113113
Now that we have assembled our linear system, we want to solve it.
114114
We choose to solve one system using an LU solver, and the other one using a CG solver.
115115

116-
.. literalinclude:: ../drivers/example1.py
116+
.. literalinclude:: ../examples/example1.py
117117
:start-after: Construct solvers
118118
:end-before: #################
119119
:lineno-match:
@@ -128,7 +128,7 @@ Norms and inner products
128128
Finally, we want to check that we actually solved the system by computing residual errors.
129129
We also compute errors in :math:`H^1_0` and :math:`L^2` norms.
130130

131-
.. literalinclude:: ../drivers/example1.py
131+
.. literalinclude:: ../examples/example1.py
132132
:start-after: Inner products
133133
:end-before: plt.show
134134
:lineno-match:

docs/example2.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ A fractional kernel
3737

3838
We start off by creating a fractional kernel with infinite horizon and constant fractional order :math:`s=0.75`.
3939

40-
.. literalinclude:: ../drivers/example2.py
40+
.. literalinclude:: ../examples/example2.py
4141
:start-after: Get a fractional kernel
4242
:end-before: #################
4343
:lineno-match:
@@ -66,7 +66,7 @@ Instead of the `meshFactory` used in the previous example, we now use the `nonlo
6666
The advantage is that this factory can generate meshes with appropriate interaction domains.
6767
For this particular example, the factory will not generate any interaction domain, since the homogeneous Dirichlet condition on :math:`\mathbb{R}^2\setminus\Omega` can be enforced via a boundary integral.
6868

69-
.. literalinclude:: ../drivers/example2.py
69+
.. literalinclude:: ../examples/example2.py
7070
:start-after: Generate an appropriate mesh
7171
:end-before: #################
7272
:lineno-match:
@@ -80,7 +80,7 @@ We assemble the nonlocal operator by passing the kernel to the `assembleNonlocal
8080
The optional parameter `matrixFormat` determines what kind of linear operator is assembled.
8181
We time the assembly of the operator as a dense matrix, and as a hierarchical matrix, and inspect the resulting objects.
8282

83-
.. literalinclude:: ../drivers/example2.py
83+
.. literalinclude:: ../examples/example2.py
8484
:start-after: Assemble the operator
8585
:end-before: #################
8686
:lineno-match:
@@ -93,7 +93,7 @@ For larger number of unknowns, we expect the hierarchical assembly scale like :m
9393

9494
Similar to the local PDE example, we can then solve the resulting linear equation and compute the error in energy norm.
9595

96-
.. literalinclude:: ../drivers/example2.py
96+
.. literalinclude:: ../examples/example2.py
9797
:start-after: Solve the linear system
9898
:end-before: #################
9999
:lineno-match:
@@ -116,7 +116,7 @@ We will choose :math:`\gamma(x,y) \sim \chi_{V_{\delta}^{(2)}(x)}(y)` for :math:
116116
117117
where :math:`\mathcal{I}:=\{y\in\mathbb{R}^2\setminus\Omega | \exists x\in\Omega: \gamma(x,y)\neq 0\}` is the interaction domain.
118118

119-
.. literalinclude:: ../drivers/example2.py
119+
.. literalinclude:: ../examples/example2.py
120120
:start-after: Solve a problem with finite horizon
121121
:end-before: #################
122122
:lineno-match:

0 commit comments

Comments
 (0)