]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make control flow easier to read. 2911/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 3 Aug 2016 13:16:02 +0000 (07:16 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 3 Aug 2016 13:16:02 +0000 (07:16 -0600)
source/dofs/dof_tools.cc

index b71591635cd00abd948b2870e2abeff2550879c0..ed38ec8d7d7c391b1f5eced26431826d814a6d7c 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 1999 - 2015 by the deal.II authors
+// Copyright (C) 1999 - 2016 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -2074,28 +2074,26 @@ namespace DoFTools
     block_list.reinit(i, dof_handler.n_dofs(), dof_handler.get_fe().dofs_per_cell);
     i=0;
     for (cell=dof_handler.begin(level); cell != endc; ++cell)
-      {
-        if (!cell->is_locally_owned_on_level())
-          continue;
-
-        indices.resize(cell->get_fe().dofs_per_cell);
-        cell->get_mg_dof_indices(indices);
+      if (cell->is_locally_owned_on_level())
+        {
+          indices.resize(cell->get_fe().dofs_per_cell);
+          cell->get_mg_dof_indices(indices);
 
-        if (selected_dofs.size()!=0)
-          AssertDimension(indices.size(), selected_dofs.size());
+          if (selected_dofs.size()!=0)
+            AssertDimension(indices.size(), selected_dofs.size());
 
-        for (types::global_dof_index j=0; j<indices.size(); ++j)
-          {
-            if (selected_dofs.size() == 0)
-              block_list.add(i,indices[j]-offset);
-            else
-              {
-                if (selected_dofs[j])
-                  block_list.add(i,indices[j]-offset);
-              }
-          }
-        ++i;
-      }
+          for (types::global_dof_index j=0; j<indices.size(); ++j)
+            {
+              if (selected_dofs.size() == 0)
+                block_list.add(i,indices[j]-offset);
+              else
+                {
+                  if (selected_dofs[j])
+                    block_list.add(i,indices[j]-offset);
+                }
+            }
+          ++i;
+        }
   }
 
 

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.