]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use better variable names in step-43.
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 7 Jan 2022 09:49:22 +0000 (02:49 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 7 Jan 2022 09:49:22 +0000 (02:49 -0700)
examples/step-43/step-43.cc

index 32115156ee324407b0f208afd5175fe18758cb1b..1985e21bbfbfecf69f540b78ba8c7fa108f62413 100644 (file)
@@ -554,8 +554,9 @@ namespace Step43
     const double porosity;
     const double AOS_threshold;
 
-    std::shared_ptr<TrilinosWrappers::PreconditionIC> Amg_preconditioner;
-    std::shared_ptr<TrilinosWrappers::PreconditionIC> Mp_preconditioner;
+    std::shared_ptr<TrilinosWrappers::PreconditionIC> top_left_preconditioner;
+    std::shared_ptr<TrilinosWrappers::PreconditionIC>
+      bottom_right_preconditioner;
 
     bool rebuild_saturation_matrix;
 
@@ -724,8 +725,8 @@ namespace Step43
     }
 
     {
-      Amg_preconditioner.reset();
-      Mp_preconditioner.reset();
+      top_left_preconditioner.reset();
+      bottom_right_preconditioner.reset();
       darcy_preconditioner_matrix.clear();
 
       BlockDynamicSparsityPattern dsp(darcy_dofs_per_block,
@@ -930,11 +931,15 @@ namespace Step43
   {
     assemble_darcy_preconditioner();
 
-    Amg_preconditioner = std::make_shared<TrilinosWrappers::PreconditionIC>();
-    Amg_preconditioner->initialize(darcy_preconditioner_matrix.block(0, 0));
+    top_left_preconditioner =
+      std::make_shared<TrilinosWrappers::PreconditionIC>();
+    top_left_preconditioner->initialize(
+      darcy_preconditioner_matrix.block(0, 0));
 
-    Mp_preconditioner = std::make_shared<TrilinosWrappers::PreconditionIC>();
-    Mp_preconditioner->initialize(darcy_preconditioner_matrix.block(1, 1));
+    bottom_right_preconditioner =
+      std::make_shared<TrilinosWrappers::PreconditionIC>();
+    bottom_right_preconditioner->initialize(
+      darcy_preconditioner_matrix.block(1, 1));
   }
 
 
@@ -1473,12 +1478,12 @@ namespace Step43
           const LinearSolvers::InverseMatrix<TrilinosWrappers::SparseMatrix,
                                              TrilinosWrappers::PreconditionIC>
             mp_inverse(darcy_preconditioner_matrix.block(1, 1),
-                       *Mp_preconditioner);
+                       *bottom_right_preconditioner);
 
           const LinearSolvers::BlockSchurPreconditioner<
             TrilinosWrappers::PreconditionIC,
             TrilinosWrappers::PreconditionIC>
-            preconditioner(darcy_matrix, mp_inverse, *Amg_preconditioner);
+            preconditioner(darcy_matrix, mp_inverse, *top_left_preconditioner);
 
           SolverControl solver_control(darcy_matrix.m(),
                                        1e-16 * darcy_rhs.l2_norm());

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.