From: Wolfgang Bangerth Date: Tue, 15 May 2018 11:05:39 +0000 (+0800) Subject: Make some formatting more consistent. X-Git-Tag: v9.1.0-rc1~1141^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8019a427a2cb4f5d7aabc985cc36d56f497ac097;p=dealii.git Make some formatting more consistent. --- diff --git a/include/deal.II/base/patterns.h b/include/deal.II/base/patterns.h index d6e03cea57..5e7063b81b 100644 --- a/include/deal.II/base/patterns.h +++ b/include/deal.II/base/patterns.h @@ -1492,8 +1492,8 @@ namespace Patterns namespace internal { - const std::array default_list_separator {{"," , ";" , "|" , "%"}}; - const std::array default_map_separator {{":" , "=" , "@" , "#"}}; + const std::array default_list_separator {{",", ";", "|", "%"}}; + const std::array default_map_separator {{":", "=", "@", "#"}}; //specialize a type for all of the STL containers and maps template struct is_list_compatible : std::false_type {}; diff --git a/include/deal.II/base/table.h b/include/deal.II/base/table.h index 85f1a38bef..7e423dd41d 100644 --- a/include/deal.II/base/table.h +++ b/include/deal.II/base/table.h @@ -1633,7 +1633,7 @@ namespace TransposeTableIterators * Move assignment operator. This assigns a new value to the table entry at the * current row and column coordinates. */ - const Accessor &operator = (T&&) const; + const Accessor &operator = (T &&) const; /** * Since we overload value() we have to explicitly use the base class diff --git a/include/deal.II/differentiation/ad/ad_number_traits.h b/include/deal.II/differentiation/ad/ad_number_traits.h index 302923c741..467850f99d 100644 --- a/include/deal.II/differentiation/ad/ad_number_traits.h +++ b/include/deal.II/differentiation/ad/ad_number_traits.h @@ -351,8 +351,8 @@ namespace Differentiation template static void independent_variable(const ScalarType &in, - const unsigned int , - const unsigned int , + const unsigned int, + const unsigned int, ADNumberType &out) { out = in; @@ -386,8 +386,8 @@ namespace Differentiation template static void independent_variable(const ScalarType &in, - const unsigned int , - const unsigned int , + const unsigned int, + const unsigned int, ADNumberType &out) { AssertThrow(false, ExcMessage("Marking for complex numbers has not yet been implemented.")); diff --git a/include/deal.II/differentiation/ad/adolc_number_types.h b/include/deal.II/differentiation/ad/adolc_number_types.h index 73779a7149..33b2f397d3 100644 --- a/include/deal.II/differentiation/ad/adolc_number_types.h +++ b/include/deal.II/differentiation/ad/adolc_number_types.h @@ -161,8 +161,8 @@ namespace Differentiation */ static void independent_variable(const scalar_type &in, - const unsigned int , - const unsigned int , + const unsigned int, + const unsigned int, ADNumberType &out) { out <<= in; @@ -200,7 +200,7 @@ namespace Differentiation static void independent_variable(const scalar_type &in, const unsigned int index, - const unsigned int , + const unsigned int, ADNumberType &out) { // It is important that the tapeless variables have their values set diff --git a/include/deal.II/differentiation/ad/adolc_product_types.h b/include/deal.II/differentiation/ad/adolc_product_types.h index 4f5a343af2..c47d972593 100644 --- a/include/deal.II/differentiation/ad/adolc_product_types.h +++ b/include/deal.II/differentiation/ad/adolc_product_types.h @@ -110,7 +110,7 @@ namespace internal /* --- Complex double --- */ template <> - struct ProductTypeImpl ,std::complex > + struct ProductTypeImpl,std::complex > { typedef std::complex type; }; @@ -128,7 +128,7 @@ namespace internal }; template <> - struct ProductTypeImpl ,std::complex > + struct ProductTypeImpl,std::complex > { typedef std::complex type; }; @@ -142,7 +142,7 @@ namespace internal /* --- Complex float --- */ template <> - struct ProductTypeImpl ,std::complex > + struct ProductTypeImpl,std::complex > { typedef std::complex type; }; diff --git a/include/deal.II/matrix_free/evaluation_kernels.h b/include/deal.II/matrix_free/evaluation_kernels.h index 2090672dbb..cca81827a3 100644 --- a/include/deal.II/matrix_free/evaluation_kernels.h +++ b/include/deal.II/matrix_free/evaluation_kernels.h @@ -1010,7 +1010,7 @@ namespace internal Number *gradients_quad, Number *hessians_quad, Number *, - const bool , + const bool, const bool evaluate_gradients, const bool evaluate_hessians) { diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index dac475894d..0786ccd5c8 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -4022,7 +4022,7 @@ FEEvaluationBase *src[comp], values_dofs[comp], vector_selector); else - operation.process_dofs_vectorized_transpose(data->dofs_per_component_on_cell* + operation.process_dofs_vectorized_transpose(data->dofs_per_component_on_cell * n_components, dof_indices, *src[0], &values_dofs[0][0], diff --git a/include/deal.II/matrix_free/mapping_info.templates.h b/include/deal.II/matrix_free/mapping_info.templates.h index e27f3730ed..91329cce05 100644 --- a/include/deal.II/matrix_free/mapping_info.templates.h +++ b/include/deal.II/matrix_free/mapping_info.templates.h @@ -1740,7 +1740,7 @@ namespace internal if (update_flags & update_quadrature_points) face_data_by_cells[my_q].quadrature_points. - resize_fast(cell_type.size()*GeometryInfo::faces_per_cell* + resize_fast(cell_type.size()*GeometryInfo::faces_per_cell * face_data_by_cells[my_q].descriptor[0].n_q_points); } diff --git a/include/deal.II/matrix_free/matrix_free.h b/include/deal.II/matrix_free/matrix_free.h index f1799b534f..dc8ce0b827 100644 --- a/include/deal.II/matrix_free/matrix_free.h +++ b/include/deal.II/matrix_free/matrix_free.h @@ -2880,7 +2880,7 @@ namespace internal template void update_ghost_values_start_block (const VectorStruct &, - const unsigned int , + const unsigned int, std::integral_constant, VectorDataExchange &) {} @@ -2891,19 +2891,19 @@ namespace internal {} template void update_ghost_values_finish_block (const VectorStruct &, - const unsigned int , + const unsigned int, std::integral_constant, VectorDataExchange &) {} template void compress_start_block (const VectorStruct &, - const unsigned int , + const unsigned int, std::integral_constant, VectorDataExchange &) {} template void compress_finish_block (const VectorStruct &, - const unsigned int , + const unsigned int, std::integral_constant, VectorDataExchange &) {} diff --git a/include/deal.II/matrix_free/matrix_free.templates.h b/include/deal.II/matrix_free/matrix_free.templates.h index 7bda30fd67..5a53486862 100644 --- a/include/deal.II/matrix_free/matrix_free.templates.h +++ b/include/deal.II/matrix_free/matrix_free.templates.h @@ -1331,7 +1331,7 @@ void MatrixFree::initialize_indices face_info.faces[f].cells_interior[v] != numbers::invalid_unsigned_int; ++v) { AssertIndexRange(face_info.faces[f].cells_interior[v], - n_macro_cells_before* + n_macro_cells_before * VectorizedArray::n_array_elements); if (dof_info[no].index_storage_variants[internal::MatrixFreeFunctions::DoFInfo::dof_access_face_exterior][f] >= internal::MatrixFreeFunctions::DoFInfo::IndexStorageVariants::contiguous diff --git a/include/deal.II/matrix_free/shape_info.templates.h b/include/deal.II/matrix_free/shape_info.templates.h index 56d1bc3cb3..60913fff8b 100644 --- a/include/deal.II/matrix_free/shape_info.templates.h +++ b/include/deal.II/matrix_free/shape_info.templates.h @@ -385,7 +385,7 @@ namespace internal for (unsigned int j=0; j - std::max(zero_tol, zero_tol* + std::max(zero_tol, zero_tol * std::abs(get_first_array_element(shape_values[i*n_q_points_1d+j])))) return false; diff --git a/include/deal.II/numerics/kdtree.h b/include/deal.II/numerics/kdtree.h index 988b2fb533..96267a67b8 100644 --- a/include/deal.II/numerics/kdtree.h +++ b/include/deal.II/numerics/kdtree.h @@ -157,7 +157,7 @@ public: * A typedef for the actual KDTree object. */ typedef - typename nanoflann::KDTreeSingleIndexAdaptor , + typename nanoflann::KDTreeSingleIndexAdaptor, PointCloudAdaptor, dim, unsigned int> NanoFlannKDTree; diff --git a/source/fe/fe_face.cc b/source/fe/fe_face.cc index c76fe501ac..35dafb80f2 100644 --- a/source/fe/fe_face.cc +++ b/source/fe/fe_face.cc @@ -84,7 +84,7 @@ FE_FaceQ::FE_FaceQ (const unsigned int degree) // initialize unit support points (this makes it possible to assign initial // values to FE_FaceQ) - this->unit_support_points.resize(GeometryInfo::faces_per_cell* + this->unit_support_points.resize(GeometryInfo::faces_per_cell * this->unit_face_support_points.size()); const unsigned int n_face_dofs = this->unit_face_support_points.size(); for (unsigned int i=0; i &p, const std::vector::active_cell_iterator > > &vertex_to_cells, const std::vector > > &vertex_to_cell_centers, - const typename MeshType::active_cell_iterator &cell_hint , + const typename MeshType::active_cell_iterator &cell_hint, const std::vector &marked_vertices) { std::pair::active_cell_iterator, Point > cell_and_position; @@ -1631,7 +1631,7 @@ next_cell: // invalid cell, then query for the closest global vertex if (current_cell.state() == IteratorState::valid) { - const unsigned int closest_vertex = find_closest_vertex_of_cell(current_cell , p); + const unsigned int closest_vertex = find_closest_vertex_of_cell(current_cell, p); vertex_to_point = p - current_cell ->vertex(closest_vertex); closest_vertex_index = current_cell ->vertex_index(closest_vertex); } @@ -4404,7 +4404,7 @@ next_cell: const auto &other_owned_idx = std::get<1>(guessed_points); std::map< unsigned int, - std::pair< std::vector> , std::vector > > + std::pair< std::vector>, std::vector > > other_owned_pts; for (const auto &indices: other_owned_idx) diff --git a/source/lac/sparsity_tools.cc b/source/lac/sparsity_tools.cc index 5bba13cd76..084e548dd5 100644 --- a/source/lac/sparsity_tools.cc +++ b/source/lac/sparsity_tools.cc @@ -173,8 +173,8 @@ namespace SparsityTools SparsityPattern *graph = reinterpret_cast(data); *ierr = ZOLTAN_OK; - Assert( globalID != nullptr , ExcInternalError() ); - Assert( localID != nullptr , ExcInternalError() ); + Assert( globalID != nullptr, ExcInternalError() ); + Assert( localID != nullptr, ExcInternalError() ); //set global degrees of freedom auto n_dofs = graph->n_rows(); @@ -196,7 +196,7 @@ namespace SparsityTools *ierr = ZOLTAN_OK; - Assert ( numEdges != nullptr , ExcInternalError() ); + Assert ( numEdges != nullptr, ExcInternalError() ); for (int i=0; icolumn() ) { - Assert( nextNborGID != nullptr , ExcInternalError() ); - Assert( nextNborProc != nullptr , ExcInternalError() ); + Assert( nextNborGID != nullptr, ExcInternalError() ); + Assert( nextNborProc != nullptr, ExcInternalError() ); *nextNborGID++ = col->column(); *nextNborProc++ = 0; //All the vertices on processor 0 @@ -326,7 +326,7 @@ namespace SparsityTools (void)rc; //check for error code in partitioner - Assert( rc == ZOLTAN_OK , ExcInternalError() ); + Assert( rc == ZOLTAN_OK, ExcInternalError() ); //By default, all indices belong to part 0. After zoltan partition //some are migrated to different part ID, which is stored in export_to_part array. @@ -440,7 +440,7 @@ namespace SparsityTools (void) rc; //Check for error code - Assert (rc == ZOLTAN_OK , + Assert (rc == ZOLTAN_OK, ExcInternalError()); //Allocate and assign color indices diff --git a/source/matrix_free/task_info.cc b/source/matrix_free/task_info.cc index 1abe3874a6..8169b59a58 100644 --- a/source/matrix_free/task_info.cc +++ b/source/matrix_free/task_info.cc @@ -145,7 +145,7 @@ namespace internal tbb::task *execute () override { - tbb::empty_task *root = new( tbb::task::allocate_root() )tbb::empty_task; + tbb::empty_task *root = new ( tbb::task::allocate_root() )tbb::empty_task; const unsigned int evens = task_info.partition_evens[partition]; const unsigned int odds = task_info.partition_odds[partition]; const unsigned int n_blocked_workers = @@ -157,14 +157,14 @@ namespace internal root->set_ref_count(evens+1); for (unsigned int j=0; jallocate_child()) + worker[j] = new (root->allocate_child()) CellWork(function, task_info. partition_row_index[partition]+2*j, task_info, false); if (j>0) { worker[j]->set_ref_count(2); - blocked_worker[j-1]->dummy = new(worker[j]->allocate_child()) + blocked_worker[j-1]->dummy = new (worker[j]->allocate_child()) tbb::empty_task; worker[j-1]->spawn(*blocked_worker[j-1]); } @@ -172,7 +172,7 @@ namespace internal worker[j]->set_ref_count(1); if (jallocate_child()) + blocked_worker[j] = new (worker[j]->allocate_child()) CellWork(function, task_info. partition_row_index [partition] + 2*j+1, task_info, true); @@ -181,7 +181,7 @@ namespace internal { if (odds==evens) { - worker[evens] = new(worker[j]->allocate_child()) + worker[evens] = new (worker[j]->allocate_child()) CellWork(function, task_info. partition_row_index[partition]+2*j+1, task_info, false); @@ -189,7 +189,7 @@ namespace internal } else { - tbb::empty_task *child = new(worker[j]->allocate_child()) + tbb::empty_task *child = new (worker[j]->allocate_child()) tbb::empty_task(); worker[j]->spawn(*child); } @@ -332,23 +332,23 @@ namespace internal funct.zero_dst_vector_range(numbers::invalid_unsigned_int); if (scheme == partition_partition) { - tbb::empty_task *root = new( tbb::task::allocate_root() ) + tbb::empty_task *root = new ( tbb::task::allocate_root() ) tbb::empty_task; root->set_ref_count(evens+1); std::vector worker(n_workers); std::vector blocked_worker(n_blocked_workers); MPICommunication *worker_compr = - new(root->allocate_child())MPICommunication(funct, true); + new (root->allocate_child())MPICommunication(funct, true); worker_compr->set_ref_count(1); for (unsigned int j=0; j0) { - worker[j] = new(root->allocate_child()) + worker[j] = new (root->allocate_child()) partition::PartitionWork (funct,2*j,*this,false); worker[j]->set_ref_count(2); - blocked_worker[j-1]->dummy = new(worker[j]->allocate_child()) + blocked_worker[j-1]->dummy = new (worker[j]->allocate_child()) tbb::empty_task; if (j>1) worker[j-1]->spawn(*blocked_worker[j-1]); @@ -357,7 +357,7 @@ namespace internal } else { - worker[j] = new(worker_compr->allocate_child()) + worker[j] = new (worker_compr->allocate_child()) partition::PartitionWork (funct,2*j,*this,false); worker[j]->set_ref_count(2); MPICommunication *worker_dist = @@ -366,20 +366,20 @@ namespace internal } if (jallocate_child()) + blocked_worker[j] = new (worker[j]->allocate_child()) partition::PartitionWork(funct,2*j+1,*this,true); } else { if (odds==evens) { - worker[evens] = new(worker[j]->allocate_child()) + worker[evens] = new (worker[j]->allocate_child()) partition::PartitionWork(funct,2*j+1,*this,false); worker[j]->spawn(*worker[evens]); } else { - tbb::empty_task *child = new(worker[j]->allocate_child()) + tbb::empty_task *child = new (worker[j]->allocate_child()) tbb::empty_task(); worker[j]->spawn(*child); } @@ -395,7 +395,7 @@ namespace internal // tree of partitions if (odds > 0) { - tbb::empty_task *root = new( tbb::task::allocate_root() ) tbb::empty_task; + tbb::empty_task *root = new ( tbb::task::allocate_root() ) tbb::empty_task; root->set_ref_count(evens+1); const unsigned int n_blocked_workers = odds-(odds+evens+1)%2; const unsigned int n_workers = cell_partition_data.size()-1- @@ -412,10 +412,10 @@ namespace internal { const unsigned int spawn_index_new = worker_index; if (part == 0) - worker[worker_index] = new(worker_compr->allocate_child()) + worker[worker_index] = new (worker_compr->allocate_child()) color::PartitionWork(funct,slice_index,*this,false); else - worker[worker_index] = new(root->allocate_child()) + worker[worker_index] = new (root->allocate_child()) color::PartitionWork(funct,slice_index,*this,false); slice_index++; for (; slice_indexallocate_child()) + blocked_worker[part/2] = new (worker[worker_index-1]->allocate_child()) color::PartitionWork(funct,slice_index,*this,true); slice_index++; if (slice_indexset_ref_count(1); - worker[worker_index] = new(blocked_worker[part/2]->allocate_child()) + worker[worker_index] = new (blocked_worker[part/2]->allocate_child()) color::PartitionWork(funct,slice_index,*this,false); slice_index++; } @@ -508,7 +508,7 @@ namespace internal for (unsigned int color=0; color < partition_row_index[1]; ++color) { - tbb::empty_task *root = new( tbb::task::allocate_root() ) tbb::empty_task; + tbb::empty_task *root = new ( tbb::task::allocate_root() ) tbb::empty_task; root->set_ref_count(2); color::PartitionWork *worker = new (root->allocate_child())color::PartitionWork(funct,color,*this,false); diff --git a/source/multigrid/mg_transfer_matrix_free.cc b/source/multigrid/mg_transfer_matrix_free.cc index 5977fdd783..97bc0016bb 100644 --- a/source/multigrid/mg_transfer_matrix_free.cc +++ b/source/multigrid/mg_transfer_matrix_free.cc @@ -452,7 +452,7 @@ void MGTransferMatrixFree const unsigned int shift = internal::MGTransfer::compute_shift_within_children (parent_child_connect[from_level-1][cell+v].second, fe_degree+1-element_is_continuous, fe_degree); - AssertIndexRange(parent_child_connect[from_level-1][cell+v].first* + AssertIndexRange(parent_child_connect[from_level-1][cell+v].first * n_child_cell_dofs+n_child_cell_dofs-1, level_dof_indices[from_level-1].size()); const unsigned int *indices = &level_dof_indices[from_level-1][parent_child_connect[from_level-1][cell+v].first*n_child_cell_dofs+shift]; diff --git a/source/sundials/kinsol.cc b/source/sundials/kinsol.cc index 5661507f0d..2bbc6563b4 100644 --- a/source/sundials/kinsol.cc +++ b/source/sundials/kinsol.cc @@ -230,7 +230,7 @@ namespace SUNDIALS kinsol_mem = KINCreate(); - int status = KINInit(kinsol_mem, t_kinsol_function , solution); + int status = KINInit(kinsol_mem, t_kinsol_function, solution); (void) status; AssertKINSOL(status); diff --git a/tests/lapack/full_matrix_27.cc b/tests/lapack/full_matrix_27.cc index 64e62d469b..bacb977f44 100644 --- a/tests/lapack/full_matrix_27.cc +++ b/tests/lapack/full_matrix_27.cc @@ -56,7 +56,7 @@ test(const unsigned int size) for (unsigned int j = 0; j < size; ++j) { const NumberType diff = A(i,j) + a * v(i) * v(j) - B(i,j); - AssertThrow(std::abs(diff) < 1e-10 * std::abs(B(i,j)) , + AssertThrow(std::abs(diff) < 1e-10 * std::abs(B(i,j)), ExcMessage("diff="+ std::to_string(diff))); } diff --git a/tests/matrix_free/multigrid_dg_periodic.cc b/tests/matrix_free/multigrid_dg_periodic.cc index 92adece7d9..ca3551b33d 100644 --- a/tests/matrix_free/multigrid_dg_periodic.cc +++ b/tests/matrix_free/multigrid_dg_periodic.cc @@ -422,7 +422,7 @@ public: coarse_matrix = &matrix; } - virtual void operator() (const unsigned int , + virtual void operator() (const unsigned int, parallel::distributed::Vector &dst, const parallel::distributed::Vector &src) const { diff --git a/tests/matrix_free/multigrid_dg_sip_02.cc b/tests/matrix_free/multigrid_dg_sip_02.cc index d4cd524236..4bfbf876d2 100644 --- a/tests/matrix_free/multigrid_dg_sip_02.cc +++ b/tests/matrix_free/multigrid_dg_sip_02.cc @@ -344,7 +344,7 @@ public: coarse_matrix = &matrix; } - virtual void operator() (const unsigned int , + virtual void operator() (const unsigned int, parallel::distributed::Vector &dst, const parallel::distributed::Vector &src) const { diff --git a/tests/quick_tests/sundials-ida.cc b/tests/quick_tests/sundials-ida.cc index c2a1b42d0b..09ab693458 100644 --- a/tests/quick_tests/sundials-ida.cc +++ b/tests/quick_tests/sundials-ida.cc @@ -86,7 +86,7 @@ public: return 0; }; - time_stepper.setup_jacobian = [&](const double , + time_stepper.setup_jacobian = [&](const double, const VectorType &, const VectorType &, const double alpha) ->int @@ -119,7 +119,7 @@ public: return 0; }; - time_stepper.solver_should_restart = [](const double , + time_stepper.solver_should_restart = [](const double, VectorType &, VectorType &) ->bool { diff --git a/tests/sundials/harmonic_oscillator_01.cc b/tests/sundials/harmonic_oscillator_01.cc index cfdf6369b3..ed3605f5cb 100644 --- a/tests/sundials/harmonic_oscillator_01.cc +++ b/tests/sundials/harmonic_oscillator_01.cc @@ -83,7 +83,7 @@ public: return 0; }; - time_stepper.setup_jacobian = [&](const double , + time_stepper.setup_jacobian = [&](const double, const VectorType &, const VectorType &, const double alpha) ->int diff --git a/tests/zoltan/zoltan_02.cc b/tests/zoltan/zoltan_02.cc index 3b74f380e8..02e4ac423a 100644 --- a/tests/zoltan/zoltan_02.cc +++ b/tests/zoltan/zoltan_02.cc @@ -62,7 +62,7 @@ int main (int argc, char **argv) SparsityPattern sp_graph; sp_graph.copy_from(dynamic_sparse_graph); - Assert( num_indices == sp_graph.n_rows() , ExcInternalError() ); + Assert( num_indices == sp_graph.n_rows(), ExcInternalError() ); std::vector color_indices; unsigned int num_colors; diff --git a/tests/zoltan/zoltan_03.cc b/tests/zoltan/zoltan_03.cc index 4afcb00a83..3e0422237b 100644 --- a/tests/zoltan/zoltan_03.cc +++ b/tests/zoltan/zoltan_03.cc @@ -63,7 +63,7 @@ int main (int argc, char **argv) SparsityPattern sp_graph; sp_graph.copy_from(dynamic_sparse_graph); - Assert( num_indices == sp_graph.n_rows() , ExcInternalError() ); + Assert( num_indices == sp_graph.n_rows(), ExcInternalError() ); std::vector color_indices; unsigned int num_colors; diff --git a/tests/zoltan/zoltan_04.cc b/tests/zoltan/zoltan_04.cc index 5cb73181bc..e310875d59 100644 --- a/tests/zoltan/zoltan_04.cc +++ b/tests/zoltan/zoltan_04.cc @@ -56,7 +56,7 @@ int main (int argc, char **argv) SparsityPattern sp_graph; sp_graph.copy_from(dynamic_sparse_graph); - Assert( num_indices == sp_graph.n_rows() , ExcInternalError() ); + Assert( num_indices == sp_graph.n_rows(), ExcInternalError() ); std::vector color_indices; unsigned int num_colors;