* boundary conditions. Parallelization via MUMPS and MPI.
* </td></tr>
*
+ * <tr valign="top">
+ * <td>step-63</td>
+ * <td>Block smoothers for geometric multigrid. A scalar convection
+ * diffusion equation is solved with different additive or
+ * multiplicative multigrid smoothers.
+ * </td></tr>
+ *
* </table>
*
* <a name="topic"></a>
* step-42,
* step-43,
* step-56,
- * step-59
+ * step-59,
+ * step-63
* </td>
* </tr>
*
-#Epsilon
-set Epsilon = 0.005
+# Diffusion parameter
+set Epsilon = 0.005
# Finite Element degree
-set Fe degree = 1
+set Fe degree = 1
-# Smoother Type: SOR|Jacobi|block SOR|block Jacobi
-set Smoother type = block Jacobi
+# Select smoother: SOR|Jacobi|block SOR|block Jacobi
+set Smoother type = block Jacobi
-# Number of smoothing steps
-set Smoothing steps = 3
+# Select DoF renumbering: none|downstream|upstream|random
+set DoF renumbering = downstream
-# DoF renumbering: no|downstream|upstream|random
-set DoF renumbering = downstream
+# Number of smoothing steps
+set Smoothing steps = 3
-# With streamline diffusion: true|false
+# Enable streamline diffusion stabilization: true|false
set With streamline diffusion = true
-# Output: true|false
-set Output = false
-
+# Generate graphical output: true|false
+set Output = true
-#Epsilon
-set Epsilon = 0.005
+# Diffusion parameter
+set Epsilon = 0.005
# Finite Element degree
-set Fe degree = 1
+set Fe degree = 1
-# Smoother Type: SOR|Jacobi|block SOR|block Jacobi
-set Smoother type = block SOR
+# Select smoother: SOR|Jacobi|block SOR|block Jacobi
+set Smoother type = block SOR
-# Number of smoothing steps
-set Smoothing steps = 1
+# Select DoF renumbering: none|downstream|upstream|random
+set DoF renumbering = downstream
-# DoF renumbering: no|downstream|upstream|random
-set DoF renumbering = downstream
+# Number of smoothing steps
+set Smoothing steps = 1
-# With streamline diffusion: true|false
+# Enable streamline diffusion stabilization: true|false
set With streamline diffusion = true
-# Output: true|false
-set Output = false
+# Generate graphical output: true|false
+set Output = true
<br>
-<i>This program was contributed by Thomas Clevenger and Timo Heister.</i>
+<i>This program was contributed by Thomas C. Clevenger and Timo Heister.
+
+Timo Heister was partially supported by NSF Award DMS-1522191, DMS-1901529,
+OAC-1835452, by the Computational Infrastructure in Geodynamics initiative
+(CIG), through the NSF under Award EAR-0949446 and EAR-1550901 and The
+University of California - Davis, and by Technical Data Analysis,
+Inc. through US Navy STTR N16A-T003.
+</i>
<a name="Intro"></a>
<h1>Introduction</h1>
-unfinished
-
+techniques
Staring with the additive smoothers, we see that renumbering the DoFs/cells has no effect on convergence speed. This is because these smoothers compute operations on each DoF (point-smoother) or cell (block-smoother) independently and add up the results. Since we can define these smoothers as an application of a sum of matrices, and matrix addition is communicative, the order at which we sum the different components will not affect the end result.
-<table align="center" border="1">
+<table align="center" class="doxtable">
<tr>
<th></th>
<th></th>
<th colspan="1">$Q_1$</th>
<th colspan="7">Smoother (smoothing steps)</th>
</tr>
+
<tr>
<th></th>
<th></th>
<th></th>
<th colspan="3">Block Jacobi (3)</th>
</tr>
-
<tr>
<th></th>
<th></th>
<th></th>
<th colspan="3">Renumbering Strategy</th>
</tr>
-
<tr>
<th>Cells</th>
<th></th>
<th>Random</th>
<th>Upstream</th>
</tr>
-
<tr>
<th>32</th>
<th></th>
<td>3</th>
<td>3</th>
</tr>
-
<tr>
<th>128</th>
<th></th>
<td>6</th>
<td>6</th>
</tr>
-
<tr>
<th>512</th>
<th></th>
<td>9</th>
<td>9</th>
</tr>
-
<tr>
<th>2048</th>
<th></th>
<td>13</th>
<td>13</th>
</tr>
-
<tr>
<th>8192</th>
<th></th>
<td>15</th>
<td>15</th>
</tr>
-
<tr>
<th>32768</th>
<th></th>
<td>16</th>
<td>16</th>
</tr>
-
<tr>
<th>131072</th>
<th></th>
<td>16</th>
<td>16</th>
</tr>
-
</table>
On the other hand, for multiplicative smoothers, we can speed up convergence by renumbering the DoFs/cells in the advection direction, and similarly, we can slow down convergence if we do the renumbering in the opposite direction. This is because the multiplicative smoothers transfer information from DoF to DoF, and the solutions at any one DoF of an advection-dominate problem is highly dependent on the solution at DoFs upstream of the advection direction.
As we increase $\varepsilon$, however, the problem becomes more diffusion-dominated and the effectiveness of DoF/cell renumbering drops. On the other hand, in the extreme case of $\varepsilon=0$ (advection-only), we have a 1st-order PDE and multiplicative methods become effective solvers (Note: special care must be taken for the boundary conditions in this case).
-<table align="center" border="1">
+<table align="center" class="doxtable">
<tr>
<th></th>
<th></th>
<th></th>
<th colspan="3">Block SOR (1)</th>
</tr>
-
<tr>
<th></th>
<th></th>
<th></th>
<th colspan="3">Renumbering Strategy</th>
</tr>
-
<tr>
<th>Cells</th>
<th></th>
<th>Random</th>
<th>Upstream</th>
</tr>
-
<tr>
<th>32</th>
<th></th>
<td>2</th>
<td>3</th>
</tr>
-
<tr>
<th>128</th>
<th></th>
<td>5</th>
<td>7</th>
</tr>
-
<tr>
<th>512</th>
<th></th>
<td>7</th>
<td>12</th>
</tr>
-
<tr>
<th>2048</th>
<th></th>
<td>10</th>
<td>17</th>
</tr>
-
<tr>
<th>8192</th>
<th></th>
<td>11</th>
<td>20</th>
</tr>
-
<tr>
<th>32768</th>
<th></th>
<td>12</th>
<td>21</th>
</tr>
-
<tr>
<th>131072</th>
<th></th>
<td>12</th>
<td>21</th>
</tr>
-
</table>
We will limit the results to runs using the downstream renumbering. Here is a cross comparison of all four smoothers for both $Q_1$ and $Q_3$ elements:
-<table align="center" border="1">
+<table align="center" class="doxtable">
<tr>
<th></th>
<td></th>
<th colspan="1">$Q_3$</th>
<th colspan="4">Smoother (smoothing steps)</th>
</tr>
-
<tr>
<th colspan="1">Cells</th>
<td></th>
<th colspan="1">SOR (3)</th>
<th colspan="1">Block SOR (1)</th>
</tr>
-
<tr>
<th>32</th>
<td></th>
<td>15</th>
<td>6</th>
</tr>
-
<tr>
<th>128</th>
<td></th>
<td>21</th>
<td>9</th>
</tr>
-
<tr>
<th>512</th>
<td></th>
<td>28</th>
<td>9</th>
</tr>
-
<tr>
<th>2048</th>
<td></th>
<td>32</th>
<td>9</th>
</tr>
-
<tr>
<th>8192</th>
<td></th>
<td>34</th>
<td>10</th>
</tr>
-
<tr>
<th>32768</th>
<td></th>
<td>10</th>
<td></th>
</tr>
-
<tr>
<th>131072</th>
<td></th>
<td>11</th>
<td></th>
</tr>
-
</table>
We see that for $Q_1$, both multiplicative smoothers require a smaller combination of smoothing steps and iteration counts than either additive smoother. However, when we in increase the degree to a $Q_3$ element, there is a clear advantage for the block smoothers in terms of the increase in smoothing steps and iterations required to solve. Specifically, the block SOR smoother gives constant iterations over degree, and the block Jacobi only sees about a 38% increase in iterations compared to 75% and 183% for Jacobi and SOR respectively.
Iteration counts do not tell the full story in the optimality of a one smoother over another. Obviously we must examine the cost of an iteration. Block smoothers here are at a disadvantage as they are having to construct and invert a cell matrix for each cell. Here is a comparison of solve times for a $Q_3$ element with 74,496 DoFs:
-<table align="center" border="1">
+<table align="center" class="doxtable">
<tr>
<th colspan="1">$Q_3$</th>
<th colspan="4">Smoother (smoothing steps)</th>
</tr>
-
<tr>
<th colspan="1">DoFs</th>
<th colspan="1">Jacobi (6)</th>
<th colspan="1">SOR (3)</th>
<th colspan="1">Block SOR (1)</th>
</tr>
-
<tr>
<th>74496</th>
<td>0.689 s</th>
<td>1.189 s</th>
<td>1.021 s</th>
</tr>
-
</table>
The smoother that requires the most iterations (Jacobi) actually take the shortest time (roughly 2/3 the time of the next fastest method). This is because all that is requires to apply a Jacobi smoothing step is multiplication by a diagonal matrix which is very cheap. On the other hand, while SOR requires over 3x more iterations (each with 3x more smoothing steps) than block SOR, the times are roughly equivalent, implying that a smoothing step of block SOR is roughly 9x slower than a smoothing step of SOR. Lastly, block Jacobi is almost 6x more expensive than block SOR, which intuitively makes sense from the fact that 1 step of each method has the same cost (inverting the cell matrices and either adding or multiply them together), and block Jacobi has 3 times the smoothing step per iteration with 2 times the iterations.
<h3> Possible Extensions </h3>
-<h5> Constant iterations for $Q_5$ </h5>
+<h5> Constant iterations for Q<sub>5</sub> </h5>
Change the number of smoothing steps and the smoother relaxation parameter (set in <code>Smoother::AdditionalData()</code> inside <code>create_smoother()</code>, only necessary for point smoothers) so that we maintain a constant number of iterations for a $Q_5$ element.
-<h5> Effectiveness of renumbering for changing $\varepsilon$ </h5>
+<h5> Effectiveness of renumbering for changing epsilon </h5>
Increase/decrease the parameter ``Epsilon" in the .prm files of the multiplicative methods and observe the relationship of downstream vs. upstream reordering.
-#Epsilon
-set Epsilon = 0.005
+# Diffusion parameter
+set Epsilon = 0.005
# Finite Element degree
-set Fe degree = 1
+set Fe degree = 1
-# Smoother Type: SOR|Jacobi|block SOR|block Jacobi
-set Smoother type = Jacobi
+# Select smoother: SOR|Jacobi|block SOR|block Jacobi
+set Smoother type = Jacobi
-# Number of smoothing steps
-set Smoothing steps = 6
+# Select DoF renumbering: none|downstream|upstream|random
+set DoF renumbering = downstream
-# DoF renumbering: no|downstream|upstream|random
-set DoF renumbering = downstream
+# Number of smoothing steps
+set Smoothing steps = 6
-# With streamline diffusion: true|false
+# Enable streamline diffusion stabilization: true|false
set With streamline diffusion = true
-# Output: true|false
-set Output = false
+# Generate graphical output: true|false
+set Output = true
-#Epsilon
-set Epsilon = 0.005
+# Diffusion parameter
+set Epsilon = 0.005
# Finite Element degree
-set Fe degree = 1
+set Fe degree = 1
-# Smoother Type: SOR|Jacobi|block SOR|block Jacobi
-set Smoother type = SOR
+# Select smoother: SOR|Jacobi|block SOR|block Jacobi
+set Smoother type = SOR
-# Number of smoothing steps
-set Smoothing steps = 3
+# Select DoF renumbering: none|downstream|upstream|random
+set DoF renumbering = downstream
-# DoF renumbering: no|downstream|upstream|random
-set DoF renumbering = downstream
+# Number of smoothing steps
+set Smoothing steps = 3
-# With streamline diffusion: true|false
+# Enable streamline diffusion stabilization: true|false
set With streamline diffusion = true
-# Output: true|false
-set Output = false
+# Generate graphical output: true|false
+set Output = true
{
ParameterHandler prm;
- prm.declare_entry("Epsilon", "0.005", Patterns::Double(0), "Epsilon");
+ prm.declare_entry("Epsilon",
+ "0.005",
+ Patterns::Double(0),
+ "Diffusion parameter");
prm.declare_entry("Fe degree",
"1",
- Patterns::Integer(0),
+ Patterns::Integer(1),
"Finite Element degree");
prm.declare_entry("Smoother type",
"block SOR",
Patterns::Selection("SOR|Jacobi|block SOR|block Jacobi"),
- "Smoother Type: SOR|Jacobi|block SOR|block Jacobi");
+ "Select smoother: SOR|Jacobi|block SOR|block Jacobi");
prm.declare_entry("Smoothing steps",
"2",
Patterns::Integer(1),
"Number of smoothing steps");
- prm.declare_entry("DoF renumbering",
- "downstream",
- Patterns::Selection("none|downstream|upstream|random"),
- "DoF renumbering: none|downstream|upstream|random");
+ prm.declare_entry(
+ "DoF renumbering",
+ "downstream",
+ Patterns::Selection("none|downstream|upstream|random"),
+ "Select DoF renumbering: none|downstream|upstream|random");
prm.declare_entry("With streamline diffusion",
"true",
Patterns::Bool(),
- "With streamline diffusion: true|false");
+ "Enable streamline diffusion stabilization: true|false");
prm.declare_entry("Output",
"true",
Patterns::Bool(),
}
- // @sect1{Cell permutations}
+ // @sect3{Cell permutations}
//
// The ordering in which cells and degrees of freedom are traversed
// will play a roll in the speed of convergence for multiplicative
// The relaxation parameter for point smoothers is chosen based on trial and
// error, and they reflect values necessary to keep the iteration counts in
// the GMRES solve constant (or as close as possible) as we refine the mesh.
- // The two values given for both ``Jacobi" and ``SOR" are for degree 1 and
+ // The two values given for both "Jacobi" and "SOR" are for degree 1 and
// degree 3 finite elements. If the user wants to change to another degree,
// they may need to adjust these numbers. For block smoothers, this parameter
// has a more straightforward interpretation, namely that for additive methods