]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Improve spacing and indentation.
authorDavid Wells <wellsd2@rpi.edu>
Wed, 2 Mar 2016 13:51:42 +0000 (08:51 -0500)
committerDavid Wells <wellsd2@rpi.edu>
Mon, 7 Mar 2016 04:25:58 +0000 (23:25 -0500)
source/dofs/dof_tools_sparsity.cc

index 66c701034b8e8c422aceb4766a9a77022640bbc0..a2d927315d54d5ff61d22aa3c41b06a0b6b4c594 100644 (file)
@@ -718,31 +718,32 @@ namespace DoFTools
                                   const Table<2,Coupling> &int_mask,
                                   const Table<2,Coupling> &flux_mask)
       {
-        const FiniteElement<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe = dof.get_fe();
+        const FiniteElement<DoFHandlerType::dimension,DoFHandlerType::space_dimension>
+        &fe = dof.get_fe();
 
-        std::vector<types::global_dof_index> dofs_on_this_cell(fe.dofs_per_cell);
-        std::vector<types::global_dof_index> dofs_on_other_cell(fe.dofs_per_cell);
+        std::vector<types::global_dof_index> dofs_on_this_cell (fe.dofs_per_cell);
+        std::vector<types::global_dof_index> dofs_on_other_cell (fe.dofs_per_cell);
 
         const Table<2,Coupling>
-        int_dof_mask  = dof_couplings_from_component_couplings(fe, int_mask),
-        flux_dof_mask = dof_couplings_from_component_couplings(fe, flux_mask);
+        int_dof_mask  = dof_couplings_from_component_couplings (fe, int_mask),
+        flux_dof_mask = dof_couplings_from_component_couplings (fe, flux_mask);
 
-        Table<2,bool> support_on_face(fe.dofs_per_cell,
-                                      GeometryInfo<DoFHandlerType::dimension>::faces_per_cell);
+        Table<2,bool> support_on_face
+        (fe.dofs_per_cell, GeometryInfo<DoFHandlerType::dimension>::faces_per_cell);
         for (unsigned int i=0; i<fe.dofs_per_cell; ++i)
           for (unsigned int f=0; f<GeometryInfo<DoFHandlerType::dimension>::faces_per_cell; ++f)
             support_on_face(i,f) = fe.has_support_on_face(i,f);
 
-        typename DoFHandlerType::active_cell_iterator cell = dof.begin_active(),
-                                                      endc = dof.end();
+        typename DoFHandlerType::active_cell_iterator cell = dof.begin_active (),
+                                                      endc = dof.end ();
         for (; cell!=endc; ++cell)
-          if (cell->is_locally_owned())
+          if (cell->is_locally_owned ())
             {
               cell->get_dof_indices (dofs_on_this_cell);
               // make sparsity pattern for this cell
               for (unsigned int i=0; i<fe.dofs_per_cell; ++i)
                 for (unsigned int j=0; j<fe.dofs_per_cell; ++j)
-                  if (int_dof_mask(i,j) != none)
+                  if (int_dof_mask (i,j) != none)
                     sparsity.add (dofs_on_this_cell[i],
                                   dofs_on_this_cell[j]);
 
@@ -752,11 +753,11 @@ namespace DoFTools
                    ++face_n)
                 {
                   const typename DoFHandlerType::face_iterator
-                  cell_face = cell->face(face_n);
+                  cell_face = cell->face (face_n);
                   if (cell_face->user_flag_set ())
                     continue;
 
-                  if (cell->at_boundary (face_n) )
+                  if (cell->at_boundary (face_n))
                     {
                       for (unsigned int i=0; i<fe.dofs_per_cell; ++i)
                         {
@@ -765,9 +766,9 @@ namespace DoFTools
                             {
                               const bool j_non_zero_i = support_on_face (j, face_n);
 
-                              if ((flux_dof_mask(i,j) == always)
+                              if (flux_dof_mask (i,j) == always
                                   ||
-                                  (flux_dof_mask(i,j) == nonzero
+                                  (flux_dof_mask (i,j) == nonzero
                                    &&
                                    i_non_zero_i
                                    &&
@@ -780,19 +781,18 @@ namespace DoFTools
                   else
                     {
                       typename DoFHandlerType::level_cell_iterator
-                      neighbor = cell->neighbor(face_n);
-                      // Refinement edges are taken care of by coarser
-                      // cells
-                      if (cell->neighbor_is_coarser(face_n))
+                      neighbor = cell->neighbor (face_n);
+                      // Refinement edges are taken care of by coarser cells
+                      if (cell->neighbor_is_coarser (face_n))
                         continue;
 
                       const unsigned int
-                      neighbor_face_n = cell->neighbor_of_neighbor(face_n);
+                      neighbor_face_n = cell->neighbor_of_neighbor (face_n);
 
-                      if (cell_face->has_children())
+                      if (cell_face->has_children ())
                         {
                           for (unsigned int sub_nr = 0;
-                               sub_nr != cell_face->n_children();
+                               sub_nr != cell_face->n_children ();
                                ++sub_nr)
                             {
                               const typename DoFHandlerType::level_cell_iterator
@@ -809,7 +809,7 @@ namespace DoFTools
                                       const bool j_non_zero_i = support_on_face (j, face_n);
                                       const bool j_non_zero_e = support_on_face (j, neighbor_face_n);
 
-                                      if (flux_dof_mask(i,j) == always)
+                                      if (flux_dof_mask (i,j) == always)
                                         {
                                           sparsity.add (dofs_on_this_cell[i],
                                                         dofs_on_other_cell[j]);
@@ -820,7 +820,7 @@ namespace DoFTools
                                           sparsity.add (dofs_on_other_cell[i],
                                                         dofs_on_other_cell[j]);
                                         }
-                                      else if (flux_dof_mask(i,j) == nonzero)
+                                      else if (flux_dof_mask (i,j) == nonzero)
                                         {
                                           if (i_non_zero_i && j_non_zero_e)
                                             sparsity.add (dofs_on_this_cell[i],
@@ -836,7 +836,7 @@ namespace DoFTools
                                                           dofs_on_other_cell[j]);
                                         }
 
-                                      if (flux_dof_mask(j,i) == always)
+                                      if (flux_dof_mask (j,i) == always)
                                         {
                                           sparsity.add (dofs_on_this_cell[j],
                                                         dofs_on_other_cell[i]);
@@ -847,7 +847,7 @@ namespace DoFTools
                                           sparsity.add (dofs_on_other_cell[j],
                                                         dofs_on_other_cell[i]);
                                         }
-                                      else if (flux_dof_mask(j,i) == nonzero)
+                                      else if (flux_dof_mask (j,i) == nonzero)
                                         {
                                           if (j_non_zero_i && i_non_zero_e)
                                             sparsity.add (dofs_on_this_cell[j],
@@ -878,7 +878,7 @@ namespace DoFTools
                                 {
                                   const bool j_non_zero_i = support_on_face (j, face_n);
                                   const bool j_non_zero_e = support_on_face (j, neighbor_face_n);
-                                  if (flux_dof_mask(i,j) == always)
+                                  if (flux_dof_mask (i,j) == always)
                                     {
                                       sparsity.add (dofs_on_this_cell[i],
                                                     dofs_on_other_cell[j]);
@@ -889,7 +889,7 @@ namespace DoFTools
                                       sparsity.add (dofs_on_other_cell[i],
                                                     dofs_on_other_cell[j]);
                                     }
-                                  if (flux_dof_mask(i,j) == nonzero)
+                                  if (flux_dof_mask (i,j) == nonzero)
                                     {
                                       if (i_non_zero_i && j_non_zero_e)
                                         sparsity.add (dofs_on_this_cell[i],
@@ -905,7 +905,7 @@ namespace DoFTools
                                                       dofs_on_other_cell[j]);
                                     }
 
-                                  if (flux_dof_mask(j,i) == always)
+                                  if (flux_dof_mask (j,i) == always)
                                     {
                                       sparsity.add (dofs_on_this_cell[j],
                                                     dofs_on_other_cell[i]);
@@ -916,7 +916,7 @@ namespace DoFTools
                                       sparsity.add (dofs_on_other_cell[j],
                                                     dofs_on_other_cell[i]);
                                     }
-                                  if (flux_dof_mask(j,i) == nonzero)
+                                  if (flux_dof_mask (j,i) == nonzero)
                                     {
                                       if (j_non_zero_i && i_non_zero_e)
                                         sparsity.add (dofs_on_this_cell[j],
@@ -933,7 +933,7 @@ namespace DoFTools
                                     }
                                 }
                             }
-                          neighbor->face(neighbor_face_n)->set_user_flag ();
+                          neighbor->face (neighbor_face_n)->set_user_flag ();
                         }
                     }
                 }

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.