From 90929c9f06994b1527dc4385d7d0d1957d333681 Mon Sep 17 00:00:00 2001 From: David Wells <wellsd2@rpi.edu> Date: Wed, 2 Mar 2016 08:51:42 -0500 Subject: [PATCH] Improve spacing and indentation. --- source/dofs/dof_tools_sparsity.cc | 62 +++++++++++++++---------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/source/dofs/dof_tools_sparsity.cc b/source/dofs/dof_tools_sparsity.cc index 66c701034b..a2d927315d 100644 --- a/source/dofs/dof_tools_sparsity.cc +++ b/source/dofs/dof_tools_sparsity.cc @@ -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 (); } } } -- 2.39.5