From fb843f0247dbe78c2e17dc027b39919497b6e051 Mon Sep 17 00:00:00 2001 From: bangerth Date: Wed, 23 Jan 2008 00:59:54 +0000 Subject: [PATCH] Re-indent. git-svn-id: https://svn.dealii.org/trunk@15644 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/dofs/dof_tools.cc | 428 +++++++++++------------ 1 file changed, 214 insertions(+), 214 deletions(-) diff --git a/deal.II/deal.II/source/dofs/dof_tools.cc b/deal.II/deal.II/source/dofs/dof_tools.cc index 55ae34f1e2..1dce1176d4 100644 --- a/deal.II/deal.II/source/dofs/dof_tools.cc +++ b/deal.II/deal.II/source/dofs/dof_tools.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -189,13 +189,13 @@ DoFTools::make_sparsity_pattern ( const std::list > + typename DH::cell_iterator> > cell_list = GridTools::get_finest_common_cells (dof_row, dof_col); typename std::list > + typename DH::cell_iterator> > ::const_iterator cell_iter = cell_list.begin(); @@ -401,7 +401,7 @@ DoFTools::make_boundary_sparsity_pattern ( for (unsigned int j=0; j void ensure_existence_of_subface_matrix (const FiniteElement &fe1, @@ -1486,20 +1486,20 @@ namespace internal /** - * Copy constraints into a constraint - * matrix object. - * + * Copy constraints into a constraint + * matrix object. + * * This function removes zero * constraints and those, which * constrain a DoF which was * already eliminated in one of * the previous steps of the hp * hanging node procedure. - * - * It also suppresses very small - * entries in the constraint matrix to - * avoid making the sparsity pattern - * fuller than necessary. + * + * It also suppresses very small + * entries in the constraint matrix to + * avoid making the sparsity pattern + * fuller than necessary. */ #ifdef DEAL_II_ANON_NAMESPACE_BUG static @@ -1540,35 +1540,35 @@ namespace internal if (constraint_already_satisfied == false) { - // add up the absolute - // values of all - // constraints in this line - // to get a measure of - // their absolute size - double abs_sum = 0; - for (unsigned int i=0; i= 1e-14*abs_sum)) + && + (std::fabs(face_constraints(row,i)) >= 1e-14*abs_sum)) { #ifdef WOLFGANG std::cout << " " << slave_dofs[row] @@ -1838,7 +1838,7 @@ namespace internal // refined, we can only visit each // face with hanging nodes once typename DH::active_cell_iterator cell = dof_handler.begin_active(), - endc = dof_handler.end(); + endc = dof_handler.end(); for (; cell!=endc; ++cell) for (unsigned int face=0; face::faces_per_cell; ++face) if (cell->face(face)->has_children()) @@ -2530,13 +2530,13 @@ namespace internal ->fe_index_is_active(cell->active_fe_index()) == true, ExcInternalError()); - // Only if there is - // a neighbor with - // a different - // active_fe_index - // and the same h-level, - // some action has - // to be taken. + // Only if there is + // a neighbor with + // a different + // active_fe_index + // and the same h-level, + // some action has + // to be taken. if ((DoFHandlerSupportsDifferentP::value == true) && !cell->face(face)->at_boundary () @@ -2553,159 +2553,159 @@ namespace internal // face we have to // constrain switch (cell->get_fe().compare_for_face_domination (neighbor->get_fe ())) - { - case FiniteElementDomination::this_element_dominates: { - // Get DoFs on - // dominating and - // dominated side of - // the face - master_dofs.resize (cell->get_fe().dofs_per_face); - cell->face(face)->get_dof_indices (master_dofs, - cell->active_fe_index ()); + case FiniteElementDomination::this_element_dominates: + { + // Get DoFs on + // dominating and + // dominated side of + // the face + master_dofs.resize (cell->get_fe().dofs_per_face); + cell->face(face)->get_dof_indices (master_dofs, + cell->active_fe_index ()); - slave_dofs.resize (neighbor->get_fe().dofs_per_face); - cell->face(face)->get_dof_indices (slave_dofs, - neighbor->active_fe_index ()); + slave_dofs.resize (neighbor->get_fe().dofs_per_face); + cell->face(face)->get_dof_indices (slave_dofs, + neighbor->active_fe_index ()); - // make sure - // the element - // constraints - // for this - // face are - // available - ensure_existence_of_face_matrix - (cell->get_fe(), - neighbor->get_fe(), - face_interpolation_matrices - [cell->active_fe_index()][neighbor->active_fe_index()]); - - // Add constraints to global constraint - // matrix. + // make sure + // the element + // constraints + // for this + // face are + // available + ensure_existence_of_face_matrix + (cell->get_fe(), + neighbor->get_fe(), + face_interpolation_matrices + [cell->active_fe_index()][neighbor->active_fe_index()]); + + // Add constraints to global constraint + // matrix. #ifdef WOLFGANG - std::cout << "p-constraints for cell=" << cell - << ", face=" << face << std::endl; + std::cout << "p-constraints for cell=" << cell + << ", face=" << face << std::endl; #endif - filter_constraints (master_dofs, - slave_dofs, - *(face_interpolation_matrices - [cell->active_fe_index()] - [neighbor->active_fe_index()]), - constraints); - - break; - } + filter_constraints (master_dofs, + slave_dofs, + *(face_interpolation_matrices + [cell->active_fe_index()] + [neighbor->active_fe_index()]), + constraints); - case FiniteElementDomination::other_element_dominates: - { - // we don't do anything - // here since we will - // come back to this - // face from the other - // cell, at which time - // we will fall into - // the first case - // clause above - break; - } + break; + } - case FiniteElementDomination::either_element_can_dominate: - { - // it appears as if - // neither element has - // any constraints on - // its neighbor. this - // may be because - // neither element has - // any DoFs on faces at - // all. or that the two - // elements are - // actually the same, - // although they happen - // to run under - // different fe_indices - // (this is what - // happens in - // hp/hp_hanging_nodes_01 - // for example). - // - // another possibility - // is what happens in - // crash_13. there, we - // have - // FESystem(FE_Q(1),FE_DGQ(0)) - // vs. FESystem(FE_Q(1),FE_DGQ(1)). - // neither of them - // dominates the - // other. the point is - // that it doesn't - // matter, since - // hopefully for this - // case, both sides' - // dofs should have - // been unified. - // - // make sure this is - // actually true. this - // actually only - // matters, of course, - // if either of the two - // finite elements - // actually do have - // dofs on the face - if ((cell->get_fe().dofs_per_face != 0) - || - (cell->neighbor(face)->get_fe().dofs_per_face != 0)) - { - Assert (cell->get_fe().dofs_per_face - == - cell->neighbor(face)->get_fe().dofs_per_face, - ExcNotImplemented()); - - // (ab)use the master - // and slave dofs - // arrays for a - // moment here - master_dofs.resize (cell->get_fe().dofs_per_face); - cell->face(face) - ->get_dof_indices (master_dofs, - cell->active_fe_index ()); - - slave_dofs.resize (cell->neighbor(face)->get_fe().dofs_per_face); - cell->face(face) - ->get_dof_indices (slave_dofs, - cell->neighbor(face)->active_fe_index ()); - - for (unsigned int i=0; iget_fe().dofs_per_face; ++i) - Assert (master_dofs[i] == slave_dofs[i], - ExcInternalError()); - } + case FiniteElementDomination::other_element_dominates: + { + // we don't do anything + // here since we will + // come back to this + // face from the other + // cell, at which time + // we will fall into + // the first case + // clause above + break; + } + + case FiniteElementDomination::either_element_can_dominate: + { + // it appears as if + // neither element has + // any constraints on + // its neighbor. this + // may be because + // neither element has + // any DoFs on faces at + // all. or that the two + // elements are + // actually the same, + // although they happen + // to run under + // different fe_indices + // (this is what + // happens in + // hp/hp_hanging_nodes_01 + // for example). + // + // another possibility + // is what happens in + // crash_13. there, we + // have + // FESystem(FE_Q(1),FE_DGQ(0)) + // vs. FESystem(FE_Q(1),FE_DGQ(1)). + // neither of them + // dominates the + // other. the point is + // that it doesn't + // matter, since + // hopefully for this + // case, both sides' + // dofs should have + // been unified. + // + // make sure this is + // actually true. this + // actually only + // matters, of course, + // if either of the two + // finite elements + // actually do have + // dofs on the face + if ((cell->get_fe().dofs_per_face != 0) + || + (cell->neighbor(face)->get_fe().dofs_per_face != 0)) + { + Assert (cell->get_fe().dofs_per_face + == + cell->neighbor(face)->get_fe().dofs_per_face, + ExcNotImplemented()); + + // (ab)use the master + // and slave dofs + // arrays for a + // moment here + master_dofs.resize (cell->get_fe().dofs_per_face); + cell->face(face) + ->get_dof_indices (master_dofs, + cell->active_fe_index ()); + + slave_dofs.resize (cell->neighbor(face)->get_fe().dofs_per_face); + cell->face(face) + ->get_dof_indices (slave_dofs, + cell->neighbor(face)->active_fe_index ()); + + for (unsigned int i=0; iget_fe().dofs_per_face; ++i) + Assert (master_dofs[i] == slave_dofs[i], + ExcInternalError()); + } - break; - } + break; + } - case FiniteElementDomination::neither_element_dominates: - { - // we don't presently - // know what exactly to - // do here. it isn't quite - // clear what exactly we - // would have to do - // here. sit tight until - // someone trips over the - // following statement - // and see what exactly - // is going on - Assert (false, ExcNotImplemented()); - break; - } + case FiniteElementDomination::neither_element_dominates: + { + // we don't presently + // know what exactly to + // do here. it isn't quite + // clear what exactly we + // would have to do + // here. sit tight until + // someone trips over the + // following statement + // and see what exactly + // is going on + Assert (false, ExcNotImplemented()); + break; + } - default: - // we shouldn't get - // here - Assert (false, ExcInternalError()); - } + default: + // we shouldn't get + // here + Assert (false, ExcInternalError()); + } } } } @@ -3059,7 +3059,7 @@ DoFTools::extract_dofs ( for (unsigned int i=0; ineighbor(0) == dof_handler.end()) { - // In 1D the number of DoFs - // on the faces should be - // equal to the number of DoFs - // on the vertices. + // In 1D the number of DoFs + // on the faces should be + // equal to the number of DoFs + // on the vertices. Assert (fe.dofs_per_face == fe.dofs_per_vertex, ExcInternalError()); @@ -3392,9 +3392,9 @@ DoFTools::extract_boundary_dofs (const DH &dof_handler, } } - // check right-most - // vertex. same procedure here - // as above + // check right-most + // vertex. same procedure here + // as above if (check_right_vertex) if (cell->neighbor(1) == dof_handler.end()) { @@ -3761,10 +3761,10 @@ DoFTools::count_dofs_per_component ( for (unsigned int dd=0;dd::faces_per_cell; ++f) if (boundary_indicators.find (cell->face(f)->boundary_indicator()) != boundary_indicators.end()) - { - const unsigned int dofs_per_face = cell->get_fe().dofs_per_face; - dofs_on_face.resize (dofs_per_face); - cell->face(f)->get_dof_indices (dofs_on_face, cell->active_fe_index()); - for (unsigned int i=0; iget_fe().dofs_per_face; + dofs_on_face.resize (dofs_per_face); + cell->face(f)->get_dof_indices (dofs_on_face, cell->active_fe_index()); + for (unsigned int i=0; i