From: heister Date: Mon, 3 Dec 2012 19:44:54 +0000 (+0000) Subject: make indent X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8748dbbd7a1075d871366bff12c2821d16edcd31;p=dealii-svn.git make indent git-svn-id: https://svn.dealii.org/trunk@27737 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-46/step-46.cc b/deal.II/examples/step-46/step-46.cc index 1c27847ed9..a3bd49cc21 100644 --- a/deal.II/examples/step-46/step-46.cc +++ b/deal.II/examples/step-46/step-46.cc @@ -684,8 +684,8 @@ namespace Step46 // // - The neighbor is at the same refinement level and has no // children. - // - The neighbor has children. - // - The neighbor is coarser. + // - The neighbor has children. + // - The neighbor is coarser. // // In all three cases, we are only interested in it if it is // part of the fluid subdomain. So let us start with the first diff --git a/deal.II/examples/step-6/step-6.cc b/deal.II/examples/step-6/step-6.cc index b62734b212..068fe9a410 100644 --- a/deal.II/examples/step-6/step-6.cc +++ b/deal.II/examples/step-6/step-6.cc @@ -430,9 +430,9 @@ void Step6::assemble_system () // @p cell_rhs into the global objects. cell->get_dof_indices (local_dof_indices); constraints.distribute_local_to_global(cell_matrix, - cell_rhs, - local_dof_indices, - system_matrix, system_rhs); + cell_rhs, + local_dof_indices, + system_matrix, system_rhs); } // Now we are done assembling the linear system. The constrained nodes are // still in the linear system (there is a one on the diagonal of the matrix diff --git a/deal.II/include/deal.II/grid/tria_objects.h b/deal.II/include/deal.II/grid/tria_objects.h index d4f57aad4b..a0cf6f1a85 100644 --- a/deal.II/include/deal.II/grid/tria_objects.h +++ b/deal.II/include/deal.II/grid/tria_objects.h @@ -319,7 +319,7 @@ namespace internal /** * Access to user pointers. */ - void * &user_pointer(const unsigned int i); + void *&user_pointer(const unsigned int i); /** * Read-only access to user pointers. @@ -763,7 +763,7 @@ namespace internal template inline - void * & + void*& TriaObjects::user_pointer (const unsigned int i) { #ifdef DEBUG diff --git a/deal.II/include/deal.II/lac/relaxation_block.h b/deal.II/include/deal.II/lac/relaxation_block.h index 54e57fe500..6a2d94fc25 100644 --- a/deal.II/include/deal.II/lac/relaxation_block.h +++ b/deal.II/include/deal.II/lac/relaxation_block.h @@ -310,7 +310,7 @@ public: /** * Return the memory allocated in this object. */ - std::size_t memory_consumption() const; + std::size_t memory_consumption() const; }; diff --git a/deal.II/include/deal.II/lac/relaxation_block.templates.h b/deal.II/include/deal.II/lac/relaxation_block.templates.h index d4ae73c14d..f0fa8b5e90 100644 --- a/deal.II/include/deal.II/lac/relaxation_block.templates.h +++ b/deal.II/include/deal.II/lac/relaxation_block.templates.h @@ -39,8 +39,8 @@ std::size_t RelaxationBlock::AdditionalData::memory_consumption() const { std::size_t result = sizeof(*this) - + - sizeof(block_list) + block_list.memory_consumption(); - for (unsigned int i=0;i::abs_square(*X++); } @@ -518,7 +518,7 @@ namespace internal struct Norm1 { RealType - operator() (const Number *&X, const Number * &, const RealType &) const + operator() (const Number *&X, const Number *&, const RealType &) const { return numbers::NumberTraits::abs(*X++); } @@ -528,7 +528,7 @@ namespace internal struct NormP { RealType - operator() (const Number *&X, const Number * &, const RealType &p) const + operator() (const Number *&X, const Number *&, const RealType &p) const { return std::pow(numbers::NumberTraits::abs(*X++), p); } @@ -538,7 +538,7 @@ namespace internal struct MeanValue { Number - operator() (const Number *&X, const Number * &, const Number &) const + operator() (const Number *&X, const Number *&, const Number &) const { return *X++; } diff --git a/deal.II/include/deal.II/numerics/vector_tools.templates.h b/deal.II/include/deal.II/numerics/vector_tools.templates.h index 6936970500..a96dfb3a24 100644 --- a/deal.II/include/deal.II/numerics/vector_tools.templates.h +++ b/deal.II/include/deal.II/numerics/vector_tools.templates.h @@ -77,14 +77,14 @@ namespace VectorTools template void perform_compress_insert (::dealii::parallel::distributed::Vector &vec) { - // should not do compress when inserting - // elements as the ghosts are fixed and some - // will not be set at all. Instead, zero the - // ghost data afterwards to get consistent - // data. Otherwise, at least with the layout - // in r27671 the tests/mpi/step-48/ncpu_10 - // will signal incorrect results because of - // incorrect interpolation. + // should not do compress when inserting + // elements as the ghosts are fixed and some + // will not be set at all. Instead, zero the + // ghost data afterwards to get consistent + // data. Otherwise, at least with the layout + // in r27671 the tests/mpi/step-48/ncpu_10 + // will signal incorrect results because of + // incorrect interpolation. vec.zero_out_ghosts(); } diff --git a/deal.II/source/dofs/dof_handler_policy.cc b/deal.II/source/dofs/dof_handler_policy.cc index 8d6aa68f8f..16593216c2 100644 --- a/deal.II/source/dofs/dof_handler_policy.cc +++ b/deal.II/source/dofs/dof_handler_policy.cc @@ -247,8 +247,8 @@ namespace internal (cell->subdomain_id() == subdomain_id)) next_free_dof = Implementation::distribute_dofs_on_cell (dof_handler, - cell, - next_free_dof); + cell, + next_free_dof); // update the cache used for cell dof indices for (typename DoFHandler::cell_iterator diff --git a/deal.II/source/dofs/dof_tools.cc b/deal.II/source/dofs/dof_tools.cc index 874a78c99d..aecaa3dd48 100644 --- a/deal.II/source/dofs/dof_tools.cc +++ b/deal.II/source/dofs/dof_tools.cc @@ -3304,16 +3304,16 @@ namespace DoFTools static const int dim = FaceIterator::AccessorType::dimension; Assert( (dim != 1) || - (face_orientation == true && - face_flip == false && - face_rotation == false), + (face_orientation == true && + face_flip == false && + face_rotation == false), ExcMessage ("The supplied orientation " "(face_orientation, face_flip, face_rotation) " "is invalid for 1D")); Assert( (dim != 2) || - (face_orientation == true && - face_rotation == false), + (face_orientation == true && + face_rotation == false), ExcMessage ("The supplied orientation " "(face_orientation, face_flip, face_rotation) " "is invalid for 2D")); @@ -3332,20 +3332,26 @@ namespace DoFTools static const int lookup_table_2d[2][2] // flip = { {0, 1}, // false - {1, 0}, // true - }; + {1, 0}, // true + }; static const int lookup_table_3d[2][2][2][4] // orientation flip rotation = { { { {0, 2, 1, 3}, // false false false - {2, 3, 0, 1}, }, // false false true - { {3, 1, 2, 0}, // false true false - {1, 0, 3, 2}, }, }, // false true true - { { {0, 1, 2, 3}, // true false false - {1, 3, 0, 2}, }, // true false true - { {3, 2, 1, 0}, // true true false - {2, 0, 3, 1}, }, }, // true true true - }; + {2, 3, 0, 1}, + }, // false false true + { {3, 1, 2, 0}, // false true false + {1, 0, 3, 2}, + }, + }, // false true true + { { {0, 1, 2, 3}, // true false false + {1, 3, 0, 2}, + }, // true false true + { {3, 2, 1, 0}, // true true false + {2, 0, 3, 1}, + }, + }, // true true true + }; // In the case that both faces have children, we loop over all // children and apply make_periodicty_constrains recursively: @@ -3359,16 +3365,16 @@ namespace DoFTools { // Lookup the index for the second face unsigned int j; - switch(dim) + switch (dim) { - case 2: - j = lookup_table_2d[face_flip][i]; - break; - case 3: - j = lookup_table_3d[face_orientation][face_flip][face_rotation][i]; - break; - default: - AssertThrow(false, ExcNotImplemented()); + case 2: + j = lookup_table_2d[face_flip][i]; + break; + case 3: + j = lookup_table_3d[face_orientation][face_flip][face_rotation][i]; + break; + default: + AssertThrow(false, ExcNotImplemented()); } make_periodicity_constraints (face_1->child(i), @@ -3433,11 +3439,11 @@ namespace DoFTools for (unsigned int i = 0; i < dofs_per_face; ++i) { const unsigned int cell_index = fe. - face_to_cell_index(i, - 0, // It doesn't really matter, just assume - // we're on the first face... - true, false, false // default orientation - ); + face_to_cell_index(i, + 0, // It doesn't really matter, just assume + // we're on the first face... + true, false, false // default orientation + ); cell_to_rotated_face_index[cell_index] = i; } @@ -3447,12 +3453,12 @@ namespace DoFTools // orientation: const unsigned int j = cell_to_rotated_face_index[fe. - face_to_cell_index(i, - 0, // It doesn't really matter, just assume - // we're on the first face... - face_orientation, - face_flip, - face_rotation)]; + face_to_cell_index(i, + 0, // It doesn't really matter, just assume + // we're on the first face... + face_orientation, + face_flip, + face_rotation)]; // And finally constrain the two DoFs respecting component_mask: if ((component_mask.n_selected_components(fe.n_components()) == fe.n_components()) diff --git a/deal.II/source/fe/fe_face.cc b/deal.II/source/fe/fe_face.cc index be980ad419..85812d966c 100644 --- a/deal.II/source/fe/fe_face.cc +++ b/deal.II/source/fe/fe_face.cc @@ -36,7 +36,7 @@ FE_FaceQ::FE_FaceQ (const unsigned int degree) { const double step = 1./this->degree; Point p; - + unsigned int k=0; for (unsigned int iz=0; iz <= ((codim>2) ? this->degree : 0) ; ++iz) for (unsigned int iy=0; iy <= ((codim>1) ? this->degree : 0) ; ++iy) @@ -47,7 +47,7 @@ FE_FaceQ::FE_FaceQ (const unsigned int degree) p(1) = iy * step; if (codim>2) p(2) = iz * step; - + this->unit_face_support_points[k++] = p; } AssertDimension (k, this->unit_face_support_points.size()); diff --git a/deal.II/source/grid/grid_tools.cc b/deal.II/source/grid/grid_tools.cc index 1e4516091b..0933ec500f 100644 --- a/deal.II/source/grid/grid_tools.cc +++ b/deal.II/source/grid/grid_tools.cc @@ -2499,10 +2499,10 @@ next_cell: FaceMap matching = match_periodic_face_pairs(faces1, faces2, direction, offset); std::map - return_value; + return_value; - for(typename FaceMap::iterator pairing = matching.begin(); - pairing != matching.end(); ++pairing) + for (typename FaceMap::iterator pairing = matching.begin(); + pairing != matching.end(); ++pairing) { Assert(pairing->second.second == 1, ExcMessage("Found a face match with non standard orientation. " diff --git a/deal.II/source/lac/trilinos_sparse_matrix.cc b/deal.II/source/lac/trilinos_sparse_matrix.cc index d475a648eb..a3d05064c9 100644 --- a/deal.II/source/lac/trilinos_sparse_matrix.cc +++ b/deal.II/source/lac/trilinos_sparse_matrix.cc @@ -771,7 +771,7 @@ set_matrix_values: // Extract local indices in // the matrix. int trilinos_i = matrix->LRID(static_cast(i)), - trilinos_j = matrix->LCID(static_cast(j)); + trilinos_j = matrix->LCID(static_cast(j)); TrilinosScalar value = 0.; // If the data is not on the