]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
fix unnecessary if
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 27 Jul 2011 18:58:46 +0000 (18:58 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 27 Jul 2011 18:58:46 +0000 (18:58 +0000)
git-svn-id: https://svn.dealii.org/trunk@23978 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-39/step-39.cc

index 5258bf7d7bb4c19cc393f215a257570a82869b6c..67a51756c0622885d77844bbd58d273afd59081b 100644 (file)
@@ -904,17 +904,14 @@ Step39<dim>::run(unsigned int n_steps)
   for (unsigned int s=0;s<n_steps;++s)
     {
       deallog << "Step " << s << std::endl;
-      if (s != 0)
+      if (estimates.block(0).size() == 0)
+       triangulation.refine_global(1);
+      else
        {
-         if (estimates.block(0).size() == 0)
-           triangulation.refine_global(1);
-         else
-           {
-             GridRefinement::refine_and_coarsen_fixed_fraction (triangulation,
-                                                                estimates.block(0),
-                                                                0.5, 0.0);
-             triangulation.execute_coarsening_and_refinement ();
-           }
+         GridRefinement::refine_and_coarsen_fixed_fraction (triangulation,
+                                                            estimates.block(0),
+                                                            0.5, 0.0);
+         triangulation.execute_coarsening_and_refinement ();
        }
       
       deallog << "Triangulation "

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.