From 157d08cfbc33f63397595e8d13b29cd68659e1ce Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Thu, 21 Sep 2023 10:54:34 -0400 Subject: [PATCH] Assert* should end with a semicolon --- include/deal.II/base/function.templates.h | 8 +-- .../deal.II/base/symmetric_tensor.templates.h | 10 +-- .../fe/fe_tools_extrapolate.templates.h | 8 +-- include/deal.II/integrators/grad_div.h | 4 +- include/deal.II/lac/block_matrix_base.h | 5 +- include/deal.II/lac/full_matrix.templates.h | 6 +- source/base/data_out_base.cc | 8 +-- source/base/function_signed_distance.cc | 6 +- source/base/mpi.cc | 3 +- source/base/polynomial.cc | 2 +- source/base/table_handler.cc | 2 +- .../repartitioning_policy_tools.cc | 6 +- source/distributed/shared_tria.cc | 2 +- source/dofs/dof_handler_policy.cc | 2 +- source/dofs/dof_tools_constraints.cc | 5 +- source/fe/fe_poly_tensor.cc | 6 +- source/grid/grid_generator.cc | 14 ++-- source/grid/grid_tools.cc | 2 +- source/grid/tria.cc | 6 +- source/lac/petsc_vector_base.cc | 3 +- source/lac/sparsity_tools.cc | 7 +- source/numerics/data_out_faces.cc | 2 +- tests/base/point_02.cc | 5 +- tests/fe/fe_values_no_mapping.cc | 42 ++++++------ tests/matrix_free/stokes_computation.cc | 4 +- tests/mpi/trilinos_sparse_matrix_03.cc | 66 ++++++++++--------- .../stokes_computation.cc | 4 +- .../immersed_surface_quadrature.cc | 2 +- tests/numerics/no_flux_18.cc | 4 +- tests/sharedtria/tria_multigrid_01.cc | 6 +- tests/sharedtria/tria_zorder_01.cc | 7 +- tests/simplex/q_projection_01.cc | 2 +- tests/simplex/simplex_grids.h | 6 +- 33 files changed, 141 insertions(+), 124 deletions(-) diff --git a/include/deal.II/base/function.templates.h b/include/deal.II/base/function.templates.h index b12d3e8640..fae02036d5 100644 --- a/include/deal.II/base/function.templates.h +++ b/include/deal.II/base/function.templates.h @@ -407,11 +407,11 @@ namespace Functions (void)points; AssertIndexRange(component, this->n_components); Assert(return_values.size() == points.size(), - ExcDimensionMismatch(return_values.size(), points.size())) + ExcDimensionMismatch(return_values.size(), points.size())); - std::fill(return_values.begin(), - return_values.end(), - function_value_vector[component]); + std::fill(return_values.begin(), + return_values.end(), + function_value_vector[component]); } diff --git a/include/deal.II/base/symmetric_tensor.templates.h b/include/deal.II/base/symmetric_tensor.templates.h index ce092f084e..c246c9f350 100644 --- a/include/deal.II/base/symmetric_tensor.templates.h +++ b/include/deal.II/base/symmetric_tensor.templates.h @@ -308,8 +308,9 @@ namespace internal AssertThrow( false, ExcMessage( - "No convergence in iterative QL eigenvector algorithm.")) return std:: - array>, dim>(); + "No convergence in iterative QL eigenvector algorithm.")); + return std::array>, + dim>(); } // Calculate the shift.. @@ -445,8 +446,9 @@ namespace internal AssertThrow( false, ExcMessage( - "No convergence in iterative Jacobi eigenvector algorithm.")) return std:: - array>, dim>(); + "No convergence in iterative Jacobi eigenvector algorithm.")); + return std::array>, + dim>(); } // Compute threshold value which dictates whether or diff --git a/include/deal.II/fe/fe_tools_extrapolate.templates.h b/include/deal.II/fe/fe_tools_extrapolate.templates.h index 7461abedaf..fa1faae8d0 100644 --- a/include/deal.II/fe/fe_tools_extrapolate.templates.h +++ b/include/deal.II/fe/fe_tools_extrapolate.templates.h @@ -66,7 +66,7 @@ namespace FETools const DoFHandler & /*dof2*/, OutVector & /*u2*/) { - Assert(false, ExcNotImplemented()) + Assert(false, ExcNotImplemented()); } }; @@ -373,7 +373,7 @@ namespace FETools public: ExtrapolateImplementation() { - AssertThrow(false, ExcNotImplemented()) + AssertThrow(false, ExcNotImplemented()); } template @@ -390,7 +390,7 @@ namespace FETools public: ExtrapolateImplementation() { - AssertThrow(false, ExcNotImplemented()) + AssertThrow(false, ExcNotImplemented()); } template @@ -407,7 +407,7 @@ namespace FETools public: ExtrapolateImplementation() { - AssertThrow(false, ExcNotImplemented()) + AssertThrow(false, ExcNotImplemented()); } template diff --git a/include/deal.II/integrators/grad_div.h b/include/deal.II/integrators/grad_div.h index 82b5ad1ed1..fffeb7839e 100644 --- a/include/deal.II/integrators/grad_div.h +++ b/include/deal.II/integrators/grad_div.h @@ -180,8 +180,8 @@ namespace LocalIntegrators double factor = 1.) { const unsigned int n_dofs = fe.dofs_per_cell; - AssertDimension(fe.get_fe().n_components(), dim) - AssertVectorVectorDimension(input, dim, fe.n_quadrature_points); + AssertDimension(fe.get_fe().n_components(), dim); + AssertVectorVectorDimension(input, dim, fe.n_quadrature_points); AssertVectorVectorDimension(Dinput, dim, fe.n_quadrature_points); AssertVectorVectorDimension(data, dim, fe.n_quadrature_points); diff --git a/include/deal.II/lac/block_matrix_base.h b/include/deal.II/lac/block_matrix_base.h index c751739db6..77e72087be 100644 --- a/include/deal.II/lac/block_matrix_base.h +++ b/include/deal.II/lac/block_matrix_base.h @@ -1939,8 +1939,9 @@ BlockMatrixBase::add(const size_type row, if (col_indices[i] <= before) Assert(false, ExcMessage("Flag col_indices_are_sorted is set, but " - "indices appear to not be sorted.")) else before = - col_indices[i]; + "indices appear to not be sorted.")); + else + before = col_indices[i]; # endif const std::pair row_index = this->row_block_indices.global_to_local(row); diff --git a/include/deal.II/lac/full_matrix.templates.h b/include/deal.II/lac/full_matrix.templates.h index 395e3fbaec..f9544a31cd 100644 --- a/include/deal.II/lac/full_matrix.templates.h +++ b/include/deal.II/lac/full_matrix.templates.h @@ -1614,7 +1614,8 @@ FullMatrix::left_invert(const FullMatrix &A) A_t.Tadd(A, 1); A_t.mmult(A_t_times_A, A); if (number(A_t_times_A.determinant()) == number(0)) - Assert(false, ExcSingular()) else + Assert(false, ExcSingular()); + else { A_t_times_A_inv.invert(A_t_times_A); A_t_times_A_inv.mmult(left_inv, A_t); @@ -1652,7 +1653,8 @@ FullMatrix::right_invert(const FullMatrix &A) A_t.Tadd(A, 1); A.mmult(A_times_A_t, A_t); if (number(A_times_A_t.determinant()) == number(0)) - Assert(false, ExcSingular()) else + Assert(false, ExcSingular()); + else { A_times_A_t_inv.invert(A_times_A_t); A_t.mmult(right_inv, A_times_A_t_inv); diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index d4ef78f357..185d45a622 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -4964,11 +4964,11 @@ namespace DataOutBase // check against # of data sets in first patch. if (patches[0].points_are_available) { - AssertDimension(n_data_sets + spacedim, patches[0].data.n_rows()) + AssertDimension(n_data_sets + spacedim, patches[0].data.n_rows()); } else { - AssertDimension(n_data_sets, patches[0].data.n_rows()) + AssertDimension(n_data_sets, patches[0].data.n_rows()); } //--------------------- @@ -5375,11 +5375,11 @@ namespace DataOutBase // patches are made in write_gmv_reorder_data_vectors if (patches[0].points_are_available) { - AssertDimension(n_data_sets + spacedim, patches[0].data.n_rows()) + AssertDimension(n_data_sets + spacedim, patches[0].data.n_rows()); } else { - AssertDimension(n_data_sets, patches[0].data.n_rows()) + AssertDimension(n_data_sets, patches[0].data.n_rows()); } const char *ascii_or_binary = diff --git a/source/base/function_signed_distance.cc b/source/base/function_signed_distance.cc index 94cc80cbdc..a7de839c63 100644 --- a/source/base/function_signed_distance.cc +++ b/source/base/function_signed_distance.cc @@ -30,7 +30,7 @@ namespace Functions : center(center) , radius(radius) { - Assert(radius > 0, ExcMessage("Radius must be positive.")) + Assert(radius > 0, ExcMessage("Radius must be positive.")); } @@ -89,7 +89,7 @@ namespace Functions : point_in_plane(point) , normal(normal) { - Assert(normal.norm() > 0, ExcMessage("Plane normal must not be 0.")) + Assert(normal.norm() > 0, ExcMessage("Plane normal must not be 0.")); } @@ -142,7 +142,7 @@ namespace Functions , max_iter(max_iter) { for (unsigned int d = 0; d < dim; ++d) - Assert(radii[d] > 0, ExcMessage("All radii must be positive.")) + Assert(radii[d] > 0, ExcMessage("All radii must be positive.")); } diff --git a/source/base/mpi.cc b/source/base/mpi.cc index f2cd1b19c6..39f9b92f87 100644 --- a/source/base/mpi.cc +++ b/source/base/mpi.cc @@ -1019,7 +1019,8 @@ namespace Utilities if (finalize_petscslepc) { PetscErrorCode ierr = SlepcFinalize(); - AssertThrow(ierr == 0, SLEPcWrappers::SolverBase::ExcSLEPcError(ierr)) + AssertThrow(ierr == 0, + SLEPcWrappers::SolverBase::ExcSLEPcError(ierr)); } # else // or just end PETSc if we did so diff --git a/source/base/polynomial.cc b/source/base/polynomial.cc index 831d4a69e4..dcac24e43c 100644 --- a/source/base/polynomial.cc +++ b/source/base/polynomial.cc @@ -665,7 +665,7 @@ namespace Polynomials break; } default: - Assert(false, ExcInternalError()) + Assert(false, ExcInternalError()); } Assert(x != nullptr, ExcInternalError()); diff --git a/source/base/table_handler.cc b/source/base/table_handler.cc index 8ec6713bb7..5964e35e85 100644 --- a/source/base/table_handler.cc +++ b/source/base/table_handler.cc @@ -73,7 +73,7 @@ namespace internal { Assert(false, ExcMessage("The number stored by this element of the " - "table is not a number.")) + "table is not a number.")); } return 0; diff --git a/source/distributed/repartitioning_policy_tools.cc b/source/distributed/repartitioning_policy_tools.cc index 2cc1c893ec..79cd033d14 100644 --- a/source/distributed/repartitioning_policy_tools.cc +++ b/source/distributed/repartitioning_policy_tools.cc @@ -115,10 +115,10 @@ namespace RepartitioningPolicyTools Assert( tria_fine.all_reference_cells_are_hyper_cube(), ExcMessage( - "FirstChildPolicy is only working for pure hex meshes at the moment.")) + "FirstChildPolicy is only working for pure hex meshes at the moment.")); - const internal::CellIDTranslator - cell_id_translator(n_coarse_cells, n_global_levels); + const internal::CellIDTranslator cell_id_translator(n_coarse_cells, + n_global_levels); is_level_partitions.set_size(cell_id_translator.size()); for (const auto &cell : tria_fine.active_cell_iterators()) diff --git a/source/distributed/shared_tria.cc b/source/distributed/shared_tria.cc index b8d2db266f..8156890ef9 100644 --- a/source/distributed/shared_tria.cc +++ b/source/distributed/shared_tria.cc @@ -153,7 +153,7 @@ namespace parallel } else { - AssertThrow(false, ExcInternalError()) + AssertThrow(false, ExcInternalError()); } // do not partition multigrid levels if user is diff --git a/source/dofs/dof_handler_policy.cc b/source/dofs/dof_handler_policy.cc index 768d0cddba..38ca81c57b 100644 --- a/source/dofs/dof_handler_policy.cc +++ b/source/dofs/dof_handler_policy.cc @@ -3271,7 +3271,7 @@ namespace internal Assert(Utilities::MPI::this_mpi_process(tr->get_communicator()) == this->dof_handler->get_triangulation() .locally_owned_subdomain(), - ExcInternalError()) + ExcInternalError()); // gather new numbers among processors into one vector { diff --git a/source/dofs/dof_tools_constraints.cc b/source/dofs/dof_tools_constraints.cc index f134f3181b..7e8aafdef6 100644 --- a/source/dofs/dof_tools_constraints.cc +++ b/source/dofs/dof_tools_constraints.cc @@ -2225,10 +2225,9 @@ namespace DoFTools // matrix, we assume that for a 0* rotation we would have to build the // identity matrix - Assert(matrix.m() == spacedim, ExcInternalError()) + Assert(matrix.m() == spacedim, ExcInternalError()); - Quadrature - quadrature(fe.get_unit_face_support_points(face_no)); + Quadrature quadrature(fe.get_unit_face_support_points(face_no)); // have an array that stores the location of each vector-dof tuple we want // to rotate. diff --git a/source/fe/fe_poly_tensor.cc b/source/fe/fe_poly_tensor.cc index 97b8e8d8ec..40e3b68e26 100644 --- a/source/fe/fe_poly_tensor.cc +++ b/source/fe/fe_poly_tensor.cc @@ -1040,7 +1040,7 @@ FE_PolyTensor::fill_fe_values( (mapping_kind == mapping_raviart_thomas) || (mapping_kind == mapping_nedelec)))) { - Assert(false, ExcNotImplemented()) + Assert(false, ExcNotImplemented()); } } } @@ -1724,7 +1724,7 @@ FE_PolyTensor::fill_fe_face_values( // third derivatives are not implemented if (fe_data.update_each & update_3rd_derivatives) { - Assert(false, ExcNotImplemented()) + Assert(false, ExcNotImplemented()); } } } @@ -2397,7 +2397,7 @@ FE_PolyTensor::fill_fe_subface_values( // third derivatives are not implemented if (fe_data.update_each & update_3rd_derivatives) { - Assert(false, ExcNotImplemented()) + Assert(false, ExcNotImplemented()); } } } diff --git a/source/grid/grid_generator.cc b/source/grid/grid_generator.cc index 90ee15377d..c4c33b3a1f 100644 --- a/source/grid/grid_generator.cc +++ b/source/grid/grid_generator.cc @@ -2650,11 +2650,11 @@ namespace GridGenerator epsilon = std::min(epsilon, 0.01 * delta[i][i]); Assert(epsilon > 0, ExcMessage( - "The distance between corner points must be positive.")) + "The distance between corner points must be positive.")); - // actual code is external since - // 1-D is different from 2/3d. - colorize_subdivided_hyper_rectangle(tria, p1, p2, epsilon); + // actual code is external since + // 1-D is different from 2/3d. + colorize_subdivided_hyper_rectangle(tria, p1, p2, epsilon); } } @@ -5125,9 +5125,9 @@ namespace GridGenerator { AssertThrow(n_rotate_middle_square < 4, ExcMessage("The number of rotation by pi/2 of the right square " - "must be in the half-open range [0,4).")) + "must be in the half-open range [0,4).")); - constexpr unsigned int dim = 2; + constexpr unsigned int dim = 2; const unsigned int n_cells = 5; std::vector> cells(n_cells); @@ -8706,7 +8706,7 @@ namespace GridGenerator } else { - AssertThrow(false, ExcNotImplemented()) + AssertThrow(false, ExcNotImplemented()); } } } // namespace GridGenerator diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index 0fb44268a9..6abda211d9 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -1403,7 +1403,7 @@ namespace GridTools (std::lower_bound(edge_list.begin(), edge_list.end(), e) - edge_list.begin()); Assert(edge_indices[l] < edge_list.size(), ExcInternalError()); - Assert(edge_list[edge_indices[l]] == e, ExcInternalError()) + Assert(edge_list[edge_indices[l]] == e, ExcInternalError()); } } diff --git a/source/grid/tria.cc b/source/grid/tria.cc index e3a004a552..9db1fabe33 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -13174,7 +13174,7 @@ namespace } else { - Assert(false, ExcNotImplemented()) + Assert(false, ExcNotImplemented()); } } } // namespace @@ -13214,7 +13214,7 @@ namespace } else { - Assert(false, ExcNotImplemented()) + Assert(false, ExcNotImplemented()); } } } // namespace @@ -13254,7 +13254,7 @@ namespace } else { - Assert(false, ExcNotImplemented()) + Assert(false, ExcNotImplemented()); } } } // namespace diff --git a/source/lac/petsc_vector_base.cc b/source/lac/petsc_vector_base.cc index 78c3b6927c..8967c581e3 100644 --- a/source/lac/petsc_vector_base.cc +++ b/source/lac/petsc_vector_base.cc @@ -783,7 +783,8 @@ namespace PETScWrappers { Assert(false, ExcMessage("You can't ask a complex value " - "whether it is non-negative.")) return true; + "whether it is non-negative.")); + return true; } } // namespace internal diff --git a/source/lac/sparsity_tools.cc b/source/lac/sparsity_tools.cc index 65fdb2c792..11c2b56d86 100644 --- a/source/lac/sparsity_tools.cc +++ b/source/lac/sparsity_tools.cc @@ -679,11 +679,10 @@ namespace SparsityTools "component, but as stated in the documentation " "we only want to reorder such graphs if no " "starting indices are given. The function was " - "called with starting indices, however.")) + "called with starting indices, however.")); - next_round_dofs.push_back( - internal::find_unnumbered_starting_index(sparsity, - new_indices)); + next_round_dofs.push_back( + internal::find_unnumbered_starting_index(sparsity, new_indices)); } diff --git a/source/numerics/data_out_faces.cc b/source/numerics/data_out_faces.cc index 923e61396b..940cd725f5 100644 --- a/source/numerics/data_out_faces.cc +++ b/source/numerics/data_out_faces.cc @@ -336,7 +336,7 @@ DataOutFaces::build_patches(const unsigned int n_subdivisions) Assert(false, ExcMessage("The DataOutFaces class can currently not be " "used on meshes that do not have the same cell type " - "throughout.")) + "throughout.")); } diff --git a/tests/base/point_02.cc b/tests/base/point_02.cc index ef123697e4..fca5e46be2 100644 --- a/tests/base/point_02.cc +++ b/tests/base/point_02.cc @@ -37,10 +37,9 @@ check() const double d = p1.distance(p2); const double d2 = p1.distance_square(p2); - AssertThrow(std::abs(d - std::sqrt(d2)) < 1e-10, ExcInternalError()) + AssertThrow(std::abs(d - std::sqrt(d2)) < 1e-10, ExcInternalError()); - deallog - << "Ok" << std::endl; + deallog << "Ok" << std::endl; } int diff --git a/tests/fe/fe_values_no_mapping.cc b/tests/fe/fe_values_no_mapping.cc index 843152b8ad..49c806dcfe 100644 --- a/tests/fe/fe_values_no_mapping.cc +++ b/tests/fe/fe_values_no_mapping.cc @@ -108,33 +108,35 @@ test() fe_val.get_function_values(interpolant, values); fe_val_m.get_function_values(interpolant, values_m); - Assert(values[0] == values_m[0], ExcInternalError()) + Assert(values[0] == values_m[0], ExcInternalError()); - for (const unsigned int f : GeometryInfo::face_indices()) - { - fe_f_val.reinit(cell, f); - fe_f_val_m.reinit(cell, f); + for (const unsigned int f : GeometryInfo::face_indices()) + { + fe_f_val.reinit(cell, f); + fe_f_val_m.reinit(cell, f); - fe_f_val.get_function_values(interpolant, values); - fe_f_val_m.get_function_values(interpolant, values_m); - Assert(values[0] == values_m[0], ExcInternalError()) + fe_f_val.get_function_values(interpolant, values); + fe_f_val_m.get_function_values(interpolant, values_m); + Assert(values[0] == values_m[0], ExcInternalError()); // Also check the Jacobian with FESubfaceValues if (cell->at_boundary(f) == false && cell->neighbor(f)->level() < cell->level()) - { - fe_subf_val.reinit(cell->neighbor(f), - cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - fe_subf_val_m.reinit(cell->neighbor(f), - cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - fe_subf_val.get_function_values(interpolant, values); - fe_subf_val_m.get_function_values(interpolant, values_m); - Assert(values[0] == values_m[0], ExcInternalError()) + { + fe_subf_val.reinit( + cell->neighbor(f), + cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + fe_subf_val_m.reinit( + cell->neighbor(f), + cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + fe_subf_val.get_function_values(interpolant, values); + fe_subf_val_m.get_function_values(interpolant, values_m); + Assert(values[0] == values_m[0], ExcInternalError()); + } } - } } deallog << "OK" << std::endl; } diff --git a/tests/matrix_free/stokes_computation.cc b/tests/matrix_free/stokes_computation.cc index b215196874..edca6c9a6e 100644 --- a/tests/matrix_free/stokes_computation.cc +++ b/tests/matrix_free/stokes_computation.cc @@ -248,7 +248,9 @@ namespace StokesClass "did not converge to a tolerance of " + Utilities::to_string(solver_control.tolerance()) + ". It reported the following error:\n\n") + - exc.what())) else throw QuietException(); + exc.what())); + else + throw QuietException(); } dst.block(1) *= -1.0; } diff --git a/tests/mpi/trilinos_sparse_matrix_03.cc b/tests/mpi/trilinos_sparse_matrix_03.cc index c0800bff72..6d59272d05 100644 --- a/tests/mpi/trilinos_sparse_matrix_03.cc +++ b/tests/mpi/trilinos_sparse_matrix_03.cc @@ -105,12 +105,13 @@ test() { AssertThrow(p->row() == 0, ExcInternalError()); if (p->column() == 0) - AssertThrow(p->value() == 0.1, - ExcInternalError()) else if (p->column() == 2) - AssertThrow(p->value() == 0.2, ExcInternalError()) else - // well, we didn't write here, so the only thing that - // should be in there is a zero - AssertThrow(p->value() == 0.0, ExcInternalError()); + AssertThrow(p->value() == 0.1, ExcInternalError()); + else if (p->column() == 2) + AssertThrow(p->value() == 0.2, ExcInternalError()); + else + // well, we didn't write here, so the only thing that + // should be in there is a zero + AssertThrow(p->value() == 0.0, ExcInternalError()); } } else @@ -121,10 +122,11 @@ test() { AssertThrow(p->row() == 2, ExcInternalError()); if (p->column() == 3) - AssertThrow(p->value() == 0.3, ExcInternalError()) else - // well, we didn't write here, so the only thing that - // should be in there is a zero - AssertThrow(p->value() == 0.0, ExcInternalError()); + AssertThrow(p->value() == 0.3, ExcInternalError()); + else + // well, we didn't write here, so the only thing that + // should be in there is a zero + AssertThrow(p->value() == 0.0, ExcInternalError()); } } @@ -141,12 +143,13 @@ test() { AssertThrow(p->row() == 0, ExcInternalError()); if (p->column() == 0) - AssertThrow(p->value() == 0.1, - ExcInternalError()) else if (p->column() == 2) - AssertThrow(p->value() == 0.2, ExcInternalError()) else - // well, we didn't write here, so the only thing that - // should be in there is a zero - AssertThrow(p->value() == 0.0, ExcInternalError()); + AssertThrow(p->value() == 0.1, ExcInternalError()); + else if (p->column() == 2) + AssertThrow(p->value() == 0.2, ExcInternalError()); + else + // well, we didn't write here, so the only thing that + // should be in there is a zero + AssertThrow(p->value() == 0.0, ExcInternalError()); } } else @@ -158,10 +161,11 @@ test() { AssertThrow(p->row() == 2, ExcInternalError()); if (p->column() == 3) - AssertThrow(p->value() == 0.3, ExcInternalError()) else - // well, we didn't write here, so the only thing that - // should be in there is a zero - AssertThrow(p->value() == 0.0, ExcInternalError()); + AssertThrow(p->value() == 0.3, ExcInternalError()); + else + // well, we didn't write here, so the only thing that + // should be in there is a zero + AssertThrow(p->value() == 0.0, ExcInternalError()); } } @@ -175,12 +179,13 @@ test() { AssertThrow(p->row() == 0, ExcInternalError()); if (p->column() == 0) - AssertThrow(p->value() == 108, - ExcInternalError()) else if (p->column() == 2) - AssertThrow(p->value() == 0.2, ExcInternalError()) else - // well, we didn't write here, so the only thing that - // should be in there is a zero - AssertThrow(p->value() == 0.0, ExcInternalError()); + AssertThrow(p->value() == 108, ExcInternalError()); + else if (p->column() == 2) + AssertThrow(p->value() == 0.2, ExcInternalError()); + else + // well, we didn't write here, so the only thing that + // should be in there is a zero + AssertThrow(p->value() == 0.0, ExcInternalError()); } } else @@ -191,10 +196,11 @@ test() { AssertThrow(p->row() == 2, ExcInternalError()); if (p->column() == 3) - AssertThrow(p->value() == 42, ExcInternalError()) else - // well, we didn't write here, so the only thing that - // should be in there is a zero - AssertThrow(p->value() == 0.0, ExcInternalError()); + AssertThrow(p->value() == 42, ExcInternalError()); + else + // well, we didn't write here, so the only thing that + // should be in there is a zero + AssertThrow(p->value() == 0.0, ExcInternalError()); } } diff --git a/tests/multigrid-global-coarsening/stokes_computation.cc b/tests/multigrid-global-coarsening/stokes_computation.cc index 34a3a5bcaf..2edf3d4a8e 100644 --- a/tests/multigrid-global-coarsening/stokes_computation.cc +++ b/tests/multigrid-global-coarsening/stokes_computation.cc @@ -248,7 +248,9 @@ namespace StokesClass "did not converge to a tolerance of " + Utilities::to_string(solver_control.tolerance()) + ". It reported the following error:\n\n") + - exc.what())) else throw QuietException(); + exc.what())); + else + throw QuietException(); } dst.block(1) *= -1.0; } diff --git a/tests/non_matching/immersed_surface_quadrature.cc b/tests/non_matching/immersed_surface_quadrature.cc index b40d5226d6..27f0091ccf 100644 --- a/tests/non_matching/immersed_surface_quadrature.cc +++ b/tests/non_matching/immersed_surface_quadrature.cc @@ -51,7 +51,7 @@ check_get_normals( { const std::vector> &points = quadrature.get_points(); const std::vector> &normals = quadrature.get_normal_vectors(); - AssertThrow(points.size() == normals.size(), ExcInternalError()) + AssertThrow(points.size() == normals.size(), ExcInternalError()); } diff --git a/tests/numerics/no_flux_18.cc b/tests/numerics/no_flux_18.cc index 3451766065..e4c972c1a7 100644 --- a/tests/numerics/no_flux_18.cc +++ b/tests/numerics/no_flux_18.cc @@ -249,7 +249,9 @@ namespace StokesClass "did not converge to a tolerance of " + Utilities::to_string(solver_control.tolerance()) + ". It reported the following error:\n\n") + - exc.what())) else throw QuietException(); + exc.what())); + else + throw QuietException(); } dst.block(1) *= -1.0; } diff --git a/tests/sharedtria/tria_multigrid_01.cc b/tests/sharedtria/tria_multigrid_01.cc index 0536d0dec6..a3cdf66355 100644 --- a/tests/sharedtria/tria_multigrid_01.cc +++ b/tests/sharedtria/tria_multigrid_01.cc @@ -63,7 +63,7 @@ compare_meshes(parallel::shared::Triangulation &shared_tria, { AssertThrow(shared_map[it->first] == it->second, ExcMessage( - "Not all CellIds map to correct level subdomain_ids.")) + "Not all CellIds map to correct level subdomain_ids.")); } @@ -88,14 +88,14 @@ compare_meshes(parallel::shared::Triangulation &shared_tria, { if (cell1->level_subdomain_id() != numbers::artificial_subdomain_id) Assert(p4est_known_cells.find(cell1->id()) != p4est_known_cells.end(), - ExcMessage("Cell not known by processor.")) + ExcMessage("Cell not known by processor.")); } cell2 = p4est_tria.begin(), endc2 = p4est_tria.end(); for (; cell2 != endc2; ++cell2) { if (cell2->level_subdomain_id() != numbers::artificial_subdomain_id) Assert(shared_known_cells.find(cell2->id()) != shared_known_cells.end(), - ExcMessage("Cell not known by processor.")) + ExcMessage("Cell not known by processor.")); } } diff --git a/tests/sharedtria/tria_zorder_01.cc b/tests/sharedtria/tria_zorder_01.cc index 50cc2130c7..4ea3bf1d4d 100644 --- a/tests/sharedtria/tria_zorder_01.cc +++ b/tests/sharedtria/tria_zorder_01.cc @@ -37,10 +37,9 @@ compare_meshes(parallel::shared::Triangulation &shared_tria, { AssertThrow(shared_tria.n_locally_owned_active_cells() == p4est_tria.n_locally_owned_active_cells(), - ExcMessage("Subdomains are of different sizes.")) + ExcMessage("Subdomains are of different sizes.")); - std::map - shared_map; + std::map shared_map; std::map p4est_map; typename Triangulation::active_cell_iterator cell1 = shared_tria @@ -66,7 +65,7 @@ compare_meshes(parallel::shared::Triangulation &shared_tria, ++it) { AssertThrow(shared_map[it->first] == it->second, - ExcMessage("Not all CellIds map to correct subdomain_ids.")) + ExcMessage("Not all CellIds map to correct subdomain_ids.")); } } diff --git a/tests/simplex/q_projection_01.cc b/tests/simplex/q_projection_01.cc index c7434286b2..5f392f164e 100644 --- a/tests/simplex/q_projection_01.cc +++ b/tests/simplex/q_projection_01.cc @@ -30,7 +30,7 @@ template void test(const unsigned int) { - AssertThrow(false, ExcNotImplemented()) + AssertThrow(false, ExcNotImplemented()); } template <> diff --git a/tests/simplex/simplex_grids.h b/tests/simplex/simplex_grids.h index c1f04ccb43..cdf68f9611 100644 --- a/tests/simplex/simplex_grids.h +++ b/tests/simplex/simplex_grids.h @@ -123,7 +123,7 @@ namespace dealii } else { - AssertThrow(false, ExcNotImplemented()) + AssertThrow(false, ExcNotImplemented()); } } @@ -269,7 +269,7 @@ namespace dealii } else { - AssertThrow(false, ExcNotImplemented()) + AssertThrow(false, ExcNotImplemented()); } } @@ -373,7 +373,7 @@ namespace dealii } else { - AssertThrow(false, ExcNotImplemented()) + AssertThrow(false, ExcNotImplemented()); } } -- 2.39.5