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
Copy file name to clipboardExpand all lines: demos/adaptive_multigrid/adaptive_multigrid.py.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,7 +100,7 @@ For more information about patch relaxation, see `Using patch relaxation for mul
100
100
Adaptive Mesh Refinement
101
101
-------------------------
102
102
In this section we will discuss how to adaptively refine select elements and add the newly refined mesh into the *AdaptiveMeshHierarchy*.
103
-
For this problem, we will be using the Babuška-Rheinbolt a-posteriori estimate for an element:
103
+
For this problem, we will be using the Babuška-Rheinbolt aposteriori estimate for an element:
104
104
105
105
.. math::
106
106
\eta_K^2 = h_K^2\int_K | f + \nabla^2 u_h |^2\mathrm{d}x + \frac{h_K}{2} \int_{\partial K \setminus\partial\Omega} \llbracket\nabla u_h \cdot n \rrbracket^2\mathrm{d}s,
@@ -110,7 +110,7 @@ where :math:`K` is the element, :math:`h_K` is the diameter of the element, :mat
110
110
.. math::
111
111
\int_\Omega\eta_K^2 w \mathrm{d}x = \int_\Omega\sum_K h_K^2\int_K (f + \text{div} (\text{grad} u_h) )^2\mathrm{d}x w \mathrm{d}x + \int_\Omega\sum_K \frac{h_K}{2} \int_{\partial K \setminus\partial\Omega} \llbracket\nabla u_h \cdot n \rrbracket^2\mathrm{d}s w \mathrm{d}x
112
112
113
-
Our approach will be to compute the estimator over all elements and selectively choose to refine only those that contribute most to the error. To compute the error estimator, we use the function below to solve the variational formulation of the error estimator. Since our estimator is a constant per element, we use a DG0 function space. ::
113
+
Our approach will be to compute the estimator over all elements and selectively choose to refine only those that contribute most to the error. To conveniently compute the error estimator, we use the function below to solve a variational formulation for the error estimator. Since our estimator is a constant per element, we use a DG0 function space. ::
114
114
115
115
def estimate_error(mesh, uh):
116
116
W = FunctionSpace(mesh, "DG", 0)
@@ -136,7 +136,7 @@ Our approach will be to compute the estimator over all elements and selectively
136
136
error_est = sqrt(eta_.dot(eta_))
137
137
return (eta, error_est)
138
138
139
-
The next step is to choose which elements to refine. For this we use Dörfler marking [Dörfler1996]:
139
+
The next step is to choose which elements to refine. For this we use a simplified variant of Dörfler marking [Dörfler1996]:
0 commit comments