]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Step-69: Apply review suggestion 12559/head
authorMatthias Maier <tamiko@43-1.org>
Sat, 31 Jul 2021 14:25:52 +0000 (09:25 -0500)
committerMatthias Maier <tamiko@43-1.org>
Sat, 31 Jul 2021 14:25:52 +0000 (09:25 -0500)
examples/step-69/step-69.cc

index 6ea0cadbf139b80916fb8331d899d2cc480f343d..4a801f97ba1d7aac33eb8e93c9a80da27c95e675 100644 (file)
@@ -675,8 +675,6 @@ namespace Step69
               }
           }
       }
-
-    triangulation.refine_global(refinement);
   }
 
   // @sect4{Assembly of offline matrices}
@@ -2472,25 +2470,16 @@ namespace Step69
     // scratch space, and initialize the DataOut<dim> object. All of these
     // operations are pretty standard and discussed in detail in the
     // Discretization and OfflineData classes.
-    //
-    // We have to make take care of a special case when resuming an
-    // interrupted computation though: In order to be able to read in the
-    // saved mesh and associated state vector we have to make sure to
-    // not refine the coarse mesh:
 
     {
       print_head(pcout, "create triangulation");
 
+      discretization.setup();
+
       if (resume)
-        {
-          discretization.refinement = 0;
-          discretization.setup();
-          discretization.triangulation.load(base_name + "-checkpoint.mesh");
-        }
+        discretization.triangulation.load(base_name + "-checkpoint.mesh");
       else
-        {
-          discretization.setup();
-        }
+        discretization.triangulation.refine_global(discretization.refinement);
 
       pcout << "Number of active cells:       "
             << discretization.triangulation.n_global_active_cells()

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.