From: Bruno Turcksin Date: Mon, 2 Mar 2015 22:44:43 +0000 (-0600) Subject: Change Assert to AssertThrow in the tests. X-Git-Tag: v8.3.0-rc1~345^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a78cbea8dedca4be7ce5418319107c24e710c6e5;p=dealii.git Change Assert to AssertThrow in the tests. --- diff --git a/tests/aniso/mesh_3d_21.cc b/tests/aniso/mesh_3d_21.cc index e2facef0fe..2bb04e40c0 100644 --- a/tests/aniso/mesh_3d_21.cc +++ b/tests/aniso/mesh_3d_21.cc @@ -76,18 +76,18 @@ void check_this (Triangulation<3> &tria) for (unsigned int q=0; q transform (const Point p) p(1)*(1+p(0))*(1+p(2)), p(2)*(1+p(0))*(1+p(1))); default: - Assert (false, ExcNotImplemented()); + AssertThrow (false, ExcNotImplemented()); return Point(); }; } @@ -94,7 +94,7 @@ void check_element (const Triangulation &tr, // to be active, not only // some of them for (unsigned int c=0; cn_children(); ++c) - Assert (cell->child(c)->active(), ExcInternalError()); + AssertThrow (cell->child(c)->active(), ExcInternalError()); // then restrict and prolongate cell->get_interpolated_dof_values (tmp, v); diff --git a/tests/base/full_tensor_01.cc b/tests/base/full_tensor_01.cc index 8ee0af837b..fdf884ca21 100644 --- a/tests/base/full_tensor_01.cc +++ b/tests/base/full_tensor_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -37,11 +37,11 @@ int main () t[1][0] = 4; // make sure transposition doesn't change // anything - Assert (t == transpose(t), ExcInternalError()); + AssertThrow (t == transpose(t), ExcInternalError()); // check norm of tensor - Assert (std::fabs(t.norm() - std::sqrt(1.*1+2*2+2*4*4)) < 1e-14, - ExcInternalError()); + AssertThrow (std::fabs(t.norm() - std::sqrt(1.*1+2*2+2*4*4)) < 1e-14, + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/base/full_tensor_02.cc b/tests/base/full_tensor_02.cc index 4aaa71ba5a..3b097eff62 100644 --- a/tests/base/full_tensor_02.cc +++ b/tests/base/full_tensor_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -41,16 +41,16 @@ int main () t[1][2] = 6; t[2][1] = 6; - Assert (t[0][1] == t[1][0], ExcInternalError()); + AssertThrow (t[0][1] == t[1][0], ExcInternalError()); // make sure transposition doesn't change // anything - Assert (t == transpose(t), ExcInternalError()); + AssertThrow (t == transpose(t), ExcInternalError()); // check norm of tensor - Assert (std::fabs(t.norm() - std::sqrt(1.*1+2*2+3*3+2*4*4+2*5*5+2*6*6)) - < 1e-14, - ExcInternalError()); + AssertThrow (std::fabs(t.norm() - std::sqrt(1.*1+2*2+3*3+2*4*4+2*5*5+2*6*6)) + < 1e-14, + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/base/full_tensor_03.cc b/tests/base/full_tensor_03.cc index 672caaba98..9d68efbf6f 100644 --- a/tests/base/full_tensor_03.cc +++ b/tests/base/full_tensor_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -36,7 +36,7 @@ int main () t[0][1][0][1] = 3; t[1][0][1][0] = 3; - Assert (t[0][1][0][1] == t[1][0][1][0], ExcInternalError()); + AssertThrow (t[0][1][0][1] == t[1][0][1][0], ExcInternalError()); // check norm of tensor deallog << t.norm() << std::endl; @@ -50,8 +50,8 @@ int main () for (unsigned int l=0; l<2; ++l) norm_sqr += t[i][j][k][l] * t[i][j][k][l]; - Assert (std::fabs (t.norm()*t.norm() - norm_sqr) < 1e-14, - ExcInternalError()); + AssertThrow (std::fabs (t.norm()*t.norm() - norm_sqr) < 1e-14, + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/base/full_tensor_04.cc b/tests/base/full_tensor_04.cc index 775ace62cf..32a4e32de4 100644 --- a/tests/base/full_tensor_04.cc +++ b/tests/base/full_tensor_04.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -36,7 +36,7 @@ int main () t[0][1][0][1] = 3; t[1][0][1][0] = 3; - Assert (t[0][1][0][1] == t[1][0][1][0], ExcInternalError()); + AssertThrow (t[0][1][0][1] == t[1][0][1][0], ExcInternalError()); // check norm of tensor deallog << t.norm() << std::endl; @@ -49,8 +49,8 @@ int main () for (unsigned int k=0; k<2; ++k) for (unsigned int l=0; l<2; ++l) norm_sqr += t[i][j][k][l] * t[i][j][k][l]; - Assert (std::fabs (t.norm()*t.norm() - norm_sqr) < 1e-14, - ExcInternalError()); + AssertThrow (std::fabs (t.norm()*t.norm() - norm_sqr) < 1e-14, + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/base/full_tensor_05.cc b/tests/base/full_tensor_05.cc index cd13e3f3fa..4d2bf055c5 100644 --- a/tests/base/full_tensor_05.cc +++ b/tests/base/full_tensor_05.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -54,7 +54,7 @@ void test () b[i][j] = tmp_ij; } - Assert (a == b, ExcInternalError()); + AssertThrow (a == b, ExcInternalError()); // try the same thing with scaled // tensors etc @@ -70,7 +70,7 @@ void test () b[i][j] = tmp_ij; } - Assert (a == b/2, ExcInternalError()); + AssertThrow (a == b/2, ExcInternalError()); } diff --git a/tests/base/full_tensor_06.cc b/tests/base/full_tensor_06.cc index c82c02c103..17e3dac8ea 100644 --- a/tests/base/full_tensor_06.cc +++ b/tests/base/full_tensor_06.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -72,8 +72,8 @@ void test () for (unsigned int i=0; i v(3); object.vector_value (p, v); for (unsigned int c=0; c<3; ++c) - Assert (v(c) == (c==1 ? p.norm() : 0), - ExcInternalError()); + AssertThrow (v(c) == (c==1 ? p.norm() : 0), + ExcInternalError()); } deallog << "OK" << std::endl; @@ -68,8 +68,8 @@ void check2 () for (unsigned int d=0; d object (x, 1, dim+2); - Assert (object.n_components == dim+2, ExcInternalError()); + AssertThrow (object.n_components == dim+2, ExcInternalError()); for (unsigned int i=0; i<10; ++i) { @@ -50,21 +50,21 @@ void check1 () for (unsigned int c=0; c v(dim+2); object.vector_value (p, v); for (unsigned int c=0; c fill (const std_cxx11::array,1> &coordinates Table<2,double> fill (const std_cxx11::array,2> &coordinates) { Table<2,double> data(coordinates[0].size(), - coordinates[1].size()); + coordinates[1].size()); for (unsigned int i=0; i fill (const std_cxx11::array,2> &coordinates Table<3,double> fill (const std_cxx11::array,3> &coordinates) { Table<3,double> data(coordinates[0].size(), - coordinates[1].size(), - coordinates[2].size()); + coordinates[1].size(), + coordinates[2].size()); for (unsigned int i=0; i p; for (unsigned int d=0; d()) - value_at_bottom_left) < 1e-12, - ExcInternalError()); + + AssertThrow (std::fabs(f.value(Point()) - value_at_bottom_left) < 1e-12, + ExcInternalError()); Point top_right; double value_at_top_right = 1; @@ -103,9 +103,9 @@ void check () top_right[d] = 1000; value_at_top_right *= coordinates[d].back(); } - Assert (std::fabs(f.value(top_right) - value_at_top_right) < 1e-12, - ExcInternalError()); - + AssertThrow (std::fabs(f.value(top_right) - value_at_top_right) < 1e-12, + ExcInternalError()); + deallog << "OK" << std::endl; } diff --git a/tests/base/functions_11.cc b/tests/base/functions_11.cc index 685cb5a2b5..98d2aa1cac 100644 --- a/tests/base/functions_11.cc +++ b/tests/base/functions_11.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2013 - 2014 by the deal.II authors +// Copyright (C) 2013 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -33,7 +33,7 @@ Table<1,double> fill (const std_cxx11::array,1> &coordinates Table<2,double> fill (const std_cxx11::array,2> &coordinates) { Table<2,double> data(coordinates[0].size(), - coordinates[1].size()); + coordinates[1].size()); for (unsigned int i=0; i fill (const std_cxx11::array,2> &coordinates Table<3,double> fill (const std_cxx11::array,3> &coordinates) { Table<3,double> data(coordinates[0].size(), - coordinates[1].size(), - coordinates[2].size()); + coordinates[1].size(), + coordinates[2].size()); for (unsigned int i=0; i data = fill(coordinates); Functions::InterpolatedUniformGridData f(intervals, n_subintervals, data); @@ -88,16 +88,16 @@ void check () { Point p; for (unsigned int d=0; d()) - value_at_bottom_left) < 1e-12, - ExcInternalError()); + + AssertThrow (std::fabs(f.value(Point()) - value_at_bottom_left) < 1e-12, + ExcInternalError()); Point top_right; double value_at_top_right = 1; @@ -116,9 +116,9 @@ void check () top_right[d] = 1000; value_at_top_right *= coordinates[d].back(); } - Assert (std::fabs(f.value(top_right) - value_at_top_right) < 1e-12, - ExcInternalError()); - + AssertThrow (std::fabs(f.value(top_right) - value_at_top_right) < 1e-12, + ExcInternalError()); + deallog << "OK" << std::endl; } diff --git a/tests/base/gauss_lobatto.cc b/tests/base/gauss_lobatto.cc index 5a82bb5d3d..64a833b93f 100644 --- a/tests/base/gauss_lobatto.cc +++ b/tests/base/gauss_lobatto.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 1998 - 2014 by the deal.II authors +// Copyright (C) 1998 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -44,13 +44,13 @@ int main() double p = 0; for (unsigned int i=0; i::is_inside_unit_cell (p) == - GeometryInfo::is_inside_unit_cell (pp), - ExcInternalError()); + AssertThrow ((p-pp).norm_square() < 1e-15*1e-15, ExcInternalError()); + AssertThrow (GeometryInfo::is_inside_unit_cell (p) == + GeometryInfo::is_inside_unit_cell (pp), + ExcInternalError()); } } } diff --git a/tests/base/geometry_info_4.cc b/tests/base/geometry_info_4.cc index 92d6b45335..509381a64c 100644 --- a/tests/base/geometry_info_4.cc +++ b/tests/base/geometry_info_4.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -38,8 +38,8 @@ void test () phi_i = GeometryInfo::d_linear_shape_function(GeometryInfo::unit_cell_vertex(v),i); deallog << phi_i << std::endl; - Assert (phi_i == (i==v ? 1 : 0), - ExcInternalError()); + AssertThrow (phi_i == (i==v ? 1 : 0), + ExcInternalError()); } // check that @@ -51,7 +51,7 @@ void test () double s = 0; for (unsigned int i=0; i::vertices_per_cell; ++i) s += GeometryInfo::d_linear_shape_function(GeometryInfo::unit_cell_vertex(v),i); - Assert (s == 1, ExcInternalError()); + AssertThrow (s == 1, ExcInternalError()); deallog << "Sum of shape functions: " << s << std::endl; } @@ -63,7 +63,7 @@ void test () double s = 0; for (unsigned int i=0; i::vertices_per_cell; ++i) s += GeometryInfo::d_linear_shape_function(center,i); - Assert (s == 1, ExcInternalError()); + AssertThrow (s == 1, ExcInternalError()); deallog << "Sum of shape functions: " << s << std::endl; } diff --git a/tests/base/geometry_info_5.cc b/tests/base/geometry_info_5.cc index db719fd36b..4bd05c6ca9 100644 --- a/tests/base/geometry_info_5.cc +++ b/tests/base/geometry_info_5.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -52,7 +52,7 @@ void test () Tensor<1,dim> s; for (unsigned int i=0; i::vertices_per_cell; ++i) s += GeometryInfo::d_linear_shape_function_gradient(GeometryInfo::unit_cell_vertex(v),i); - Assert (s.norm() == 0, ExcInternalError()); + AssertThrow (s.norm() == 0, ExcInternalError()); deallog << "Sum of shape functions: " << s << std::endl; } @@ -64,7 +64,7 @@ void test () Tensor<1,dim> s; for (unsigned int i=0; i::vertices_per_cell; ++i) s += GeometryInfo::d_linear_shape_function_gradient(center,i); - Assert (s.norm() == 0, ExcInternalError()); + AssertThrow (s.norm() == 0, ExcInternalError()); deallog << "Sum of shape functions: " << s << std::endl; } diff --git a/tests/base/geometry_info_6.cc b/tests/base/geometry_info_6.cc index 54d3053674..b3737678c9 100644 --- a/tests/base/geometry_info_6.cc +++ b/tests/base/geometry_info_6.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -46,7 +46,7 @@ void test () { deallog << "Reference cell: " << determinants[v] << std::endl; - Assert (static_cast(determinants[v]) == 1, ExcInternalError()); + AssertThrow (static_cast(determinants[v]) == 1, ExcInternalError()); } } @@ -67,7 +67,7 @@ void test () { deallog << "Squashed cell: " << determinants[v] << std::endl; - Assert (static_cast(determinants[v]) == 0.1, ExcInternalError()); + AssertThrow (static_cast(determinants[v]) == 0.1, ExcInternalError()); } } @@ -97,7 +97,7 @@ void test () { deallog << "Squashed+rotated cell: " << determinants[v] << std::endl; - Assert (static_cast(determinants[v]) == 0.1, ExcInternalError()); + AssertThrow (static_cast(determinants[v]) == 0.1, ExcInternalError()); } } diff --git a/tests/base/geometry_info_7.cc b/tests/base/geometry_info_7.cc index 4859e043ad..b2e65d471b 100644 --- a/tests/base/geometry_info_7.cc +++ b/tests/base/geometry_info_7.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -52,7 +52,7 @@ void test () { deallog << "Reference cell: face " << f << ": " << alternating_forms[v] << std::endl; - Assert (alternating_forms[v].norm() == 1, ExcInternalError()); + AssertThrow (alternating_forms[v].norm() == 1, ExcInternalError()); } } } @@ -84,9 +84,9 @@ void test () // other faces are // squashed if (f < 2) - Assert (alternating_forms[v].norm() == 1, ExcInternalError()) + AssertThrow (alternating_forms[v].norm() == 1, ExcInternalError()) else - Assert (alternating_forms[v].norm() == 0.1, ExcInternalError()); + AssertThrow (alternating_forms[v].norm() == 0.1, ExcInternalError()); } } } @@ -135,9 +135,9 @@ void test () // vector would have // rotated along) if (f<2) - Assert (alternating_forms[v].norm() == 1, ExcInternalError()) + AssertThrow (alternating_forms[v].norm() == 1, ExcInternalError()) else - Assert (alternating_forms[v].norm() == 0.1, ExcInternalError()); + AssertThrow (alternating_forms[v].norm() == 0.1, ExcInternalError()); } } } diff --git a/tests/base/graph_coloring_02a.cc b/tests/base/graph_coloring_02a.cc index c1244d050e..dbe8cfe0e1 100644 --- a/tests/base/graph_coloring_02a.cc +++ b/tests/base/graph_coloring_02a.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -34,7 +34,7 @@ template std::vector get_conflict_indices_cfem( - typename DoFHandler::active_cell_iterator const &it) + typename DoFHandler::active_cell_iterator const &it) { std::vector local_dof_indices(it->get_fe().dofs_per_cell); it->get_dof_indices(local_dof_indices); @@ -57,48 +57,48 @@ void check() typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(); for (; cellcenter()[0]==0.625) - && - ((dim < 2) || (cell->center()[1]==0.625)) - && - ((dim < 3) || (cell->center()[2]==0.625))) - cell->set_refine_flag(); - } + { + if ((cell->center()[0]==0.625) + && + ((dim < 2) || (cell->center()[1]==0.625)) + && + ((dim < 3) || (cell->center()[2]==0.625))) + cell->set_refine_flag(); + } triangulation.execute_coarsening_and_refinement(); dof_handler.distribute_dofs(fe); // Create the coloring std::vector::active_cell_iterator> > coloring( - GraphColoring::make_graph_coloring(dof_handler.begin_active(),dof_handler.end(), - std_cxx11::function (typename - DoFHandler::active_cell_iterator const &)> (&get_conflict_indices_cfem))); + GraphColoring::make_graph_coloring(dof_handler.begin_active(),dof_handler.end(), + std_cxx11::function (typename + DoFHandler::active_cell_iterator const &)> (&get_conflict_indices_cfem))); // verify that within each color, there is no conflict for (unsigned int color=0; color - conflicts_i = get_conflict_indices_cfem (coloring[color][i]); - std::sort (conflicts_i.begin(), conflicts_i.end()); - - for (unsigned int j=i+1; j - conflicts_j = get_conflict_indices_cfem (coloring[color][j]); - std::sort (conflicts_j.begin(), conflicts_j.end()); - - // compute intersection of index sets - std::vector - intersection (std::max (conflicts_i.size(), conflicts_j.size())); - std::vector::iterator - p = std::set_intersection (conflicts_i.begin(), conflicts_i.end(), - conflicts_j.begin(), conflicts_j.end(), - intersection.begin()); - // verify that there is no intersection - Assert (p == intersection.begin(), - ExcInternalError()); - } + std::vector + conflicts_i = get_conflict_indices_cfem (coloring[color][i]); + std::sort (conflicts_i.begin(), conflicts_i.end()); + + for (unsigned int j=i+1; j + conflicts_j = get_conflict_indices_cfem (coloring[color][j]); + std::sort (conflicts_j.begin(), conflicts_j.end()); + + // compute intersection of index sets + std::vector + intersection (std::max (conflicts_i.size(), conflicts_j.size())); + std::vector::iterator + p = std::set_intersection (conflicts_i.begin(), conflicts_i.end(), + conflicts_j.begin(), conflicts_j.end(), + intersection.begin()); + // verify that there is no intersection + AssertThrow (p == intersection.begin(), + ExcInternalError()); + } } deallog << "OK" << std::endl; diff --git a/tests/base/graph_coloring_04.cc b/tests/base/graph_coloring_04.cc index 8d562de6d5..94575ffc24 100644 --- a/tests/base/graph_coloring_04.cc +++ b/tests/base/graph_coloring_04.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -38,7 +38,7 @@ template std::vector get_conflict_indices( - const typename DoFHandler::active_cell_iterator &it) + const typename DoFHandler::active_cell_iterator &it) { std::vector local_dof_indices(it->get_fe().dofs_per_cell); it->get_dof_indices(local_dof_indices); @@ -52,45 +52,45 @@ void check () { Triangulation triangulation; GridGenerator::hyper_shell (triangulation, - Point(), - 1, 2, - (dim==3) ? 96 : 12, - true); + Point(), + 1, 2, + (dim==3) ? 96 : 12, + true); triangulation.refine_global (3); for (unsigned int i=0; i<3; ++i) - { - Vector estimated_error_per_cell (triangulation.n_active_cells()); - for (unsigned int i=0; i< estimated_error_per_cell.size(); ++i) - estimated_error_per_cell(i) = i; - GridRefinement:: + { + Vector estimated_error_per_cell (triangulation.n_active_cells()); + for (unsigned int i=0; i< estimated_error_per_cell.size(); ++i) + estimated_error_per_cell(i) = i; + GridRefinement:: refine_and_coarsen_fixed_fraction (triangulation, - estimated_error_per_cell, - 0.3, 0.1); - triangulation.execute_coarsening_and_refinement(); - } - + estimated_error_per_cell, + 0.3, 0.1); + triangulation.execute_coarsening_and_refinement(); + } + FE_Q fe(1); DoFHandler stokes_dof_handler (triangulation); stokes_dof_handler.distribute_dofs (fe); for (typename DoFHandler::active_cell_iterator cell=stokes_dof_handler.begin_active(); - cell != stokes_dof_handler.end(); ++cell) + cell != stokes_dof_handler.end(); ++cell) cell->clear_user_flag (); - std::vector::active_cell_iterator> > coloring + std::vector::active_cell_iterator> > coloring = GraphColoring::make_graph_coloring(stokes_dof_handler.begin_active(), - stokes_dof_handler.end(), - std_cxx11::function ( - const typename DoFHandler::active_cell_iterator &)>(&get_conflict_indices)); + stokes_dof_handler.end(), + std_cxx11::function ( + const typename DoFHandler::active_cell_iterator &)>(&get_conflict_indices)); for (unsigned int c=0; cset_user_flag(); for (typename DoFHandler::active_cell_iterator cell=stokes_dof_handler.begin_active(); - cell != stokes_dof_handler.end(); ++cell) - Assert (cell->user_flag_set () == true, ExcInternalError()); + cell != stokes_dof_handler.end(); ++cell) + AssertThrow (cell->user_flag_set () == true, ExcInternalError()); deallog<<"OK"<description(), ExcInternalError()); + AssertThrow (pattern2 != 0, ExcInternalError()); + AssertThrow (desc == pattern2->description(), ExcInternalError()); deallog << desc << std::endl; diff --git a/tests/base/product_type_01.cc b/tests/base/product_type_01.cc index 67bf7dd2ad..9e58d5e109 100644 --- a/tests/base/product_type_01.cc +++ b/tests/base/product_type_01.cc @@ -31,10 +31,10 @@ template void check() { - Assert (typeid(typename ProductType::type) == typeid(CompareType), - ExcInternalError()); - Assert (typeid(typename ProductType::type) == typeid(T() * U()), - ExcInternalError()); + AssertThrow (typeid(typename ProductType::type) == typeid(CompareType), + ExcInternalError()); + AssertThrow (typeid(typename ProductType::type) == typeid(T() * U()), + ExcInternalError()); } diff --git a/tests/base/product_type_01_symmetric.cc b/tests/base/product_type_01_symmetric.cc index c5ee98a6a7..bcda229e7f 100644 --- a/tests/base/product_type_01_symmetric.cc +++ b/tests/base/product_type_01_symmetric.cc @@ -31,10 +31,10 @@ template void check() { - Assert (typeid(typename ProductType::type) == typeid(CompareType), - ExcInternalError()); - Assert (typeid(typename ProductType::type) == typeid(T() * U()), - ExcInternalError()); + AssertThrow (typeid(typename ProductType::type) == typeid(CompareType), + ExcInternalError()); + AssertThrow (typeid(typename ProductType::type) == typeid(T() * U()), + ExcInternalError()); } diff --git a/tests/base/product_type_02.cc b/tests/base/product_type_02.cc index c75d9a7ea4..eb104a14e3 100644 --- a/tests/base/product_type_02.cc +++ b/tests/base/product_type_02.cc @@ -32,10 +32,10 @@ template void check() { - Assert (typeid(T() * U()) == typeid(CompareType), - ExcInternalError()); - Assert (typeid(T() * U()) == typeid(CompareType), - ExcInternalError()); + AssertThrow (typeid(T() * U()) == typeid(CompareType), + ExcInternalError()); + AssertThrow (typeid(T() * U()) == typeid(CompareType), + ExcInternalError()); } @@ -64,6 +64,6 @@ int main() check,std::complex,Tensor<1,1,std::complex > >(); check,Tensor<1,1,float>,Tensor<1,1,std::complex > >(); - + deallog << "OK" << std::endl; } diff --git a/tests/base/product_type_03.cc b/tests/base/product_type_03.cc index 7de4b4bd84..3c92d26e23 100644 --- a/tests/base/product_type_03.cc +++ b/tests/base/product_type_03.cc @@ -32,10 +32,10 @@ template void check() { - Assert (typeid(T() * U()) == typeid(CompareType), - ExcInternalError()); - Assert (typeid(T() * U()) == typeid(CompareType), - ExcInternalError()); + AssertThrow (typeid(T() * U()) == typeid(CompareType), + ExcInternalError()); + AssertThrow (typeid(T() * U()) == typeid(CompareType), + ExcInternalError()); } @@ -64,6 +64,6 @@ int main() check,std::complex,Tensor<2,1,std::complex > >(); check,Tensor<2,1,float>,Tensor<2,1,std::complex > >(); - + deallog << "OK" << std::endl; } diff --git a/tests/base/product_type_03_symmetric.cc b/tests/base/product_type_03_symmetric.cc index a7a1dada2c..0abd107d2e 100644 --- a/tests/base/product_type_03_symmetric.cc +++ b/tests/base/product_type_03_symmetric.cc @@ -31,10 +31,10 @@ template void check() { - Assert (typeid(T() * U()) == typeid(CompareType), - ExcInternalError()); - Assert (typeid(T() * U()) == typeid(CompareType), - ExcInternalError()); + AssertThrow (typeid(T() * U()) == typeid(CompareType), + ExcInternalError()); + AssertThrow (typeid(T() * U()) == typeid(CompareType), + ExcInternalError()); } @@ -63,6 +63,6 @@ int main() check,std::complex,SymmetricTensor<2,1,std::complex > >(); check,SymmetricTensor<2,1,float>,SymmetricTensor<2,1,std::complex > >(); - + deallog << "OK" << std::endl; } diff --git a/tests/base/product_type_04.cc b/tests/base/product_type_04.cc index 99962fce8c..e553b861fa 100644 --- a/tests/base/product_type_04.cc +++ b/tests/base/product_type_04.cc @@ -43,10 +43,10 @@ int main() t[0] = 1.23456; t[1] = 2.46802; t[2] = 3.69258; - Assert (7*t == 7.0 * t, ExcInternalError()); - Assert (t*7 == t * 7.0, ExcInternalError()); - Assert (t*7 == 7*t , ExcInternalError()); - Assert ((t*7 - (t+t+t+t+t+t+t)).norm() < 1e-12, ExcInternalError()); + AssertThrow (7*t == 7.0 * t, ExcInternalError()); + AssertThrow (t*7 == t * 7.0, ExcInternalError()); + AssertThrow (t*7 == 7*t , ExcInternalError()); + AssertThrow ((t*7 - (t+t+t+t+t+t+t)).norm() < 1e-12, ExcInternalError()); } // now also try it for a rank-2 tensor (higher rank tensors are @@ -57,11 +57,11 @@ int main() t[0][1] = 7.87965; t[1][0] = 2.64686; t[1][1] = 3.35792; - Assert (7*t == 7.0 * t, ExcInternalError()); - Assert (t*7 == t * 7.0, ExcInternalError()); - Assert (t*7 == 7*t , ExcInternalError()); - Assert ((t*7 - (t+t+t+t+t+t+t)).norm() < 1e-12, ExcInternalError()); + AssertThrow (7*t == 7.0 * t, ExcInternalError()); + AssertThrow (t*7 == t * 7.0, ExcInternalError()); + AssertThrow (t*7 == 7*t , ExcInternalError()); + AssertThrow ((t*7 - (t+t+t+t+t+t+t)).norm() < 1e-12, ExcInternalError()); } - + deallog << "OK" << std::endl; } diff --git a/tests/base/product_type_04_symmetric.cc b/tests/base/product_type_04_symmetric.cc index dca8609d4b..96832b7beb 100644 --- a/tests/base/product_type_04_symmetric.cc +++ b/tests/base/product_type_04_symmetric.cc @@ -42,11 +42,11 @@ int main() t[0][0] = 1.23456; t[0][1] = 7.87965; t[1][1] = 3.35792; - Assert (7*t == 7.0 * t, ExcInternalError()); - Assert (t*7 == t * 7.0, ExcInternalError()); - Assert (t*7 == 7*t , ExcInternalError()); - Assert ((t*7 - (t+t+t+t+t+t+t)).norm() < 1e-12, ExcInternalError()); + AssertThrow (7*t == 7.0 * t, ExcInternalError()); + AssertThrow (t*7 == t * 7.0, ExcInternalError()); + AssertThrow (t*7 == 7*t , ExcInternalError()); + AssertThrow ((t*7 - (t+t+t+t+t+t+t)).norm() < 1e-12, ExcInternalError()); } - + deallog << "OK" << std::endl; } diff --git a/tests/base/product_type_05.cc b/tests/base/product_type_05.cc index caeeb59561..32e0d28539 100644 --- a/tests/base/product_type_05.cc +++ b/tests/base/product_type_05.cc @@ -33,10 +33,10 @@ template void check() { - Assert (typeid(typename ProductType::type) == typeid(CompareType), - ExcInternalError()); - Assert (typeid(typename ProductType::type) == typeid(T() * U()), - ExcInternalError()); + AssertThrow (typeid(typename ProductType::type) == typeid(CompareType), + ExcInternalError()); + AssertThrow (typeid(typename ProductType::type) == typeid(T() * U()), + ExcInternalError()); } @@ -49,18 +49,18 @@ int main() check(); deallog << typename ProductType::type(2.345)*typename ProductType::type(3.456) - << ' ' - << typename ProductType::type(2.345*3.456) - << std::endl; - + << ' ' + << typename ProductType::type(2.345*3.456) + << std::endl; + check,std::complex,std::complex >(); deallog << (typename ProductType,std::complex >::type(2.345, 1.23) * - typename ProductType,std::complex >::type(3.456, 2.45)) - << ' ' - << (typename ProductType,std::complex >::type - (std::complex(2.345, 1.23) * - std::complex(3.456, 2.45))) - << std::endl; - + typename ProductType,std::complex >::type(3.456, 2.45)) + << ' ' + << (typename ProductType,std::complex >::type + (std::complex(2.345, 1.23) * + std::complex(3.456, 2.45))) + << std::endl; + deallog << "OK" << std::endl; } diff --git a/tests/base/scalar_01.cc b/tests/base/scalar_01.cc index b04e8c4003..33c8cc0edc 100644 --- a/tests/base/scalar_01.cc +++ b/tests/base/scalar_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2009 - 2014 by the deal.II authors +// Copyright (C) 2009 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -26,7 +26,7 @@ template void compare (const U &u, const V &v) { - Assert (static_cast(u)==static_cast(v), ExcInternalError()); + AssertThrow (static_cast(u)==static_cast(v), ExcInternalError()); } diff --git a/tests/base/symmetric_tensor_01.cc b/tests/base/symmetric_tensor_01.cc index 44613ac5d7..9673bebedf 100644 --- a/tests/base/symmetric_tensor_01.cc +++ b/tests/base/symmetric_tensor_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -35,26 +35,26 @@ int main () t[1][1] = 2; t[0][1] = 3; - Assert (t[0][1] == t[1][0], ExcInternalError()); + AssertThrow (t[0][1] == t[1][0], ExcInternalError()); // check that if a single element is // accessed, its transpose element gets the // same value t[1][0] = 4; - Assert (t[0][1] == 4, ExcInternalError()); + AssertThrow (t[0][1] == 4, ExcInternalError()); // make sure transposition doesn't change // anything - Assert (t == transpose(t), ExcInternalError()); + AssertThrow (t == transpose(t), ExcInternalError()); // check norm of tensor - Assert (std::fabs(t.norm() - std::sqrt(1.*1+2*2+2*4*4)) < 1e-14, - ExcInternalError()); + AssertThrow (std::fabs(t.norm() - std::sqrt(1.*1+2*2+2*4*4)) < 1e-14, + ExcInternalError()); // make sure norm is induced by scalar // product - Assert (std::fabs (t.norm()*t.norm() - t*t) < 1e-14, - ExcInternalError()); + AssertThrow (std::fabs (t.norm()*t.norm() - t*t) < 1e-14, + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/base/symmetric_tensor_02.cc b/tests/base/symmetric_tensor_02.cc index d242bc41b3..aef9b38950 100644 --- a/tests/base/symmetric_tensor_02.cc +++ b/tests/base/symmetric_tensor_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -38,27 +38,27 @@ int main () t[0][2] = 5; t[1][2] = 6; - Assert (t[0][1] == t[1][0], ExcInternalError()); + AssertThrow (t[0][1] == t[1][0], ExcInternalError()); // check that if a single element is // accessed, its transpose element gets the // same value t[1][0] = 14; - Assert (t[0][1] == 14, ExcInternalError()); + AssertThrow (t[0][1] == 14, ExcInternalError()); // make sure transposition doesn't change // anything - Assert (t == transpose(t), ExcInternalError()); + AssertThrow (t == transpose(t), ExcInternalError()); // check norm of tensor - Assert (std::fabs(t.norm() - std::sqrt(1.*1+2*2+3*3+2*14*14+2*5*5+2*6*6)) - < 1e-14, - ExcInternalError()); + AssertThrow (std::fabs(t.norm() - std::sqrt(1.*1+2*2+3*3+2*14*14+2*5*5+2*6*6)) + < 1e-14, + ExcInternalError()); // make sure norm is induced by scalar // product - Assert (std::fabs (t.norm()*t.norm() - t*t) < 1e-14, - ExcInternalError()); + AssertThrow (std::fabs (t.norm()*t.norm() - t*t) < 1e-14, + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/base/symmetric_tensor_03.cc b/tests/base/symmetric_tensor_03.cc index 45fe1d47dc..6b172d6662 100644 --- a/tests/base/symmetric_tensor_03.cc +++ b/tests/base/symmetric_tensor_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -35,17 +35,17 @@ int main () t[1][1][1][1] = 2; t[0][1][0][1] = 3; - Assert (t[0][1][0][1] == t[1][0][1][0], ExcInternalError()); + AssertThrow (t[0][1][0][1] == t[1][0][1][0], ExcInternalError()); // check that if a single element is // accessed, its transpose element gets the // same value t[1][0][0][1] = 4; - Assert (t[0][1][1][0] == 4, ExcInternalError()); + AssertThrow (t[0][1][1][0] == 4, ExcInternalError()); // make sure transposition doesn't change // anything - Assert (t == transpose(t), ExcInternalError()); + AssertThrow (t == transpose(t), ExcInternalError()); // check norm of tensor deallog << t.norm() << std::endl; @@ -59,8 +59,8 @@ int main () for (unsigned int l=0; l<2; ++l) norm_sqr += t[i][j][k][l] * t[i][j][k][l]; - Assert (std::fabs (t.norm()*t.norm() - norm_sqr) < 1e-14, - ExcInternalError()); + AssertThrow (std::fabs (t.norm()*t.norm() - norm_sqr) < 1e-14, + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/base/symmetric_tensor_04.cc b/tests/base/symmetric_tensor_04.cc index bbef36a985..9a53bb98f7 100644 --- a/tests/base/symmetric_tensor_04.cc +++ b/tests/base/symmetric_tensor_04.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -35,17 +35,17 @@ int main () t[1][1][1][1] = 2; t[0][1][0][1] = 3; - Assert (t[0][1][0][1] == t[1][0][1][0], ExcInternalError()); + AssertThrow (t[0][1][0][1] == t[1][0][1][0], ExcInternalError()); // check that if a single element is // accessed, its transpose element gets the // same value t[1][0][0][1] = 4; - Assert (t[0][1][1][0] == 4, ExcInternalError()); + AssertThrow (t[0][1][1][0] == 4, ExcInternalError()); // make sure transposition doesn't change // anything - Assert (t == transpose(t), ExcInternalError()); + AssertThrow (t == transpose(t), ExcInternalError()); // check norm of tensor deallog << t.norm() << std::endl; @@ -58,8 +58,8 @@ int main () for (unsigned int k=0; k<2; ++k) for (unsigned int l=0; l<2; ++l) norm_sqr += t[i][j][k][l] * t[i][j][k][l]; - Assert (std::fabs (t.norm()*t.norm() - norm_sqr) < 1e-14, - ExcInternalError()); + AssertThrow (std::fabs (t.norm()*t.norm() - norm_sqr) < 1e-14, + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/base/symmetric_tensor_05.cc b/tests/base/symmetric_tensor_05.cc index 901a40e61e..9f6ebbdf84 100644 --- a/tests/base/symmetric_tensor_05.cc +++ b/tests/base/symmetric_tensor_05.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -55,7 +55,7 @@ void test () b[i][j] = tmp_ij; } - Assert (a == b/2, ExcInternalError()); + AssertThrow (a == b/2, ExcInternalError()); // try the same thing with scaled // tensors etc @@ -71,7 +71,7 @@ void test () b[i][j] = tmp_ij; } - Assert (a == b/4, ExcInternalError()); + AssertThrow (a == b/4, ExcInternalError()); } diff --git a/tests/base/symmetric_tensor_06.cc b/tests/base/symmetric_tensor_06.cc index ba16985124..3494f2280a 100644 --- a/tests/base/symmetric_tensor_06.cc +++ b/tests/base/symmetric_tensor_06.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -72,8 +72,8 @@ void test () for (unsigned int i=0; i x = deviator_tensor() * t; - Assert ((x-deviator(t)).norm() < 1e-15*t.norm(), ExcInternalError()); + AssertThrow ((x-deviator(t)).norm() < 1e-15*t.norm(), ExcInternalError()); deallog << "x=" << std::endl; for (unsigned int i=0; i()*t) < 1e-15*t.norm(), - ExcInternalError()); + AssertThrow (trace(deviator_tensor()*t) < 1e-15*t.norm(), + ExcInternalError()); } diff --git a/tests/base/symmetric_tensor_14.cc b/tests/base/symmetric_tensor_14.cc index fcc1a92a78..a4769c1f33 100644 --- a/tests/base/symmetric_tensor_14.cc +++ b/tests/base/symmetric_tensor_14.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -34,7 +34,7 @@ void test () t[i][j] = (1.+(i+1)*(j*2)); SymmetricTensor<2,dim> x = identity_tensor() * t; - Assert ((x-t).norm() < 1e-15*t.norm(), ExcInternalError()); + AssertThrow ((x-t).norm() < 1e-15*t.norm(), ExcInternalError()); deallog << "x=" << std::endl; for (unsigned int i=0; i x = T * t; - Assert ((x-trace(t)*unit_symmetric_tensor()).norm() - < 1e-15*t.norm(), ExcInternalError()); + AssertThrow ((x-trace(t)*unit_symmetric_tensor()).norm() + < 1e-15*t.norm(), ExcInternalError()); deallog << "x=" << std::endl; for (unsigned int i=0; i x = T * t; - Assert ((x-(t*t)*t).norm() - < 1e-15*t.norm(), ExcInternalError()); + AssertThrow ((x-(t*t)*t).norm() + < 1e-15*t.norm(), ExcInternalError()); deallog << "x=" << std::endl; for (unsigned int i=0; i(), unit_symmetric_tensor())); - Assert ((T-deviator_tensor()).norm() - <= 1e-15*T.norm(), ExcInternalError()); + AssertThrow ((T-deviator_tensor()).norm() + <= 1e-15*T.norm(), ExcInternalError()); } diff --git a/tests/base/symmetric_tensor_17.cc b/tests/base/symmetric_tensor_17.cc index d6c1e377aa..afbff9e81d 100644 --- a/tests/base/symmetric_tensor_17.cc +++ b/tests/base/symmetric_tensor_17.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -60,9 +60,9 @@ void test () // t_times_1 should be a multiple of the // unit tensor, given the structure we have // given to it - Assert ((t_times_1 - (dim*10000 + 2*100)*unit_symmetric_tensor()).norm() - < 1e-14*t_times_1.norm(), - ExcInternalError()); + AssertThrow ((t_times_1 - (dim*10000 + 2*100)*unit_symmetric_tensor()).norm() + < 1e-14*t_times_1.norm(), + ExcInternalError()); } diff --git a/tests/base/symmetric_tensor_18.cc b/tests/base/symmetric_tensor_18.cc index c43fd02f9a..9bbf708e12 100644 --- a/tests/base/symmetric_tensor_18.cc +++ b/tests/base/symmetric_tensor_18.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -59,8 +59,8 @@ void test () for (unsigned int b=0; b &A) << B[i][j][k][l] << ' ' << T_left[i][j][k][l] << std::endl; - Assert (std::fabs(T_left[i][j][k][l] - - identity_tensor()[i][j][k][l]) - < 1e-10, - ExcInternalError()); + AssertThrow (std::fabs(T_left[i][j][k][l] - + identity_tensor()[i][j][k][l]) + < 1e-10, + ExcInternalError()); } // check left inverse @@ -63,10 +63,10 @@ void check (const SymmetricTensor<4,dim> &A) << B[i][j][k][l] << ' ' << T_right[i][j][k][l] << std::endl; - Assert (std::fabs(T_right[i][j][k][l] - - identity_tensor()[i][j][k][l]) - < 1e-10, - ExcInternalError()); + AssertThrow (std::fabs(T_right[i][j][k][l] - + identity_tensor()[i][j][k][l]) + < 1e-10, + ExcInternalError()); } } diff --git a/tests/base/symmetric_tensor_21.cc b/tests/base/symmetric_tensor_21.cc index 0f9c561208..9d9acf0a56 100644 --- a/tests/base/symmetric_tensor_21.cc +++ b/tests/base/symmetric_tensor_21.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -40,7 +40,7 @@ int main () t = 0; deallog << t.norm() << std::endl; - Assert (t.norm() == 0, ExcInternalError()); + AssertThrow (t.norm() == 0, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/base/symmetric_tensor_23.cc b/tests/base/symmetric_tensor_23.cc index 7f130d5264..d615c09ae5 100644 --- a/tests/base/symmetric_tensor_23.cc +++ b/tests/base/symmetric_tensor_23.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -36,8 +36,8 @@ int main () t[0][0] = 1; double x[1] = { 1 }; - Assert ((t == SymmetricTensor<2,1>(x)), - ExcInternalError()); + AssertThrow ((t == SymmetricTensor<2,1>(x)), + ExcInternalError()); } { @@ -47,8 +47,8 @@ int main () t[0][1] = 3; double x[3] = { 1, 2, 3 }; - Assert ((t == SymmetricTensor<2,2>(x)), - ExcInternalError()); + AssertThrow ((t == SymmetricTensor<2,2>(x)), + ExcInternalError()); } { @@ -61,8 +61,8 @@ int main () t[1][2] = 6; double x[6] = { 1, 2, 3, 4, 5, 6 }; - Assert ((t == SymmetricTensor<2,3>(x)), - ExcInternalError()); + AssertThrow ((t == SymmetricTensor<2,3>(x)), + ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/base/symmetric_tensor_24.cc b/tests/base/symmetric_tensor_24.cc index aaf12087c9..6713cee607 100644 --- a/tests/base/symmetric_tensor_24.cc +++ b/tests/base/symmetric_tensor_24.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -34,11 +34,11 @@ void check () deallog << i << " -- " << S::unrolled_to_component_indices (i) << std::endl; - Assert (S::component_to_unrolled_index - (S::unrolled_to_component_indices (i)) - == - i, - ExcInternalError()); + AssertThrow (S::component_to_unrolled_index + (S::unrolled_to_component_indices (i)) + == + i, + ExcInternalError()); } } diff --git a/tests/base/symmetric_tensor_25.cc b/tests/base/symmetric_tensor_25.cc index 06d0b414c5..21872f2cef 100644 --- a/tests/base/symmetric_tensor_25.cc +++ b/tests/base/symmetric_tensor_25.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -58,7 +58,7 @@ void check () - third_invariant(S) * unit_symmetric_tensor (); deallog << R << std::endl; - Assert (R.norm() < 1e-10, ExcInternalError()); + AssertThrow (R.norm() < 1e-10, ExcInternalError()); } } diff --git a/tests/base/symmetric_tensor_27.cc b/tests/base/symmetric_tensor_27.cc index 810ce4cb6f..728d117b2e 100644 --- a/tests/base/symmetric_tensor_27.cc +++ b/tests/base/symmetric_tensor_27.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -41,15 +41,15 @@ void test () t[i][j] = (1.+(i+1)*(j*2)); deallog << scalar_product(s,s) << std::endl; - Assert (scalar_product(s,s) == s*s, ExcInternalError()); - + AssertThrow (scalar_product(s,s) == s*s, ExcInternalError()); + deallog << scalar_product(s,t) << std::endl; - Assert (scalar_product(s,t) == s*symmetrize(t), ExcInternalError()); - Assert (scalar_product(s,t) == symmetrize(t)*s, ExcInternalError()); - + AssertThrow (scalar_product(s,t) == s*symmetrize(t), ExcInternalError()); + AssertThrow (scalar_product(s,t) == symmetrize(t)*s, ExcInternalError()); + deallog << scalar_product(t,s) << std::endl; - Assert (scalar_product(t,s) == s*symmetrize(t), ExcInternalError()); - Assert (scalar_product(t,s) == symmetrize(t)*s, ExcInternalError()); + AssertThrow (scalar_product(t,s) == s*symmetrize(t), ExcInternalError()); + AssertThrow (scalar_product(t,s) == symmetrize(t)*s, ExcInternalError()); } diff --git a/tests/base/table.cc b/tests/base/table.cc index e058dfe986..1d1cb55210 100644 --- a/tests/base/table.cc +++ b/tests/base/table.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 1998 - 2014 by the deal.II authors +// Copyright (C) 1998 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -59,16 +59,16 @@ main () for (unsigned int i=0; i<3; ++i) for (unsigned int j=0; j<3; ++j) { - Assert (Td[i][j] == Td(i,j), ExcInternalError()); - Assert (Ti[i][j] == Ti(i,j), ExcInternalError()); - Assert (Ti[i][j] == Td(i,j), ExcInternalError()); + AssertThrow (Td[i][j] == Td(i,j), ExcInternalError()); + AssertThrow (Ti[i][j] == Ti(i,j), ExcInternalError()); + AssertThrow (Ti[i][j] == Td(i,j), ExcInternalError()); - Assert (*(Td[i].begin()+j) == Td(i,j), ExcInternalError()); - Assert (*(Ti[i].begin()+j) == Ti(i,j), ExcInternalError()); - Assert (*(Ti[i].begin()+j) == Td(i,j), ExcInternalError()); + AssertThrow (*(Td[i].begin()+j) == Td(i,j), ExcInternalError()); + AssertThrow (*(Ti[i].begin()+j) == Ti(i,j), ExcInternalError()); + AssertThrow (*(Ti[i].begin()+j) == Td(i,j), ExcInternalError()); - Assert (&*(Td[i].begin()+j) == &Td(i,j), ExcInternalError()); - Assert (&*(Ti[i].begin()+j) == &Ti(i,j), ExcInternalError()); + AssertThrow (&*(Td[i].begin()+j) == &Td(i,j), ExcInternalError()); + AssertThrow (&*(Ti[i].begin()+j) == &Ti(i,j), ExcInternalError()); deallog << i << " " << j << " " << Td[i][j] << " ok" << std::endl; }; @@ -89,23 +89,23 @@ main () for (unsigned int i=0; i<4; ++i) for (unsigned int j=0; j<3; ++j) { - Assert (Td[i][j] == Td(i,j), ExcInternalError()); - Assert (Ti[i][j] == Ti(i,j), ExcInternalError()); - Assert (Ti[i][j] == Td(i,j), ExcInternalError()); + AssertThrow (Td[i][j] == Td(i,j), ExcInternalError()); + AssertThrow (Ti[i][j] == Ti(i,j), ExcInternalError()); + AssertThrow (Ti[i][j] == Td(i,j), ExcInternalError()); - Assert (*(Td[i].begin()+j) == Td(i,j), ExcInternalError()); - Assert (*(Ti[i].begin()+j) == Ti(i,j), ExcInternalError()); - Assert (*(Ti[i].begin()+j) == Td(i,j), ExcInternalError()); + AssertThrow (*(Td[i].begin()+j) == Td(i,j), ExcInternalError()); + AssertThrow (*(Ti[i].begin()+j) == Ti(i,j), ExcInternalError()); + AssertThrow (*(Ti[i].begin()+j) == Td(i,j), ExcInternalError()); - Assert (&*(Td[i].begin()+j) == &Td(i,j), ExcInternalError()); - Assert (&*(Ti[i].begin()+j) == &Ti(i,j), ExcInternalError()); + AssertThrow (&*(Td[i].begin()+j) == &Td(i,j), ExcInternalError()); + AssertThrow (&*(Ti[i].begin()+j) == &Ti(i,j), ExcInternalError()); deallog << i << " " << j << " " << Td[i][j] << " ok" << std::endl; }; for (unsigned int i=0; i<4; ++i) - Assert (Td[i].end() - Td[i].begin() == 3, - ExcInternalError()); + AssertThrow (Td[i].end() - Td[i].begin() == 3, + ExcInternalError()); }; @@ -154,9 +154,9 @@ main () for (unsigned int i=0; i(K), - ExcInternalError()); + AssertThrow (Td[i][j].end() - Td[i][j].begin() == + static_cast(K), + ExcInternalError()); }; // a 4d-table @@ -233,16 +233,16 @@ main () for (unsigned int k=0; k(L), - ExcDimensionMismatch(Td[i][j][k].end() - Td[i][j][k].begin(), - static_cast(L))); + AssertThrow (Td[i][j][k].end() - Td[i][j][k].begin() == + static_cast(L), + ExcDimensionMismatch(Td[i][j][k].end() - Td[i][j][k].begin(), + static_cast(L))); }; // 5d-table @@ -281,16 +281,16 @@ main () for (unsigned int l=0; l(M), - ExcDimensionMismatch(Td[i][j][k][l].end() - Td[i][j][k][l].begin(), - static_cast(M))); + AssertThrow (Td[i][j][k][l].end() - Td[i][j][k][l].begin() == + static_cast(M), + ExcDimensionMismatch(Td[i][j][k][l].end() - Td[i][j][k][l].begin(), + static_cast(M))); }; // a 6d-table @@ -332,16 +332,16 @@ main () for (unsigned int m=0; m(N), - ExcDimensionMismatch(Td[i][j][k][l][m].end() - Td[i][j][k][l][m].begin(), - static_cast(N))); + AssertThrow (Td[i][j][k][l][m].end() - Td[i][j][k][l][m].begin() == + static_cast(N), + ExcDimensionMismatch(Td[i][j][k][l][m].end() - Td[i][j][k][l][m].begin(), + static_cast(N))); }; } diff --git a/tests/base/table_indices_01.cc b/tests/base/table_indices_01.cc index 20b5314f74..51bdd4a9e9 100644 --- a/tests/base/table_indices_01.cc +++ b/tests/base/table_indices_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -36,16 +36,16 @@ int main () t2[0] = 84; t2[1] = 42; - Assert (t1 == t2, ExcInternalError()); - Assert (t1[0] == t2[0], ExcInternalError()); - Assert (t1[1] == t2[1], ExcInternalError()); + AssertThrow (t1 == t2, ExcInternalError()); + AssertThrow (t1[0] == t2[0], ExcInternalError()); + AssertThrow (t1[1] == t2[1], ExcInternalError()); - Assert (! (t1 != t2), ExcInternalError()); + AssertThrow (! (t1 != t2), ExcInternalError()); t2.sort(); - Assert (t1 != t2, ExcInternalError()); - Assert (t1[0] == t2[1], ExcInternalError()); - Assert (t1[1] == t2[0], ExcInternalError()); + AssertThrow (t1 != t2, ExcInternalError()); + AssertThrow (t1[0] == t2[1], ExcInternalError()); + AssertThrow (t1[1] == t2[0], ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/base/task_02.cc b/tests/base/task_02.cc index 77c3d4c692..c564c88af1 100644 --- a/tests/base/task_02.cc +++ b/tests/base/task_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2009 - 2014 by the deal.II authors +// Copyright (C) 2009 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -41,7 +41,7 @@ int main() deallog.threshold_double(1.e-10); Threads::Task t = Threads::new_task (test); - Assert (t.return_value() == 42, ExcInternalError()); + AssertThrow (t.return_value() == 42, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/base/task_10.cc b/tests/base/task_10.cc index 27ba827acc..33676dd931 100644 --- a/tests/base/task_10.cc +++ b/tests/base/task_10.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2009 - 2014 by the deal.II authors +// Copyright (C) 2009 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -39,9 +39,9 @@ int main() deallog.threshold_double(1.e-10); Threads::Task<> t; - Assert (t.joinable() == false, ExcInternalError()); - + AssertThrow (t.joinable() == false, ExcInternalError()); + t = Threads::new_task (test); - Assert (t.joinable() == true, ExcInternalError()); + AssertThrow (t.joinable() == true, ExcInternalError()); t.join (); } diff --git a/tests/base/tensor.cc b/tests/base/tensor.cc index 8a2cb50de5..e31151448b 100644 --- a/tests/base/tensor.cc +++ b/tests/base/tensor.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 1998 - 2014 by the deal.II authors +// Copyright (C) 1998 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -37,8 +37,8 @@ int main () Tensor<2,dim> t(a); Tensor<2,dim> tt; Tensor<2,dim> result(b); - Assert (transpose(transpose(t)) == t, ExcInternalError()); - Assert (transpose(transpose(result)) == result, ExcInternalError()); + AssertThrow (transpose(transpose(t)) == t, ExcInternalError()); + AssertThrow (transpose(transpose(result)) == result, ExcInternalError()); Vector unrolled(9); diff --git a/tests/base/tensor_25.cc b/tests/base/tensor_25.cc index 6e52131b5c..69ff619aa2 100644 --- a/tests/base/tensor_25.cc +++ b/tests/base/tensor_25.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -36,16 +36,16 @@ void check () for (unsigned int j=0; j(i,j,k) - == - T::unrolled_to_component_indices (i*dim*dim+j*dim+k), - ExcInternalError()); - Assert (T::component_to_unrolled_index(TableIndices<3>(i,j,k)) - == - i*dim*dim+j*dim+k, - ExcInternalError()); - Assert (t[TableIndices<3>(i,j,k)] == t[i][j][k], - ExcInternalError()); + AssertThrow (TableIndices<3>(i,j,k) + == + T::unrolled_to_component_indices (i*dim*dim+j*dim+k), + ExcInternalError()); + AssertThrow (T::component_to_unrolled_index(TableIndices<3>(i,j,k)) + == + i*dim*dim+j*dim+k, + ExcInternalError()); + AssertThrow (t[TableIndices<3>(i,j,k)] == t[i][j][k], + ExcInternalError()); } deallog << "OK" << std::endl; } diff --git a/tests/base/tensor_complex.cc b/tests/base/tensor_complex.cc index 7d4dd563b0..068fb7e6ee 100644 --- a/tests/base/tensor_complex.cc +++ b/tests/base/tensor_complex.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 1998 - 2014 by the deal.II authors +// Copyright (C) 1998 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -54,8 +54,8 @@ int main () Tensor<2,dim,std::complex > t(a); Tensor<2,dim,std::complex > tt; Tensor<2,dim,std::complex > result(b); - Assert (transpose(transpose(t)) == t, ExcInternalError()); - Assert (transpose(transpose(result)) == result, ExcInternalError()); + AssertThrow (transpose(transpose(t)) == t, ExcInternalError()); + AssertThrow (transpose(transpose(result)) == result, ExcInternalError()); Vector > unrolled(9); diff --git a/tests/base/tensor_float.cc b/tests/base/tensor_float.cc index 5f39a7ee87..9d3121286e 100644 --- a/tests/base/tensor_float.cc +++ b/tests/base/tensor_float.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 1998 - 2014 by the deal.II authors +// Copyright (C) 1998 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -38,8 +38,8 @@ int main () Tensor<2,dim,float> t(a); Tensor<2,dim,float> tt; Tensor<2,dim,float> result(b); - Assert (transpose(transpose(t)) == t, ExcInternalError()); - Assert (transpose(transpose(result)) == result, ExcInternalError()); + AssertThrow (transpose(transpose(t)) == t, ExcInternalError()); + AssertThrow (transpose(transpose(result)) == result, ExcInternalError()); Vector unrolled(9); diff --git a/tests/base/tensor_nondefault_constructor.cc b/tests/base/tensor_nondefault_constructor.cc index 3606a242c9..0f890fa9b9 100644 --- a/tests/base/tensor_nondefault_constructor.cc +++ b/tests/base/tensor_nondefault_constructor.cc @@ -35,44 +35,44 @@ int main () float b[3] = {25,31,37}; const unsigned int dim=3; - + // rank 2 { Tensor<2,dim,float> t(a); Tensor<2,dim,double> dt(t), dt2; dt2 = t; - Assert (dt2 == dt, ExcInternalError()); - Assert (dt == dt2, ExcInternalError()); - + AssertThrow (dt2 == dt, ExcInternalError()); + AssertThrow (dt == dt2, ExcInternalError()); + Tensor<2,dim,float> ft(dt), ft2; ft2 = dt; - Assert (ft2 == ft, ExcInternalError()); - Assert (ft == ft2, ExcInternalError()); - + AssertThrow (ft2 == ft, ExcInternalError()); + AssertThrow (ft == ft2, ExcInternalError()); + Tensor<2,dim,std::complex > ct(dt), ct2; ct2 = dt; - Assert (ct2 == ct, ExcInternalError()); - Assert (ct == ct2, ExcInternalError()); + AssertThrow (ct2 == ct, ExcInternalError()); + AssertThrow (ct == ct2, ExcInternalError()); } - + // rank 1 { Tensor<1,dim,float> t(b); Tensor<1,dim,double> dt(t), dt2; dt2 = t; - Assert (dt2 == dt, ExcInternalError()); - Assert (dt == dt2, ExcInternalError()); - + AssertThrow (dt2 == dt, ExcInternalError()); + AssertThrow (dt == dt2, ExcInternalError()); + Tensor<1,dim,float> ft(dt),ft2; ft2 = dt; - Assert (ft2 == ft, ExcInternalError()); - Assert (ft == ft2, ExcInternalError()); - + AssertThrow (ft2 == ft, ExcInternalError()); + AssertThrow (ft == ft2, ExcInternalError()); + Tensor<1,dim,std::complex > ct(dt), ct2; ct2 = dt; - Assert (ct2 == ct, ExcInternalError()); - Assert (ct == ct2, ExcInternalError()); + AssertThrow (ct2 == ct, ExcInternalError()); + AssertThrow (ct == ct2, ExcInternalError()); } - + deallog << "OK." << std::endl; } diff --git a/tests/base/thread_local_storage_05.cc b/tests/base/thread_local_storage_05.cc index de64445869..e0efee78f4 100644 --- a/tests/base/thread_local_storage_05.cc +++ b/tests/base/thread_local_storage_05.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2008 - 2014 by the deal.II authors +// Copyright (C) 2008 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -28,8 +28,8 @@ struct X { X () - : - i(1) + : + i(1) {}; int i; @@ -43,16 +43,16 @@ void execute (Threads::Mutex &m) // check correct default initialization bool exists; int i = tls_data.get(exists).i; - Assert (i == 1, ExcInternalError()); - Assert (exists == false, ExcInternalError()); + AssertThrow (i == 1, ExcInternalError()); + AssertThrow (exists == false, ExcInternalError()); // set value tls_data.get(exists).i = 2; // try again. should have existed this time around i = tls_data.get(exists).i; - Assert (i == 2, ExcInternalError()); - Assert (exists == true, ExcInternalError()); + AssertThrow (i == 2, ExcInternalError()); + AssertThrow (exists == true, ExcInternalError()); // wait for the barrier to clear m.acquire (); @@ -61,8 +61,8 @@ void execute (Threads::Mutex &m) // at this point, the tls object should have been cleared and should // be back at its original value i = tls_data.get(exists).i; - Assert (i == 1, ExcInternalError()); - Assert (exists == false, ExcInternalError()); + AssertThrow (i == 1, ExcInternalError()); + AssertThrow (exists == false, ExcInternalError()); } diff --git a/tests/base/thread_local_storage_06.cc b/tests/base/thread_local_storage_06.cc index 16949e17c4..af20f5c442 100644 --- a/tests/base/thread_local_storage_06.cc +++ b/tests/base/thread_local_storage_06.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2008 - 2014 by the deal.II authors +// Copyright (C) 2008 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -29,8 +29,8 @@ struct X { X () - : - i(1) + : + i(1) {}; int i; @@ -54,16 +54,16 @@ void execute (Threads::Mutex &m) // check correct default initialization bool exists; int i = tls_data.get(exists).i; - Assert (i == 42, ExcInternalError()); - Assert (exists == false, ExcInternalError()); + AssertThrow (i == 42, ExcInternalError()); + AssertThrow (exists == false, ExcInternalError()); // set value tls_data.get(exists).i = 2; // try again. should have existed this time around i = tls_data.get(exists).i; - Assert (i == 2, ExcInternalError()); - Assert (exists == true, ExcInternalError()); + AssertThrow (i == 2, ExcInternalError()); + AssertThrow (exists == true, ExcInternalError()); // wait for the barrier to clear m.acquire (); @@ -72,8 +72,8 @@ void execute (Threads::Mutex &m) // at this point, the tls object should have been cleared and should // be back at its original value i = tls_data.get(exists).i; - Assert (i == 42, ExcInternalError()); - Assert (exists == false, ExcInternalError()); + AssertThrow (i == 42, ExcInternalError()); + AssertThrow (exists == false, ExcInternalError()); } diff --git a/tests/base/thread_validity_01.cc b/tests/base/thread_validity_01.cc index df0fc6b2eb..94e7a86c81 100644 --- a/tests/base/thread_validity_01.cc +++ b/tests/base/thread_validity_01.cc @@ -35,7 +35,7 @@ private: void execute (const X &x) { - Assert (x.i == 42, ExcInternalError()); + AssertThrow (x.i == 42, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/base/thread_validity_02.cc b/tests/base/thread_validity_02.cc index 397c4b593b..44a484032e 100644 --- a/tests/base/thread_validity_02.cc +++ b/tests/base/thread_validity_02.cc @@ -39,7 +39,7 @@ private: void execute (const X &x) { - Assert (x.i == 42, ExcInternalError()); + AssertThrow (x.i == 42, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/base/thread_validity_09.cc b/tests/base/thread_validity_09.cc index 4640f2f338..0b0c9bf831 100644 --- a/tests/base/thread_validity_09.cc +++ b/tests/base/thread_validity_09.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2008 - 2014 by the deal.II authors +// Copyright (C) 2008 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -73,5 +73,5 @@ int main() ; for (unsigned int i=0; i p (new X); - Assert (counter == 1, ExcInternalError()); + AssertThrow (counter == 1, ExcInternalError()); } - Assert (counter == 0, ExcInternalError()); + AssertThrow (counter == 0, ExcInternalError()); } // test with plain unique_ptr, but also copy stuff. this only works // with move constructors, so test only in C++11 mode #ifdef DEAL_II_WITH_CXX11 { - Assert (counter == 0, ExcInternalError()); + AssertThrow (counter == 0, ExcInternalError()); { std_cxx11::unique_ptr p (new X); - Assert (counter == 1, ExcInternalError()); + AssertThrow (counter == 1, ExcInternalError()); std_cxx11::unique_ptr q = std::move(p); - Assert (counter == 1, ExcInternalError()); + AssertThrow (counter == 1, ExcInternalError()); } - Assert (counter == 0, ExcInternalError()); + AssertThrow (counter == 0, ExcInternalError()); } #endif diff --git a/tests/base/utilities_01.cc b/tests/base/utilities_01.cc index 1b3a91e4ef..e4fde7ea9a 100644 --- a/tests/base/utilities_01.cc +++ b/tests/base/utilities_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -36,33 +36,33 @@ void test () v.push_back ("1"); v.push_back (" -12"); v.push_back ("+125 "); - Assert (Utilities::string_to_int (v).size() == 3, ExcInternalError()); + AssertThrow (Utilities::string_to_int (v).size() == 3, ExcInternalError()); deallog << Utilities::string_to_int (v)[0] << std::endl; deallog << Utilities::string_to_int (v)[1] << std::endl; deallog << Utilities::string_to_int (v)[2] << std::endl; { const char *p = "alpha, beta, gamma "; - Assert (Utilities::split_string_list (p).size() == 3, - ExcInternalError()); - Assert (Utilities::split_string_list (p)[0] == "alpha", - ExcInternalError()); - Assert (Utilities::split_string_list (p)[1] == "beta", - ExcInternalError()); - Assert (Utilities::split_string_list (p)[2] == "gamma", - ExcInternalError()); + AssertThrow (Utilities::split_string_list (p).size() == 3, + ExcInternalError()); + AssertThrow (Utilities::split_string_list (p)[0] == "alpha", + ExcInternalError()); + AssertThrow (Utilities::split_string_list (p)[1] == "beta", + ExcInternalError()); + AssertThrow (Utilities::split_string_list (p)[2] == "gamma", + ExcInternalError()); } { const char *p = "alpha; beta; gamma "; - Assert (Utilities::split_string_list (p, ';').size() == 3, - ExcInternalError()); - Assert (Utilities::split_string_list (p, ';')[0] == "alpha", - ExcInternalError()); - Assert (Utilities::split_string_list (p, ';')[1] == "beta", - ExcInternalError()); - Assert (Utilities::split_string_list (p, ';')[2] == "gamma", - ExcInternalError()); + AssertThrow (Utilities::split_string_list (p, ';').size() == 3, + ExcInternalError()); + AssertThrow (Utilities::split_string_list (p, ';')[0] == "alpha", + ExcInternalError()); + AssertThrow (Utilities::split_string_list (p, ';')[1] == "beta", + ExcInternalError()); + AssertThrow (Utilities::split_string_list (p, ';')[2] == "gamma", + ExcInternalError()); } deallog << Utilities::generate_normal_random_number (13, 44) << ' '; diff --git a/tests/base/utilities_03.cc b/tests/base/utilities_03.cc index 7af1161c09..52caf9db9c 100644 --- a/tests/base/utilities_03.cc +++ b/tests/base/utilities_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -33,7 +33,7 @@ void test () v.push_back ("1.5"); v.push_back (" -12.5"); v.push_back ("+125.5 "); - Assert (Utilities::string_to_double (v).size() == 3, ExcInternalError()); + AssertThrow (Utilities::string_to_double (v).size() == 3, ExcInternalError()); deallog << Utilities::string_to_double (v)[0] << std::endl; deallog << Utilities::string_to_double (v)[1] << std::endl; deallog << Utilities::string_to_double (v)[2] << std::endl; diff --git a/tests/base/utilities_05.cc b/tests/base/utilities_05.cc index 3906ac066d..19223c6f56 100644 --- a/tests/base/utilities_05.cc +++ b/tests/base/utilities_05.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -38,14 +38,14 @@ void test () std::ostringstream s; s << "test test" << number << "test test"; - Assert (Utilities::get_integer_at_position (s.str(), - 9).first - == number, - ExcInternalError()); - Assert (Utilities::get_integer_at_position (s.str(), - 9).second - == i+1, - ExcInternalError()); + AssertThrow (Utilities::get_integer_at_position (s.str(), + 9).first + == number, + ExcInternalError()); + AssertThrow (Utilities::get_integer_at_position (s.str(), + 9).second + == i+1, + ExcInternalError()); deallog << i << ' ' << Utilities::get_integer_at_position (s.str(), 9).first diff --git a/tests/base/work_stream_03.cc b/tests/base/work_stream_03.cc index b0587ad3e7..b0c802c708 100644 --- a/tests/base/work_stream_03.cc +++ b/tests/base/work_stream_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -115,8 +115,8 @@ mass_assembler(const typename Triangulation::active_cell_iterator &cell, std_cxx11::bind(&zero_subrange, std_cxx11::_1, std_cxx11::_2, std_cxx11::ref(copy_data.cell_rhs)), 1); - Assert(q == data.x_fe_values.quadrature_point(0), - ExcInternalError()); + AssertThrow(q == data.x_fe_values.quadrature_point(0), + ExcInternalError()); copy_data.cell_rhs[0] = value(data.x_fe_values.quadrature_point(0)); } diff --git a/tests/base/work_stream_03_graph.cc b/tests/base/work_stream_03_graph.cc index afc0c12872..6ea92c8045 100644 --- a/tests/base/work_stream_03_graph.cc +++ b/tests/base/work_stream_03_graph.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -112,8 +112,8 @@ mass_assembler(const typename Triangulation::active_cell_iterator &cell, std_cxx11::bind(&zero_subrange, std_cxx11::_1, std_cxx11::_2, std_cxx11::ref(copy_data.cell_rhs)), 1); - Assert(q == data.x_fe_values.quadrature_point(0), - ExcInternalError()); + AssertThrow(q == data.x_fe_values.quadrature_point(0), + ExcInternalError()); copy_data.cell_rhs[0] = value(data.x_fe_values.quadrature_point(0)); } @@ -157,10 +157,10 @@ do_project() CopyData copy_data; copy_data.cell_rhs.resize(8); WorkStream::run(GraphColoring::make_graph_coloring (triangulation.begin_active(), - triangulation.end(), - std_cxx11::function - (const Triangulation::active_cell_iterator &)> - (&conflictor)), + triangulation.end(), + std_cxx11::function + (const Triangulation::active_cell_iterator &)> + (&conflictor)), &mass_assembler, std_cxx11::bind(©_local_to_global, std_cxx11::_1, &sum), assembler_data, copy_data, 8, 1); diff --git a/tests/base/work_stream_05.cc b/tests/base/work_stream_05.cc index 795ebc6c38..43f77000a9 100644 --- a/tests/base/work_stream_05.cc +++ b/tests/base/work_stream_05.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2008 - 2014 by the deal.II authors +// Copyright (C) 2008 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -41,8 +41,8 @@ struct CopyData void worker (const std::vector::iterator &i, - ScratchData &, - CopyData &ad) + ScratchData &, + CopyData &ad) { ad.computed = *i * 2; } @@ -72,13 +72,13 @@ void test () { const unsigned int ad_computed = v[i] * 2; for (unsigned int j=0; j<5; ++j) - comp((ad_computed+j) % result.size()) += ad_computed; + comp((ad_computed+j) % result.size()) += ad_computed; } // and compare for (unsigned int i=0; i::iterator &i, - ScratchData &, - CopyData &ad) + ScratchData &, + CopyData &ad) { ad.computed = *i * 2; } @@ -75,10 +75,10 @@ void test () v.push_back (i); WorkStream::run (GraphColoring::make_graph_coloring (v.begin(), v.end(), - std_cxx11::function - (const std::vector::iterator &)> - (&conflictor)), - &worker, &copier, + std_cxx11::function + (const std::vector::iterator &)> + (&conflictor)), + &worker, &copier, ScratchData(), CopyData()); @@ -88,13 +88,13 @@ void test () { const unsigned int ad_computed = v[i] * 2; for (unsigned int j=0; j<5; ++j) - comp((ad_computed+j) % result.size()) += ad_computed; + comp((ad_computed+j) % result.size()) += ad_computed; } // and compare for (unsigned int i=0; i::active_cell_iterator cell = tria.begin_active(); - Assert (cell == cell, ExcInternalError()); - Assert (! (cell != cell), ExcInternalError()); - Assert (! (cell < cell), ExcInternalError()); + AssertThrow (cell == cell, ExcInternalError()); + AssertThrow (! (cell != cell), ExcInternalError()); + AssertThrow (! (cell < cell), ExcInternalError()); } // same with non-active iterators { const typename Triangulation::cell_iterator cell = tria.begin(); - Assert (cell == cell, ExcInternalError()); - Assert (! (cell != cell), ExcInternalError()); - Assert (! (cell < cell), ExcInternalError()); + AssertThrow (cell == cell, ExcInternalError()); + AssertThrow (! (cell != cell), ExcInternalError()); + AssertThrow (! (cell < cell), ExcInternalError()); } FE_Q fe (1); @@ -68,16 +68,16 @@ void test () { const typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(); - Assert (cell == cell, ExcInternalError()); - Assert (! (cell != cell), ExcInternalError()); - Assert (! (cell < cell), ExcInternalError()); + AssertThrow (cell == cell, ExcInternalError()); + AssertThrow (! (cell != cell), ExcInternalError()); + AssertThrow (! (cell < cell), ExcInternalError()); } { const typename DoFHandler::cell_iterator cell = dof_handler.begin(); - Assert (cell == cell, ExcInternalError()); - Assert (! (cell != cell), ExcInternalError()); - Assert (! (cell < cell), ExcInternalError()); + AssertThrow (cell == cell, ExcInternalError()); + AssertThrow (! (cell != cell), ExcInternalError()); + AssertThrow (! (cell < cell), ExcInternalError()); } // finally check that two iterators diff --git a/tests/bits/anna_4.cc b/tests/bits/anna_4.cc index 39d314f933..6bfe6cc768 100644 --- a/tests/bits/anna_4.cc +++ b/tests/bits/anna_4.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2002 - 2014 by the deal.II authors +// Copyright (C) 2002 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -210,11 +210,11 @@ void FindBug::dirichlet_conditions () { if (fixed_dofs[i] == true) { - Assert (dirichlet_dofs[i] == 0, ExcInternalError()); + AssertThrow (dirichlet_dofs[i] == 0, ExcInternalError()); } else { - Assert (dirichlet_dofs[i] == 1, ExcInternalError()); + AssertThrow (dirichlet_dofs[i] == 1, ExcInternalError()); }; }; diff --git a/tests/bits/anna_6.cc b/tests/bits/anna_6.cc index 62e7fa2cfe..82ebf4635c 100644 --- a/tests/bits/anna_6.cc +++ b/tests/bits/anna_6.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2002 - 2014 by the deal.II authors +// Copyright (C) 2002 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -242,10 +242,10 @@ void ImposeBC::test_interpolate_BC () // nedelec boundary DoF i has // wrongly been set to some // value - Assert ((p_boundary_dofs[i] && boundary_values[i] == 1.) - || - (!(p_boundary_dofs[i]) && boundary_values[i] != 1.), - ExcInternalError()); + AssertThrow ((p_boundary_dofs[i] && boundary_values[i] == 1.) + || + (!(p_boundary_dofs[i]) && boundary_values[i] != 1.), + ExcInternalError()); deallog << boundary_values[i] << ' '; } diff --git a/tests/bits/block_sparse_matrix_2.cc b/tests/bits/block_sparse_matrix_2.cc index 908fffd070..81ad14c79a 100644 --- a/tests/bits/block_sparse_matrix_2.cc +++ b/tests/bits/block_sparse_matrix_2.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2002 - 2014 by the deal.II authors +// Copyright (C) 2002 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -79,19 +79,19 @@ int main() B.reinit (sparsity_pattern); // check some sizes - Assert (B.m() == B.block(0,0).m() + B.block(1,1).m(), - ExcInternalError()); - Assert (B.n() == B.block(0,0).n() + B.block(1,1).n(), - ExcInternalError()); - Assert (B.n_block_rows() == 2, ExcInternalError()); - Assert (B.n_block_cols() == 2, ExcInternalError()); + AssertThrow (B.m() == B.block(0,0).m() + B.block(1,1).m(), + ExcInternalError()); + AssertThrow (B.n() == B.block(0,0).n() + B.block(1,1).n(), + ExcInternalError()); + AssertThrow (B.n_block_rows() == 2, ExcInternalError()); + AssertThrow (B.n_block_cols() == 2, ExcInternalError()); // then clear, and check again B.clear (); - Assert (B.m() == 0, ExcInternalError()); - Assert (B.n() == 0, ExcInternalError()); - Assert (B.n_block_rows() == 0, ExcInternalError()); - Assert (B.n_block_cols() == 0, ExcInternalError()); + AssertThrow (B.m() == 0, ExcInternalError()); + AssertThrow (B.n() == 0, ExcInternalError()); + AssertThrow (B.n_block_rows() == 0, ExcInternalError()); + AssertThrow (B.n_block_cols() == 0, ExcInternalError()); deallog << "OK" << std::endl; diff --git a/tests/bits/block_sparse_matrix_iterator_04.cc b/tests/bits/block_sparse_matrix_iterator_04.cc index b6d73209c8..deca7f12d0 100644 --- a/tests/bits/block_sparse_matrix_iterator_04.cc +++ b/tests/bits/block_sparse_matrix_iterator_04.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -46,7 +46,7 @@ void test () BlockSparseMatrix::const_iterator it2 = m.end(); // make sure that the two of them match - Assert (it == it2, ExcInternalError()); + AssertThrow (it == it2, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/block_vector_iterator_01.cc b/tests/bits/block_vector_iterator_01.cc index f65c07cffe..92de061db4 100644 --- a/tests/bits/block_vector_iterator_01.cc +++ b/tests/bits/block_vector_iterator_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -33,9 +33,9 @@ void test () // iterator { BlockVector::const_iterator i=v.begin(); - Assert (*i == 1, ExcInternalError()); + AssertThrow (*i == 1, ExcInternalError()); ++i; - Assert (*i == 2, ExcInternalError()); + AssertThrow (*i == 2, ExcInternalError()); } // same, but create iterator in a different @@ -43,17 +43,17 @@ void test () { BlockVector::const_iterator i=const_cast&>(v).begin(); - Assert (*i == 1, ExcInternalError()); + AssertThrow (*i == 1, ExcInternalError()); ++i; - Assert (*i == 2, ExcInternalError()); + AssertThrow (*i == 2, ExcInternalError()); } // read through a read-write iterator { BlockVector::iterator i = v.begin(); - Assert (*i == 1, ExcInternalError()); + AssertThrow (*i == 1, ExcInternalError()); ++i; - Assert (*i == 2, ExcInternalError()); + AssertThrow (*i == 2, ExcInternalError()); } // write through a read-write iterator @@ -68,9 +68,9 @@ void test () // and read again { BlockVector::iterator i = v.begin(); - Assert (*i == 2, ExcInternalError()); + AssertThrow (*i == 2, ExcInternalError()); ++i; - Assert (*i == 3, ExcInternalError()); + AssertThrow (*i == 3, ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/bits/block_vector_iterator_02.cc b/tests/bits/block_vector_iterator_02.cc index 236fd6f70c..71870f8b36 100644 --- a/tests/bits/block_vector_iterator_02.cc +++ b/tests/bits/block_vector_iterator_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -33,8 +33,8 @@ void test () // iterator { BlockVector::const_iterator i=v.begin(); - Assert (i[0] == 1, ExcInternalError()); - Assert (i[1] == 2, ExcInternalError()); + AssertThrow (i[0] == 1, ExcInternalError()); + AssertThrow (i[1] == 2, ExcInternalError()); } // same, but create iterator in a different @@ -42,15 +42,15 @@ void test () { BlockVector::const_iterator i=const_cast&>(v).begin(); - Assert (i[0] == 1, ExcInternalError()); - Assert (i[1] == 2, ExcInternalError()); + AssertThrow (i[0] == 1, ExcInternalError()); + AssertThrow (i[1] == 2, ExcInternalError()); } // read through a read-write iterator { BlockVector::iterator i = v.begin(); - Assert (i[0] == 1, ExcInternalError()); - Assert (i[1] == 2, ExcInternalError()); + AssertThrow (i[0] == 1, ExcInternalError()); + AssertThrow (i[1] == 2, ExcInternalError()); } // write through a read-write iterator @@ -63,8 +63,8 @@ void test () // and read again { BlockVector::iterator i = v.begin(); - Assert (i[0] == 2, ExcInternalError()); - Assert (i[1] == 3, ExcInternalError()); + AssertThrow (i[0] == 2, ExcInternalError()); + AssertThrow (i[1] == 3, ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/bits/block_vector_vector_01.cc b/tests/bits/block_vector_vector_01.cc index e660580b12..ed4f673893 100644 --- a/tests/bits/block_vector_vector_01.cc +++ b/tests/bits/block_vector_vector_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -33,7 +33,7 @@ void test (Vector &v) v(i) = i+1.; Vector w(v); - Assert (w==v, ExcInternalError()); + AssertThrow (w==v, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/chunk_sparse_matrix_01.cc b/tests/bits/chunk_sparse_matrix_01.cc index c768b418a6..25bbb66cc6 100644 --- a/tests/bits/chunk_sparse_matrix_01.cc +++ b/tests/bits/chunk_sparse_matrix_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -46,12 +46,12 @@ void test (const unsigned int chunk_size) for (unsigned int j=0; j m(sp); - Assert (m.m() == 5, ExcInternalError()); - Assert (m.n() == 5, ExcInternalError()); + AssertThrow (m.m() == 5, ExcInternalError()); + AssertThrow (m.n() == 5, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/chunk_sparse_matrix_05.cc b/tests/bits/chunk_sparse_matrix_05.cc index e5a508c227..f8a0279703 100644 --- a/tests/bits/chunk_sparse_matrix_05.cc +++ b/tests/bits/chunk_sparse_matrix_05.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -55,11 +55,15 @@ void test (const unsigned int chunk_size) deallog << m.n_nonzero_elements() << std::endl; if (chunk_size == 1) - Assert (m.n_nonzero_elements() == counter, - ExcInternalError()) - else + { + Assert (m.n_nonzero_elements() == counter, + ExcInternalError()); + } + else + { Assert (m.n_nonzero_elements() >= counter, ExcInternalError()); + } deallog << "OK" << std::endl; } diff --git a/tests/bits/chunk_sparse_matrix_05a.cc b/tests/bits/chunk_sparse_matrix_05a.cc index 6ac8cfb5c5..9a537ec358 100644 --- a/tests/bits/chunk_sparse_matrix_05a.cc +++ b/tests/bits/chunk_sparse_matrix_05a.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -50,11 +50,15 @@ void test (const unsigned int chunk_size) deallog << m.n_nonzero_elements() << std::endl; if (chunk_size == 1) - Assert (m.n_nonzero_elements() == counter, - ExcInternalError()) - else - Assert (m.n_nonzero_elements() >= counter, - ExcInternalError()); + { + AssertThrow (m.n_nonzero_elements() == counter, + ExcInternalError()); + } + else + { + AssertThrow (m.n_nonzero_elements() >= counter, + ExcInternalError()); + } deallog << "OK" << std::endl; } diff --git a/tests/bits/chunk_sparse_matrix_09.cc b/tests/bits/chunk_sparse_matrix_09.cc index ded4fdb47b..1a038848aa 100644 --- a/tests/bits/chunk_sparse_matrix_09.cc +++ b/tests/bits/chunk_sparse_matrix_09.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -48,12 +48,12 @@ void test (const unsigned int chunk_size) for (unsigned int j=0; jrow()==i->column())) { - Assert (std::fabs(i->value() - i->row()*i->column()) < 1e-14, - ExcInternalError()); + AssertThrow (std::fabs(i->value() - i->row()*i->column()) < 1e-14, + ExcInternalError()); } else - Assert (i->value() == 0, ExcInternalError()); + AssertThrow (i->value() == 0, ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/bits/chunk_sparse_matrix_iterator_03.cc b/tests/bits/chunk_sparse_matrix_iterator_03.cc index f29c5273e9..c7c5b14f5a 100644 --- a/tests/bits/chunk_sparse_matrix_iterator_03.cc +++ b/tests/bits/chunk_sparse_matrix_iterator_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -53,11 +53,11 @@ void test (const unsigned int chunk_size) || (i->row()==i->column())) { - Assert (std::fabs(i->value() - i->row()*i->column()) < 1e-14, - ExcInternalError()); + AssertThrow (std::fabs(i->value() - i->row()*i->column()) < 1e-14, + ExcInternalError()); } else - Assert (i->value() == 0, ExcInternalError()); + AssertThrow (i->value() == 0, ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/bits/chunk_sparse_matrix_iterator_11.cc b/tests/bits/chunk_sparse_matrix_iterator_11.cc index 971ae3050e..b12392ed9f 100644 --- a/tests/bits/chunk_sparse_matrix_iterator_11.cc +++ b/tests/bits/chunk_sparse_matrix_iterator_11.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -42,17 +42,17 @@ void test (const unsigned int chunk_size) ChunkSparseMatrix::iterator k = A.begin(), j = ++A.begin(); - Assert (k < j, ExcInternalError()); - Assert (j > k, ExcInternalError()); + AssertThrow (k < j, ExcInternalError()); + AssertThrow (j > k, ExcInternalError()); - Assert (!(j < k), ExcInternalError()); - Assert (!(k > j), ExcInternalError()); + AssertThrow (!(j < k), ExcInternalError()); + AssertThrow (!(k > j), ExcInternalError()); - Assert (k != j, ExcInternalError()); - Assert (!(k == j), ExcInternalError()); + AssertThrow (k != j, ExcInternalError()); + AssertThrow (!(k == j), ExcInternalError()); - Assert (k == k, ExcInternalError()); - Assert (!(k != k), ExcInternalError()); + AssertThrow (k == k, ExcInternalError()); + AssertThrow (!(k != k), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/chunk_sparse_matrix_iterator_12.cc b/tests/bits/chunk_sparse_matrix_iterator_12.cc index 93c7fa8332..2020038904 100644 --- a/tests/bits/chunk_sparse_matrix_iterator_12.cc +++ b/tests/bits/chunk_sparse_matrix_iterator_12.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -41,17 +41,17 @@ void test (const unsigned int chunk_size) ChunkSparseMatrix::const_iterator k = A.begin(), j = ++A.begin(); - Assert (k < j, ExcInternalError()); - Assert (j > k, ExcInternalError()); + AssertThrow (k < j, ExcInternalError()); + AssertThrow (j > k, ExcInternalError()); - Assert (!(j < k), ExcInternalError()); - Assert (!(k > j), ExcInternalError()); + AssertThrow (!(j < k), ExcInternalError()); + AssertThrow (!(k > j), ExcInternalError()); - Assert (k != j, ExcInternalError()); - Assert (!(k == j), ExcInternalError()); + AssertThrow (k != j, ExcInternalError()); + AssertThrow (!(k == j), ExcInternalError()); - Assert (k == k, ExcInternalError()); - Assert (!(k != k), ExcInternalError()); + AssertThrow (k == k, ExcInternalError()); + AssertThrow (!(k != k), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/chunk_sparse_matrix_iterator_13.cc b/tests/bits/chunk_sparse_matrix_iterator_13.cc index 4d004f30a4..203eb8ea35 100644 --- a/tests/bits/chunk_sparse_matrix_iterator_13.cc +++ b/tests/bits/chunk_sparse_matrix_iterator_13.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -43,36 +43,36 @@ void test (const unsigned int chunk_size) ChunkSparseMatrix m(sp); for (unsigned int row=0; row > &v) // check that they are ok, and this time // all of them for (unsigned int i=0; i (i+1., i+2.))) - || - ((pattern[i] == false) && (v(i) == std::complex (0)))), - ExcInternalError()); + AssertThrow ((((pattern[i] == true) && (v(i) == std::complex (i+1., i+2.))) + || + ((pattern[i] == false) && (v(i) == std::complex (0)))), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_13.cc b/tests/bits/complex_vector_13.cc index 434f580136..a2d1d40c70 100644 --- a/tests/bits/complex_vector_13.cc +++ b/tests/bits/complex_vector_13.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -41,10 +41,10 @@ void test (Vector > &v) // check that they are ok, and this time // all of them for (unsigned int i=0; i (i+1., i+2.))) - || - ((pattern[i] == false) && (v(i) == std::complex (0)))), - ExcInternalError()); + AssertThrow ((((pattern[i] == true) && (v(i) == std::complex (i+1., i+2.))) + || + ((pattern[i] == false) && (v(i) == std::complex (0)))), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_14.cc b/tests/bits/complex_vector_14.cc index 4047198304..d32c6bbb77 100644 --- a/tests/bits/complex_vector_14.cc +++ b/tests/bits/complex_vector_14.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -47,10 +47,10 @@ void test (Vector > &v) // check that they are ok, and this time // all of them for (unsigned int i=0; i (i+1., i+2.))) - || - ((pattern[i] == false) && (v(i) == std::complex(0))), - ExcInternalError()); + AssertThrow (((pattern[i] == true) && (v(i) == std::complex (i+1., i+2.))) + || + ((pattern[i] == false) && (v(i) == std::complex(0))), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_15.cc b/tests/bits/complex_vector_15.cc index 8eeac93fc8..bf42dc7c48 100644 --- a/tests/bits/complex_vector_15.cc +++ b/tests/bits/complex_vector_15.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -44,10 +44,10 @@ void test (Vector > &v) // check that they are ok, and this time // all of them for (unsigned int i=0; i (i+1., i+2.))) - || - ((pattern[i] == false) && (v(i) == std::complex(0))), - ExcInternalError()); + AssertThrow (((pattern[i] == true) && (v(i) == 2.*std::complex (i+1., i+2.))) + || + ((pattern[i] == false) && (v(i) == std::complex(0))), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_16.cc b/tests/bits/complex_vector_16.cc index 831aead7c4..0758c9f9b6 100644 --- a/tests/bits/complex_vector_16.cc +++ b/tests/bits/complex_vector_16.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -46,10 +46,10 @@ void test (Vector > &v) // check that they are ok, and this time // all of them for (unsigned int i=0; i (i+1., i+2.))) - || - ((pattern[i] == false) && (v(i) == std::complex (0))), - ExcInternalError()); + AssertThrow (((pattern[i] == true) && (v(i) == std::complex (i+1., i+2.))) + || + ((pattern[i] == false) && (v(i) == std::complex (0))), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_17.cc b/tests/bits/complex_vector_17.cc index 2f02884228..ac23d3e59a 100644 --- a/tests/bits/complex_vector_17.cc +++ b/tests/bits/complex_vector_17.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -36,7 +36,7 @@ void test (Vector > &v) v.compress (); // then check the norm - Assert (v.l1_norm() == norm, ExcInternalError()); + AssertThrow (v.l1_norm() == norm, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_18.cc b/tests/bits/complex_vector_18.cc index eca53f811a..f73807bf59 100644 --- a/tests/bits/complex_vector_18.cc +++ b/tests/bits/complex_vector_18.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -37,7 +37,7 @@ void test (Vector > &v) v.compress (); // then check the norm - Assert (std::fabs((v.l2_norm() - std::sqrt(norm))/std::sqrt(norm)) < 1e-14, ExcInternalError()); + AssertThrow (std::fabs((v.l2_norm() - std::sqrt(norm))/std::sqrt(norm)) < 1e-14, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_19.cc b/tests/bits/complex_vector_19.cc index 11bf49ebd2..e58dcd15b3 100644 --- a/tests/bits/complex_vector_19.cc +++ b/tests/bits/complex_vector_19.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -37,7 +37,7 @@ void test (Vector > &v) v.compress (); // then check the norm - Assert (v.linfty_norm() == norm, ExcInternalError()); + AssertThrow (v.linfty_norm() == norm, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_20.cc b/tests/bits/complex_vector_20.cc index f97b32d5b0..78105a2af0 100644 --- a/tests/bits/complex_vector_20.cc +++ b/tests/bits/complex_vector_20.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -42,10 +42,10 @@ void test (Vector > &v) // check that the entries are ok for (unsigned int i=0; i (i+1., i+2.)*5./4.)) - || - ((pattern[i] == false) && (v(i) == std::complex(0))), - ExcInternalError()); + AssertThrow (((pattern[i] == true) && (v(i) == std::complex (i+1., i+2.)*5./4.)) + || + ((pattern[i] == false) && (v(i) == std::complex(0))), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_21.cc b/tests/bits/complex_vector_21.cc index 7d8e6589b6..302b8ac119 100644 --- a/tests/bits/complex_vector_21.cc +++ b/tests/bits/complex_vector_21.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -42,10 +42,10 @@ void test (Vector > &v) // check that the entries are ok for (unsigned int i=0; i (i+1., i+2.)*3./4.)) - || - ((pattern[i] == false) && (v(i) == std::complex(0))), - ExcInternalError()); + AssertThrow (((pattern[i] == true) && (v(i) == std::complex (i+1., i+2.)*3./4.)) + || + ((pattern[i] == false) && (v(i) == std::complex(0))), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_21_negative.cc b/tests/bits/complex_vector_21_negative.cc index 799ef47f43..e1e43b4a8b 100644 --- a/tests/bits/complex_vector_21_negative.cc +++ b/tests/bits/complex_vector_21_negative.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -44,10 +44,10 @@ void test (Vector > &v) // check that the entries are ok for (unsigned int i=0; i (i+1., i+2.)*3./4.) == std::complex(0))) - || - ((pattern[i] == false) && (v(i) == std::complex(0))), - ExcInternalError()); + AssertThrow (((pattern[i] == true) && (v(i)-(-1.*i*std::complex (i+1., i+2.)*3./4.) == std::complex(0))) + || + ((pattern[i] == false) && (v(i) == std::complex(0))), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_22.cc b/tests/bits/complex_vector_22.cc index 4c6e380416..08d5a025b3 100644 --- a/tests/bits/complex_vector_22.cc +++ b/tests/bits/complex_vector_22.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -39,7 +39,7 @@ void test (Vector > &v, w.compress (); // make sure the scalar product is zero - Assert (v*w == std::complex(0), ExcInternalError()); + AssertThrow (v*w == std::complex(0), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_23.cc b/tests/bits/complex_vector_23.cc index 5ee614b620..85afc476f9 100644 --- a/tests/bits/complex_vector_23.cc +++ b/tests/bits/complex_vector_23.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -50,10 +50,10 @@ void test (Vector > &v, deallog << v *w << ' ' << w *v << ' ' << product << ' ' << std::conj(product) << std::endl; - Assert (v*w == product, ExcInternalError()); + AssertThrow (v*w == product, ExcInternalError()); // also make sure that v*w=conj(w*v) - Assert (w*v == std::conj(product), ExcInternalError()); + AssertThrow (w*v == std::conj(product), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_25.cc b/tests/bits/complex_vector_25.cc index 6c1a0e9fe0..dde4413d6f 100644 --- a/tests/bits/complex_vector_25.cc +++ b/tests/bits/complex_vector_25.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -35,8 +35,8 @@ void test (Vector > &v) // vector is really empty const unsigned int sz = v.size(); v = 0; - Assert (v.size() == sz, ExcInternalError()); - Assert (v.l2_norm() == 0, ExcInternalError()); + AssertThrow (v.size() == sz, ExcInternalError()); + AssertThrow (v.l2_norm() == 0, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_26.cc b/tests/bits/complex_vector_26.cc index 8bf32acedd..9511ab7cc6 100644 --- a/tests/bits/complex_vector_26.cc +++ b/tests/bits/complex_vector_26.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -34,8 +34,8 @@ void test (Vector > &v) const unsigned int sz = v.size(); v = 2; - Assert (v.size() == sz, ExcInternalError()); - Assert (v.l2_norm() == std::sqrt(4.*sz), ExcInternalError()); + AssertThrow (v.size() == sz, ExcInternalError()); + AssertThrow (v.l2_norm() == std::sqrt(4.*sz), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_30.cc b/tests/bits/complex_vector_30.cc index b6d9134c68..4ef30593c6 100644 --- a/tests/bits/complex_vector_30.cc +++ b/tests/bits/complex_vector_30.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -35,8 +35,8 @@ void test (Vector > &v) // then resize with setting to zero v.reinit (13, false); - Assert (v.size() == 13, ExcInternalError()); - Assert (v.l2_norm() == 0, ExcInternalError()); + AssertThrow (v.size() == 13, ExcInternalError()); + AssertThrow (v.l2_norm() == 0, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_31.cc b/tests/bits/complex_vector_31.cc index 83253fff7e..9abd97aef9 100644 --- a/tests/bits/complex_vector_31.cc +++ b/tests/bits/complex_vector_31.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -37,8 +37,8 @@ void test (Vector > &v) v.compress (); // then check the norm - Assert (std::abs(v.norm_sqr() - norm) < 1e-14*std::abs(norm), - ExcInternalError()); + AssertThrow (std::abs(v.norm_sqr() - norm) < 1e-14*std::abs(norm), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_32.cc b/tests/bits/complex_vector_32.cc index 405465d293..8fbfc7d7ba 100644 --- a/tests/bits/complex_vector_32.cc +++ b/tests/bits/complex_vector_32.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -36,9 +36,9 @@ void test (Vector > &v) v.compress (); // then check the norm - Assert (std::abs(v.mean_value() - sum/(1.*v.size())) < - 1e-14*std::abs(sum)/v.size(), - ExcInternalError()); + AssertThrow (std::abs(v.mean_value() - sum/(1.*v.size())) < + 1e-14*std::abs(sum)/v.size(), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_33.cc b/tests/bits/complex_vector_33.cc index caeff252a0..cb953ce96e 100644 --- a/tests/bits/complex_vector_33.cc +++ b/tests/bits/complex_vector_33.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -37,9 +37,9 @@ void test (Vector > &v) v.compress (); // then check the norm - Assert (std::abs(v.lp_norm(3) - std::pow(sum, 1./3.)) < - 1e-14*std::abs(std::pow(sum, 1./3.)), - ExcInternalError()); + AssertThrow (std::abs(v.lp_norm(3) - std::pow(sum, 1./3.)) < + 1e-14*std::abs(std::pow(sum, 1./3.)), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_34.cc b/tests/bits/complex_vector_34.cc index 69c687a0db..b36836687c 100644 --- a/tests/bits/complex_vector_34.cc +++ b/tests/bits/complex_vector_34.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -37,7 +37,7 @@ void test (Vector > &v) v = 0; // then check all_zero - Assert (v.all_zero() == true, ExcInternalError()); + AssertThrow (v.all_zero() == true, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_35.cc b/tests/bits/complex_vector_35.cc index e9467095d4..827e1aeb18 100644 --- a/tests/bits/complex_vector_35.cc +++ b/tests/bits/complex_vector_35.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -46,15 +46,15 @@ void test (Vector > &v, { if (i%3 == 0) { - Assert (w(i) == std::complex (i+1., i+2.), - ExcInternalError()); - Assert (v(i) == std::complex (i+1., i+2.)+1.*i, - ExcInternalError()); + AssertThrow (w(i) == std::complex (i+1., i+2.), + ExcInternalError()); + AssertThrow (v(i) == std::complex (i+1., i+2.)+1.*i, + ExcInternalError()); } else { - Assert (w(i) == 0., ExcInternalError()); - Assert (v(i) == 1.*i, ExcInternalError()); + AssertThrow (w(i) == 0., ExcInternalError()); + AssertThrow (v(i) == 1.*i, ExcInternalError()); } } diff --git a/tests/bits/complex_vector_36.cc b/tests/bits/complex_vector_36.cc index 6a0822d722..a9ec3599f8 100644 --- a/tests/bits/complex_vector_36.cc +++ b/tests/bits/complex_vector_36.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -46,15 +46,15 @@ void test (Vector > &v, { if (i%3 == 0) { - Assert (w(i) == std::complex (i+1., i+2.), - ExcInternalError()); - Assert (v(i) == std::complex (-1., -(i+2.)), - ExcInternalError()); + AssertThrow (w(i) == std::complex (i+1., i+2.), + ExcInternalError()); + AssertThrow (v(i) == std::complex (-1., -(i+2.)), + ExcInternalError()); } else { - Assert (w(i) == 0., ExcInternalError()); - Assert (v(i) == 1.*i, ExcInternalError()); + AssertThrow (w(i) == 0., ExcInternalError()); + AssertThrow (v(i) == 1.*i, ExcInternalError()); } } diff --git a/tests/bits/complex_vector_37.cc b/tests/bits/complex_vector_37.cc index 6826b73ff6..61c93d9c2a 100644 --- a/tests/bits/complex_vector_37.cc +++ b/tests/bits/complex_vector_37.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -35,8 +35,8 @@ void test (Vector > &v) // make sure we get the expected result for (unsigned int i=0; i (i+2., i+2.), - ExcInternalError()); + AssertThrow (v(i) == std::complex (i+2., i+2.), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_38.cc b/tests/bits/complex_vector_38.cc index c8010f0186..e711bc559a 100644 --- a/tests/bits/complex_vector_38.cc +++ b/tests/bits/complex_vector_38.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -41,10 +41,10 @@ void test (Vector > &v, // make sure we get the expected result for (unsigned int i=0; i (i+1., i+2.), - ExcInternalError()); - Assert (v(i) == 1.*i+std::complex (i+1., i+2.), - ExcInternalError()); + AssertThrow (w(i) == std::complex (i+1., i+2.), + ExcInternalError()); + AssertThrow (v(i) == 1.*i+std::complex (i+1., i+2.), + ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/bits/complex_vector_39.cc b/tests/bits/complex_vector_39.cc index 8d5c15fd03..e8d300167d 100644 --- a/tests/bits/complex_vector_39.cc +++ b/tests/bits/complex_vector_39.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -41,10 +41,10 @@ void test (Vector > &v, // make sure we get the expected result for (unsigned int i=0; i (i+1., i+2.), - ExcInternalError()); - Assert (v(i) == 1.*i+2.*std::complex (i+1., i+2.), - ExcInternalError()); + AssertThrow (w(i) == std::complex (i+1., i+2.), + ExcInternalError()); + AssertThrow (v(i) == 1.*i+2.*std::complex (i+1., i+2.), + ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/bits/complex_vector_40.cc b/tests/bits/complex_vector_40.cc index cb29dfb9f4..3c1153816a 100644 --- a/tests/bits/complex_vector_40.cc +++ b/tests/bits/complex_vector_40.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -44,10 +44,10 @@ void test (Vector > &v, // make sure we get the expected result for (unsigned int i=0; i (i+1., i+2.), ExcInternalError()); - Assert (x(i) == i+2., ExcInternalError()); - Assert (v(i) == 1.*i+2.*std::complex (i+1., i+2.)+3*(i+2.), - ExcInternalError()); + AssertThrow (w(i) == std::complex (i+1., i+2.), ExcInternalError()); + AssertThrow (x(i) == i+2., ExcInternalError()); + AssertThrow (v(i) == 1.*i+2.*std::complex (i+1., i+2.)+3*(i+2.), + ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/bits/complex_vector_41.cc b/tests/bits/complex_vector_41.cc index 12bd239d7f..77f09c9439 100644 --- a/tests/bits/complex_vector_41.cc +++ b/tests/bits/complex_vector_41.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -41,10 +41,10 @@ void test (Vector > &v, // make sure we get the expected result for (unsigned int i=0; i (i+1., i+2.), - ExcInternalError()); - Assert (v(i) == 2.*i+std::complex (i+1., i+2.), - ExcInternalError()); + AssertThrow (w(i) == std::complex (i+1., i+2.), + ExcInternalError()); + AssertThrow (v(i) == 2.*i+std::complex (i+1., i+2.), + ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/bits/complex_vector_42.cc b/tests/bits/complex_vector_42.cc index b3e3bdf1fe..98b63b6516 100644 --- a/tests/bits/complex_vector_42.cc +++ b/tests/bits/complex_vector_42.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -41,10 +41,10 @@ void test (Vector > &v, // make sure we get the expected result for (unsigned int i=0; i (i+1., i+2.), - ExcInternalError()); - Assert (v(i) == 3.*i+2.*std::complex (i+1., i+2.), - ExcInternalError()); + AssertThrow (w(i) == std::complex (i+1., i+2.), + ExcInternalError()); + AssertThrow (v(i) == 3.*i+2.*std::complex (i+1., i+2.), + ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/bits/complex_vector_43.cc b/tests/bits/complex_vector_43.cc index e2b41263f5..f7d96ca86e 100644 --- a/tests/bits/complex_vector_43.cc +++ b/tests/bits/complex_vector_43.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -44,10 +44,10 @@ void test (Vector > &v, // make sure we get the expected result for (unsigned int i=0; i (i+1., i+2.), ExcInternalError()); - Assert (x(i) == i+2., ExcInternalError()); - Assert (v(i) == 1.5*i+2.*std::complex (i+1., i+2.)+3*(i+2.), - ExcInternalError()); + AssertThrow (w(i) == std::complex (i+1., i+2.), ExcInternalError()); + AssertThrow (x(i) == i+2., ExcInternalError()); + AssertThrow (v(i) == 1.5*i+2.*std::complex (i+1., i+2.)+3*(i+2.), + ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/bits/complex_vector_44.cc b/tests/bits/complex_vector_44.cc index b83c0ed936..15378dcdbb 100644 --- a/tests/bits/complex_vector_44.cc +++ b/tests/bits/complex_vector_44.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -47,15 +47,15 @@ void test (Vector > &v, // make sure we get the expected result for (unsigned int i=0; i (i+1., i+2.), - ExcInternalError()); - Assert (x(i) == i+2., ExcInternalError()); - Assert (y(i) == std::complex (i+3., i+4.), - ExcInternalError()); - Assert (v(i) == - 1.5*i+2.*std::complex (i+1., i+2.)+ - 3.*(i+2.)+4.*std::complex (i+3., i+4.), - ExcInternalError()); + AssertThrow (w(i) == std::complex (i+1., i+2.), + ExcInternalError()); + AssertThrow (x(i) == i+2., ExcInternalError()); + AssertThrow (y(i) == std::complex (i+3., i+4.), + ExcInternalError()); + AssertThrow (v(i) == + 1.5*i+2.*std::complex (i+1., i+2.)+ + 3.*(i+2.)+4.*std::complex (i+3., i+4.), + ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/bits/complex_vector_45.cc b/tests/bits/complex_vector_45.cc index a23425eb21..99fa43f89e 100644 --- a/tests/bits/complex_vector_45.cc +++ b/tests/bits/complex_vector_45.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -41,8 +41,8 @@ void test (Vector > &v, // make sure we get the expected result for (unsigned int i=0; i (i+1., i+2.), ExcInternalError()); - Assert (v(i) == 1.*i*std::complex (i+1., i+2.), ExcInternalError()); + AssertThrow (w(i) == std::complex (i+1., i+2.), ExcInternalError()); + AssertThrow (v(i) == 1.*i*std::complex (i+1., i+2.), ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/bits/complex_vector_46.cc b/tests/bits/complex_vector_46.cc index 5e2da7eeb3..9dd1cd592a 100644 --- a/tests/bits/complex_vector_46.cc +++ b/tests/bits/complex_vector_46.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -41,10 +41,10 @@ void test (Vector > &v, // make sure we get the expected result for (unsigned int i=0; i (i+1., i+2.), - ExcInternalError()); - Assert (v(i) == 2.*std::complex (i+1., i+2.), - ExcInternalError()); + AssertThrow (w(i) == std::complex (i+1., i+2.), + ExcInternalError()); + AssertThrow (v(i) == 2.*std::complex (i+1., i+2.), + ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/bits/complex_vector_47.cc b/tests/bits/complex_vector_47.cc index 943397f5a5..727e690d64 100644 --- a/tests/bits/complex_vector_47.cc +++ b/tests/bits/complex_vector_47.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -44,11 +44,11 @@ void test (Vector > &v, // make sure we get the expected result for (unsigned int i=0; i (i+1., i+2.), - ExcInternalError()); - Assert (x(i) == i+2., ExcInternalError()); - Assert (v(i) == 2.*std::complex (i+1., i+2.)+3.*(i+2.), - ExcInternalError()); + AssertThrow (w(i) == std::complex (i+1., i+2.), + ExcInternalError()); + AssertThrow (x(i) == i+2., ExcInternalError()); + AssertThrow (v(i) == 2.*std::complex (i+1., i+2.)+3.*(i+2.), + ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/bits/complex_vector_48.cc b/tests/bits/complex_vector_48.cc index 67816223fc..90761f840b 100644 --- a/tests/bits/complex_vector_48.cc +++ b/tests/bits/complex_vector_48.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -44,14 +44,14 @@ void test (Vector > &v, // make sure we get the expected result for (unsigned int i=0; i (i+2., i+3.), - ExcInternalError()); - Assert (x(i) == std::complex (i+3., i+4.), - ExcInternalError()); - Assert (std::abs(v(i) - - std::complex (i+2., i+3.) / - std::complex (i+3., i+4.)) < 1e-14*std::abs(v(i)), - ExcInternalError()); + AssertThrow (w(i) == std::complex (i+2., i+3.), + ExcInternalError()); + AssertThrow (x(i) == std::complex (i+3., i+4.), + ExcInternalError()); + AssertThrow (std::abs(v(i) - + std::complex (i+2., i+3.) / + std::complex (i+3., i+4.)) < 1e-14*std::abs(v(i)), + ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/bits/complex_vector_equality_1.cc b/tests/bits/complex_vector_equality_1.cc index 13e45d61d6..93771983f6 100644 --- a/tests/bits/complex_vector_equality_1.cc +++ b/tests/bits/complex_vector_equality_1.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -37,7 +37,7 @@ void test (Vector > &v, w(i) = std::complex (i+1., i+2.); } - Assert (!(v==w), ExcInternalError()); + AssertThrow (!(v==w), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_equality_2.cc b/tests/bits/complex_vector_equality_2.cc index 6be2d3058a..e701c78c90 100644 --- a/tests/bits/complex_vector_equality_2.cc +++ b/tests/bits/complex_vector_equality_2.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -39,7 +39,7 @@ void test (Vector > &v, // but then copy elements and make sure the // vectors are actually equal v = w; - Assert (v==w, ExcInternalError()); + AssertThrow (v==w, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_equality_3.cc b/tests/bits/complex_vector_equality_3.cc index 092eb3d77a..0ec338b96f 100644 --- a/tests/bits/complex_vector_equality_3.cc +++ b/tests/bits/complex_vector_equality_3.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -37,7 +37,7 @@ void test (Vector > &v, w(i) = std::complex (i+1., i+2.); } - Assert (v.operator != (w), ExcInternalError()); + AssertThrow (v.operator != (w), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_equality_4.cc b/tests/bits/complex_vector_equality_4.cc index b0710e790d..3a3a26111d 100644 --- a/tests/bits/complex_vector_equality_4.cc +++ b/tests/bits/complex_vector_equality_4.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -39,7 +39,7 @@ void test (Vector > &v, // but then copy elements and make sure the // vectors are actually equal v = w; - Assert (! (v.operator != (w)), ExcInternalError()); + AssertThrow (! (v.operator != (w)), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_equality_5.cc b/tests/bits/complex_vector_equality_5.cc index 55a860c3b6..9fb839366c 100644 --- a/tests/bits/complex_vector_equality_5.cc +++ b/tests/bits/complex_vector_equality_5.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -37,8 +37,8 @@ void test (Vector > &v, w(i) = std::complex (i+1., i+2.); } - Assert (!(v==w), ExcInternalError()); - Assert (!(w==v), ExcInternalError()); + AssertThrow (!(v==w), ExcInternalError()); + AssertThrow (!(w==v), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_equality_6.cc b/tests/bits/complex_vector_equality_6.cc index eb3f16ecb2..77eea4c871 100644 --- a/tests/bits/complex_vector_equality_6.cc +++ b/tests/bits/complex_vector_equality_6.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -39,8 +39,8 @@ void test (Vector > &v, // but then copy elements and make sure the // vectors are actually equal v = w; - Assert (v==w, ExcInternalError()); - Assert (w==v, ExcInternalError()); + AssertThrow (v==w, ExcInternalError()); + AssertThrow (w==v, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_equality_7.cc b/tests/bits/complex_vector_equality_7.cc index 37ea53815f..54b76638e6 100644 --- a/tests/bits/complex_vector_equality_7.cc +++ b/tests/bits/complex_vector_equality_7.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -37,8 +37,8 @@ void test (Vector > &v, w(i) = std::complex (i+1., i+2.); } - Assert (v!=w, ExcInternalError()); - Assert (w!=v, ExcInternalError()); + AssertThrow (v!=w, ExcInternalError()); + AssertThrow (w!=v, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_equality_8.cc b/tests/bits/complex_vector_equality_8.cc index 2a7be6f8d3..627fd51b4d 100644 --- a/tests/bits/complex_vector_equality_8.cc +++ b/tests/bits/complex_vector_equality_8.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -39,8 +39,8 @@ void test (Vector > &v, // but then copy elements and make sure the // vectors are actually equal v = w; - Assert (! (v!=w), ExcInternalError()); - Assert (! (w!=v), ExcInternalError()); + AssertThrow (! (v!=w), ExcInternalError()); + AssertThrow (! (w!=v), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/complex_vector_vector_01.cc b/tests/bits/complex_vector_vector_01.cc index d832d7cc26..7284d02493 100644 --- a/tests/bits/complex_vector_vector_01.cc +++ b/tests/bits/complex_vector_vector_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -32,7 +32,7 @@ void test (Vector > &v) v(i) = std::complex (i+1., i+2.); Vector > w(v); - Assert (w==v, ExcInternalError()); + AssertThrow (w==v, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/compressed_set_sparsity_pattern_09.cc b/tests/bits/compressed_set_sparsity_pattern_09.cc index 3fb294c6b2..c5e932490d 100644 --- a/tests/bits/compressed_set_sparsity_pattern_09.cc +++ b/tests/bits/compressed_set_sparsity_pattern_09.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -28,10 +28,10 @@ void test () { const unsigned int N = 1000; CompressedSetSparsityPattern csp; - Assert (csp.empty() == true, ExcInternalError()); + AssertThrow (csp.empty() == true, ExcInternalError()); csp.reinit (N, N); - Assert (csp.empty() == false, ExcInternalError()); + AssertThrow (csp.empty() == false, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/compressed_sparsity_pattern_09.cc b/tests/bits/compressed_sparsity_pattern_09.cc index 0edbfd9390..2558e4e3db 100644 --- a/tests/bits/compressed_sparsity_pattern_09.cc +++ b/tests/bits/compressed_sparsity_pattern_09.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -28,10 +28,10 @@ void test () { const unsigned int N = 1000; CompressedSparsityPattern csp; - Assert (csp.empty() == true, ExcInternalError()); + AssertThrow (csp.empty() == true, ExcInternalError()); csp.reinit (N, N); - Assert (csp.empty() == false, ExcInternalError()); + AssertThrow (csp.empty() == false, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/data_out_03.cc b/tests/bits/data_out_03.cc index 4451126952..00c9397042 100644 --- a/tests/bits/data_out_03.cc +++ b/tests/bits/data_out_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -92,15 +92,15 @@ check_this (const DoFHandler &dof_handler, // finally make sure that we have // read everything back in // correctly - Assert (data_out.get_dataset_names() == reader.get_dataset_names(), - ExcInternalError()); + AssertThrow (data_out.get_dataset_names() == reader.get_dataset_names(), + ExcInternalError()); - Assert (data_out.get_patches().size() == reader.get_patches().size(), - ExcInternalError()); + AssertThrow (data_out.get_patches().size() == reader.get_patches().size(), + ExcInternalError()); for (unsigned int i=0; i &dof_handler, // finally make sure that we have // read everything back in // correctly - Assert (data_out.get_dataset_names() == reader.get_dataset_names(), - ExcInternalError()); + AssertThrow (data_out.get_dataset_names() == reader.get_dataset_names(), + ExcInternalError()); - Assert (data_out.get_patches().size() == reader.get_patches().size(), - ExcInternalError()); + AssertThrow (data_out.get_patches().size() == reader.get_patches().size(), + ExcInternalError()); for (unsigned int i=0; i &dof_handler, // finally make sure that we have // read everything back in // correctly - Assert (data_out.get_dataset_names() == reader.get_dataset_names(), - ExcInternalError()); + AssertThrow (data_out.get_dataset_names() == reader.get_dataset_names(), + ExcInternalError()); - Assert (data_out.get_patches().size() == reader.get_patches().size(), - ExcInternalError()); + AssertThrow (data_out.get_patches().size() == reader.get_patches().size(), + ExcInternalError()); for (unsigned int i=0; i &dof_handler, // finally make sure that we have // read everything back in // correctly - Assert (data_out.get_dataset_names() == reader.get_dataset_names(), - ExcInternalError()); + AssertThrow (data_out.get_dataset_names() == reader.get_dataset_names(), + ExcInternalError()); - Assert (data_out.get_patches().size() == reader.get_patches().size(), - ExcInternalError()); + AssertThrow (data_out.get_patches().size() == reader.get_patches().size(), + ExcInternalError()); for (unsigned int i=0; i &dof_handler, // finally make sure that we have // read everything back in // correctly - Assert (data_out.get_dataset_names() == reader.get_dataset_names(), - ExcInternalError()); + AssertThrow (data_out.get_dataset_names() == reader.get_dataset_names(), + ExcInternalError()); - Assert (data_out.get_patches().size() == reader.get_patches().size(), - ExcInternalError()); + AssertThrow (data_out.get_patches().size() == reader.get_patches().size(), + ExcInternalError()); for (unsigned int i=0; i &dof_handler) // set for (unsigned int i=0; i &dof_handler) // set for (unsigned int i=0; i &tria) for (unsigned int d=0; dcenter()(d) > 0) subdomain |= (1<set_subdomain_id (subdomain); } @@ -195,7 +195,7 @@ check () // now compare the results of the two // computations - Assert (error1 == error2, ExcInternalError()); + AssertThrow (error1 == error2, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/error_estimator_02.cc b/tests/bits/error_estimator_02.cc index 450c1bf6e8..60d90fdea7 100644 --- a/tests/bits/error_estimator_02.cc +++ b/tests/bits/error_estimator_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -112,7 +112,7 @@ void make_mesh (Triangulation &tria) for (unsigned int d=0; dcenter()(d) > 0) material |= (1<set_material_id (material); } @@ -187,8 +187,8 @@ check () { deallog << i << ' ' << this_error(i) << std::endl; - Assert ((this_error(i)==0) || (error2(i)==0), - ExcInternalError()); + AssertThrow ((this_error(i)==0) || (error2(i)==0), + ExcInternalError()); if (this_error(i) != 0) error2(i) = this_error(i); } @@ -196,7 +196,7 @@ check () // now compare the results of the two // computations - Assert (error1 == error2, ExcInternalError()); + AssertThrow (error1 == error2, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/face_orientation_and_fe_nedelec_01.cc b/tests/bits/face_orientation_and_fe_nedelec_01.cc index 64b01542dc..e66facd911 100644 --- a/tests/bits/face_orientation_and_fe_nedelec_01.cc +++ b/tests/bits/face_orientation_and_fe_nedelec_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -151,8 +151,8 @@ void do_project (const Triangulation &triangulation, << std::endl; if (q<=p-order_difference) - Assert (error.l2_norm() <= 1e-10*projection.l2_norm(), - ExcFailedProjection(error.l2_norm() / projection.l2_norm())); + AssertThrow (error.l2_norm() <= 1e-10*projection.l2_norm(), + ExcFailedProjection(error.l2_norm() / projection.l2_norm())); } } diff --git a/tests/bits/face_orientation_and_fe_q_01.cc b/tests/bits/face_orientation_and_fe_q_01.cc index 2b395993fc..ff8d5f0ffd 100644 --- a/tests/bits/face_orientation_and_fe_q_01.cc +++ b/tests/bits/face_orientation_and_fe_q_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -154,8 +154,8 @@ void do_project (const Triangulation &triangulation, << std::endl; if (q<=p-order_difference) - Assert (error.l2_norm() <= 1e-10*projection.l2_norm(), - ExcFailedProjection(error.l2_norm() / projection.l2_norm())); + AssertThrow (error.l2_norm() <= 1e-10*projection.l2_norm(), + ExcFailedProjection(error.l2_norm() / projection.l2_norm())); } } diff --git a/tests/bits/face_orientation_and_fe_q_02.cc b/tests/bits/face_orientation_and_fe_q_02.cc index e99704e2cd..162093e2f2 100644 --- a/tests/bits/face_orientation_and_fe_q_02.cc +++ b/tests/bits/face_orientation_and_fe_q_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -142,8 +142,8 @@ void do_project (const Triangulation &triangulation, << std::endl; if (q<=p-order_difference) - Assert (error.l2_norm() <= 1e-10*projection.l2_norm(), - ExcFailedProjection(error.l2_norm() / projection.l2_norm())); + AssertThrow (error.l2_norm() <= 1e-10*projection.l2_norm(), + ExcFailedProjection(error.l2_norm() / projection.l2_norm())); } } diff --git a/tests/bits/fe_field_function_04.cc b/tests/bits/fe_field_function_04.cc index e13180d31a..4553a2dc7b 100644 --- a/tests/bits/fe_field_function_04.cc +++ b/tests/bits/fe_field_function_04.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -86,10 +86,10 @@ void test() fe_function.value_list (points, m); for (unsigned int i=0; i > m(2); fe_function.vector_gradient (point, m); - Assert (std::fabs(m[0][0] - 1) - < - 1e-10 * std::fabs(m[0][0] + 1), - ExcInternalError()); - Assert (std::fabs(m[0][1]) - < - 1e-10, - ExcInternalError()); - Assert (m[1].norm() - < - 1e-10, - ExcInternalError()); + AssertThrow (std::fabs(m[0][0] - 1) + < + 1e-10 * std::fabs(m[0][0] + 1), + ExcInternalError()); + AssertThrow (std::fabs(m[0][1]) + < + 1e-10, + ExcInternalError()); + AssertThrow (m[1].norm() + < + 1e-10, + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/fe_field_function_08_vector.cc b/tests/bits/fe_field_function_08_vector.cc index b2406110e5..5a665be23f 100644 --- a/tests/bits/fe_field_function_08_vector.cc +++ b/tests/bits/fe_field_function_08_vector.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -109,15 +109,15 @@ void test() fe_function.vector_laplacian (point, m); { - Assert (std::fabs(m(0) - point.square()*4*3) - < - 1e-8 * std::fabs(m(0) + point.square()*4*3), - ExcInternalError()); - - Assert (std::fabs(m(1)) - < - 1e-10, - ExcInternalError()); + AssertThrow (std::fabs(m(0) - point.square()*4*3) + < + 1e-8 * std::fabs(m(0) + point.square()*4*3), + ExcInternalError()); + + AssertThrow (std::fabs(m(1)) + < + 1e-10, + ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/bits/fe_tools_09.cc b/tests/bits/fe_tools_09.cc index c6c453de28..6a86c9e6b1 100644 --- a/tests/bits/fe_tools_09.cc +++ b/tests/bits/fe_tools_09.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -40,16 +40,16 @@ check_this (const FiniteElement &fe1, // two FEs are actually the same deallog << fe1.get_name(); p1 = FETools::get_fe_from_name (fe1.get_name()); - Assert (fe1.get_name() == p1->get_name(), - ExcInternalError()); + AssertThrow (fe1.get_name() == p1->get_name(), + ExcInternalError()); deallog << " ok" << std::endl; delete p1; // same for fe2 deallog << fe2.get_name(); p2 = FETools::get_fe_from_name (fe2.get_name()); - Assert (fe2.get_name() == p2->get_name(), - ExcInternalError()); + AssertThrow (fe2.get_name() == p2->get_name(), + ExcInternalError()); deallog << " ok" << std::endl; delete p2; } diff --git a/tests/bits/fe_tools_10.cc b/tests/bits/fe_tools_10.cc index 1dec828ecb..deeb254a28 100644 --- a/tests/bits/fe_tools_10.cc +++ b/tests/bits/fe_tools_10.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -60,16 +60,16 @@ check_this (const FiniteElement &fe1, // two FEs are actually the same deallog << modify_name (fe1.get_name()); p1 = FETools::get_fe_from_name (modify_name (fe1.get_name())); - Assert (fe1.get_name() == p1->get_name(), - ExcInternalError()); + AssertThrow (fe1.get_name() == p1->get_name(), + ExcInternalError()); deallog << " ok" << std::endl; delete p1; // same for fe2 deallog << modify_name (fe2.get_name()); p2 = FETools::get_fe_from_name (modify_name (fe2.get_name())); - Assert (fe2.get_name() == p2->get_name(), - ExcInternalError()); + AssertThrow (fe2.get_name() == p2->get_name(), + ExcInternalError()); deallog << " ok" << std::endl; delete p2; } diff --git a/tests/bits/fe_tools_11.cc b/tests/bits/fe_tools_11.cc index ce6bf9c319..731d767ff1 100644 --- a/tests/bits/fe_tools_11.cc +++ b/tests/bits/fe_tools_11.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -59,16 +59,16 @@ check_this (const FiniteElement &fe1, // two FEs are actually the same deallog << modify_name (fe1.get_name()); p1 = FETools::get_fe_from_name (modify_name (fe1.get_name())); - Assert (fe1.get_name() == p1->get_name(), - ExcInternalError()); + AssertThrow (fe1.get_name() == p1->get_name(), + ExcInternalError()); deallog << " ok" << std::endl; delete p1; // same for fe2 deallog << modify_name (fe2.get_name()); p2 = FETools::get_fe_from_name (modify_name (fe2.get_name())); - Assert (fe2.get_name() == p2->get_name(), - ExcInternalError()); + AssertThrow (fe2.get_name() == p2->get_name(), + ExcInternalError()); deallog << " ok" << std::endl; delete p2; } diff --git a/tests/bits/fe_tools_cpfqpm_02.cc b/tests/bits/fe_tools_cpfqpm_02.cc index 7623185515..dbf3962aaa 100644 --- a/tests/bits/fe_tools_cpfqpm_02.cc +++ b/tests/bits/fe_tools_cpfqpm_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -95,6 +95,6 @@ check_this (const FiniteElement &fe, product(i,i) -= 1; output_matrix (product); - Assert (product.frobenius_norm() < 1e-10, ExcInternalError()); + AssertThrow (product.frobenius_norm() < 1e-10, ExcInternalError()); } diff --git a/tests/bits/fe_tools_cpfqpm_04.cc b/tests/bits/fe_tools_cpfqpm_04.cc index e1bbb35e35..70e5fe5b8e 100644 --- a/tests/bits/fe_tools_cpfqpm_04.cc +++ b/tests/bits/fe_tools_cpfqpm_04.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -65,7 +65,7 @@ check_this (const FiniteElement &fe, FullMatrix X (fe.dofs_per_cell, q_rhs.size()); - Assert (X.m() == X.n(), ExcInternalError()); + AssertThrow (X.m() == X.n(), ExcInternalError()); FETools::compute_projection_from_quadrature_points_matrix (fe, q_rhs, q_rhs, @@ -74,6 +74,6 @@ check_this (const FiniteElement &fe, for (unsigned int i=0; i &tria) ) ); - Assert (p.distance (pp) < 1e-15, ExcInternalError()); + AssertThrow (p.distance (pp) < 1e-15, ExcInternalError()); } diff --git a/tests/bits/find_cell_5.cc b/tests/bits/find_cell_5.cc index d632200155..0fbbe8dce7 100644 --- a/tests/bits/find_cell_5.cc +++ b/tests/bits/find_cell_5.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -60,7 +60,7 @@ void check (Triangulation<3> &tria) ) ); - Assert (p.distance (pp) < 1e-15, ExcInternalError()); + AssertThrow (p.distance (pp) < 1e-15, ExcInternalError()); } diff --git a/tests/bits/find_cell_8.cc b/tests/bits/find_cell_8.cc index 16320a1190..81d67ef9da 100644 --- a/tests/bits/find_cell_8.cc +++ b/tests/bits/find_cell_8.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -83,8 +83,8 @@ void check (Triangulation<2> &tria) deallog << "<" << cell->vertex(v) << "> "; deallog << std::endl; - Assert (p.distance (cell->center()) < cell->diameter()/2, - ExcInternalError()); + AssertThrow (p.distance (cell->center()) < cell->diameter()/2, + ExcInternalError()); } diff --git a/tests/bits/find_cell_9.cc b/tests/bits/find_cell_9.cc index e0fc0cacd0..fe25b84c46 100644 --- a/tests/bits/find_cell_9.cc +++ b/tests/bits/find_cell_9.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -86,8 +86,8 @@ void check (Triangulation<2> &tria) deallog << "<" << cell->vertex(v) << "> "; deallog << std::endl; - Assert (p.distance (cell->center()) < cell->diameter()/2, - ExcInternalError()); + AssertThrow (p.distance (cell->center()) < cell->diameter()/2, + ExcInternalError()); } diff --git a/tests/bits/full_matrix_1.cc b/tests/bits/full_matrix_1.cc index f80d675613..6066582d89 100644 --- a/tests/bits/full_matrix_1.cc +++ b/tests/bits/full_matrix_1.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -52,7 +52,7 @@ int main () for (unsigned int j=0; j::const_iterator k = A.begin(), j = ++A.begin(); - Assert (k < j, ExcInternalError()); - Assert (j > k, ExcInternalError()); + AssertThrow (k < j, ExcInternalError()); + AssertThrow (j > k, ExcInternalError()); - Assert (!(j < k), ExcInternalError()); - Assert (!(k > j), ExcInternalError()); + AssertThrow (!(j < k), ExcInternalError()); + AssertThrow (!(k > j), ExcInternalError()); - Assert (k != j, ExcInternalError()); - Assert (!(k == j), ExcInternalError()); + AssertThrow (k != j, ExcInternalError()); + AssertThrow (!(k == j), ExcInternalError()); - Assert (k == k, ExcInternalError()); - Assert (!(k != k), ExcInternalError()); + AssertThrow (k == k, ExcInternalError()); + AssertThrow (!(k != k), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/full_matrix_vector_01.cc b/tests/bits/full_matrix_vector_01.cc index aeac28348a..91ba9362aa 100644 --- a/tests/bits/full_matrix_vector_01.cc +++ b/tests/bits/full_matrix_vector_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -44,12 +44,12 @@ void test (Vector &v, // make sure we get the expected result for (unsigned int i=0; i &v, // make sure we get the expected result for (unsigned int i=0; i &v, // make sure we get the expected result for (unsigned int i=0; i &v, for (unsigned int j=0; j &v) // make sure we get the expected result for (unsigned int i=0; i &v, // make sure we get the expected result for (unsigned int i=0; ipoint_inside(testpoint); deallog << testpoint << " inside " << res < &tria) // properly oriented // faces. mesh_3d_7 does it // for mis-oriented faces - Assert (cell->face_orientation(f) == true, - ExcInternalError()); - Assert (cell->neighbor(f)->face_orientation(nn) == true, - ExcInternalError()); + AssertThrow (cell->face_orientation(f) == true, + ExcInternalError()); + AssertThrow (cell->neighbor(f)->face_orientation(nn) == true, + ExcInternalError()); fe_face_values1.reinit (cell, f); fe_face_values2.reinit (cell->neighbor(f), nn); @@ -114,10 +114,10 @@ void check (Triangulation<3> &tria) { deallog << " " << fe_face_values1.quadrature_point(q) << std::endl; - Assert ((fe_face_values1.quadrature_point(q)- - fe_face_values2.quadrature_point(q)).norm_square() - < 1e-20, - ExcInternalError()); + AssertThrow ((fe_face_values1.quadrature_point(q)- + fe_face_values2.quadrature_point(q)).norm_square() + < 1e-20, + ExcInternalError()); } } } diff --git a/tests/bits/refine_and_coarsen_1d.cc b/tests/bits/refine_and_coarsen_1d.cc index 581caa9f2c..03555a4e75 100644 --- a/tests/bits/refine_and_coarsen_1d.cc +++ b/tests/bits/refine_and_coarsen_1d.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -72,8 +72,8 @@ void check () unsigned int index = 0; for (typename Triangulation::active_cell_iterator cell=tria.begin_active(); cell != tria.end(); ++cell, ++index) - Assert (cells[index] == cell, - ExcInternalError()); + AssertThrow (cells[index] == cell, + ExcInternalError()); } diff --git a/tests/bits/refine_and_coarsen_2d.cc b/tests/bits/refine_and_coarsen_2d.cc index f849e0ef14..1c67bb829b 100644 --- a/tests/bits/refine_and_coarsen_2d.cc +++ b/tests/bits/refine_and_coarsen_2d.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -72,8 +72,8 @@ void check () unsigned int index = 0; for (typename Triangulation::active_cell_iterator cell=tria.begin_active(); cell != tria.end(); ++cell, ++index) - Assert (cells[index] == cell, - ExcInternalError()); + AssertThrow (cells[index] == cell, + ExcInternalError()); } diff --git a/tests/bits/refine_and_coarsen_3d.cc b/tests/bits/refine_and_coarsen_3d.cc index 7ca5332a88..f8a31d7757 100644 --- a/tests/bits/refine_and_coarsen_3d.cc +++ b/tests/bits/refine_and_coarsen_3d.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -74,8 +74,8 @@ void check () unsigned int index = 0; for (typename Triangulation::active_cell_iterator cell=tria.begin_active(); cell != tria.end(); ++cell, ++index) - Assert (cells[index] == cell, - ExcInternalError()); + AssertThrow (cells[index] == cell, + ExcInternalError()); } diff --git a/tests/bits/refine_and_coarsen_for_parents.cc b/tests/bits/refine_and_coarsen_for_parents.cc index 1fa275c8de..c928189dd2 100644 --- a/tests/bits/refine_and_coarsen_for_parents.cc +++ b/tests/bits/refine_and_coarsen_for_parents.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2010 - 2014 by the deal.II authors +// Copyright (C) 2010 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -91,8 +91,8 @@ void check () for (typename Triangulation::cell_iterator cell = tria.begin(); cell != tria.end (); ++cell) for (unsigned int child = 0; child < cell->n_children (); ++child) - Assert (cell->child (child)->parent () == cell, - ExcInternalError ()); + AssertThrow (cell->child (child)->parent () == cell, + ExcInternalError ()); // coarsen the mesh globally and // verify that the parent relation @@ -106,8 +106,8 @@ void check () for (typename Triangulation::cell_iterator cell = tria.begin (); cell != tria.end(); ++cell) for (unsigned int child = 0; child < cell->n_children (); ++child) - Assert (cell->child (child)->parent () == cell, - ExcInternalError()); + AssertThrow (cell->child (child)->parent () == cell, + ExcInternalError()); deallog << "OK for " << dim << "d" << std::endl; } diff --git a/tests/bits/refine_and_coarsen_for_parents_02.cc b/tests/bits/refine_and_coarsen_for_parents_02.cc index a3c04134d9..71ed085429 100644 --- a/tests/bits/refine_and_coarsen_for_parents_02.cc +++ b/tests/bits/refine_and_coarsen_for_parents_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2010 - 2014 by the deal.II authors +// Copyright (C) 2010 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -92,8 +92,8 @@ void check () for (typename DoFHandler::cell_iterator cell = dof_handler.begin(); cell != dof_handler.end (); ++cell) for (unsigned int child = 0; child < cell->n_children (); ++child) - Assert (cell->child (child)->parent () == cell, - ExcInternalError ()); + AssertThrow (cell->child (child)->parent () == cell, + ExcInternalError ()); // coarsen the mesh globally and // verify that the parent relation @@ -107,8 +107,8 @@ void check () for (typename DoFHandler::cell_iterator cell = dof_handler.begin (); cell != dof_handler.end(); ++cell) for (unsigned int child = 0; child < cell->n_children (); ++child) - Assert (cell->child (child)->parent () == cell, - ExcInternalError()); + AssertThrow (cell->child (child)->parent () == cell, + ExcInternalError()); deallog << "OK for " << dim << "d" << std::endl; } diff --git a/tests/bits/refine_and_coarsen_for_parents_03.cc b/tests/bits/refine_and_coarsen_for_parents_03.cc index 2175f21aab..44d9b1bdf0 100644 --- a/tests/bits/refine_and_coarsen_for_parents_03.cc +++ b/tests/bits/refine_and_coarsen_for_parents_03.cc @@ -91,8 +91,8 @@ void check () for (typename DoFHandler::cell_iterator cell = dof_handler.begin(); cell != dof_handler.end (); ++cell) for (unsigned int child = 0; child < cell->n_children (); ++child) - Assert (cell->child (child)->parent () == cell, - ExcInternalError ()); + AssertThrow (cell->child (child)->parent () == cell, + ExcInternalError ()); // coarsen the mesh globally and // verify that the parent relation @@ -106,8 +106,8 @@ void check () for (typename DoFHandler::cell_iterator cell = dof_handler.begin (); cell != dof_handler.end(); ++cell) for (unsigned int child = 0; child < cell->n_children (); ++child) - Assert (cell->child (child)->parent () == cell, - ExcInternalError()); + AssertThrow (cell->child (child)->parent () == cell, + ExcInternalError()); deallog << "OK for " << dim << "d" << std::endl; } diff --git a/tests/bits/sparse_matrix_01.cc b/tests/bits/sparse_matrix_01.cc index 6c0c5092d2..60832d9fb8 100644 --- a/tests/bits/sparse_matrix_01.cc +++ b/tests/bits/sparse_matrix_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -46,12 +46,12 @@ void test () for (unsigned int j=0; j m(sp); - Assert (m.m() == 5, ExcInternalError()); - Assert (m.n() == 5, ExcInternalError()); + AssertThrow (m.m() == 5, ExcInternalError()); + AssertThrow (m.n() == 5, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/sparse_matrix_08.cc b/tests/bits/sparse_matrix_08.cc index e3aea1f747..2f86f67325 100644 --- a/tests/bits/sparse_matrix_08.cc +++ b/tests/bits/sparse_matrix_08.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -48,7 +48,7 @@ void test () // compare against the exact value of the // l2-norm (max row-sum) deallog << m.frobenius_norm() << std::endl; - Assert (std::fabs((m.frobenius_norm() - norm)/norm) < 1e-14, ExcInternalError()); + AssertThrow (std::fabs((m.frobenius_norm() - norm)/norm) < 1e-14, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/sparse_matrix_09.cc b/tests/bits/sparse_matrix_09.cc index 247e414fdf..7654387166 100644 --- a/tests/bits/sparse_matrix_09.cc +++ b/tests/bits/sparse_matrix_09.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -48,12 +48,12 @@ void test () for (unsigned int j=0; j::iterator k = A.begin(), j = ++A.begin(); - Assert (k < j, ExcInternalError()); - Assert (j > k, ExcInternalError()); + AssertThrow (k < j, ExcInternalError()); + AssertThrow (j > k, ExcInternalError()); - Assert (!(j < k), ExcInternalError()); - Assert (!(k > j), ExcInternalError()); + AssertThrow (!(j < k), ExcInternalError()); + AssertThrow (!(k > j), ExcInternalError()); - Assert (k != j, ExcInternalError()); - Assert (!(k == j), ExcInternalError()); + AssertThrow (k != j, ExcInternalError()); + AssertThrow (!(k == j), ExcInternalError()); - Assert (k == k, ExcInternalError()); - Assert (!(k != k), ExcInternalError()); + AssertThrow (k == k, ExcInternalError()); + AssertThrow (!(k != k), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/sparse_matrix_iterator_12.cc b/tests/bits/sparse_matrix_iterator_12.cc index 5c9aee78dc..9e881ffe28 100644 --- a/tests/bits/sparse_matrix_iterator_12.cc +++ b/tests/bits/sparse_matrix_iterator_12.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -40,17 +40,17 @@ void test () SparseMatrix::const_iterator k = A.begin(), j = ++A.begin(); - Assert (k < j, ExcInternalError()); - Assert (j > k, ExcInternalError()); + AssertThrow (k < j, ExcInternalError()); + AssertThrow (j > k, ExcInternalError()); - Assert (!(j < k), ExcInternalError()); - Assert (!(k > j), ExcInternalError()); + AssertThrow (!(j < k), ExcInternalError()); + AssertThrow (!(k > j), ExcInternalError()); - Assert (k != j, ExcInternalError()); - Assert (!(k == j), ExcInternalError()); + AssertThrow (k != j, ExcInternalError()); + AssertThrow (!(k == j), ExcInternalError()); - Assert (k == k, ExcInternalError()); - Assert (!(k != k), ExcInternalError()); + AssertThrow (k == k, ExcInternalError()); + AssertThrow (!(k != k), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/sparse_matrix_iterator_13.cc b/tests/bits/sparse_matrix_iterator_13.cc index cd9dfc0e90..82f65f49ae 100644 --- a/tests/bits/sparse_matrix_iterator_13.cc +++ b/tests/bits/sparse_matrix_iterator_13.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -36,36 +36,36 @@ void test () SparseMatrix m(sp); for (unsigned int row=0; row &v, // make sure we get the expected result for (unsigned int i=0; i &v, // make sure we get the expected result for (unsigned int i=0; i &v, // make sure we get the expected result for (unsigned int i=0; i &v, // make sure we get the expected result for (unsigned int i=0; i &v, // make sure we get the expected result for (unsigned int i=0; i &v, for (unsigned int j=0; j &v) // make sure we get the expected result for (unsigned int i=0; i &v, // make sure we get the expected result for (unsigned int i=0; i::assemble_step () fe_values.get_function_values (present_solution, local_solution_values); fe_values.get_function_gradients (present_solution, - local_solution_grads); + local_solution_grads); for (unsigned int q_point=0; q_point::refine_grid () const double x_left = fe_values.quadrature_point(0)[0]; const double x_right = fe_values.quadrature_point(1)[0]; - Assert (x_left == cell->vertex(0)[0], ExcInternalError()); - Assert (x_right == cell->vertex(1)[0], ExcInternalError()); + AssertThrow (x_left == cell->vertex(0)[0], ExcInternalError()); + AssertThrow (x_right == cell->vertex(1)[0], ExcInternalError()); const double u_left = local_values[0]; const double u_right = local_values[1]; @@ -537,7 +537,7 @@ MinimizationProblem::energy (const DoFHandler &dof_handler, fe_values.get_function_values (function, local_solution_values); fe_values.get_function_gradients (function, - local_solution_grads); + local_solution_grads); for (unsigned int q_point=0; q_pointcenter()(d) > 0) subdomain |= (1<set_subdomain_id (subdomain); }; diff --git a/tests/bits/subdomain_ids_02.cc b/tests/bits/subdomain_ids_02.cc index d37ca19d1b..fa1923d58b 100644 --- a/tests/bits/subdomain_ids_02.cc +++ b/tests/bits/subdomain_ids_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2001 - 2014 by the deal.II authors +// Copyright (C) 2001 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -60,7 +60,7 @@ void test () for (unsigned int d=0; dcenter()(d) > 0) subdomain |= (1<set_subdomain_id (subdomain); }; @@ -93,8 +93,8 @@ void test () // since every dof is assigned a valid // subdomain id for (unsigned int i=0; icenter()(d) > 0) subdomain |= (1<set_subdomain_id (subdomain); }; diff --git a/tests/bits/subdomain_ids_04.cc b/tests/bits/subdomain_ids_04.cc index 098d07dc7c..4f1aad4945 100644 --- a/tests/bits/subdomain_ids_04.cc +++ b/tests/bits/subdomain_ids_04.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2001 - 2014 by the deal.II authors +// Copyright (C) 2001 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -61,7 +61,7 @@ void test () for (unsigned int d=0; dcenter()(d) > 0) subdomain |= (1<set_subdomain_id (subdomain); }; @@ -94,11 +94,11 @@ void test () { // we must just have crossed the // boundary to another subdomain - Assert (subdomain_association[i] == present_subdomain+1, - ExcInternalError()); + AssertThrow (subdomain_association[i] == present_subdomain+1, + ExcInternalError()); ++present_subdomain; } - Assert (present_subdomain == (1<center()(d) > 0) subdomain |= (1<set_subdomain_id (subdomain); }; @@ -79,13 +79,13 @@ void test () // check that the number of dofs // associated is also what the respective // function returns - Assert (static_cast - (std::count (subdomain_association.begin(), - subdomain_association.end(), subdomain)) - == - DoFTools::count_dofs_with_subdomain_association (dof_handler, - subdomain), - ExcInternalError()); + AssertThrow (static_cast + (std::count (subdomain_association.begin(), + subdomain_association.end(), subdomain)) + == + DoFTools::count_dofs_with_subdomain_association (dof_handler, + subdomain), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/subdomain_ids_06.cc b/tests/bits/subdomain_ids_06.cc index 61c4b44104..f8898a9f14 100644 --- a/tests/bits/subdomain_ids_06.cc +++ b/tests/bits/subdomain_ids_06.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2001 - 2014 by the deal.II authors +// Copyright (C) 2001 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -60,7 +60,7 @@ void test () for (unsigned int d=0; dcenter()(d) > 0) subdomain |= (1<set_subdomain_id (subdomain); } @@ -73,20 +73,20 @@ void test () // check that the number of cells // associated is also what the respective // function returns - Assert (static_cast - (std::count (subdomain_association.begin(), - subdomain_association.end(), subdomain)) - == - GridTools::count_cells_with_subdomain_association (tria, - subdomain), - ExcInternalError()); + AssertThrow (static_cast + (std::count (subdomain_association.begin(), + subdomain_association.end(), subdomain)) + == + GridTools::count_cells_with_subdomain_association (tria, + subdomain), + ExcInternalError()); // ...and that this is also the correct // number - Assert (GridTools::count_cells_with_subdomain_association (tria, - subdomain) - == (tria.n_active_cells() / (1<center()(d) > 0) subdomain |= (1<set_subdomain_id (subdomain); }; @@ -88,8 +88,8 @@ void test () for (unsigned int i=0; irefine_flag_set(), ExcInternalError()); + AssertThrow (!cell->refine_flag_set(), ExcInternalError()); tria.execute_coarsening_and_refinement(); diff --git a/tests/bits/unit_support_points.cc b/tests/bits/unit_support_points.cc index 198c17cc44..45efcc4a1b 100644 --- a/tests/bits/unit_support_points.cc +++ b/tests/bits/unit_support_points.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -34,9 +34,9 @@ template void check_cell1 (const FiniteElement &fe) { for (unsigned int i=0; i void check_face1 (const FiniteElement &fe) { for (unsigned int i=0; i &v) v.compress (); - Assert (v.size() == 100, ExcInternalError()); + AssertThrow (v.size() == 100, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_12.cc b/tests/bits/vector_12.cc index 667695010e..874c2c0e47 100644 --- a/tests/bits/vector_12.cc +++ b/tests/bits/vector_12.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -41,10 +41,10 @@ void test (Vector &v) // check that they are ok, and this time // all of them for (unsigned int i=0; i &v) // check that they are ok, and this time // all of them for (unsigned int i=0; i &v) // check that they are ok, and this time // all of them for (unsigned int i=0; i &v) // check that they are ok, and this time // all of them for (unsigned int i=0; i &v) // check that they are ok, and this time // all of them for (unsigned int i=0; i &v) v.compress (); // then check the norm - Assert (std::fabs((v.l2_norm() - std::sqrt(norm))/std::sqrt(norm)) < 1e-14, ExcInternalError()); + AssertThrow (std::fabs((v.l2_norm() - std::sqrt(norm))/std::sqrt(norm)) < 1e-14, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_19.cc b/tests/bits/vector_19.cc index de64f5036a..b85d0112e3 100644 --- a/tests/bits/vector_19.cc +++ b/tests/bits/vector_19.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -36,7 +36,7 @@ void test (Vector &v) v.compress (); // then check the norm - Assert (v.linfty_norm() == norm, ExcInternalError()); + AssertThrow (v.linfty_norm() == norm, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_20.cc b/tests/bits/vector_20.cc index 061588801c..82e694f289 100644 --- a/tests/bits/vector_20.cc +++ b/tests/bits/vector_20.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -42,10 +42,10 @@ void test (Vector &v) // check that the entries are ok for (unsigned int i=0; i &v) // check that the entries are ok for (unsigned int i=0; i &v) // check that the entries are ok for (unsigned int i=0; i &v, w.compress (); // make sure the scalar product is zero - Assert (v*w == 0, ExcInternalError()); + AssertThrow (v*w == 0, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_23.cc b/tests/bits/vector_23.cc index 8ac28a9ee9..d537da57ed 100644 --- a/tests/bits/vector_23.cc +++ b/tests/bits/vector_23.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -46,7 +46,7 @@ void test (Vector &v, w.compress (); // make sure the scalar product is zero - Assert (v*w == product, ExcInternalError()); + AssertThrow (v*w == product, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_24.cc b/tests/bits/vector_24.cc index 3bba6a41cd..89bae73078 100644 --- a/tests/bits/vector_24.cc +++ b/tests/bits/vector_24.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -38,8 +38,8 @@ void test (Vector &v) // vector is really empty const unsigned int sz = v.size(); v = 0; - Assert (v.size() == sz, ExcInternalError()); - Assert (v.l2_norm() == 0, ExcInternalError()); + AssertThrow (v.size() == sz, ExcInternalError()); + AssertThrow (v.l2_norm() == 0, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_25.cc b/tests/bits/vector_25.cc index 1e5c1a9c91..4b98951fe0 100644 --- a/tests/bits/vector_25.cc +++ b/tests/bits/vector_25.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -35,8 +35,8 @@ void test (Vector &v) // vector is really empty const unsigned int sz = v.size(); v = 0; - Assert (v.size() == sz, ExcInternalError()); - Assert (v.l2_norm() == 0, ExcInternalError()); + AssertThrow (v.size() == sz, ExcInternalError()); + AssertThrow (v.l2_norm() == 0, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_26.cc b/tests/bits/vector_26.cc index c0733733f3..e4851beee5 100644 --- a/tests/bits/vector_26.cc +++ b/tests/bits/vector_26.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -34,8 +34,8 @@ void test (Vector &v) const unsigned int sz = v.size(); v = 2; - Assert (v.size() == sz, ExcInternalError()); - Assert (v.l2_norm() == std::sqrt(4.*sz), ExcInternalError()); + AssertThrow (v.size() == sz, ExcInternalError()); + AssertThrow (v.l2_norm() == std::sqrt(4.*sz), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_29.cc b/tests/bits/vector_29.cc index 5e759aca07..a2c73ca0b5 100644 --- a/tests/bits/vector_29.cc +++ b/tests/bits/vector_29.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -28,7 +28,7 @@ void test (Vector &v) { v.reinit (13, true); - Assert (v.size() == 13, ExcInternalError()); + AssertThrow (v.size() == 13, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_30.cc b/tests/bits/vector_30.cc index 8d20944379..44bfcf9c9f 100644 --- a/tests/bits/vector_30.cc +++ b/tests/bits/vector_30.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -35,8 +35,8 @@ void test (Vector &v) // then resize with setting to zero v.reinit (13, false); - Assert (v.size() == 13, ExcInternalError()); - Assert (v.l2_norm() == 0, ExcInternalError()); + AssertThrow (v.size() == 13, ExcInternalError()); + AssertThrow (v.l2_norm() == 0, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_31.cc b/tests/bits/vector_31.cc index 6df751107f..3c19c2a1a9 100644 --- a/tests/bits/vector_31.cc +++ b/tests/bits/vector_31.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -36,8 +36,8 @@ void test (Vector &v) v.compress (); // then check the norm - Assert (std::fabs(v.norm_sqr() - norm) < 1e-14*norm, - ExcInternalError()); + AssertThrow (std::fabs(v.norm_sqr() - norm) < 1e-14*norm, + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_32.cc b/tests/bits/vector_32.cc index 2fe237b4d1..6c2c0aad3b 100644 --- a/tests/bits/vector_32.cc +++ b/tests/bits/vector_32.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -36,8 +36,8 @@ void test (Vector &v) v.compress (); // then check the norm - Assert (std::fabs(v.mean_value() - sum/v.size()) < 1e-14*sum/v.size(), - ExcInternalError()); + AssertThrow (std::fabs(v.mean_value() - sum/v.size()) < 1e-14*sum/v.size(), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_33.cc b/tests/bits/vector_33.cc index 58b3a294b7..5b566dc1d4 100644 --- a/tests/bits/vector_33.cc +++ b/tests/bits/vector_33.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -36,9 +36,9 @@ void test (Vector &v) v.compress (); // then check the norm - Assert (std::fabs(v.lp_norm(3) - std::pow(sum, 1./3.)) < - 1e-14*std::pow(sum, 1./3.), - ExcInternalError()); + AssertThrow (std::fabs(v.lp_norm(3) - std::pow(sum, 1./3.)) < + 1e-14*std::pow(sum, 1./3.), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_34.cc b/tests/bits/vector_34.cc index c377f1a7a2..57c73e6856 100644 --- a/tests/bits/vector_34.cc +++ b/tests/bits/vector_34.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -39,7 +39,7 @@ void test (Vector &v) v = 0; // then check all_zero - Assert (v.all_zero() == true, ExcInternalError()); + AssertThrow (v.all_zero() == true, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_35.cc b/tests/bits/vector_35.cc index f08a642ab5..0dc1320a28 100644 --- a/tests/bits/vector_35.cc +++ b/tests/bits/vector_35.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -46,13 +46,13 @@ void test (Vector &v, { if (i%3 == 0) { - Assert (w(i) == i+1., ExcInternalError()); - Assert (v(i) == i+i+1., ExcInternalError()); + AssertThrow (w(i) == i+1., ExcInternalError()); + AssertThrow (v(i) == i+i+1., ExcInternalError()); } else { - Assert (w(i) == 0, ExcInternalError()); - Assert (v(i) == i, ExcInternalError()); + AssertThrow (w(i) == 0, ExcInternalError()); + AssertThrow (v(i) == i, ExcInternalError()); } } diff --git a/tests/bits/vector_36.cc b/tests/bits/vector_36.cc index 47fd6b16fc..879d75b055 100644 --- a/tests/bits/vector_36.cc +++ b/tests/bits/vector_36.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -46,13 +46,13 @@ void test (Vector &v, { if (i%3 == 0) { - Assert (w(i) == i+1., ExcInternalError()); - Assert (v(i) == i-(i+1.), ExcInternalError()); + AssertThrow (w(i) == i+1., ExcInternalError()); + AssertThrow (v(i) == i-(i+1.), ExcInternalError()); } else { - Assert (w(i) == 0, ExcInternalError()); - Assert (v(i) == i, ExcInternalError()); + AssertThrow (w(i) == 0, ExcInternalError()); + AssertThrow (v(i) == i, ExcInternalError()); } } diff --git a/tests/bits/vector_37.cc b/tests/bits/vector_37.cc index fa8298a07f..73daf709cd 100644 --- a/tests/bits/vector_37.cc +++ b/tests/bits/vector_37.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -35,7 +35,7 @@ void test (Vector &v) // make sure we get the expected result for (unsigned int i=0; i &v, // make sure we get the expected result for (unsigned int i=0; i &v, // make sure we get the expected result for (unsigned int i=0; i &v, // make sure we get the expected result for (unsigned int i=0; i &v, // make sure we get the expected result for (unsigned int i=0; i &v, // make sure we get the expected result for (unsigned int i=0; i &v, // make sure we get the expected result for (unsigned int i=0; i &v, // make sure we get the expected result for (unsigned int i=0; i &v, // make sure we get the expected result for (unsigned int i=0; i &v, // make sure we get the expected result for (unsigned int i=0; i &v) // check that the vector is really // non-negative - Assert (v.is_non_negative() == true, ExcInternalError()); + AssertThrow (v.is_non_negative() == true, ExcInternalError()); // then set a single element to a negative // value and check again v(v.size()/2) = -1; - Assert (v.is_non_negative() == false, ExcInternalError()); + AssertThrow (v.is_non_negative() == false, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_equality_1.cc b/tests/bits/vector_equality_1.cc index 023938c8d0..2dd8a1b130 100644 --- a/tests/bits/vector_equality_1.cc +++ b/tests/bits/vector_equality_1.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -37,7 +37,7 @@ void test (Vector &v, w(i) = i+1.; } - Assert (!(v==w), ExcInternalError()); + AssertThrow (!(v==w), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_equality_2.cc b/tests/bits/vector_equality_2.cc index 227fdf8eea..76893ce67f 100644 --- a/tests/bits/vector_equality_2.cc +++ b/tests/bits/vector_equality_2.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -39,7 +39,7 @@ void test (Vector &v, // but then copy elements and make sure the // vectors are actually equal v = w; - Assert (v==w, ExcInternalError()); + AssertThrow (v==w, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_equality_3.cc b/tests/bits/vector_equality_3.cc index 2c097ac63f..f662b022b4 100644 --- a/tests/bits/vector_equality_3.cc +++ b/tests/bits/vector_equality_3.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -37,7 +37,7 @@ void test (Vector &v, w(i) = i+1.; } - Assert (v.operator != (w), ExcInternalError()); + AssertThrow (v.operator != (w), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_equality_4.cc b/tests/bits/vector_equality_4.cc index 37ce15887e..9dc7daa5c2 100644 --- a/tests/bits/vector_equality_4.cc +++ b/tests/bits/vector_equality_4.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -39,7 +39,7 @@ void test (Vector &v, // but then copy elements and make sure the // vectors are actually equal v = w; - Assert (! (v.operator != (w)), ExcInternalError()); + AssertThrow (! (v.operator != (w)), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_equality_5.cc b/tests/bits/vector_equality_5.cc index 05c3c6f63a..db7dd82605 100644 --- a/tests/bits/vector_equality_5.cc +++ b/tests/bits/vector_equality_5.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -37,8 +37,8 @@ void test (Vector &v, w(i) = i+1.; } - Assert (!(v==w), ExcInternalError()); - Assert (!(w==v), ExcInternalError()); + AssertThrow (!(v==w), ExcInternalError()); + AssertThrow (!(w==v), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_equality_6.cc b/tests/bits/vector_equality_6.cc index d4cfe3d4f5..384d0b67f2 100644 --- a/tests/bits/vector_equality_6.cc +++ b/tests/bits/vector_equality_6.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -39,8 +39,8 @@ void test (Vector &v, // but then copy elements and make sure the // vectors are actually equal v = w; - Assert (v==w, ExcInternalError()); - Assert (w==v, ExcInternalError()); + AssertThrow (v==w, ExcInternalError()); + AssertThrow (w==v, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_equality_7.cc b/tests/bits/vector_equality_7.cc index e164b3e51e..b85523f2b0 100644 --- a/tests/bits/vector_equality_7.cc +++ b/tests/bits/vector_equality_7.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -37,8 +37,8 @@ void test (Vector &v, w(i) = i+1.; } - Assert (v!=w, ExcInternalError()); - Assert (w!=v, ExcInternalError()); + AssertThrow (v!=w, ExcInternalError()); + AssertThrow (w!=v, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_vector_01.cc b/tests/bits/vector_vector_01.cc index 6feb13b61b..b8151a70bc 100644 --- a/tests/bits/vector_vector_01.cc +++ b/tests/bits/vector_vector_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -32,7 +32,7 @@ void test (Vector &v) v(i) = i+1.; Vector w(v); - Assert (w==v, ExcInternalError()); + AssertThrow (w==v, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/codim_one/direction_flag_03.cc b/tests/codim_one/direction_flag_03.cc index 13571efe65..f1f8f09ff5 100644 --- a/tests/codim_one/direction_flag_03.cc +++ b/tests/codim_one/direction_flag_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2010 - 2014 by the deal.II authors +// Copyright (C) 2010 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -38,8 +38,8 @@ void test () for (typename Triangulation::active_cell_iterator cell = volume_mesh.begin_active(); cell != volume_mesh.end(); ++cell) - Assert (cell->direction_flag() == true, - ExcInternalError()); + AssertThrow (cell->direction_flag() == true, + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/codim_one/error_estimator_01.cc b/tests/codim_one/error_estimator_01.cc index a26ce863ac..e192ced206 100644 --- a/tests/codim_one/error_estimator_01.cc +++ b/tests/codim_one/error_estimator_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -110,7 +110,7 @@ void make_mesh (Triangulation &tria) for (unsigned int d=0; dcenter()(d) > 0) subdomain |= (1<set_subdomain_id (subdomain); } @@ -193,7 +193,7 @@ check () // now compare the results of the two // computations - Assert (error1 == error2, ExcInternalError()); + AssertThrow (error1 == error2, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/codim_one/extract_boundary_mesh_02.cc b/tests/codim_one/extract_boundary_mesh_02.cc index 7cfb1b43a3..4ceb9acb2a 100644 --- a/tests/codim_one/extract_boundary_mesh_02.cc +++ b/tests/codim_one/extract_boundary_mesh_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2010 - 2014 by the deal.II authors +// Copyright (C) 2010 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -65,7 +65,7 @@ void test_vertices_orientation(const Triangulation &boundary_mes { Point diff(face->vertex(k)); diff -= cell->vertex(k); - Assert (diff.square() == 0, ExcInternalError()); + AssertThrow (diff.square() == 0, ExcInternalError()); } } } diff --git a/tests/codim_one/extract_boundary_mesh_03.cc b/tests/codim_one/extract_boundary_mesh_03.cc index d535fba71c..6b83ab99ca 100644 --- a/tests/codim_one/extract_boundary_mesh_03.cc +++ b/tests/codim_one/extract_boundary_mesh_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2010 - 2014 by the deal.II authors +// Copyright (C) 2010 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -73,7 +73,7 @@ void test_vertices_orientation(const Triangulation &boundary_mes { Point diff(face->vertex(k)); diff -= cell->vertex(k); - Assert (diff.square() == 0, ExcInternalError()); + AssertThrow (diff.square() == 0, ExcInternalError()); } } } diff --git a/tests/codim_one/extract_boundary_mesh_04.cc b/tests/codim_one/extract_boundary_mesh_04.cc index a6d255893e..1fafe60d78 100644 --- a/tests/codim_one/extract_boundary_mesh_04.cc +++ b/tests/codim_one/extract_boundary_mesh_04.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2010 - 2014 by the deal.II authors +// Copyright (C) 2010 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -73,7 +73,7 @@ void test_vertices_orientation(const Triangulation &boundary_mes { Point diff(face->vertex(k)); diff -= cell->vertex(k); - Assert (diff.square() == 0, ExcInternalError()); + AssertThrow (diff.square() == 0, ExcInternalError()); } } } @@ -127,7 +127,7 @@ int main () surface_to_volume_mapping = GridGenerator::extract_boundary_mesh (volume_mesh, boundary_mesh, - boundary_ids); + boundary_ids); deallog << volume_mesh.n_active_cells () << std::endl; deallog << boundary_mesh.n_active_cells () << std::endl; diff --git a/tests/codim_one/interpolate_boundary_values_01.cc b/tests/codim_one/interpolate_boundary_values_01.cc index 74ae5cf6fd..b51ac77f77 100644 --- a/tests/codim_one/interpolate_boundary_values_01.cc +++ b/tests/codim_one/interpolate_boundary_values_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -66,14 +66,14 @@ void test(std::string filename) for (unsigned int v=0; v::vertices_per_face; ++v) for (unsigned int i=0; iface(f)->vertex_dof_index(v,i)) - != bv.end(), - ExcInternalError()); - Assert (bv[cell->face(f)->vertex_dof_index(v,i)] - == - Functions::SquareFunction() - .value(cell->face(f)->vertex(v),i), - ExcInternalError()); + AssertThrow (bv.find(cell->face(f)->vertex_dof_index(v,i)) + != bv.end(), + ExcInternalError()); + AssertThrow (bv[cell->face(f)->vertex_dof_index(v,i)] + == + Functions::SquareFunction() + .value(cell->face(f)->vertex(v),i), + ExcInternalError()); } } diff --git a/tests/codim_one/interpolate_boundary_values_02.cc b/tests/codim_one/interpolate_boundary_values_02.cc index ab752e8561..b985272e1d 100644 --- a/tests/codim_one/interpolate_boundary_values_02.cc +++ b/tests/codim_one/interpolate_boundary_values_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -70,14 +70,14 @@ void test() for (unsigned int v=0; v::vertices_per_face; ++v) for (unsigned int i=0; iface(f)->vertex_dof_index(v,i)) - != bv.end(), - ExcInternalError()); - Assert (bv[cell->face(f)->vertex_dof_index(v,i)] - == - Functions::SquareFunction() - .value(cell->face(f)->vertex(v),i), - ExcInternalError()); + AssertThrow (bv.find(cell->face(f)->vertex_dof_index(v,i)) + != bv.end(), + ExcInternalError()); + AssertThrow (bv[cell->face(f)->vertex_dof_index(v,i)] + == + Functions::SquareFunction() + .value(cell->face(f)->vertex(v),i), + ExcInternalError()); } } } diff --git a/tests/codim_one/interpolate_boundary_values_02_vector_valued.cc b/tests/codim_one/interpolate_boundary_values_02_vector_valued.cc index 843923bd1c..b735ed4b3e 100644 --- a/tests/codim_one/interpolate_boundary_values_02_vector_valued.cc +++ b/tests/codim_one/interpolate_boundary_values_02_vector_valued.cc @@ -84,14 +84,14 @@ void test() for (unsigned int v=0; v::vertices_per_face; ++v) for (unsigned int i=0; iface(f)->vertex_dof_index(v,i)) - != bv.end(), - ExcInternalError()); - Assert (bv[cell->face(f)->vertex_dof_index(v,i)] - == - X() - .value(cell->face(f)->vertex(v),i), - ExcInternalError()); + AssertThrow (bv.find(cell->face(f)->vertex_dof_index(v,i)) + != bv.end(), + ExcInternalError()); + AssertThrow (bv[cell->face(f)->vertex_dof_index(v,i)] + == + X() + .value(cell->face(f)->vertex(v),i), + ExcInternalError()); } } } diff --git a/tests/codim_one/interpolate_boundary_values_03.cc b/tests/codim_one/interpolate_boundary_values_03.cc index 3d05c5b838..7b8e6403a5 100644 --- a/tests/codim_one/interpolate_boundary_values_03.cc +++ b/tests/codim_one/interpolate_boundary_values_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -77,14 +77,14 @@ void test() for (unsigned int v=0; v::vertices_per_face; ++v) for (unsigned int i=0; iface(f)->vertex_dof_index(v,i)) - != bv.end(), - ExcInternalError()); - Assert (bv[cell->face(f)->vertex_dof_index(v,i)] - == - Functions::SquareFunction() - .value(cell->face(f)->vertex(v),i), - ExcInternalError()); + AssertThrow (bv.find(cell->face(f)->vertex_dof_index(v,i)) + != bv.end(), + ExcInternalError()); + AssertThrow (bv[cell->face(f)->vertex_dof_index(v,i)] + == + Functions::SquareFunction() + .value(cell->face(f)->vertex(v),i), + ExcInternalError()); } } } diff --git a/tests/codim_one/interpolate_boundary_values_1d_closed_ring.cc b/tests/codim_one/interpolate_boundary_values_1d_closed_ring.cc index 2515a6a58a..56b0256402 100644 --- a/tests/codim_one/interpolate_boundary_values_1d_closed_ring.cc +++ b/tests/codim_one/interpolate_boundary_values_1d_closed_ring.cc @@ -85,14 +85,14 @@ void test() for (unsigned int v=0; v::vertices_per_face; ++v) for (unsigned int i=0; iface(f)->vertex_dof_index(v,i)) - != bv.end(), - ExcInternalError()); - Assert (bv[cell->face(f)->vertex_dof_index(v,i)] - == - Functions::SquareFunction() - .value(cell->face(f)->vertex(v),i), - ExcInternalError()); + AssertThrow (bv.find(cell->face(f)->vertex_dof_index(v,i)) + != bv.end(), + ExcInternalError()); + AssertThrow (bv[cell->face(f)->vertex_dof_index(v,i)] + == + Functions::SquareFunction() + .value(cell->face(f)->vertex(v),i), + ExcInternalError()); } } } diff --git a/tests/codim_one/mean_value.cc b/tests/codim_one/mean_value.cc index 09d1db9a95..b8978f82c3 100644 --- a/tests/codim_one/mean_value.cc +++ b/tests/codim_one/mean_value.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -63,7 +63,7 @@ void test() x, 0); // we have a symmetric domain and a symmetric function. the result // should be close to zero - Assert (std::fabs(mean) < 1e-15, ExcInternalError()); + AssertThrow (std::fabs(mean) < 1e-15, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/deal.II/coarsening_02.cc b/tests/deal.II/coarsening_02.cc index 123f984cb4..f87e4b481c 100644 --- a/tests/deal.II/coarsening_02.cc +++ b/tests/deal.II/coarsening_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2008 - 2014 by the deal.II authors +// Copyright (C) 2008 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -96,7 +96,7 @@ void test() cell != triangulation.end(); ++cell, ++index) if (flags[index]) cell->set_refine_flag(); - Assert (index == triangulation.n_active_cells(), ExcInternalError()); + AssertThrow (index == triangulation.n_active_cells(), ExcInternalError()); // flag all other cells for coarsening // (this should ensure that at least @@ -113,8 +113,8 @@ void test() // verify that none of the cells // violates the level-1-at-vertex rule - Assert (satisfies_level1_at_vertex_rule (triangulation), - ExcInternalError()); + AssertThrow (satisfies_level1_at_vertex_rule (triangulation), + ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/deal.II/coarsening_02_1d.cc b/tests/deal.II/coarsening_02_1d.cc index c5f8be6d5e..7582362e2c 100644 --- a/tests/deal.II/coarsening_02_1d.cc +++ b/tests/deal.II/coarsening_02_1d.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2008 - 2014 by the deal.II authors +// Copyright (C) 2008 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -128,8 +128,8 @@ void test() // verify that none of the cells // violates the level-1-at-vertex rule - Assert (satisfies_level1_at_vertex_rule (triangulation), - ExcInternalError()); + AssertThrow (satisfies_level1_at_vertex_rule (triangulation), + ExcInternalError()); deallog << "Iteration " << i diff --git a/tests/deal.II/coarsening_03.cc b/tests/deal.II/coarsening_03.cc index 7ffb326bec..99a9d356f7 100644 --- a/tests/deal.II/coarsening_03.cc +++ b/tests/deal.II/coarsening_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2008 - 2014 by the deal.II authors +// Copyright (C) 2008 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -97,8 +97,8 @@ void test() // verify that none of the cells // violates the level-1-at-vertex rule - Assert (satisfies_level1_at_vertex_rule (triangulation), - ExcInternalError()); + AssertThrow (satisfies_level1_at_vertex_rule (triangulation), + ExcInternalError()); } diff --git a/tests/deal.II/constraints_hanging_nodes_bc.cc b/tests/deal.II/constraints_hanging_nodes_bc.cc index 3d8b46c773..d3916e66fa 100644 --- a/tests/deal.II/constraints_hanging_nodes_bc.cc +++ b/tests/deal.II/constraints_hanging_nodes_bc.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2010 - 2014 by the deal.II authors +// Copyright (C) 2010 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -111,23 +111,23 @@ void test () deallog << "Check that both constraint matrices are identical... "; for (unsigned int i=0; i > &constraint_format; if (correct_constraints.is_constrained(i)) { constraint_format correct = *correct_constraints.get_constraint_entries(i); constraint_format library = *library_constraints.get_constraint_entries(i); - Assert (correct.size() == library.size(), ExcInternalError()); + AssertThrow (correct.size() == library.size(), ExcInternalError()); for (unsigned int q=0; qset_refine_flag(); - Assert (index == triangulation.n_active_cells(), ExcInternalError()); + AssertThrow (index == triangulation.n_active_cells(), ExcInternalError()); // flag all other cells for coarsening // (this should ensure that at least @@ -79,15 +79,15 @@ void test() FE_Q fe(2); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs(fe); - + // now extract patches and print the number of dofs on each for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) deallog << cell << ": " - << DoFTools::count_dofs_on_patch > - (GridTools::get_patch_around_cell > (cell)) - << std::endl; + << DoFTools::count_dofs_on_patch > + (GridTools::get_patch_around_cell > (cell)) + << std::endl; } diff --git a/tests/deal.II/data_out_postprocessor_01.cc b/tests/deal.II/data_out_postprocessor_01.cc index c39ccd403c..51d7dd0a73 100644 --- a/tests/deal.II/data_out_postprocessor_01.cc +++ b/tests/deal.II/data_out_postprocessor_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -159,12 +159,12 @@ public: { for (unsigned int q=0; qset_refine_flag(); - Assert (index == triangulation.n_active_cells(), ExcInternalError()); + AssertThrow (index == triangulation.n_active_cells(), ExcInternalError()); // flag all other cells for coarsening // (this should ensure that at least @@ -90,16 +90,16 @@ void test() IndexSet all (N); all.add_range (0, N); - Assert (dof_handler.n_locally_owned_dofs() == N, - ExcInternalError()); - Assert (dof_handler.locally_owned_dofs() == all, - ExcInternalError()); - Assert (dof_handler.n_locally_owned_dofs_per_processor() == - std::vector (1,N), - ExcInternalError()); - Assert (dof_handler.locally_owned_dofs_per_processor() == - std::vector(1,all), - ExcInternalError()); + AssertThrow (dof_handler.n_locally_owned_dofs() == N, + ExcInternalError()); + AssertThrow (dof_handler.locally_owned_dofs() == all, + ExcInternalError()); + AssertThrow (dof_handler.n_locally_owned_dofs_per_processor() == + std::vector (1,N), + ExcInternalError()); + AssertThrow (dof_handler.locally_owned_dofs_per_processor() == + std::vector(1,all), + ExcInternalError()); } } diff --git a/tests/deal.II/face_orientations_3d.cc b/tests/deal.II/face_orientations_3d.cc index 26dc63c2a8..e34017a04b 100644 --- a/tests/deal.II/face_orientations_3d.cc +++ b/tests/deal.II/face_orientations_3d.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2002 - 2014 by the deal.II authors +// Copyright (C) 2002 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -63,10 +63,10 @@ void test (const char *filename) // face is misoriented, // then there must be a // neighbor over there - Assert (cell->neighbor(f) - ->face_orientation(cell->neighbor_of_neighbor(f)) - == true, - ExcInternalError()); + AssertThrow (cell->neighbor(f) + ->face_orientation(cell->neighbor_of_neighbor(f)) + == true, + ExcInternalError()); } deallog << " " << misoriented_faces << " misoriented faces" << std::endl; } diff --git a/tests/deal.II/fe_values_view_02.cc b/tests/deal.II/fe_values_view_02.cc index f698180717..90b25eb58e 100644 --- a/tests/deal.II/fe_values_view_02.cc +++ b/tests/deal.II/fe_values_view_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2007 - 2014 by the deal.II authors +// Copyright (C) 2007 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -81,32 +81,32 @@ void test (const Triangulation &tr, for (unsigned int d=0; d &tr, for (unsigned int d=0; d &tr, for (unsigned int d=0; d &tr, for (unsigned int d=0; d &tr, for (unsigned int d=0; d::assemble_system() for (unsigned int m = 0; m < dim; m++) { for (unsigned int n = 0; n< dim; n++) - Assert ( (local_values[q])[m][n] == stress_value, ExcInternalError()); + AssertThrow ( (local_values[q])[m][n] == stress_value, ExcInternalError()); - Assert ( (local_divergences[q])[m] == 0.0, ExcInternalError()); - Assert ( local_scalar_values[q] == gamma_value, ExcInternalError()); + AssertThrow ( (local_divergences[q])[m] == 0.0, ExcInternalError()); + AssertThrow ( local_scalar_values[q] == gamma_value, ExcInternalError()); } } diff --git a/tests/deal.II/fe_values_view_28.cc b/tests/deal.II/fe_values_view_28.cc index 0ce76f0117..e942d2c72f 100644 --- a/tests/deal.II/fe_values_view_28.cc +++ b/tests/deal.II/fe_values_view_28.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2007 - 2014 by the deal.II authors +// Copyright (C) 2007 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -40,12 +40,12 @@ public: F() : Function<2>(2) {} virtual void vector_value (const Point<2> &p, - Vector &v) const - { - // make the function equal to (0,x^2) - v[0] = 0; - v[1] = p[0]*p[0]; - } + Vector &v) const + { + // make the function equal to (0,x^2) + v[0] = 0; + v[1] = p[0]*p[0]; + } }; @@ -59,8 +59,8 @@ Tensor<1,1> curl (const Tensor<2,2> &grads) Tensor<1,3> curl (const Tensor<2,3> &grads) { return Point<3>(grads[2][1] - grads[1][2], - grads[0][2] - grads[2][0], - grads[1][0] - grads[0][1]); + grads[0][2] - grads[2][0], + grads[1][0] - grads[0][1]); } @@ -99,19 +99,19 @@ void test (const Triangulation &tr, for (unsigned int q=0; qcenter()(d) > 0) subdomain |= (1<set_subdomain_id (subdomain); }; @@ -205,14 +205,14 @@ void test () (cell1->subdomain_id () != 1)) ++cell1; - Assert (cell == cell1, ExcInternalError()); - Assert (cell1 == cell, ExcInternalError()); + AssertThrow (cell == cell1, ExcInternalError()); + AssertThrow (cell1 == cell, ExcInternalError()); if (cell.state() != IteratorState::valid) break; }; - Assert (cell == endc, ExcInternalError()); - Assert (cell1 == endc, ExcInternalError()); + AssertThrow (cell == endc, ExcInternalError()); + AssertThrow (cell1 == endc, ExcInternalError()); logfile << "Check 5: OK" << std::endl; }; diff --git a/tests/deal.II/filtered_iterator_03.cc b/tests/deal.II/filtered_iterator_03.cc index 4c4d3d3de9..ebd856ccb3 100644 --- a/tests/deal.II/filtered_iterator_03.cc +++ b/tests/deal.II/filtered_iterator_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2001 - 2014 by the deal.II authors +// Copyright (C) 2001 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -76,7 +76,7 @@ void test () for (unsigned int d=0; d<2; ++d) if (cell->center()(d) > 0) subdomain |= (1<set_subdomain_id (subdomain); }; diff --git a/tests/deal.II/filtered_matrix.cc b/tests/deal.II/filtered_matrix.cc index 094235765b..609b149e38 100644 --- a/tests/deal.II/filtered_matrix.cc +++ b/tests/deal.II/filtered_matrix.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2013 - 2014 by the deal.II authors +// Copyright (C) 2013 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -67,8 +67,8 @@ solve_filtered (std::map &bv, for (std::map::const_iterator i=bv.begin(); i!=bv.end(); ++i) - Assert (std::fabs(u(i->first) - i->second) < 1e-8, - ExcInternalError()); + AssertThrow (std::fabs(u(i->first) - i->second) < 1e-8, + ExcInternalError()); } diff --git a/tests/deal.II/get_dofs_on_patch.cc b/tests/deal.II/get_dofs_on_patch.cc index 9544b00f26..1f67f2580b 100644 --- a/tests/deal.II/get_dofs_on_patch.cc +++ b/tests/deal.II/get_dofs_on_patch.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2014 by the deal.II authors +// Copyright (C) 2014-2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -60,7 +60,7 @@ void test() cell != triangulation.end(); ++cell, ++index) if (flags[index]) cell->set_refine_flag(); - Assert (index == triangulation.n_active_cells(), ExcInternalError()); + AssertThrow (index == triangulation.n_active_cells(), ExcInternalError()); // flag all other cells for coarsening // (this should ensure that at least @@ -79,19 +79,19 @@ void test() FE_Q fe(2); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs(fe); - + // now extract patches and print the mapping from global to patch dofs for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) { const std::vector - m = DoFTools::get_dofs_on_patch > - (GridTools::get_patch_around_cell > (cell)); + m = DoFTools::get_dofs_on_patch > + (GridTools::get_patch_around_cell > (cell)); deallog << cell << ": "; for (unsigned int i=0; i" << m[i] - << ' '; + deallog << i << "->" << m[i] + << ' '; deallog << std::endl; } } diff --git a/tests/deal.II/get_patch_around_cell_01.cc b/tests/deal.II/get_patch_around_cell_01.cc index c7fa511e2e..20043e0bbd 100644 --- a/tests/deal.II/get_patch_around_cell_01.cc +++ b/tests/deal.II/get_patch_around_cell_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2014 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -58,7 +58,7 @@ void test() cell != triangulation.end(); ++cell, ++index) if (flags[index]) cell->set_refine_flag(); - Assert (index == triangulation.n_active_cells(), ExcInternalError()); + AssertThrow (index == triangulation.n_active_cells(), ExcInternalError()); // flag all other cells for coarsening // (this should ensure that at least @@ -77,19 +77,19 @@ void test() // now extract patches and print every fifth of them unsigned int index = 0; for (typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + cell = triangulation.begin_active(); cell != triangulation.end(); ++cell, ++index) { std::vector::active_cell_iterator> patch_cells - = GridTools::get_patch_around_cell > (cell); + = GridTools::get_patch_around_cell > (cell); if (index % 5 == 0) - { - deallog << "Patch around cell " << cell << ": "; - for (unsigned int i=0; i::faces_per_cell; ++f) - Assert (cell->face(f)->at_boundary() == cell->at_boundary(f), - ExcInternalError()); + AssertThrow (cell->face(f)->at_boundary() == cell->at_boundary(f), + ExcInternalError()); // also output something slightly // more useful diff --git a/tests/deal.II/grid_hyper_shell_06.cc b/tests/deal.II/grid_hyper_shell_06.cc index fd1463b2b3..7e7467f67e 100644 --- a/tests/deal.II/grid_hyper_shell_06.cc +++ b/tests/deal.II/grid_hyper_shell_06.cc @@ -51,11 +51,11 @@ void check (double r1, double r2, unsigned int n) cell != tria.end(); ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->face(f)->at_boundary()) - for (unsigned int l=0; l::lines_per_face; ++l) - Assert (cell->face(f)->line(l)->boundary_indicator() - == - cell->face(f)->boundary_indicator(), - ExcInternalError()); + for (unsigned int l=0; l::lines_per_face; ++l) + AssertThrow (cell->face(f)->line(l)->boundary_indicator() + == + cell->face(f)->boundary_indicator(), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/deal.II/grid_in_02.cc b/tests/deal.II/grid_in_02.cc index 9d13067d21..4d79dd5f11 100644 --- a/tests/deal.II/grid_in_02.cc +++ b/tests/deal.II/grid_in_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2002 - 2014 by the deal.II authors +// Copyright (C) 2002 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -77,9 +77,9 @@ void test2 () for (unsigned int e=0; e::faces_per_cell; ++e) if (f != e) if (!cell->at_boundary(e) && !cell->at_boundary(f)) - Assert (cell->neighbor(e) != - cell->neighbor(f), - ExcInternalError()); + AssertThrow (cell->neighbor(e) != + cell->neighbor(f), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/deal.II/inhomogeneous_constraints_vector.cc b/tests/deal.II/inhomogeneous_constraints_vector.cc index 35e0418f9e..d790111807 100644 --- a/tests/deal.II/inhomogeneous_constraints_vector.cc +++ b/tests/deal.II/inhomogeneous_constraints_vector.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2009 - 2014 by the deal.II authors +// Copyright (C) 2009 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -234,7 +234,7 @@ void LaplaceProblem::assemble_system () // and compare whether we really got the // same right hand side vector test -= system_rhs; - Assert (test.l2_norm() <= 1e-12, ExcInternalError()); + AssertThrow (test.l2_norm() <= 1e-12, ExcInternalError()); } template diff --git a/tests/deal.II/interpolate_based_on_material_id_01.cc b/tests/deal.II/interpolate_based_on_material_id_01.cc index d3d6e40a9e..9d7b11b899 100644 --- a/tests/deal.II/interpolate_based_on_material_id_01.cc +++ b/tests/deal.II/interpolate_based_on_material_id_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -69,16 +69,16 @@ void test () triangulation.refine_global (3); std::map*> functions; for (typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + cell = triangulation.begin_active(); cell != triangulation.end(); ++cell) { cell->set_material_id(cell->index() % 128); if (functions.find(cell->index() % 128) == functions.end()) - functions[cell->index() % 128] - = new ConstantFunction(cell->index() % 128); + functions[cell->index() % 128] + = new ConstantFunction(cell->index() % 128); } - + for (unsigned int p=1; p<7-dim; ++p) { FE_DGQ fe(p); @@ -87,19 +87,19 @@ void test () Vector interpolant (dof_handler.n_dofs()); VectorTools::interpolate_based_on_material_id (MappingQ1(), - dof_handler, - functions, - interpolant); + dof_handler, + functions, + interpolant); for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); - cell != dof_handler.end(); - ++cell) - { - Vector values (fe.dofs_per_cell); - cell->get_dof_values (interpolant, values); - for (unsigned int i=0; iindex() % 128, ExcInternalError()); - } + cell = dof_handler.begin_active(); + cell != dof_handler.end(); + ++cell) + { + Vector values (fe.dofs_per_cell); + cell->get_dof_values (interpolant, values); + for (unsigned int i=0; iindex() % 128, ExcInternalError()); + } } deallog << "OK" << std::endl; } diff --git a/tests/deal.II/interpolate_boundary_values_01.cc b/tests/deal.II/interpolate_boundary_values_01.cc index d7dc49b5f6..e014988066 100644 --- a/tests/deal.II/interpolate_boundary_values_01.cc +++ b/tests/deal.II/interpolate_boundary_values_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -171,11 +171,11 @@ void FindBug::dirichlet_conditions () { if (fixed_dofs[i] == true) { - Assert (dirichlet_dofs[i] == 13, ExcInternalError()); + AssertThrow (dirichlet_dofs[i] == 13, ExcInternalError()); } else { - Assert (dirichlet_dofs[i] == 1, ExcInternalError()); + AssertThrow (dirichlet_dofs[i] == 1, ExcInternalError()); }; }; diff --git a/tests/deal.II/kelly_crash_02.cc b/tests/deal.II/kelly_crash_02.cc index e56a656ee9..188f65cdf6 100644 --- a/tests/deal.II/kelly_crash_02.cc +++ b/tests/deal.II/kelly_crash_02.cc @@ -224,10 +224,10 @@ void test () cell != triangulation.end(); ++cell) for (unsigned int face_no=0; face_no::faces_per_cell; ++face_no) - Assert (cell->at_boundary(face_no) - == - cell->face(face_no)->at_boundary(), - ExcInternalError()); + AssertThrow (cell->at_boundary(face_no) + == + cell->face(face_no)->at_boundary(), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/deal.II/mesh_smoothing_02.cc b/tests/deal.II/mesh_smoothing_02.cc index b9c93e209e..d32a880f3e 100644 --- a/tests/deal.II/mesh_smoothing_02.cc +++ b/tests/deal.II/mesh_smoothing_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -117,13 +117,13 @@ void test () cell = triangulation.begin(); cell != triangulation.end(); ++cell) { - Assert ((cell->refine_flag_set() == false) - && - (cell->coarsen_flag_set() == false), - ExcInternalError()); + AssertThrow ((cell->refine_flag_set() == false) + && + (cell->coarsen_flag_set() == false), + ExcInternalError()); if (!cell->active()) - Assert (cell_is_patch_level_1<2>(cell), - ExcInternalError()); + AssertThrow (cell_is_patch_level_1<2>(cell), + ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/deal.II/normal_vector_01.cc b/tests/deal.II/normal_vector_01.cc index 0e3f488686..f0f9775294 100644 --- a/tests/deal.II/normal_vector_01.cc +++ b/tests/deal.II/normal_vector_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -80,13 +80,13 @@ int main () face=cell->face(face_no); boundary.get_normals_at_vertices(face, normals); for (unsigned int v=0; v::vertices_per_face; ++v) - Assert ((boundary.normal_vector (face, - face->vertex(v)) - - - normals[v] / normals[v].norm()).norm() - < - 1e-12, - ExcInternalError()); + AssertThrow ((boundary.normal_vector (face, + face->vertex(v)) + - + normals[v] / normals[v].norm()).norm() + < + 1e-12, + ExcInternalError()); } tria.clear(); } diff --git a/tests/deal.II/normal_vector_01_2d.cc b/tests/deal.II/normal_vector_01_2d.cc index 994d4e535c..8c4105b41e 100644 --- a/tests/deal.II/normal_vector_01_2d.cc +++ b/tests/deal.II/normal_vector_01_2d.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -80,13 +80,13 @@ int main () face=cell->face(face_no); boundary.get_normals_at_vertices(face, normals); for (unsigned int v=0; v::vertices_per_face; ++v) - Assert ((boundary.normal_vector (face, - face->vertex(v)) - - - normals[v] / normals[v].norm()).norm() - < - 1e-12, - ExcInternalError()); + AssertThrow ((boundary.normal_vector (face, + face->vertex(v)) + - + normals[v] / normals[v].norm()).norm() + < + 1e-12, + ExcInternalError()); } tria.clear(); } diff --git a/tests/deal.II/normal_vector_02.cc b/tests/deal.II/normal_vector_02.cc index 31312cfef3..2cebfb20c2 100644 --- a/tests/deal.II/normal_vector_02.cc +++ b/tests/deal.II/normal_vector_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -55,13 +55,13 @@ int main () Triangulation<3>::face_iterator face = cell->face(face_no); boundary.get_normals_at_vertices(face, normals); for (unsigned int v=0; v::vertices_per_face; ++v) - Assert ((boundary.normal_vector (face, - face->vertex(v)) - - - normals[v] / normals[v].norm()).norm() - < - 1e-12, - ExcInternalError()); + AssertThrow ((boundary.normal_vector (face, + face->vertex(v)) + - + normals[v] / normals[v].norm()).norm() + < + 1e-12, + ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/deal.II/normal_vector_02_2d.cc b/tests/deal.II/normal_vector_02_2d.cc index 20b0180b0c..46f752bff8 100644 --- a/tests/deal.II/normal_vector_02_2d.cc +++ b/tests/deal.II/normal_vector_02_2d.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -55,13 +55,13 @@ int main () Triangulation<2>::face_iterator face = cell->face(face_no); boundary.get_normals_at_vertices(face, normals); for (unsigned int v=0; v::vertices_per_face; ++v) - Assert ((boundary.normal_vector (face, - face->vertex(v)) - - - normals[v] / normals[v].norm()).norm() - < - 1e-12, - ExcInternalError()); + AssertThrow ((boundary.normal_vector (face, + face->vertex(v)) + - + normals[v] / normals[v].norm()).norm() + < + 1e-12, + ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/deal.II/project_to_surface_02.cc b/tests/deal.II/project_to_surface_02.cc index 89cf73f9e3..f081ed526c 100644 --- a/tests/deal.II/project_to_surface_02.cc +++ b/tests/deal.II/project_to_surface_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -122,9 +122,9 @@ void test () // trial_point than any of // the vertices of the quad for (unsigned int v=0; v<4; ++v) - Assert (p.distance (trial_point) <= - quad->vertex(v).distance (trial_point), - ExcInternalError()); + AssertThrow (p.distance (trial_point) <= + quad->vertex(v).distance (trial_point), + ExcInternalError()); } tria.clear(); } diff --git a/tests/deal.II/project_to_surface_03.cc b/tests/deal.II/project_to_surface_03.cc index 2e1a0f1121..e7769184bb 100644 --- a/tests/deal.II/project_to_surface_03.cc +++ b/tests/deal.II/project_to_surface_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -93,9 +93,9 @@ void test () // trial_point than any of // the vertices of the quad for (unsigned int v=0; v<4; ++v) - Assert (p.distance (trial_point) <= - quad->vertex(v).distance (trial_point), - ExcInternalError()); + AssertThrow (p.distance (trial_point) <= + quad->vertex(v).distance (trial_point), + ExcInternalError()); } deallog << std::endl; } diff --git a/tests/deal.II/range_based_for_tria.cc b/tests/deal.II/range_based_for_tria.cc index 695d7f8657..1625f2ad23 100644 --- a/tests/deal.II/range_based_for_tria.cc +++ b/tests/deal.II/range_based_for_tria.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2014 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -45,8 +45,8 @@ void check() // now verify that it is really only the active cells for (auto cell : tr.cell_iterators()) - Assert (cell->user_flag_set() == !cell->has_children(), - ExcInternalError()); + AssertThrow (cell->user_flag_set() == !cell->has_children(), + ExcInternalError()); } // now do the same again for all levels of the triangulation @@ -54,17 +54,17 @@ void check() { tr.clear_user_flags (); for (auto cell : tr.active_cell_iterators_on_level(l)) - cell->set_user_flag(); + cell->set_user_flag(); for (auto cell : tr.cell_iterators_on_level(l)) - Assert (cell->user_flag_set() == !cell->has_children(), - ExcInternalError()); - + AssertThrow (cell->user_flag_set() == !cell->has_children(), + ExcInternalError()); + for (auto cell : tr.cell_iterators()) - Assert ((cell->user_flag_set() == !cell->has_children()) - || - (l != cell->level()), - ExcInternalError()); + AssertThrow ((cell->user_flag_set() == !cell->has_children()) + || + (l != cell->level()), + ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/deal.II/recursively_set_material_id.cc b/tests/deal.II/recursively_set_material_id.cc index 071612d101..e63a0d46bd 100644 --- a/tests/deal.II/recursively_set_material_id.cc +++ b/tests/deal.II/recursively_set_material_id.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2007 - 2014 by the deal.II authors +// Copyright (C) 2007 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -76,11 +76,15 @@ void test() deallog << n << std::endl; if (t==0) - Assert (n == GeometryInfo::max_children_per_cell, - ExcInternalError()) - else - Assert (n == 2, - ExcInternalError()); + { + AssertThrow (n == GeometryInfo::max_children_per_cell, + ExcInternalError()); + } + else + { + AssertThrow (n == 2, + ExcInternalError()); + } } } diff --git a/tests/deal.II/subdomain_ids.cc b/tests/deal.II/subdomain_ids.cc index bbafe8a5aa..f611f04750 100644 --- a/tests/deal.II/subdomain_ids.cc +++ b/tests/deal.II/subdomain_ids.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2001 - 2014 by the deal.II authors +// Copyright (C) 2001 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -63,7 +63,7 @@ void test () for (unsigned int d=0; dcenter()(d) > 0) subdomain |= (1<set_subdomain_id (subdomain); }; @@ -79,13 +79,13 @@ void test () std::vector subdomain_cells(1<subdomain_id() < (1<subdomain_id() < (1<subdomain_id()]; }; for (unsigned int i=0; i<(1< subdomain_cells(1<subdomain_id() < (1<subdomain_id() < (1<subdomain_id()]; }; for (unsigned int i=0; i<(1<(std::count (selected_dofs.begin(), - selected_dofs.end(), - true)) - == - dof_handler.n_dofs() / (1<(std::count (selected_dofs.begin(), + selected_dofs.end(), + true)) + == + dof_handler.n_dofs() / (1<(std::count (selected_dofs.begin(), - selected_dofs.end(), - true)) - == - std::pow(static_cast(cells_per_direction/2+1),dim), - ExcNumberMismatch(std::count (selected_dofs.begin(), - selected_dofs.end(), - true), - static_cast(std::pow(static_cast( - cells_per_direction/2+1),dim)))); + AssertThrow (static_cast(std::count (selected_dofs.begin(), + selected_dofs.end(), + true)) + == + std::pow(static_cast(cells_per_direction/2+1),dim), + ExcNumberMismatch(std::count (selected_dofs.begin(), + selected_dofs.end(), + true), + static_cast(std::pow(static_cast( + cells_per_direction/2+1),dim)))); } deallog << "Check 4 (dim=" << dim << ") ok" << std::endl; }; diff --git a/tests/deal.II/subdomain_on_refinement.cc b/tests/deal.II/subdomain_on_refinement.cc index 381e60f51a..a3d0287ac8 100644 --- a/tests/deal.II/subdomain_on_refinement.cc +++ b/tests/deal.II/subdomain_on_refinement.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2001 - 2014 by the deal.II authors +// Copyright (C) 2001 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -53,8 +53,8 @@ void test () cell = tria.begin_active (), endc = tria.end (); for (; cell!=endc; ++cell) - Assert (cell->subdomain_id() == 42, - ExcInternalError()); + AssertThrow (cell->subdomain_id() == 42, + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/deal.II/time_dependent_01.cc b/tests/deal.II/time_dependent_01.cc index c9e6febdb2..d2167abcd5 100644 --- a/tests/deal.II/time_dependent_01.cc +++ b/tests/deal.II/time_dependent_01.cc @@ -69,8 +69,8 @@ void test () td.end_sweep (); // make sure we have called TimeStep::end_sweep once for every time step object - Assert (end_sweep_flags == std::vector (n_time_steps, true), - ExcInternalError()); + AssertThrow (end_sweep_flags == std::vector (n_time_steps, true), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/distributed_grids/3d_refinement_08.cc b/tests/distributed_grids/3d_refinement_08.cc index 9c26d106f4..78bc2d6540 100644 --- a/tests/distributed_grids/3d_refinement_08.cc +++ b/tests/distributed_grids/3d_refinement_08.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2008 - 2014 by the deal.II authors +// Copyright (C) 2008 - 2015 by the deal.II authors // // This file is part of the deal.II library. // diff --git a/tests/distributed_grids/count_dofs_per_block_01.cc b/tests/distributed_grids/count_dofs_per_block_01.cc index ced29431df..6bb79043c8 100644 --- a/tests/distributed_grids/count_dofs_per_block_01.cc +++ b/tests/distributed_grids/count_dofs_per_block_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2008 - 2014 by the deal.II authors +// Copyright (C) 2008 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -71,7 +71,7 @@ void test() cell != triangulation.end(); ++cell, ++index) if (flags[index]) cell->set_refine_flag(); - Assert (index == triangulation.n_active_cells(), ExcInternalError()); + AssertThrow (index == triangulation.n_active_cells(), ExcInternalError()); // flag all other cells for coarsening // (this should ensure that at least @@ -90,9 +90,9 @@ void test() std::vector dofs_per_block (fe.n_components()); DoFTools::count_dofs_per_block (dof_handler, dofs_per_block); - Assert (std::accumulate (dofs_per_block.begin(), dofs_per_block.end(), 0U) - == dof_handler.n_dofs(), - ExcInternalError()); + AssertThrow (std::accumulate (dofs_per_block.begin(), dofs_per_block.end(), 0U) + == dof_handler.n_dofs(), + ExcInternalError()); unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD); if (myid == 0) diff --git a/tests/distributed_grids/dof_handler_number_cache.cc b/tests/distributed_grids/dof_handler_number_cache.cc index 40bb0d50bc..9b9fcf2a41 100644 --- a/tests/distributed_grids/dof_handler_number_cache.cc +++ b/tests/distributed_grids/dof_handler_number_cache.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2008 - 2014 by the deal.II authors +// Copyright (C) 2008 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -72,7 +72,7 @@ void test() cell != triangulation.end(); ++cell, ++index) if (flags[index]) cell->set_refine_flag(); - Assert (index == triangulation.n_active_cells(), ExcInternalError()); + AssertThrow (index == triangulation.n_active_cells(), ExcInternalError()); // flag all other cells for coarsening // (this should ensure that at least @@ -94,16 +94,16 @@ void test() IndexSet all (N); all.add_range (0, N); - Assert (dof_handler.n_locally_owned_dofs() == N, - ExcInternalError()); - Assert (dof_handler.locally_owned_dofs() == all, - ExcInternalError()); - Assert (dof_handler.n_locally_owned_dofs_per_processor() == - std::vector (1,N), - ExcInternalError()); - Assert (dof_handler.locally_owned_dofs_per_processor() == - std::vector(1,all), - ExcInternalError()); + AssertThrow (dof_handler.n_locally_owned_dofs() == N, + ExcInternalError()); + AssertThrow (dof_handler.locally_owned_dofs() == all, + ExcInternalError()); + AssertThrow (dof_handler.n_locally_owned_dofs_per_processor() == + std::vector (1,N), + ExcInternalError()); + AssertThrow (dof_handler.locally_owned_dofs_per_processor() == + std::vector(1,all), + ExcInternalError()); } } diff --git a/tests/fe/block_mask_01.cc b/tests/fe/block_mask_01.cc index 6ba676033b..6d4b19307e 100644 --- a/tests/fe/block_mask_01.cc +++ b/tests/fe/block_mask_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2012 - 2014 by the deal.II authors +// Copyright (C) 2012 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -32,9 +32,9 @@ void test () { BlockMask m; - Assert (m[0] == true, ExcInternalError()); - Assert (m[42] == true, ExcInternalError()); - Assert (m[1000000000] == true, ExcInternalError()); + AssertThrow (m[0] == true, ExcInternalError()); + AssertThrow (m[42] == true, ExcInternalError()); + AssertThrow (m[1000000000] == true, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/fe/block_mask_03.cc b/tests/fe/block_mask_03.cc index aea0da4cb9..f7d62c2753 100644 --- a/tests/fe/block_mask_03.cc +++ b/tests/fe/block_mask_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2012 - 2014 by the deal.II authors +// Copyright (C) 2012 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -37,7 +37,7 @@ void test () // verify equality for (unsigned int i=0; i &fe, delta_x; } - Assert ((gradient-fd_grad).norm () <= 2e-5, - ExcInternalError()); + AssertThrow ((gradient-fd_grad).norm () <= 2e-5, + ExcInternalError()); } deallog << "OK" << std::endl; } diff --git a/tests/fe/component_mask_01.cc b/tests/fe/component_mask_01.cc index bdb736eea6..d451099623 100644 --- a/tests/fe/component_mask_01.cc +++ b/tests/fe/component_mask_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2012 - 2014 by the deal.II authors +// Copyright (C) 2012 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -32,9 +32,9 @@ void test () { ComponentMask m; - Assert (m[0] == true, ExcInternalError()); - Assert (m[42] == true, ExcInternalError()); - Assert (m[1000000000] == true, ExcInternalError()); + AssertThrow (m[0] == true, ExcInternalError()); + AssertThrow (m[42] == true, ExcInternalError()); + AssertThrow (m[1000000000] == true, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/fe/component_mask_02.cc b/tests/fe/component_mask_02.cc index 749d4c2589..31079f68e8 100644 --- a/tests/fe/component_mask_02.cc +++ b/tests/fe/component_mask_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2012 - 2014 by the deal.II authors +// Copyright (C) 2012 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -39,7 +39,7 @@ void test () // verify equality for (unsigned int i=0; i &coarse_fe, for (unsigned int i=0; i radius = c1_values.quadrature_point(i); radius /= std::sqrt(radius.square()); - Assert ((radius-c1_values.normal_vector(i)).norm_square() < 1e-14, - ExcInternalError()); + AssertThrow ((radius-c1_values.normal_vector(i)).norm_square() < 1e-14, + ExcInternalError()); }; }; } diff --git a/tests/fe/mapping_real_to_unit_q1.cc b/tests/fe/mapping_real_to_unit_q1.cc index 7cc16f436a..199a20c92b 100644 --- a/tests/fe/mapping_real_to_unit_q1.cc +++ b/tests/fe/mapping_real_to_unit_q1.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -96,8 +96,8 @@ void test_real_to_unit_cell() // the same point again const Point p = map.transform_unit_to_real_cell(cell,unit_points[i]); const Point p_unit = map.transform_real_to_unit_cell(cell,p); - Assert (unit_points[i].distance(p_unit) < 1e-10, - ExcInternalError()); + AssertThrow (unit_points[i].distance(p_unit) < 1e-10, + ExcInternalError()); } } deallog << "OK" << std::endl; diff --git a/tests/fe/mapping_real_to_unit_q4_curved.cc b/tests/fe/mapping_real_to_unit_q4_curved.cc index 417f1d2e82..c2c0edf102 100644 --- a/tests/fe/mapping_real_to_unit_q4_curved.cc +++ b/tests/fe/mapping_real_to_unit_q4_curved.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -99,8 +99,8 @@ void test_real_to_unit_cell() // the same point again const Point p = map.transform_unit_to_real_cell(cell,unit_points[i]); const Point p_unit = map.transform_real_to_unit_cell(cell,p); - Assert (unit_points[i].distance(p_unit) < 1e-10, - ExcInternalError()); + AssertThrow (unit_points[i].distance(p_unit) < 1e-10, + ExcInternalError()); } deallog << "OK" << std::endl; } diff --git a/tests/fe/mapping_real_to_unit_q4_curved_codim.cc b/tests/fe/mapping_real_to_unit_q4_curved_codim.cc index 65c4e5428c..d3f7159d08 100644 --- a/tests/fe/mapping_real_to_unit_q4_curved_codim.cc +++ b/tests/fe/mapping_real_to_unit_q4_curved_codim.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -99,8 +99,8 @@ void test_real_to_unit_cell() // the same point again const Point p = map.transform_unit_to_real_cell(cell,unit_points[i]); const Point p_unit = map.transform_real_to_unit_cell(cell,p); - Assert (unit_points[i].distance(p_unit) < 1e-10, - ExcInternalError()); + AssertThrow (unit_points[i].distance(p_unit) < 1e-10, + ExcInternalError()); } deallog << "OK" << std::endl; } diff --git a/tests/fe/mapping_real_to_unit_q4_straight.cc b/tests/fe/mapping_real_to_unit_q4_straight.cc index 6a8406c31b..539512a2b8 100644 --- a/tests/fe/mapping_real_to_unit_q4_straight.cc +++ b/tests/fe/mapping_real_to_unit_q4_straight.cc @@ -101,8 +101,8 @@ void test_real_to_unit_cell() // the same point again const Point p = map.transform_unit_to_real_cell(cell,unit_points[i]); const Point p_unit = map.transform_real_to_unit_cell(cell,p); - Assert (unit_points[i].distance(p_unit) < 1e-10, - ExcInternalError()); + AssertThrow (unit_points[i].distance(p_unit) < 1e-10, + ExcInternalError()); } } deallog << "OK" << std::endl; diff --git a/tests/fe/non_primitive_1.cc b/tests/fe/non_primitive_1.cc index 93e8764ef5..e6fa2beab1 100644 --- a/tests/fe/non_primitive_1.cc +++ b/tests/fe/non_primitive_1.cc @@ -319,16 +319,16 @@ test () // written out a little bit, only // write every so-many-th element SparseMatrix::const_iterator p1 = A1.begin(), - p2 = A2.begin(), - p3 = A3.begin(); + p2 = A2.begin(), + p3 = A3.begin(); for (unsigned int i=0; ivalue() << std::endl; - Assert (p1->value() == p2->value(), - ExcInternalError()); - Assert (p1->value() == p3->value(), - ExcInternalError()); + AssertThrow (p1->value() == p2->value(), + ExcInternalError()); + AssertThrow (p1->value() == p3->value(), + ExcInternalError()); }; } diff --git a/tests/fe/numbering.cc b/tests/fe/numbering.cc index 005238b0cf..9c6132f016 100644 --- a/tests/fe/numbering.cc +++ b/tests/fe/numbering.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2013 - 2014 by the deal.II authors +// Copyright (C) 2013 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -182,14 +182,14 @@ void check (const FE_Q &fe) hierarchic_to_lexicographic_numbering[next_index++] = (n-1)*n*n+n*(i+1)+j+1; // inside hex - Assert (fe.dofs_per_hex == fe.dofs_per_quad*fe.dofs_per_line, - ExcInternalError()); + AssertThrow (fe.dofs_per_hex == fe.dofs_per_quad*fe.dofs_per_line, + ExcInternalError()); for (unsigned int i=0; i &fe) // for equality std::vector h2l (fe.dofs_per_cell); FETools::hierarchic_to_lexicographic_numbering (fe, h2l); - Assert (hierarchic_to_lexicographic_numbering == h2l, - ExcInternalError()); + AssertThrow (hierarchic_to_lexicographic_numbering == h2l, + ExcInternalError()); } diff --git a/tests/fe/shapes.h b/tests/fe/shapes.h index 1f364d0951..7d5cf4774b 100644 --- a/tests/fe/shapes.h +++ b/tests/fe/shapes.h @@ -70,20 +70,20 @@ plot_shape_functions(Mapping &mapping, for (unsigned int c=0; c()) && - (fe.shape_hessian_component(i,k,c) == Tensor<2,dim>()), - ExcInternalError()); + AssertThrow ((fe.shape_value_component(i,k,c) == 0) && + (fe.shape_grad_component(i,k,c) == Tensor<1,dim>()) && + (fe.shape_hessian_component(i,k,c) == Tensor<2,dim>()), + ExcInternalError()); }; } deallog << std::endl; @@ -155,26 +155,26 @@ plot_face_shape_functions( if (fe.get_fe().system_to_component_index(i).first == c) { if (uflags & update_values) - Assert ((fe.shape_value(i,k) == fe.shape_value_component(i,k,c)), - ExcInternalError()); + AssertThrow ((fe.shape_value(i,k) == fe.shape_value_component(i,k,c)), + ExcInternalError()); if (uflags & update_gradients) - Assert((fe.shape_grad(i,k) == fe.shape_grad_component(i,k,c)), - ExcInternalError()); + AssertThrow((fe.shape_grad(i,k) == fe.shape_grad_component(i,k,c)), + ExcInternalError()); if (uflags & update_hessians) - Assert((fe.shape_hessian(i,k) == fe.shape_hessian_component(i,k,c)), - ExcInternalError()); + AssertThrow((fe.shape_hessian(i,k) == fe.shape_hessian_component(i,k,c)), + ExcInternalError()); } else { if (uflags & update_values) - Assert ((fe.shape_value_component(i,k,c) == 0), - ExcInternalError()); + AssertThrow ((fe.shape_value_component(i,k,c) == 0), + ExcInternalError()); if (uflags & update_gradients) - Assert ((fe.shape_grad_component(i,k,c) == Tensor<1,dim>()), - ExcInternalError()); + AssertThrow ((fe.shape_grad_component(i,k,c) == Tensor<1,dim>()), + ExcInternalError()); if (uflags & update_hessians) - Assert ((fe.shape_hessian_component(i,k,c) == Tensor<2,dim>()), - ExcInternalError()); + AssertThrow ((fe.shape_hessian_component(i,k,c) == Tensor<2,dim>()), + ExcInternalError()); } } } diff --git a/tests/fe/up_and_down.cc b/tests/fe/up_and_down.cc index 94756951f5..f2a6c448ff 100644 --- a/tests/fe/up_and_down.cc +++ b/tests/fe/up_and_down.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2013 - 2014 by the deal.II authors +// Copyright (C) 2013 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -88,7 +88,7 @@ void check_element (const Triangulation &tr, // to be active, not only // some of them for (unsigned int c=0; c::max_children_per_cell; ++c) - Assert (cell->child(c)->active(), ExcInternalError()); + AssertThrow (cell->child(c)->active(), ExcInternalError()); // then restrict and prolongate cell->get_interpolated_dof_values (tmp, v); diff --git a/tests/gla/extract_subvector_to.cc b/tests/gla/extract_subvector_to.cc index c18bf3b54e..72da2bddb4 100644 --- a/tests/gla/extract_subvector_to.cc +++ b/tests/gla/extract_subvector_to.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -45,15 +45,15 @@ void test (Vector &vector) std::vector values1 (indices.size()); vector.extract_subvector_to (indices, values1); for (unsigned int j=0; j values2 (indices.size()); vector.extract_subvector_to (indices.begin(), - indices.end(), - values2.begin()); + indices.end(), + values2.begin()); for (unsigned int j=0; j values1 (indices.size()); vector.extract_subvector_to (indices, values1); for (unsigned int j=0; j values2 (indices.size()); vector.extract_subvector_to (indices.begin(), - indices.end(), - values2.begin()); + indices.end(), + values2.begin()); for (unsigned int j=0; j &tria) vertices.insert (cell->face(f)->vertex_index(2)); vertices.insert (cell->face(f)->vertex_index(3)); } - Assert (vertices.size() == 8, ExcInternalError()); + AssertThrow (vertices.size() == 8, ExcInternalError()); } deallog << " ok." << std::endl; } diff --git a/tests/grid/mesh_3d_11.cc b/tests/grid/mesh_3d_11.cc index f66746880b..1e2029bfc3 100644 --- a/tests/grid/mesh_3d_11.cc +++ b/tests/grid/mesh_3d_11.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -53,17 +53,17 @@ void check_this (Triangulation<3> &tria) for (unsigned int ff=0; ff::faces_per_cell; ++ff) if (neighbor->neighbor(ff) == cell) { - Assert (found == false, ExcInternalError()); - Assert (ff == nb_nb, ExcInternalError()); + AssertThrow (found == false, ExcInternalError()); + AssertThrow (ff == nb_nb, ExcInternalError()); - Assert (cell->face(f) == neighbor->face(ff), - ExcInternalError()); + AssertThrow (cell->face(f) == neighbor->face(ff), + ExcInternalError()); found = true; break; } - Assert (found == true, ExcInternalError()); + AssertThrow (found == true, ExcInternalError()); } deallog << " ok." << std::endl; } diff --git a/tests/grid/mesh_3d_13.cc b/tests/grid/mesh_3d_13.cc index 07633be292..3bd6a8f99c 100644 --- a/tests/grid/mesh_3d_13.cc +++ b/tests/grid/mesh_3d_13.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -71,11 +71,11 @@ void check_this (Triangulation<3> &tria) const Triangulation<3>::active_cell_iterator neighbor_child = neighbor->child(neighbor_child_index); - Assert (neighbor_child->face(neighbor_neighbor) == - cell->face(face_no)->child(subface_no), - ExcInternalError()); - Assert (!neighbor->child(neighbor_child_index)->has_children(), - ExcInternalError()); + AssertThrow (neighbor_child->face(neighbor_neighbor) == + cell->face(face_no)->child(subface_no), + ExcInternalError()); + AssertThrow (!neighbor->child(neighbor_child_index)->has_children(), + ExcInternalError()); } } diff --git a/tests/grid/mesh_3d_14.cc b/tests/grid/mesh_3d_14.cc index 621d819d59..7362c28020 100644 --- a/tests/grid/mesh_3d_14.cc +++ b/tests/grid/mesh_3d_14.cc @@ -77,18 +77,18 @@ void check_this (Triangulation<3> &tria) for (unsigned int q=0; q &tria) // make sure, that both ways yield // the same result - Assert (neighbor_child == - cell->neighbor_child_on_subface (face_no, - subface_no), - ExcInternalError()); + AssertThrow (neighbor_child == + cell->neighbor_child_on_subface (face_no, + subface_no), + ExcInternalError()); } } diff --git a/tests/grid/mesh_3d_18.cc b/tests/grid/mesh_3d_18.cc index ec41b94b30..14ce6bd3a0 100644 --- a/tests/grid/mesh_3d_18.cc +++ b/tests/grid/mesh_3d_18.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -96,9 +96,9 @@ void test_with_wrong_face_orientation () // CellAccessor::neighbor_child_on_subface it // should work. let's make sure we get the // status we expect. - Assert (cell->face(3)->child(1) == - neighbor_child->face(cell->neighbor_of_neighbor(3)), - ExcInternalError()); + AssertThrow (cell->face(3)->child(1) == + neighbor_child->face(cell->neighbor_of_neighbor(3)), + ExcInternalError()); } diff --git a/tests/grid/mesh_3d_21.cc b/tests/grid/mesh_3d_21.cc index 74f3416a81..e91270207f 100644 --- a/tests/grid/mesh_3d_21.cc +++ b/tests/grid/mesh_3d_21.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -69,8 +69,8 @@ void check_this (Triangulation<3> &tria) const unsigned int our_face_no=neighbor_child->neighbor_of_coarser_neighbor(neighbor_neighbor).first; const unsigned int our_subface_no=neighbor_child->neighbor_of_coarser_neighbor(neighbor_neighbor).second; - Assert (our_face_no==face_no, ExcInternalError()); - Assert (our_subface_no==subface_no, ExcInternalError()); + AssertThrow (our_face_no==face_no, ExcInternalError()); + AssertThrow (our_subface_no==subface_no, ExcInternalError()); deallog << "from coarse to fine and back: OK" <neighbor(face_no)->level()level()) @@ -82,7 +82,7 @@ void check_this (Triangulation<3> &tria) // try to find the way back to our cell const DoFHandler<3>::active_cell_iterator our_cell=cell->neighbor(face_no)->neighbor_child_on_subface(neighbor_face_no, neighbor_subface_no); - Assert (our_cell==cell, ExcInternalError()); + AssertThrow (our_cell==cell, ExcInternalError()); deallog << "from fine to coarse and back: OK" <vertex(1) == cells[1]->vertex(4), - ExcInternalError()); - Assert (cells[0]->vertex(3) == cells[1]->vertex(6), - ExcInternalError()); - Assert (cells[0]->vertex(5) == cells[1]->vertex(5), - ExcInternalError()); - Assert (cells[0]->vertex(7) == cells[1]->vertex(7), - ExcInternalError()); + AssertThrow (cells[0]->vertex(1) == cells[1]->vertex(4), + ExcInternalError()); + AssertThrow (cells[0]->vertex(3) == cells[1]->vertex(6), + ExcInternalError()); + AssertThrow (cells[0]->vertex(5) == cells[1]->vertex(5), + ExcInternalError()); + AssertThrow (cells[0]->vertex(7) == cells[1]->vertex(7), + ExcInternalError()); } diff --git a/tests/grid/mesh_3d_8.cc b/tests/grid/mesh_3d_8.cc index 66427b7622..c0616e4049 100644 --- a/tests/grid/mesh_3d_8.cc +++ b/tests/grid/mesh_3d_8.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -45,8 +45,8 @@ void check_this (Triangulation<3> &tria) std::set::line_iterator> lines; for (unsigned int l=0; l::lines_per_cell; ++l) { - Assert (lines.find (cell->line(l)) == lines.end(), - ExcInternalError()); + AssertThrow (lines.find (cell->line(l)) == lines.end(), + ExcInternalError()); lines.insert (cell->line(l)); } } diff --git a/tests/grid/mesh_3d_9.cc b/tests/grid/mesh_3d_9.cc index 27ff193d52..d48595278a 100644 --- a/tests/grid/mesh_3d_9.cc +++ b/tests/grid/mesh_3d_9.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -49,7 +49,7 @@ void check_this (Triangulation<3> &tria) vertices.insert (cell->line(l)->vertex_index(0)); vertices.insert (cell->line(l)->vertex_index(1)); } - Assert (vertices.size() == 8, ExcInternalError()); + AssertThrow (vertices.size() == 8, ExcInternalError()); } deallog << " ok." << std::endl; } diff --git a/tests/hp/crash_15.cc b/tests/hp/crash_15.cc index 18383dc30b..4e20d369ef 100644 --- a/tests/hp/crash_15.cc +++ b/tests/hp/crash_15.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -110,8 +110,8 @@ void test () cell->line(line)->get_dof_indices (line_dof_indices_2, cell->line(line)->nth_active_fe_index(j)); - Assert (line_dof_indices_1 == line_dof_indices_2, - ExcInternalError()); + AssertThrow (line_dof_indices_1 == line_dof_indices_2, + ExcInternalError()); } } } diff --git a/tests/hp/dof_handler_number_cache.cc b/tests/hp/dof_handler_number_cache.cc index c240a838b3..5cf61f9f33 100644 --- a/tests/hp/dof_handler_number_cache.cc +++ b/tests/hp/dof_handler_number_cache.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2008 - 2014 by the deal.II authors +// Copyright (C) 2008 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -71,7 +71,7 @@ void test() cell != triangulation.end(); ++cell, ++index) if (flags[index]) cell->set_refine_flag(); - Assert (index == triangulation.n_active_cells(), ExcInternalError()); + AssertThrow (index == triangulation.n_active_cells(), ExcInternalError()); // flag all other cells for coarsening // (this should ensure that at least @@ -100,16 +100,16 @@ void test() IndexSet all (N); all.add_range (0, N); - Assert (dof_handler.n_locally_owned_dofs() == N, - ExcInternalError()); - Assert (dof_handler.locally_owned_dofs() == all, - ExcInternalError()); - Assert (dof_handler.n_locally_owned_dofs_per_processor() == - std::vector (1,N), - ExcInternalError()); - Assert (dof_handler.locally_owned_dofs_per_processor() == - std::vector(1,all), - ExcInternalError()); + AssertThrow (dof_handler.n_locally_owned_dofs() == N, + ExcInternalError()); + AssertThrow (dof_handler.locally_owned_dofs() == all, + ExcInternalError()); + AssertThrow (dof_handler.n_locally_owned_dofs_per_processor() == + std::vector (1,N), + ExcInternalError()); + AssertThrow (dof_handler.locally_owned_dofs_per_processor() == + std::vector(1,all), + ExcInternalError()); } } diff --git a/tests/hp/fe_collection_02.cc b/tests/hp/fe_collection_02.cc index 9ab0deeb8c..bf00af45f0 100644 --- a/tests/hp/fe_collection_02.cc +++ b/tests/hp/fe_collection_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -37,8 +37,8 @@ void test () hp::FECollection fe_collection; fe_collection.push_back (FESystem(FE_Q(2),dim)); fe_collection.push_back (FESystem(FE_Q(2),dim)); - Assert (fe_collection.n_components() == dim, - ExcInternalError()); + AssertThrow (fe_collection.n_components() == dim, + ExcInternalError()); } // now the same with one of the elements @@ -48,8 +48,8 @@ void test () hp::FECollection fe_collection; fe_collection.push_back (FESystem(FE_Q(2),dim)); fe_collection.push_back (FE_RaviartThomas(1)); - Assert (fe_collection.n_components() == dim, - ExcInternalError()); + AssertThrow (fe_collection.n_components() == dim, + ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/hp/fe_collection_03.cc b/tests/hp/fe_collection_03.cc index fd0bc7ffe4..7539ceb033 100644 --- a/tests/hp/fe_collection_03.cc +++ b/tests/hp/fe_collection_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2014 by the deal.II authors +// Copyright (C) 2005 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -37,8 +37,8 @@ void test () hp::FECollection fe_collection; fe_collection.push_back (FESystem(FE_Q(2),dim)); fe_collection.push_back (FESystem(FE_Q(2),dim)); - Assert (fe_collection.n_components() == dim, - ExcInternalError()); + AssertThrow (fe_collection.n_components() == dim, + ExcInternalError()); } // now the same with one of the elements @@ -51,8 +51,8 @@ void test () hp::FECollection fe_collection; fe_collection.push_back (FESystem(FESystem(FE_Q(2),dim),1)); fe_collection.push_back (FE_RaviartThomas(1)); - Assert (fe_collection.n_blocks() == 1, - ExcInternalError()); + AssertThrow (fe_collection.n_blocks() == 1, + ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/hp/get_interpolated_dof_values_02.cc b/tests/hp/get_interpolated_dof_values_02.cc index 4a98c44e47..66d60b30dc 100644 --- a/tests/hp/get_interpolated_dof_values_02.cc +++ b/tests/hp/get_interpolated_dof_values_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 1998 - 2014 by the deal.II authors +// Copyright (C) 1998 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -82,21 +82,21 @@ void test () // then do the same with the "correct", local fe_index Vector local2 (cell->get_fe().dofs_per_cell); cell->get_interpolated_dof_values (solution, local2, - cell->active_fe_index()); + cell->active_fe_index()); // and do it a third time with the fe_index for a Q1 element Vector local3 (fe[0].dofs_per_cell); cell->get_interpolated_dof_values (solution, local3, - 0); + 0); // now verify correctness - Assert (local1 == local2, ExcInternalError()); + AssertThrow (local1 == local2, ExcInternalError()); // also for the second test. note that vertex dofs always come first in // local1, so we can easily compare for (unsigned int i=0; i &dof) DoFRenumbering::block_wise (dof); const std::vector vb = get_dofs (dof); - Assert (vc == vb, ExcInternalError()); + AssertThrow (vc == vb, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/hp/set_dof_values_by_interpolation_02.cc b/tests/hp/set_dof_values_by_interpolation_02.cc index 865e6367fe..26ea1ac315 100644 --- a/tests/hp/set_dof_values_by_interpolation_02.cc +++ b/tests/hp/set_dof_values_by_interpolation_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 1998 - 2014 by the deal.II authors +// Copyright (C) 1998 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -81,16 +81,16 @@ void test () // set values without specifying an explicit fe_index Vector local (cell->get_fe().dofs_per_cell); for (unsigned int i=0; iset_dof_values_by_interpolation (local, solution1); // then do the same with the "correct", local fe_index cell->set_dof_values_by_interpolation (local, solution2, - cell->active_fe_index()); + cell->active_fe_index()); // now verify correctness - Assert (solution1 == solution2, ExcInternalError()); + AssertThrow (solution1 == solution2, ExcInternalError()); } deallog << "OK" << std::endl; } diff --git a/tests/hp/solution_transfer_06.cc b/tests/hp/solution_transfer_06.cc index 486ae23bec..18f9095770 100644 --- a/tests/hp/solution_transfer_06.cc +++ b/tests/hp/solution_transfer_06.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2011 - 2014 by the deal.II authors +// Copyright (C) 2011 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -69,7 +69,7 @@ void test () // set refine flag for the only cell we have, then do the refinement SolutionTransfer, hp::DoFHandler > - solution_trans(dof_handler); + solution_trans(dof_handler); dof_handler.begin_active()->set_refine_flag (); solution_trans.prepare_for_coarsening_and_refinement(solution); triangulation.execute_coarsening_and_refinement (); @@ -80,14 +80,14 @@ void test () // distribute dofs and transfer solution there dof_handler.distribute_dofs (fe_collection); - + Vector new_solution(dof_handler.n_dofs()); solution_trans.interpolate(solution, new_solution); // we should now have only 1s in the new_solution vector for (unsigned int i=0; i, hp::DoFHandler > - solution_trans(dof_handler); + solution_trans(dof_handler); dof_handler.begin_active()->set_refine_flag (); solution_trans.prepare_for_pure_refinement(); triangulation.execute_coarsening_and_refinement (); @@ -80,14 +80,14 @@ void test () // distribute dofs and transfer solution there dof_handler.distribute_dofs (fe_collection); - + Vector new_solution(dof_handler.n_dofs()); solution_trans.refine_interpolate(solution, new_solution); // we should now have only 1s in the new_solution vector for (unsigned int i=0; i triangulation; GridGenerator::hyper_cube (triangulation); triangulation.refine_global (1); - + hp::FECollection fe_collection; fe_collection.push_back(FE_Q(1)); fe_collection.push_back(FE_Q(2)); @@ -68,10 +68,10 @@ void test () // coarsen everything away SolutionTransfer, hp::DoFHandler > - solution_trans(dof_handler); + solution_trans(dof_handler); for (unsigned int c=0; cn_children(); ++c) dof_handler.begin(0)->child(c)->set_coarsen_flag (); - + solution_trans.prepare_for_coarsening_and_refinement(solution); triangulation.execute_coarsening_and_refinement (); @@ -80,14 +80,14 @@ void test () // distribute dofs and transfer solution there dof_handler.distribute_dofs (fe_collection); - + Vector new_solution(dof_handler.n_dofs()); solution_trans.interpolate(solution, new_solution); // we should now have only 1s in the new_solution vector for (unsigned int i=0; i, hp::DoFHandler > - solution_trans(dof_handler); + solution_trans(dof_handler); dof_handler.begin_active()->set_refine_flag (); solution_trans.prepare_for_pure_refinement(); triangulation.execute_coarsening_and_refinement (); @@ -78,14 +78,14 @@ void test () // distribute dofs and transfer solution there dof_handler.distribute_dofs (fe_collection); - + Vector new_solution(dof_handler.n_dofs()); solution_trans.refine_interpolate(solution, new_solution); // we should now have only 1s in the new_solution vector for (unsigned int i=0; i b(partition); - Assert (b.n_blocks() == partition.size(), - ExcInternalError()); + AssertThrow (b.n_blocks() == partition.size(), + ExcInternalError()); unsigned int size = 0; for (unsigned int i = 0; i < b.n_blocks(); ++i) { - Assert (b.block(i).size() == partition[i], ExcInternalError()); + AssertThrow (b.block(i).size() == partition[i], ExcInternalError()); size += b.block(i).size(); } - Assert (b.size() == size, ExcInternalError()); + AssertThrow (b.size() == size, ExcInternalError()); for (unsigned int i = 0; i < b.size(); ++i) { b(i) = v[i]; - Assert (b(i) == v[i], ExcInternalError()); + AssertThrow (b(i) == v[i], ExcInternalError()); } dealii::BlockVector c; c = b; - Assert (c == b, ExcInternalError()); - Assert (c.n_blocks() == b.n_blocks(), ExcInternalError()); + AssertThrow (c == b, ExcInternalError()); + AssertThrow (c.n_blocks() == b.n_blocks(), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/lac/block_vector_vector_assign.cc b/tests/lac/block_vector_vector_assign.cc index b791eb3792..a699561703 100644 --- a/tests/lac/block_vector_vector_assign.cc +++ b/tests/lac/block_vector_vector_assign.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -55,12 +55,12 @@ void test () v1(i) = 1+i*i; v2 = v1; - Assert (v1==v2, ExcInternalError()); + AssertThrow (v1==v2, ExcInternalError()); BlockVector v3 (ivector); v3 = v2; - Assert (v3==v2, ExcInternalError()); - Assert (v3==v1, ExcInternalError()); + AssertThrow (v3==v2, ExcInternalError()); + AssertThrow (v3==v1, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/lac/complex_block_vector_vector_assign.cc b/tests/lac/complex_block_vector_vector_assign.cc index b626ab4ba1..006e1d9f30 100644 --- a/tests/lac/complex_block_vector_vector_assign.cc +++ b/tests/lac/complex_block_vector_vector_assign.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2014 by the deal.II authors +// Copyright (C) 2006 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -55,12 +55,12 @@ void test () v1(i) = 1+i*i; v2 = v1; - Assert (v1==v2, ExcInternalError()); + AssertThrow (v1==v2, ExcInternalError()); BlockVector > v3 (ivector); v3 = v2; - Assert (v3==v2, ExcInternalError()); - Assert (v3==v1, ExcInternalError()); + AssertThrow (v3==v2, ExcInternalError()); + AssertThrow (v3==v1, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/lac/full_matrix_02.cc b/tests/lac/full_matrix_02.cc index 5094f04a18..bd943baf00 100644 --- a/tests/lac/full_matrix_02.cc +++ b/tests/lac/full_matrix_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2010 - 2014 by the deal.II authors +// Copyright (C) 2010 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -57,7 +57,7 @@ main () A.mTmult(C,B); D.add(-1,C); - Assert ( D.frobenius_norm() < 1e-15, - ExcInternalError()); + AssertThrow ( D.frobenius_norm() < 1e-15, + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/lac/full_matrix_03.cc b/tests/lac/full_matrix_03.cc index 0e2d70f410..b1e9c96ced 100644 --- a/tests/lac/full_matrix_03.cc +++ b/tests/lac/full_matrix_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2010 - 2014 by the deal.II authors +// Copyright (C) 2010 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -59,7 +59,7 @@ main () A.TmTmult(C,B); D.add(-1,C); - Assert ( D.frobenius_norm() < 1e-15, - ExcInternalError()); + AssertThrow ( D.frobenius_norm() < 1e-15, + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/lac/full_matrix_05.cc b/tests/lac/full_matrix_05.cc index cef94618a6..cb0436c50c 100644 --- a/tests/lac/full_matrix_05.cc +++ b/tests/lac/full_matrix_05.cc @@ -52,8 +52,8 @@ void test () // correct for (unsigned int i=0; i in(size), out(size); in = 1.; - + { IterationNumberControl control(5); SolverCG<> solver(control); solver.solve(A, out, in, PreconditionIdentity()); - Assert (control.last_step() == 1, ExcInternalError()); + AssertThrow (control.last_step() == 1, ExcInternalError()); } for (unsigned int i=0; i solver(control); solver.solve(A, out, in, PreconditionIdentity()); - Assert (control.last_step() == 5, ExcInternalError()); + AssertThrow (control.last_step() == 5, ExcInternalError()); } bool solved_exactly = true; for (unsigned int i=0; i 1e-8) solved_exactly = false; - Assert(solved_exactly == false, ExcInternalError()); + AssertThrow(solved_exactly == false, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/lac/sparse_matrix_Tmmult_01.cc b/tests/lac/sparse_matrix_Tmmult_01.cc index 2bc11a7943..48a2156203 100644 --- a/tests/lac/sparse_matrix_Tmmult_01.cc +++ b/tests/lac/sparse_matrix_Tmmult_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2011 - 2014 by the deal.II authors +// Copyright (C) 2011 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -75,8 +75,8 @@ void test (const unsigned int n) A.Tvmult (z, tmp); y -= z; - Assert (y.l2_norm() <= 1e-12 * z.l2_norm(), - ExcInternalError()); + AssertThrow (y.l2_norm() <= 1e-12 * z.l2_norm(), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/lac/sparse_matrix_Tmmult_02.cc b/tests/lac/sparse_matrix_Tmmult_02.cc index 403f1a30c8..614dfe7b9b 100644 --- a/tests/lac/sparse_matrix_Tmmult_02.cc +++ b/tests/lac/sparse_matrix_Tmmult_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2011 - 2014 by the deal.II authors +// Copyright (C) 2011 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -80,8 +80,8 @@ void test (const unsigned int n) A.Tvmult (z, tmp); y -= z; - Assert (y.l2_norm() <= 1e-12 * z.l2_norm(), - ExcInternalError()); + AssertThrow (y.l2_norm() <= 1e-12 * z.l2_norm(), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/lac/sparse_matrix_mmult_01.cc b/tests/lac/sparse_matrix_mmult_01.cc index 7e45e7c6d0..ddb681d69c 100644 --- a/tests/lac/sparse_matrix_mmult_01.cc +++ b/tests/lac/sparse_matrix_mmult_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2011 - 2014 by the deal.II authors +// Copyright (C) 2011 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -75,8 +75,8 @@ void test (const unsigned int n) A.vmult (z, tmp); y -= z; - Assert (y.l2_norm() <= 1e-12 * z.l2_norm(), - ExcInternalError()); + AssertThrow (y.l2_norm() <= 1e-12 * z.l2_norm(), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/lac/sparse_matrix_mmult_02.cc b/tests/lac/sparse_matrix_mmult_02.cc index cd1ff2b8bd..dbf71d0b9e 100644 --- a/tests/lac/sparse_matrix_mmult_02.cc +++ b/tests/lac/sparse_matrix_mmult_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2011 - 2014 by the deal.II authors +// Copyright (C) 2011 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -80,8 +80,8 @@ void test (const unsigned int n) A.vmult (z, tmp); y -= z; - Assert (y.l2_norm() <= 1e-12 * z.l2_norm(), - ExcInternalError()); + AssertThrow (y.l2_norm() <= 1e-12 * z.l2_norm(), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/lac/sparsity_pattern.cc b/tests/lac/sparsity_pattern.cc index 2f365245a6..526aaf467b 100644 --- a/tests/lac/sparsity_pattern.cc +++ b/tests/lac/sparsity_pattern.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2001 - 2014 by the deal.II authors +// Copyright (C) 2001 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -98,7 +98,7 @@ main () { SparsityPattern::const_iterator p3=sp3.begin(row), p4=sp4.begin(row); for (; p3!=sp3.end(row); ++p3, ++p4) - Assert (p3->column() == p4->column(), ExcInternalError()); + AssertThrow (p3->column() == p4->column(), ExcInternalError()); }; @@ -115,15 +115,15 @@ main () const SparsityPattern & sp = (loop==1 ? sp1 : (loop==2 ? sp2 : (loop==3 ? sp3 : sp4))); for (unsigned int i=0; icolumn() == p5->column(), ExcInternalError()); + AssertThrow (p3->column() == p5->column(), ExcInternalError()); } } diff --git a/tests/lac/sparsity_pattern_common.h b/tests/lac/sparsity_pattern_common.h index d992460d0f..8ef9a66e4a 100644 --- a/tests/lac/sparsity_pattern_common.h +++ b/tests/lac/sparsity_pattern_common.h @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2008 - 2014 by the deal.II authors +// Copyright (C) 2008 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -306,18 +306,24 @@ void copy_from_1 () if ((sparsity_pattern.stores_only_added_elements() == true) && (sp4.stores_only_added_elements() == true)) - Assert (sparsity_pattern.n_nonzero_elements() == - sp4.n_nonzero_elements(), - ExcInternalError()); + AssertThrow (sparsity_pattern.n_nonzero_elements() == + sp4.n_nonzero_elements(), + ExcInternalError()); for (unsigned int i=0; i(sparsity_pattern.frobenius_norm() * - sparsity_pattern.frobenius_norm() - + 0.5), - ExcInternalError()) - else - Assert (sp4.n_nonzero_elements() >= - static_cast(sparsity_pattern.frobenius_norm() * - sparsity_pattern.frobenius_norm() - + 0.5), - ExcInternalError()); + { + AssertThrow (sp4.n_nonzero_elements() == + static_cast(sparsity_pattern.frobenius_norm() * + sparsity_pattern.frobenius_norm() + + 0.5), + ExcInternalError()); + } + else + { + AssertThrow (sp4.n_nonzero_elements() >= + static_cast(sparsity_pattern.frobenius_norm() * + sparsity_pattern.frobenius_norm() + + 0.5), + ExcInternalError()); + } for (unsigned int i=0; i(Testing::rand())/static_cast(RAND_MAX); const typename Vector::real_type norm = vec.l2_norm(); for (unsigned int i=0; i<30; ++i) - Assert (vec.l2_norm() == norm, ExcInternalError()); + AssertThrow (vec.l2_norm() == norm, ExcInternalError()); Vector vec2 (vec); for (unsigned int i=0; i<10; ++i) - Assert (vec2.l2_norm() == norm, ExcInternalError()); + AssertThrow (vec2.l2_norm() == norm, ExcInternalError()); } } diff --git a/tests/lac/vector_large_numbers.cc b/tests/lac/vector_large_numbers.cc index 3721e94307..b720633344 100644 --- a/tests/lac/vector_large_numbers.cc +++ b/tests/lac/vector_large_numbers.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2012 - 2014 by the deal.II authors +// Copyright (C) 2012 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -34,20 +34,20 @@ void check_large_numbers() v(7) = 1e20; const double correct = std::sqrt(1e26 + 1e38 + 1e42 + 1e40 + 1.); - Assert (std::abs(v.l2_norm() - correct) < 1e-6*correct, ExcInternalError()); + AssertThrow (std::abs(v.l2_norm() - correct) < 1e-6*correct, ExcInternalError()); v = 0.; v(5) = 1e-30; v(9) = 1e-32; const double correct2 = std::sqrt(1e-60 + 1e-64); - Assert (std::abs(v.l2_norm() - correct2) < 1e-6*correct2, ExcInternalError()); + AssertThrow (std::abs(v.l2_norm() - correct2) < 1e-6*correct2, ExcInternalError()); Vector w(7); w(0) = 1e232; w(6) = 1e231; w(3) = 1e200; const double correct3 = std::sqrt(100. + 1.) * 1e231; - Assert (std::abs(w.l2_norm() - correct3) < 1e-13*correct3, ExcInternalError()); + AssertThrow (std::abs(w.l2_norm() - correct3) < 1e-13*correct3, ExcInternalError()); w = 0; w(1) = 1e-302; @@ -56,10 +56,10 @@ void check_large_numbers() w(4) = 3e-303; w(5) = -1e-303; const double correct4 = std::sqrt(100. + 1. + 4. + 9 + 1.) * 1e-303; - Assert (std::abs(w.l2_norm() - correct4) < 1e-13*correct4, ExcInternalError()); + AssertThrow (std::abs(w.l2_norm() - correct4) < 1e-13*correct4, ExcInternalError()); const double correct5 = std::pow(1000. + 1. + 8. + 27 + 1., 1./3.) * 1e-303; - Assert (std::abs(w.lp_norm(3.) - correct5) < 1e-13*correct5, ExcInternalError()); + AssertThrow (std::abs(w.lp_norm(3.) - correct5) < 1e-13*correct5, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/lac/vector_norms.cc b/tests/lac/vector_norms.cc index 3e8333805c..b0f218f0b8 100644 --- a/tests/lac/vector_norms.cc +++ b/tests/lac/vector_norms.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2012 - 2014 by the deal.II authors +// Copyright (C) 2012 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -43,24 +43,24 @@ void check_norms () vec(i) = i+1; const number l1_norm = vec.l1_norm(); - Assert (std::abs(l1_norm-0.5*size*(size+1)) < acc*0.5*size*(size+1), - ExcInternalError()); + AssertThrow (std::abs(l1_norm-0.5*size*(size+1)) < acc*0.5*size*(size+1), + ExcInternalError()); // test accuracy of summation const long double value = 3.14159265358979323846; vec = (number)value; const number l1_norma = vec.l1_norm(); - Assert (std::abs(l1_norma-value*size) < acc*size*value, - ExcInternalError()); + AssertThrow (std::abs(l1_norma-value*size) < acc*size*value, + ExcInternalError()); const number l2_norma = vec.l2_norm(); - Assert (std::abs(l2_norma-value*std::sqrt((number)size)) < acc*std::sqrt(size)*value, - ExcInternalError()); + AssertThrow (std::abs(l2_norma-value*std::sqrt((number)size)) < acc*std::sqrt(size)*value, + ExcInternalError()); const number lp_norma = vec.lp_norm(3.); - Assert (std::abs(lp_norma-value*std::pow(static_cast(size), - static_cast(1./3.))) < - std::max(acc,number(1e-15))*std::pow(static_cast(size), - static_cast(1./3.))*value, - ExcInternalError()); + AssertThrow (std::abs(lp_norma-value*std::pow(static_cast(size), + static_cast(1./3.))) < + std::max(acc,number(1e-15))*std::pow(static_cast(size), + static_cast(1./3.))*value, + ExcInternalError()); } } @@ -84,27 +84,27 @@ void check_complex_norms () } const number l1_norm = vec.l1_norm(); - Assert (std::abs(l1_norm-sum) < acc*sum, - ExcInternalError()); + AssertThrow (std::abs(l1_norm-sum) < acc*sum, + ExcInternalError()); // test accuracy of summation const std::complex value (3.14159265358979323846, 0.1); vec = std::complex(value); const number l1_norma = vec.l1_norm(); - Assert (std::abs(l1_norma-std::abs(value)*size) < - acc*size*std::abs(value), - ExcInternalError()); + AssertThrow (std::abs(l1_norma-std::abs(value)*size) < + acc*size*std::abs(value), + ExcInternalError()); const number l2_norma = vec.l2_norm(); - Assert (std::abs(l2_norma-std::abs(value)*std::sqrt((number)size)) < - acc*std::sqrt((number)size)*std::abs(value), - ExcInternalError()); + AssertThrow (std::abs(l2_norma-std::abs(value)*std::sqrt((number)size)) < + acc*std::sqrt((number)size)*std::abs(value), + ExcInternalError()); const number lp_norma = vec.lp_norm(3.); - Assert (std::abs(lp_norma-std::abs(value)* - std::pow(static_cast(size), - static_cast(1./3.))) < - acc*std::pow(static_cast(size), - static_cast(1./3.))*std::abs(value), - ExcInternalError()); + AssertThrow (std::abs(lp_norma-std::abs(value)* + std::pow(static_cast(size), + static_cast(1./3.))) < + acc*std::pow(static_cast(size), + static_cast(1./3.))*std::abs(value), + ExcInternalError()); } } diff --git a/tests/lapack/full_matrix_00.cc b/tests/lapack/full_matrix_00.cc index 4abe485d6c..cdb3cf2fd4 100644 --- a/tests/lapack/full_matrix_00.cc +++ b/tests/lapack/full_matrix_00.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2014 by the deal.II authors +// Copyright (C) 2014-2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -25,16 +25,16 @@ void test (const unsigned int size, - const bool reinit_square) + const bool reinit_square) { // this test can not currently work with matrices smaller than // 1\times2. - Assert (size>2, ExcInternalError()); + AssertThrow (size>2, ExcInternalError()); // initialise a first matrix with the standard constructor and fill // it with some numbers LAPACKFullMatrix M (size, size); - + for (unsigned int i=0; i &a, const Triangulation &b) //compare the two files std::string cmd = std::string("diff -q ")+file1+std::string(" ")+file2; - Assert (system(cmd.c_str()) == 0, ExcInternalError()); + AssertThrow (system(cmd.c_str()) == 0, ExcInternalError()); //and delete them std::remove (file1.c_str()); diff --git a/tests/mpi/communicate_moved_vertices_02.cc b/tests/mpi/communicate_moved_vertices_02.cc index 2fca617768..cd9072c341 100644 --- a/tests/mpi/communicate_moved_vertices_02.cc +++ b/tests/mpi/communicate_moved_vertices_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2009 - 2014 by the deal.II authors +// Copyright (C) 2009 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -50,8 +50,8 @@ void test() = GridTools::get_locally_owned_vertices (tr); for (unsigned int v=0; v&>(tr.get_vertices()[v]) += shift; - ++n_vertices_moved; + // maybe not the most elegant way to do it, but it works for the purpose + // of the test... + const_cast&>(tr.get_vertices()[v]) += shift; + ++n_vertices_moved; } - Assert (Utilities::MPI::sum (n_vertices_moved, MPI_COMM_WORLD) - == - (dim==2 ? 15 : 75), - ExcInternalError()); + AssertThrow (Utilities::MPI::sum (n_vertices_moved, MPI_COMM_WORLD) + == + (dim==2 ? 15 : 75), + ExcInternalError()); tr.communicate_locally_moved_vertices (moved_locally_owned_vertices); @@ -89,13 +89,13 @@ void test() { for (unsigned int i=0; iset_refine_flag(); - Assert (index == triangulation.n_active_cells(), ExcInternalError()); + AssertThrow (index == triangulation.n_active_cells(), ExcInternalError()); // flag all other cells for coarsening // (this should ensure that at least @@ -90,9 +90,9 @@ void test() std::vector dofs_per_block (fe.n_components()); DoFTools::count_dofs_per_block (dof_handler, dofs_per_block); - Assert (std::accumulate (dofs_per_block.begin(), dofs_per_block.end(), 0U) - == dof_handler.n_dofs(), - ExcInternalError()); + AssertThrow (std::accumulate (dofs_per_block.begin(), dofs_per_block.end(), 0U) + == dof_handler.n_dofs(), + ExcInternalError()); unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD); if (myid == 0) diff --git a/tests/mpi/count_dofs_per_component_01.cc b/tests/mpi/count_dofs_per_component_01.cc index 7cc8d51a9c..bd337ae386 100644 --- a/tests/mpi/count_dofs_per_component_01.cc +++ b/tests/mpi/count_dofs_per_component_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2008 - 2014 by the deal.II authors +// Copyright (C) 2008 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -57,9 +57,9 @@ void test() std::vector dofs_per_component (fe.n_components()); DoFTools::count_dofs_per_component (dof_handler, dofs_per_component); - Assert (std::accumulate (dofs_per_component.begin(), dofs_per_component.end(), 0U) - == dof_handler.n_dofs(), - ExcInternalError()); + AssertThrow (std::accumulate (dofs_per_component.begin(), dofs_per_component.end(), 0U) + == dof_handler.n_dofs(), + ExcInternalError()); unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD); if (myid == 0) diff --git a/tests/mpi/crash_03.cc b/tests/mpi/crash_03.cc index b5e6380c2f..b4ebebe144 100644 --- a/tests/mpi/crash_03.cc +++ b/tests/mpi/crash_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2008 - 2014 by the deal.II authors +// Copyright (C) 2008 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -65,7 +65,7 @@ void test() cell != triangulation.end(); ++cell, ++index) if (flags[index]) cell->set_refine_flag(); - Assert (index == triangulation.n_active_cells(), ExcInternalError()); + AssertThrow (index == triangulation.n_active_cells(), ExcInternalError()); // flag all other cells for coarsening // (this should ensure that at least diff --git a/tests/mpi/dof_handler_number_cache.cc b/tests/mpi/dof_handler_number_cache.cc index fc038c5d72..4a99c29b70 100644 --- a/tests/mpi/dof_handler_number_cache.cc +++ b/tests/mpi/dof_handler_number_cache.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2008 - 2014 by the deal.II authors +// Copyright (C) 2008 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -106,12 +106,12 @@ void test() ExcInternalError()); for (unsigned int i=0; i range = vector.local_range(); for (unsigned int i=range.first; i range = vector.local_range(); for (unsigned int i=range.first; i range = vector.local_range(); for (unsigned int i=range.first; i range = vector.local_range(); for (unsigned int i=range.first; isubdomain_id() != (unsigned int)myid) { - Assert (cell->is_ghost() || cell->is_artificial(), - ExcInternalError()); + AssertThrow (cell->is_ghost() || cell->is_artificial(), + ExcInternalError()); continue; } @@ -81,21 +81,21 @@ void test() { if (cell->at_boundary(n)) continue; - Assert (cell->neighbor(n).state() == IteratorState::valid, - ExcInternalError()); + AssertThrow (cell->neighbor(n).state() == IteratorState::valid, + ExcInternalError()); - Assert( cell->neighbor(n)->level() == cell->level(), - ExcInternalError()); + AssertThrow ( cell->neighbor(n)->level() == cell->level(), + ExcInternalError()); - Assert(!cell->neighbor(n)->has_children(), ExcInternalError() ); - Assert( cell->neighbor(n)->subdomain_id()< numprocs, ExcInternalError()); + AssertThrow (!cell->neighbor(n)->has_children(), ExcInternalError() ); + AssertThrow ( cell->neighbor(n)->subdomain_id()< numprocs, ExcInternalError()); // all neighbors of // locally owned cells // must be ghosts but // can't be artificial - Assert (cell->neighbor(n)->is_ghost(), ExcInternalError()); - Assert (!cell->neighbor(n)->is_artificial(), ExcInternalError()); + AssertThrow (cell->neighbor(n)->is_ghost(), ExcInternalError()); + AssertThrow (!cell->neighbor(n)->is_artificial(), ExcInternalError()); } diff --git a/tests/mpi/p4est_2d_ghost_02.cc b/tests/mpi/p4est_2d_ghost_02.cc index 569774854f..3379371b8a 100644 --- a/tests/mpi/p4est_2d_ghost_02.cc +++ b/tests/mpi/p4est_2d_ghost_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2009 - 2014 by the deal.II authors +// Copyright (C) 2009 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -77,8 +77,8 @@ void test() { if (cell->subdomain_id() != (unsigned int)myid) { - Assert (cell->is_ghost() || cell->is_artificial(), - ExcInternalError()); + AssertThrow (cell->is_ghost() || cell->is_artificial(), + ExcInternalError()); continue; } @@ -86,13 +86,13 @@ void test() { if (cell->at_boundary(n)) continue; - Assert (cell->neighbor(n).state() == IteratorState::valid, - ExcInternalError()); + AssertThrow (cell->neighbor(n).state() == IteratorState::valid, + ExcInternalError()); - Assert( cell->neighbor(n)->level() == cell->level(), - ExcInternalError()); + AssertThrow ( cell->neighbor(n)->level() == cell->level(), + ExcInternalError()); - Assert(!cell->neighbor(n)->has_children(), ExcInternalError() ); + AssertThrow (!cell->neighbor(n)->has_children(), ExcInternalError() ); } } @@ -102,9 +102,9 @@ void test() << checksum << std::endl; - Assert (tr.n_global_active_cells() == - static_cast(std::pow (1.*GeometryInfo::max_children_per_cell, i+1)), - ExcInternalError()); + AssertThrow (tr.n_global_active_cells() == + static_cast(std::pow (1.*GeometryInfo::max_children_per_cell, i+1)), + ExcInternalError()); } } diff --git a/tests/mpi/p4est_3d_ghost_01.cc b/tests/mpi/p4est_3d_ghost_01.cc index dbdd0552a2..e03705b93d 100644 --- a/tests/mpi/p4est_3d_ghost_01.cc +++ b/tests/mpi/p4est_3d_ghost_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2009 - 2014 by the deal.II authors +// Copyright (C) 2009 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -82,21 +82,21 @@ void test() { if (cell->subdomain_id() != (unsigned int)myid) { - Assert (cell->is_ghost() || cell->is_artificial(), - ExcInternalError()); + AssertThrow (cell->is_ghost() || cell->is_artificial(), + ExcInternalError()); } else for (unsigned int n=0; n::faces_per_cell; ++n) { if (cell->at_boundary(n)) continue; - Assert (cell->neighbor(n).state() == IteratorState::valid, - ExcInternalError()); + AssertThrow (cell->neighbor(n).state() == IteratorState::valid, + ExcInternalError()); - Assert( cell->neighbor(n)->level() == cell->level(), - ExcInternalError()); + AssertThrow ( cell->neighbor(n)->level() == cell->level(), + ExcInternalError()); - Assert(!cell->neighbor(n)->has_children(), ExcInternalError() ); + AssertThrow (!cell->neighbor(n)->has_children(), ExcInternalError() ); } diff --git a/tests/mpi/p4est_save_03.cc b/tests/mpi/p4est_save_03.cc index 987c1e5977..9a7c999882 100644 --- a/tests/mpi/p4est_save_03.cc +++ b/tests/mpi/p4est_save_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2009 - 2014 by the deal.II authors +// Copyright (C) 2009 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -146,8 +146,8 @@ void test() { unsigned int idx = locally_owned_dofs.nth_index_in_set (i); //std::cout << '[' << idx << ']' << ' ' << solution(idx) << std::endl; - Assert (idx == solution (idx), ExcInternalError()); - Assert (2*idx == solution2 (idx), ExcInternalError()); + AssertThrow (idx == solution (idx), ExcInternalError()); + AssertThrow (2*idx == solution2 (idx), ExcInternalError()); } double norm = solution.l1_norm(); diff --git a/tests/mpi/parallel_block_vector_01.cc b/tests/mpi/parallel_block_vector_01.cc index bd4e4d0367..b902281d3c 100644 --- a/tests/mpi/parallel_block_vector_01.cc +++ b/tests/mpi/parallel_block_vector_01.cc @@ -59,8 +59,8 @@ void test () v*=2.0; if (myid < 8) { - Assert(v(myid*2) == myid*4.0, ExcInternalError()); - Assert(v(myid*2+1) == myid*4.0+2.0, ExcInternalError()); + AssertThrow (v(myid*2) == myid*4.0, ExcInternalError()); + AssertThrow (v(myid*2+1) == myid*4.0+2.0, ExcInternalError()); } parallel::distributed::BlockVector w(3); @@ -73,8 +73,8 @@ void test () const double l2_norm = w.l2_norm(); if (myid == 0) deallog << "l2 norm: " << l2_norm << std::endl; - Assert(std::abs(v.l2_norm()*std::sqrt(3.)-w.l2_norm()) < 1e-13, - ExcInternalError()); + AssertThrow (std::abs(v.l2_norm()*std::sqrt(3.)-w.l2_norm()) < 1e-13, + ExcInternalError()); } // check l1 norm @@ -82,8 +82,8 @@ void test () const double l1_norm = w.l1_norm(); if (myid == 0) deallog << "l1 norm: " << l1_norm << std::endl; - Assert(std::abs(v.l1_norm()*3.-w.l1_norm()) < 1e-14, - ExcInternalError()); + AssertThrow (std::abs(v.l1_norm()*3.-w.l1_norm()) < 1e-14, + ExcInternalError()); } // check linfty norm @@ -91,8 +91,8 @@ void test () const double linfty_norm = w.linfty_norm(); if (myid == 0) deallog << "linfty norm: " << linfty_norm << std::endl; - Assert(v.linfty_norm()==w.linfty_norm(), - ExcInternalError()); + AssertThrow (v.linfty_norm()==w.linfty_norm(), + ExcInternalError()); } // check lp norm @@ -101,8 +101,8 @@ void test () if (myid == 0) deallog << "l2.2 norm: " << lp_norm << std::endl; - Assert (std::fabs (w.l2_norm() - w.lp_norm(2.0)) < 1e-14, - ExcInternalError()); + AssertThrow (std::fabs (w.l2_norm() - w.lp_norm(2.0)) < 1e-14, + ExcInternalError()); } // check mean value (should be equal to l1 @@ -113,18 +113,18 @@ void test () if (myid == 0) deallog << "Mean value: " << mean << std::endl; - Assert (std::fabs (mean * w.size() - w.l1_norm()) < 1e-15, - ExcInternalError()); + AssertThrow (std::fabs (mean * w.size() - w.l1_norm()) < 1e-15, + ExcInternalError()); } // check inner product { const double norm_sqr = w.norm_sqr(); - Assert (std::fabs(w * w - norm_sqr) < 1e-15, - ExcInternalError()); + AssertThrow (std::fabs(w * w - norm_sqr) < 1e-15, + ExcInternalError()); parallel::distributed::BlockVector w2; w2 = w; - Assert (std::fabs(w2 * w - norm_sqr) < 1e-15, - ExcInternalError()); + AssertThrow (std::fabs(w2 * w - norm_sqr) < 1e-15, + ExcInternalError()); if (myid<8) w2.block(0).local_element(0) = -1; diff --git a/tests/mpi/parallel_partitioner_01.cc b/tests/mpi/parallel_partitioner_01.cc index 9a4d650d01..6b359d29e2 100644 --- a/tests/mpi/parallel_partitioner_01.cc +++ b/tests/mpi/parallel_partitioner_01.cc @@ -83,32 +83,32 @@ void test () // processors if (myid == 0) { - Assert (v.is_ghost_entry (13) == false, ExcInternalError()); + AssertThrow (v.is_ghost_entry (13) == false, ExcInternalError()); } else { - Assert (v.is_ghost_entry (13) == true, ExcInternalError()); + AssertThrow (v.is_ghost_entry (13) == true, ExcInternalError()); } // count that 27 is ghost nowhere - Assert (v.is_ghost_entry (27) == false, ExcInternalError()); + AssertThrow (v.is_ghost_entry (27) == false, ExcInternalError()); if (myid == 0) { - Assert (v.in_local_range (27) == true, ExcInternalError()); + AssertThrow (v.in_local_range (27) == true, ExcInternalError()); } else { - Assert (v.in_local_range (27) == false, ExcInternalError()); + AssertThrow (v.in_local_range (27) == false, ExcInternalError()); } // element with number set is ghost if (myid == 1) { - Assert (v.is_ghost_entry (set) == false, ExcInternalError()); + AssertThrow (v.is_ghost_entry (set) == false, ExcInternalError()); } else { - Assert (v.is_ghost_entry (set) == true, ExcInternalError()); + AssertThrow (v.is_ghost_entry (set) == true, ExcInternalError()); } if (myid == 0) diff --git a/tests/mpi/parallel_vector_02.cc b/tests/mpi/parallel_vector_02.cc index 5fa91ff2bf..321e63df2a 100644 --- a/tests/mpi/parallel_vector_02.cc +++ b/tests/mpi/parallel_vector_02.cc @@ -50,8 +50,8 @@ void test () v.compress(VectorOperation::add); v*=2.0; - Assert(v(myid*2) == myid*4.0, ExcInternalError()); - Assert(v(myid*2+1) == myid*4.0+2.0, ExcInternalError()); + AssertThrow(v(myid*2) == myid*4.0, ExcInternalError()); + AssertThrow(v(myid*2+1) == myid*4.0+2.0, ExcInternalError()); // set ghost dof, compress v(1) = 7; @@ -65,7 +65,7 @@ void test () // import ghosts onto all procs v.update_ghost_values(); - Assert (v(1) == 7. * numproc, ExcInternalError()); + AssertThrow (v(1) == 7. * numproc, ExcInternalError()); // check l2 norm const double l2_norm = v.l2_norm(); diff --git a/tests/mpi/parallel_vector_03.cc b/tests/mpi/parallel_vector_03.cc index 7e6350ddf0..6447dedd55 100644 --- a/tests/mpi/parallel_vector_03.cc +++ b/tests/mpi/parallel_vector_03.cc @@ -50,8 +50,8 @@ void test () v.compress(VectorOperation::insert); v*=2.0; - Assert(v(myid*2) == myid*4.0, ExcInternalError()); - Assert(v(myid*2+1) == myid*4.0+2.0, ExcInternalError()); + AssertThrow(v(myid*2) == myid*4.0, ExcInternalError()); + AssertThrow(v(myid*2+1) == myid*4.0+2.0, ExcInternalError()); // set ghost dof on all processors, compress // (insert mode) @@ -66,7 +66,7 @@ void test () // import ghosts onto all procs v.update_ghost_values(); - Assert (v(1) == 7.0, ExcInternalError()); + AssertThrow (v(1) == 7.0, ExcInternalError()); // check l2 norm const double l2_norm = v.l2_norm(); diff --git a/tests/mpi/parallel_vector_04.cc b/tests/mpi/parallel_vector_04.cc index e96ff2df41..6494da4adb 100644 --- a/tests/mpi/parallel_vector_04.cc +++ b/tests/mpi/parallel_vector_04.cc @@ -51,49 +51,49 @@ void test () v.compress(VectorOperation::insert); v*=2.0; - Assert(v(myid*2) == myid*4.0, ExcInternalError()); - Assert(v(myid*2+1) == myid*4.0+2.0, ExcInternalError()); + AssertThrow(v(myid*2) == myid*4.0, ExcInternalError()); + AssertThrow(v(myid*2+1) == myid*4.0+2.0, ExcInternalError()); // set ghost dof on remote process, no // compress called if (myid > 0) v(1) = 7; - Assert(v(myid*2) == myid*4.0, ExcInternalError()); - Assert(v(myid*2+1) == myid*4.0+2.0, ExcInternalError()); + AssertThrow(v(myid*2) == myid*4.0, ExcInternalError()); + AssertThrow(v(myid*2+1) == myid*4.0+2.0, ExcInternalError()); if (myid > 0) - Assert (v(1) == 7.0, ExcInternalError()); + AssertThrow (v(1) == 7.0, ExcInternalError()); // reset to zero v = 0; - Assert(v(myid*2) == 0., ExcInternalError()); - Assert(v(myid*2+1) == 0., ExcInternalError()); + AssertThrow (v(myid*2) == 0., ExcInternalError()); + AssertThrow (v(myid*2+1) == 0., ExcInternalError()); // check that everything remains zero also // after compress v.compress(VectorOperation::add); - Assert(v(myid*2) == 0., ExcInternalError()); - Assert(v(myid*2+1) == 0., ExcInternalError()); + AssertThrow (v(myid*2) == 0., ExcInternalError()); + AssertThrow (v(myid*2+1) == 0., ExcInternalError()); // set element 1 on owning process to // something nonzero if (myid == 0) v(1) = 2.; if (myid > 0) - Assert (v(1) == 0., ExcInternalError()); + AssertThrow (v(1) == 0., ExcInternalError()); // check that all processors get the correct // value again, and that it is erased by // operator= v.update_ghost_values(); - Assert (v(1) == 2.0, ExcInternalError()); + AssertThrow (v(1) == 2.0, ExcInternalError()); v = 0; - Assert (v(1) == 0.0, ExcInternalError()); + AssertThrow (v(1) == 0.0, ExcInternalError()); if (myid == 0) deallog << "OK" << std::endl; diff --git a/tests/mpi/parallel_vector_06.cc b/tests/mpi/parallel_vector_06.cc index dc68cdf287..8037305ccf 100644 --- a/tests/mpi/parallel_vector_06.cc +++ b/tests/mpi/parallel_vector_06.cc @@ -57,8 +57,8 @@ void test () v*=2.0; if (myid < 8) { - Assert(v(myid*2) == myid*4.0, ExcInternalError()); - Assert(v(myid*2+1) == myid*4.0+2.0, ExcInternalError()); + AssertThrow(v(myid*2) == myid*4.0, ExcInternalError()); + AssertThrow(v(myid*2+1) == myid*4.0+2.0, ExcInternalError()); } // check l2 norm @@ -106,12 +106,12 @@ void test () // check inner product { const double norm_sqr = v.norm_sqr(); - Assert (std::fabs(v * v - norm_sqr) < 1e-15, - ExcInternalError()); + AssertThrow (std::fabs(v * v - norm_sqr) < 1e-15, + ExcInternalError()); parallel::distributed::Vector v2; v2 = v; - Assert (std::fabs(v2 * v - norm_sqr) < 1e-15, - ExcInternalError()); + AssertThrow (std::fabs(v2 * v - norm_sqr) < 1e-15, + ExcInternalError()); if (myid<8) v2.local_element(0) = -1; diff --git a/tests/mpi/parallel_vector_07.cc b/tests/mpi/parallel_vector_07.cc index bc902e91e0..0e8bcec53e 100644 --- a/tests/mpi/parallel_vector_07.cc +++ b/tests/mpi/parallel_vector_07.cc @@ -67,27 +67,27 @@ void test () // check local values for correctness for (unsigned int i=0; i (factor, vector): "; @@ -157,7 +157,7 @@ void test () z = v; y.equ (1., z); for (int i=0; i 2) - Assert (v0(8) == 1., ExcNonEqual(v0(8),2.)); - Assert (v1(0) == 2., ExcNonEqual(v1(0),2.)); - Assert (v1(2) == 2., ExcNonEqual(v1(2),2.)); + AssertThrow (v0(8) == 1., ExcNonEqual(v0(8),2.)); + AssertThrow (v1(0) == 2., ExcNonEqual(v1(0),2.)); + AssertThrow (v1(2) == 2., ExcNonEqual(v1(2),2.)); if (numproc > 2) { - Assert (v1(8) == 2., ExcNonEqual(v1(8),2.)); - Assert (v1(10) == 2., ExcNonEqual(v1(10),2.)); + AssertThrow (v1(8) == 2., ExcNonEqual(v1(8),2.)); + AssertThrow (v1(10) == 2., ExcNonEqual(v1(10),2.)); } if (myid==0) deallog << "Initial set and ghost update OK" << std::endl; MPI_Barrier (MPI_COMM_WORLD); @@ -110,21 +110,21 @@ void test () AssertDimension (v0.size(), global_size1); AssertDimension (v1.size(), global_size0); for (unsigned int i=0; i 2) - Assert (v1(8) == 1., ExcNonEqual(v1(8),1.)); - Assert (v0(0) == 2., ExcNonEqual(v0(0),2.)); - Assert (v0(2) == 2., ExcNonEqual(v0(2),2.)); + AssertThrow (v1(8) == 1., ExcNonEqual(v1(8),1.)); + AssertThrow (v0(0) == 2., ExcNonEqual(v0(0),2.)); + AssertThrow (v0(2) == 2., ExcNonEqual(v0(2),2.)); if (numproc > 2) { - Assert (v0(8) == 2., ExcNonEqual(v0(8),2.)); - Assert (v0(10) == 2., ExcNonEqual(v0(10),2.)); + AssertThrow (v0(8) == 2., ExcNonEqual(v0(8),2.)); + AssertThrow (v0(10) == 2., ExcNonEqual(v0(10),2.)); } if (myid==0) deallog << "Ghost values after first swap OK" << std::endl; @@ -134,15 +134,15 @@ void test () v1 = 42.; v0.update_ghost_values(); v1.update_ghost_values(); - Assert (v1(2) == 42., ExcNonEqual(v1(2),42.)); + AssertThrow (v1(2) == 42., ExcNonEqual(v1(2),42.)); if (numproc > 2) - Assert (v1(8) == 42., ExcNonEqual(v1(8),42.)); - Assert (v0(0) == 7., ExcNonEqual(v0(0),7.)); - Assert (v0(2) == 7., ExcNonEqual(v0(2),7.)); + AssertThrow (v1(8) == 42., ExcNonEqual(v1(8),42.)); + AssertThrow (v0(0) == 7., ExcNonEqual(v0(0),7.)); + AssertThrow (v0(2) == 7., ExcNonEqual(v0(2),7.)); if (numproc > 2) { - Assert (v0(8) == 7., ExcNonEqual(v0(8),7.)); - Assert (v0(10) == 7., ExcNonEqual(v0(10),7.)); + AssertThrow (v0(8) == 7., ExcNonEqual(v0(8),7.)); + AssertThrow (v0(10) == 7., ExcNonEqual(v0(10),7.)); } if (myid==0) deallog << "Ghost values after re-set OK" << std::endl; @@ -153,16 +153,16 @@ void test () AssertDimension (v2.size(), global_size1); AssertDimension (v2.local_size(), local_size1); for (int i=my_start1; i 2) { - Assert (v2(8) == -1., ExcNonEqual(v2(8),-1.)); - Assert (v2(10) == -1., ExcNonEqual(v2(10),-1.)); + AssertThrow (v2(8) == -1., ExcNonEqual(v2(8),-1.)); + AssertThrow (v2(10) == -1., ExcNonEqual(v2(10),-1.)); } if (myid==0) deallog << "Ghost values after second swap OK" << std::endl; } diff --git a/tests/mpi/parallel_vector_13.cc b/tests/mpi/parallel_vector_13.cc index 2fade51626..e6830b9b5f 100644 --- a/tests/mpi/parallel_vector_13.cc +++ b/tests/mpi/parallel_vector_13.cc @@ -54,8 +54,8 @@ void test () v*=2.0; v.add(1.0); - Assert(v(myid*2) == myid*4.0+1, ExcInternalError()); - Assert(v(myid*2+1) == myid*4.0+3.0, ExcInternalError()); + AssertThrow(v(myid*2) == myid*4.0+1, ExcInternalError()); + AssertThrow(v(myid*2+1) == myid*4.0+3.0, ExcInternalError()); // set ghost dof on all processors, compress // (insert mode) @@ -79,7 +79,7 @@ void test () // import ghosts onto all procs v.update_ghost_values(); - Assert (v(1) == -7.0, ExcInternalError()); + AssertThrow (v(1) == -7.0, ExcInternalError()); // check l2 norm const double l2_norm = v.l2_norm(); diff --git a/tests/mpi/petsc_bug_ghost_vector_01.cc b/tests/mpi/petsc_bug_ghost_vector_01.cc index 0b1010acb2..2d45f4a644 100644 --- a/tests/mpi/petsc_bug_ghost_vector_01.cc +++ b/tests/mpi/petsc_bug_ghost_vector_01.cc @@ -83,11 +83,11 @@ void test () const unsigned int n_mpi_processes=Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD); MPI_Comm mpi_communicator= MPI_COMM_WORLD; parallel::distributed::Triangulation<2> fluid_triangulation(mpi_communicator, - typename Triangulation<2>::MeshSmoothing - (Triangulation<2>::smoothing_on_refinement | - Triangulation<2>::smoothing_on_coarsening)); + typename Triangulation<2>::MeshSmoothing + (Triangulation<2>::smoothing_on_refinement | + Triangulation<2>::smoothing_on_coarsening)); - { + { Triangulation<2> tmp_tria_fluid; Triangulation<2> tmp_tria_buffer; Triangulation<2> tmp_rectangle; @@ -103,44 +103,44 @@ void test () const double cell_size_x=0.1; const double cell_size_y=0.1; const double lenght = solid_cells_x*cell_size_x, - height= static_cast(h_cells*cell_size_y), - h_distance=static_cast(cell_size_x*inflow_cells), - v_distance=static_cast(cell_size_y*v_space_cells), - solid_top=static_cast(v_distance+solid_cells_y*cell_size_y), - total_length=(inflow_cells+solid_cells_x+outflow_cells)*cell_size_x; + height= static_cast(h_cells*cell_size_y), + h_distance=static_cast(cell_size_x*inflow_cells), + v_distance=static_cast(cell_size_y*v_space_cells), + solid_top=static_cast(v_distance+solid_cells_y*cell_size_y), + total_length=(inflow_cells+solid_cells_x+outflow_cells)*cell_size_x; std::vector< std::vector< double > > step_sizes(2); //----------------INFLOW --------------- - for(unsigned int i =0; i(0,0), - Point<2>(h_distance,height), - false); + step_sizes, + Point<2>(0,0), + Point<2>(h_distance,height), + false); //------------------------LOWER------------- step_sizes[0].clear(); step_sizes[1].clear(); - for(unsigned int i =0; i(h_distance,0), - Point<2>(lenght+h_distance,v_distance), - false); + step_sizes, + Point<2>(h_distance,0), + Point<2>(lenght+h_distance,v_distance), + false); tmp_tria_buffer.copy_triangulation(tmp_tria_fluid); GridGenerator::merge_triangulations(tmp_tria_buffer, - tmp_rectangle, - tmp_tria_fluid); + tmp_rectangle, + tmp_tria_fluid); tmp_tria_buffer.clear(); tmp_rectangle.clear(); @@ -149,44 +149,44 @@ void test () step_sizes[1].clear(); - for(unsigned int i =0; i<(h_cells-v_space_cells-solid_cells_y); ++i) + for (unsigned int i =0; i<(h_cells-v_space_cells-solid_cells_y); ++i) step_sizes[1].push_back(cell_size_y); GridGenerator::subdivided_hyper_rectangle(tmp_rectangle, - step_sizes, - Point<2>(h_distance,solid_top), - Point<2>(h_distance+lenght,height), - false); + step_sizes, + Point<2>(h_distance,solid_top), + Point<2>(h_distance+lenght,height), + false); tmp_tria_buffer.copy_triangulation(tmp_tria_fluid); GridGenerator::merge_triangulations(tmp_tria_buffer, - tmp_rectangle, - tmp_tria_fluid); + tmp_rectangle, + tmp_tria_fluid); tmp_tria_buffer.clear(); tmp_rectangle.clear(); // //----------------------------outflow---------- step_sizes[0].clear(); step_sizes[1].clear(); - for(unsigned int i =0; i(h_distance+lenght,0), - Point<2>(total_length,height), - false); + step_sizes, + Point<2>(h_distance+lenght,0), + Point<2>(total_length,height), + false); tmp_tria_buffer.copy_triangulation(tmp_tria_fluid); GridGenerator::merge_triangulations(tmp_tria_buffer, - tmp_rectangle, - tmp_tria_fluid); + tmp_rectangle, + tmp_tria_fluid); //-----------COPY to distributed fluid_triangulation.copy_triangulation(tmp_tria_fluid); } - + fluid_triangulation.refine_global(1); // ---------END GENERATING TRIA ------------ @@ -217,27 +217,27 @@ void test () IndexSet locally_owned_dofs = handler.locally_owned_dofs(); IndexSet locally_relevant_dofs = handler.locally_owned_dofs(); DoFTools::extract_locally_relevant_dofs(handler, - locally_relevant_dofs); + locally_relevant_dofs); PETScWrappers::MPI::Vector vector; vector.reinit(locally_owned_dofs, - locally_relevant_dofs, - mpi_communicator); + locally_relevant_dofs, + mpi_communicator); // ensure that all elements we can access locally are initially at // zero. check this first for the locally owned elements... for (unsigned int i=0; i::cell_iterator cell_iterator; DeclException1(ExcMissingCell, - cell_iterator, - << "Trying to find cell " << arg1 << " but it doesn't appear to be in the list"); + cell_iterator, + << "Trying to find cell " << arg1 << " but it doesn't appear to be in the list"); int main(int argc, char *argv[]) { dealii::Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, numbers::invalid_unsigned_int); MPILogInitAll log; - + if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) { static std::ofstream logfile("output"); @@ -76,11 +76,11 @@ int main(int argc, char *argv[]) deallog.depth_console(0); deallog.threshold_double(1.e-10); } - + parallel::distributed::Triangulation<2,3> triangulation(MPI_COMM_WORLD, - typename Triangulation<2,3>::MeshSmoothing - (Triangulation<2,3>::smoothing_on_refinement | - Triangulation<2,3 >::smoothing_on_coarsening)); + typename Triangulation<2,3>::MeshSmoothing + (Triangulation<2,3>::smoothing_on_refinement | + Triangulation<2,3 >::smoothing_on_coarsening)); GridGenerator::torus(triangulation, 1, 0.2); // create a set of all cells, and insert all cells into it @@ -91,26 +91,26 @@ int main(int argc, char *argv[]) { cells.insert (cell); if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) - deallog << "Adding cell " << cell << std::endl; + deallog << "Adding cell " << cell << std::endl; } if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) deallog << "List contains " << cells.size() << " items" << std::endl; // verify that every cell is in there - for(parallel::distributed::Triangulation<2,3>::cell_iterator cell= triangulation.begin(0); - cell!=triangulation.end(0); - ++cell) - Assert (cells.find(cell)!=cells.end(), - ExcMissingCell(cell)); + for (parallel::distributed::Triangulation<2,3>::cell_iterator cell= triangulation.begin(0); + cell!=triangulation.end(0); + ++cell) + AssertThrow (cells.find(cell)!=cells.end(), + ExcMissingCell(cell)); // refine triangulation and verify that every coarse mesh cell is in there triangulation.refine_global(2); if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) deallog << "List contains " << cells.size() << " items" << std::endl; - for(parallel::distributed::Triangulation<2,3>::cell_iterator cell= triangulation.begin(0); - cell!=triangulation.end(0); - ++cell) - Assert (cells.find(cell)!=cells.end(), - ExcMissingCell(cell)); + for (parallel::distributed::Triangulation<2,3>::cell_iterator cell= triangulation.begin(0); + cell!=triangulation.end(0); + ++cell) + AssertThrow (cells.find(cell)!=cells.end(), + ExcMissingCell(cell)); } diff --git a/tests/mpi/trilinos_bug_5609.cc b/tests/mpi/trilinos_bug_5609.cc index 09c522b20a..fad8a8c4f9 100644 --- a/tests/mpi/trilinos_bug_5609.cc +++ b/tests/mpi/trilinos_bug_5609.cc @@ -45,7 +45,7 @@ void test () x1.ReplaceGlobalValues(1, &GID, &value); x1.GlobalAssemble (Insert); if (Comm.MyPID()==0) - Assert (x1[0][0] == 1, ExcInternalError()); + AssertThrow (x1[0][0] == 1, ExcInternalError()); // copy vector Epetra_FEVector x2 (x1); @@ -62,7 +62,7 @@ void test () x2.GlobalAssemble (Insert); if (Comm.MyPID()==0) - Assert (x1[0][0] == 1, ExcInternalError()); + AssertThrow (x1[0][0] == 1, ExcInternalError()); } diff --git a/tests/mpi/trilinos_distribute_01.cc b/tests/mpi/trilinos_distribute_01.cc index bab5775479..463f0e3bce 100644 --- a/tests/mpi/trilinos_distribute_01.cc +++ b/tests/mpi/trilinos_distribute_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2009 - 2014 by the deal.II authors +// Copyright (C) 2009 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -49,9 +49,9 @@ void test() is.add_range (100*myid, 100*myid+100); vec.reinit (is, MPI_COMM_WORLD); } - Assert (vec.local_size() == 100, ExcInternalError()); - Assert (vec.local_range().first == 100*myid, ExcInternalError()); - Assert (vec.local_range().second == 100*myid+100, ExcInternalError()); + AssertThrow (vec.local_size() == 100, ExcInternalError()); + AssertThrow (vec.local_range().first == 100*myid, ExcInternalError()); + AssertThrow (vec.local_range().second == 100*myid+100, ExcInternalError()); for (unsigned int i=vec.local_range().first; i::level_cell_iterator cell = mgdof.begin_mg(), @@ -85,14 +85,20 @@ void check() // dof index for (unsigned int i=0; i fe.system_to_component_index(j).first) - Assert (mg_dof_indices[i] > mg_dof_indices[j], - ExcInternalError()); + { + AssertThrow (mg_dof_indices[i] > mg_dof_indices[j], + ExcInternalError()); + } + } } } diff --git a/tests/petsc/01.cc b/tests/petsc/01.cc index 3e29ed4b45..1725829d36 100644 --- a/tests/petsc/01.cc +++ b/tests/petsc/01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -39,13 +39,13 @@ void test (PETScWrappers::SparseMatrix &m) for (unsigned int j=0; j (1./3.)); - Assert (std::fabs(v.lp_norm(3) - true_value) < eps*true_value, - ExcInternalError()); + AssertThrow (std::fabs(v.lp_norm(3) - true_value) < eps*true_value, + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/petsc/34.cc b/tests/petsc/34.cc index 3d685b81dd..2239e6933d 100644 --- a/tests/petsc/34.cc +++ b/tests/petsc/34.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -39,7 +39,7 @@ void test (PETScWrappers::Vector &v) v = 0; // then check all_zero - Assert (v.all_zero() == true, ExcInternalError()); + AssertThrow (v.all_zero() == true, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/petsc/35.cc b/tests/petsc/35.cc index d3a1b0758a..4890c6c98e 100644 --- a/tests/petsc/35.cc +++ b/tests/petsc/35.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -46,13 +46,13 @@ void test (PETScWrappers::Vector &v, { if (i%3 == 0) { - Assert (w(i) == i+1., ExcInternalError()); - Assert (v(i) == i+i+1., ExcInternalError()); + AssertThrow (w(i) == i+1., ExcInternalError()); + AssertThrow (v(i) == i+i+1., ExcInternalError()); } else { - Assert (w(i) == 0, ExcInternalError()); - Assert (v(i) == i, ExcInternalError()); + AssertThrow (w(i) == 0, ExcInternalError()); + AssertThrow (v(i) == i, ExcInternalError()); } } diff --git a/tests/petsc/36.cc b/tests/petsc/36.cc index 718aaf7721..333a848cd2 100644 --- a/tests/petsc/36.cc +++ b/tests/petsc/36.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -46,13 +46,13 @@ void test (PETScWrappers::Vector &v, { if (i%3 == 0) { - Assert (w(i) == i+1., ExcInternalError()); - Assert (v(i) == i-(i+1.), ExcInternalError()); + AssertThrow (w(i) == i+1., ExcInternalError()); + AssertThrow (v(i) == i-(i+1.), ExcInternalError()); } else { - Assert (w(i) == 0, ExcInternalError()); - Assert (v(i) == i, ExcInternalError()); + AssertThrow (w(i) == 0, ExcInternalError()); + AssertThrow (v(i) == i, ExcInternalError()); } } diff --git a/tests/petsc/37.cc b/tests/petsc/37.cc index bf8522ae1e..7d8c2d23dc 100644 --- a/tests/petsc/37.cc +++ b/tests/petsc/37.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -35,7 +35,7 @@ void test (PETScWrappers::Vector &v) // make sure we get the expected result for (unsigned int i=0; i(v).begin(); - Assert (*i == 1, ExcInternalError()); + AssertThrow (*i == 1, ExcInternalError()); ++i; - Assert (*i == 2, ExcInternalError()); + AssertThrow (*i == 2, ExcInternalError()); } // read through a read-write iterator { PETScWrappers::BlockVector::iterator i = v.begin(); - Assert (*i == 1, ExcInternalError()); + AssertThrow (*i == 1, ExcInternalError()); ++i; - Assert (*i == 2, ExcInternalError()); + AssertThrow (*i == 2, ExcInternalError()); } // write through a read-write iterator @@ -68,9 +68,9 @@ void test () // and read again { PETScWrappers::BlockVector::iterator i = v.begin(); - Assert (*i == 2, ExcInternalError()); + AssertThrow (*i == 2, ExcInternalError()); ++i; - Assert (*i == 3, ExcInternalError()); + AssertThrow (*i == 3, ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/petsc/block_vector_iterator_02.cc b/tests/petsc/block_vector_iterator_02.cc index ba7cd833f9..18b5c4863c 100644 --- a/tests/petsc/block_vector_iterator_02.cc +++ b/tests/petsc/block_vector_iterator_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -33,8 +33,8 @@ void test () // iterator { PETScWrappers::BlockVector::const_iterator i=v.begin(); - Assert (i[0] == 1, ExcInternalError()); - Assert (i[1] == 2, ExcInternalError()); + AssertThrow (i[0] == 1, ExcInternalError()); + AssertThrow (i[1] == 2, ExcInternalError()); } // same, but create iterator in a different @@ -42,15 +42,15 @@ void test () { PETScWrappers::BlockVector::const_iterator i=const_cast(v).begin(); - Assert (i[0] == 1, ExcInternalError()); - Assert (i[1] == 2, ExcInternalError()); + AssertThrow (i[0] == 1, ExcInternalError()); + AssertThrow (i[1] == 2, ExcInternalError()); } // read through a read-write iterator { PETScWrappers::BlockVector::iterator i = v.begin(); - Assert (i[0] == 1, ExcInternalError()); - Assert (i[1] == 2, ExcInternalError()); + AssertThrow (i[0] == 1, ExcInternalError()); + AssertThrow (i[1] == 2, ExcInternalError()); } // write through a read-write iterator @@ -63,8 +63,8 @@ void test () // and read again { PETScWrappers::BlockVector::iterator i = v.begin(); - Assert (i[0] == 2, ExcInternalError()); - Assert (i[1] == 3, ExcInternalError()); + AssertThrow (i[0] == 2, ExcInternalError()); + AssertThrow (i[1] == 3, ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/petsc/block_vector_iterator_03.cc b/tests/petsc/block_vector_iterator_03.cc index 799e5bd308..78a3b793f9 100644 --- a/tests/petsc/block_vector_iterator_03.cc +++ b/tests/petsc/block_vector_iterator_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -102,7 +102,7 @@ void test () PETScWrappers::BlockVector::iterator p1 = v1.begin(); for (unsigned int i=0; i> t2; - Assert (compare (t1, t2), ExcInternalError()); + AssertThrow (compare (t1, t2), ExcInternalError()); } } diff --git a/tests/trilinos/01.cc b/tests/trilinos/01.cc index f2692c7c95..f54056ca76 100644 --- a/tests/trilinos/01.cc +++ b/tests/trilinos/01.cc @@ -40,12 +40,12 @@ void test (TrilinosWrappers::SparseMatrix &m) for (unsigned int j=0; j (1./3.)); - Assert (std::fabs(v.lp_norm(3) - true_value) < eps*true_value, - ExcInternalError()); + AssertThrow (std::fabs(v.lp_norm(3) - true_value) < eps*true_value, + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/trilinos/34.cc b/tests/trilinos/34.cc index 047b331e5c..1ff11af92c 100644 --- a/tests/trilinos/34.cc +++ b/tests/trilinos/34.cc @@ -40,7 +40,7 @@ void test (TrilinosWrappers::Vector &v) v = 0; // then check all_zero - Assert (v.all_zero() == true, ExcInternalError()); + AssertThrow (v.all_zero() == true, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/trilinos/35.cc b/tests/trilinos/35.cc index 38e21196ea..e657e3423a 100644 --- a/tests/trilinos/35.cc +++ b/tests/trilinos/35.cc @@ -47,13 +47,13 @@ void test (TrilinosWrappers::Vector &v, { if (i%3 == 0) { - Assert (w(i) == i+1., ExcInternalError()); - Assert (v(i) == i+i+1., ExcInternalError()); + AssertThrow (w(i) == i+1., ExcInternalError()); + AssertThrow (v(i) == i+i+1., ExcInternalError()); } else { - Assert (w(i) == 0, ExcInternalError()); - Assert (v(i) == i, ExcInternalError()); + AssertThrow (w(i) == 0, ExcInternalError()); + AssertThrow (v(i) == i, ExcInternalError()); } } diff --git a/tests/trilinos/36.cc b/tests/trilinos/36.cc index ba9fb2ffa8..7075d54bd3 100644 --- a/tests/trilinos/36.cc +++ b/tests/trilinos/36.cc @@ -47,13 +47,13 @@ void test (TrilinosWrappers::Vector &v, { if (i%3 == 0) { - Assert (w(i) == i+1., ExcInternalError()); - Assert (v(i) == i-(i+1.), ExcInternalError()); + AssertThrow (w(i) == i+1., ExcInternalError()); + AssertThrow (v(i) == i-(i+1.), ExcInternalError()); } else { - Assert (w(i) == 0, ExcInternalError()); - Assert (v(i) == i, ExcInternalError()); + AssertThrow (w(i) == 0, ExcInternalError()); + AssertThrow (v(i) == i, ExcInternalError()); } } diff --git a/tests/trilinos/37.cc b/tests/trilinos/37.cc index e03efe07ab..0d622a3690 100644 --- a/tests/trilinos/37.cc +++ b/tests/trilinos/37.cc @@ -36,7 +36,7 @@ void test (TrilinosWrappers::Vector &v) // make sure we get the expected result for (unsigned int i=0; i(v).begin(); - Assert (*i == 1, ExcInternalError()); + AssertThrow (*i == 1, ExcInternalError()); ++i; - Assert (*i == 2, ExcInternalError()); + AssertThrow (*i == 2, ExcInternalError()); } // read through a read-write iterator { TrilinosWrappers::BlockVector::iterator i = v.begin(); - Assert (*i == 1, ExcInternalError()); + AssertThrow (*i == 1, ExcInternalError()); ++i; - Assert (*i == 2, ExcInternalError()); + AssertThrow (*i == 2, ExcInternalError()); } // write through a read-write iterator @@ -73,9 +73,9 @@ void test () // and read again { TrilinosWrappers::BlockVector::iterator i = v.begin(); - Assert (*i == 2, ExcInternalError()); + AssertThrow (*i == 2, ExcInternalError()); ++i; - Assert (*i == 3, ExcInternalError()); + AssertThrow (*i == 3, ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/trilinos/block_vector_iterator_02.cc b/tests/trilinos/block_vector_iterator_02.cc index 09867c2f45..4c937affa9 100644 --- a/tests/trilinos/block_vector_iterator_02.cc +++ b/tests/trilinos/block_vector_iterator_02.cc @@ -38,8 +38,8 @@ void test () // iterator { TrilinosWrappers::BlockVector::const_iterator i=v.begin(); - Assert (i[0] == 1, ExcInternalError()); - Assert (i[1] == 2, ExcInternalError()); + AssertThrow (i[0] == 1, ExcInternalError()); + AssertThrow (i[1] == 2, ExcInternalError()); } // same, but create iterator in a different @@ -47,15 +47,15 @@ void test () { TrilinosWrappers::BlockVector::const_iterator i=const_cast(v).begin(); - Assert (i[0] == 1, ExcInternalError()); - Assert (i[1] == 2, ExcInternalError()); + AssertThrow (i[0] == 1, ExcInternalError()); + AssertThrow (i[1] == 2, ExcInternalError()); } // read through a read-write iterator { TrilinosWrappers::BlockVector::iterator i = v.begin(); - Assert (i[0] == 1, ExcInternalError()); - Assert (i[1] == 2, ExcInternalError()); + AssertThrow (i[0] == 1, ExcInternalError()); + AssertThrow (i[1] == 2, ExcInternalError()); } // write through a read-write iterator @@ -68,8 +68,8 @@ void test () // and read again { TrilinosWrappers::BlockVector::iterator i = v.begin(); - Assert (i[0] == 2, ExcInternalError()); - Assert (i[1] == 3, ExcInternalError()); + AssertThrow (i[0] == 2, ExcInternalError()); + AssertThrow (i[1] == 3, ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/trilinos/block_vector_iterator_03.cc b/tests/trilinos/block_vector_iterator_03.cc index 907b90227c..242a640e3d 100644 --- a/tests/trilinos/block_vector_iterator_03.cc +++ b/tests/trilinos/block_vector_iterator_03.cc @@ -66,7 +66,7 @@ void test () TrilinosWrappers::BlockVector::iterator p2 = v2.begin(); for (unsigned int i=0; irow(), p->column()) == matrix(p->row(), p->column()), - ExcInternalError()); + AssertThrow (copy(p->row(), p->column()) == matrix(p->row(), p->column()), + ExcInternalError()); } diff --git a/tests/trilinos/sparse_matrix_set_01.cc b/tests/trilinos/sparse_matrix_set_01.cc index 8824c12333..765dd98447 100644 --- a/tests/trilinos/sparse_matrix_set_01.cc +++ b/tests/trilinos/sparse_matrix_set_01.cc @@ -76,7 +76,7 @@ void test (TrilinosWrappers::SparseMatrix &m) // matrix in order to check whether all // elements really are zero. double norm = m2.frobenius_norm(); - Assert (norm == 0, ExcInternalError()); + AssertThrow (norm == 0, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/trilinos/sparse_matrix_set_02.cc b/tests/trilinos/sparse_matrix_set_02.cc index c0146fa529..38359046ca 100644 --- a/tests/trilinos/sparse_matrix_set_02.cc +++ b/tests/trilinos/sparse_matrix_set_02.cc @@ -77,7 +77,7 @@ void test (TrilinosWrappers::SparseMatrix &m) // matrix in order to check whether all // elements really are zero double norm = m2.frobenius_norm(); - Assert (norm == 0, ExcInternalError()); + AssertThrow (norm == 0, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/trilinos/sparse_matrix_vector_01.cc b/tests/trilinos/sparse_matrix_vector_01.cc index e9d12c1615..6237e550b3 100644 --- a/tests/trilinos/sparse_matrix_vector_01.cc +++ b/tests/trilinos/sparse_matrix_vector_01.cc @@ -47,12 +47,12 @@ void test (TrilinosWrappers::Vector &v, // make sure we get the expected result for (unsigned int i=0; i &v, double result = 0; for (unsigned int j=0; j &v, double result = 0; for (unsigned int j=0; j &v, double result = 0; for (unsigned int j=0; j &v, double result = 0; for (unsigned int j=0; j &v, double result = 0; for (unsigned int j=0; j &v, double result = 0; for (unsigned int j=0; j &v, double result = 0; for (unsigned int j=0; j &v, double result = 0; for (unsigned int j=0; j k, ExcInternalError()); + AssertThrow (k < j, ExcInternalError()); + AssertThrow (j > k, ExcInternalError()); - Assert (!(j < k), ExcInternalError()); - Assert (!(k > j), ExcInternalError()); + AssertThrow (!(j < k), ExcInternalError()); + AssertThrow (!(k > j), ExcInternalError()); - Assert (k != j, ExcInternalError()); - Assert (!(k == j), ExcInternalError()); + AssertThrow (k != j, ExcInternalError()); + AssertThrow (!(k == j), ExcInternalError()); - Assert (k == k, ExcInternalError()); - Assert (!(k != k), ExcInternalError()); + AssertThrow (k == k, ExcInternalError()); + AssertThrow (!(k != k), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/trilinos/trilinos_sparse_matrix_iterator_12.cc b/tests/trilinos/trilinos_sparse_matrix_iterator_12.cc index c7c5a99262..9c8e10c4c7 100644 --- a/tests/trilinos/trilinos_sparse_matrix_iterator_12.cc +++ b/tests/trilinos/trilinos_sparse_matrix_iterator_12.cc @@ -41,17 +41,17 @@ void test () TrilinosWrappers::SparseMatrix::const_iterator k = A.begin(), j = ++A.begin(); - Assert (k < j, ExcInternalError()); - Assert (j > k, ExcInternalError()); + AssertThrow (k < j, ExcInternalError()); + AssertThrow (j > k, ExcInternalError()); - Assert (!(j < k), ExcInternalError()); - Assert (!(k > j), ExcInternalError()); + AssertThrow (!(j < k), ExcInternalError()); + AssertThrow (!(k > j), ExcInternalError()); - Assert (k != j, ExcInternalError()); - Assert (!(k == j), ExcInternalError()); + AssertThrow (k != j, ExcInternalError()); + AssertThrow (!(k == j), ExcInternalError()); - Assert (k == k, ExcInternalError()); - Assert (!(k != k), ExcInternalError()); + AssertThrow (k == k, ExcInternalError()); + AssertThrow (!(k != k), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/trilinos/vector_assign_01.cc b/tests/trilinos/vector_assign_01.cc index 3bdd32e601..a4b652496f 100644 --- a/tests/trilinos/vector_assign_01.cc +++ b/tests/trilinos/vector_assign_01.cc @@ -43,7 +43,7 @@ void test (TrilinosWrappers::Vector &v, w(i) = v(i); // check that they're equal - Assert (v==w, ExcInternalError()); + AssertThrow (v==w, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/trilinos/vector_assign_02.cc b/tests/trilinos/vector_assign_02.cc index 03eb546f9b..279c6c16ba 100644 --- a/tests/trilinos/vector_assign_02.cc +++ b/tests/trilinos/vector_assign_02.cc @@ -42,7 +42,7 @@ void test (TrilinosWrappers::Vector &v, w(i) += v(i); // check that they're equal - Assert (v==w, ExcInternalError()); + AssertThrow (v==w, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/trilinos/vector_equality_1.cc b/tests/trilinos/vector_equality_1.cc index 065f27135d..ff8e6b7f7a 100644 --- a/tests/trilinos/vector_equality_1.cc +++ b/tests/trilinos/vector_equality_1.cc @@ -38,7 +38,7 @@ void test (TrilinosWrappers::Vector &v, w(i) = i+1.; } - Assert (!(v==w), ExcInternalError()); + AssertThrow (!(v==w), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/trilinos/vector_equality_2.cc b/tests/trilinos/vector_equality_2.cc index 07f2ba6626..02b92f0d9c 100644 --- a/tests/trilinos/vector_equality_2.cc +++ b/tests/trilinos/vector_equality_2.cc @@ -40,7 +40,7 @@ void test (TrilinosWrappers::Vector &v, // but then copy elements and make sure the // vectors are actually equal v = w; - Assert (v==w, ExcInternalError()); + AssertThrow (v==w, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/trilinos/vector_equality_3.cc b/tests/trilinos/vector_equality_3.cc index 100f3b9a84..15b7498ca6 100644 --- a/tests/trilinos/vector_equality_3.cc +++ b/tests/trilinos/vector_equality_3.cc @@ -38,7 +38,7 @@ void test (TrilinosWrappers::Vector &v, w(i) = i+1.; } - Assert (v!=w, ExcInternalError()); + AssertThrow (v!=w, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/trilinos/vector_equality_4.cc b/tests/trilinos/vector_equality_4.cc index 094c0ae8d4..72eee3824e 100644 --- a/tests/trilinos/vector_equality_4.cc +++ b/tests/trilinos/vector_equality_4.cc @@ -40,7 +40,7 @@ void test (TrilinosWrappers::Vector &v, // but then copy elements and make sure the // vectors are actually equal v = w; - Assert (! (v!=w), ExcInternalError()); + AssertThrow (! (v!=w), ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/umfpack/umfpack_03.cc b/tests/umfpack/umfpack_03.cc index 6f58d053be..074220576a 100644 --- a/tests/umfpack/umfpack_03.cc +++ b/tests/umfpack/umfpack_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2002 - 2014 by the deal.II authors +// Copyright (C) 2002 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -90,8 +90,8 @@ void test (bool transpose = false) for (SparseMatrix::iterator p=B.begin(); p!=B.end(); ++p) if (p->column() != p->row()) - Assert (B(p->row(),p->column()) != B(p->column(),p->row()), - ExcInternalError()); + AssertThrow (B(p->row(),p->column()) != B(p->column(),p->row()), + ExcInternalError()); // for a number of different solution // vectors, make up a matching rhs vector diff --git a/tests/umfpack/umfpack_05.cc b/tests/umfpack/umfpack_05.cc index c6150590f8..6476a91231 100644 --- a/tests/umfpack/umfpack_05.cc +++ b/tests/umfpack/umfpack_05.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2002 - 2014 by the deal.II authors +// Copyright (C) 2002 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -59,8 +59,8 @@ void test () umfpackb.solve(ubb); for (unsigned int i=0; i<4; ++i) - Assert (std::fabs (ubb(i) - i) < 1e-12, - ExcInternalError()); + AssertThrow (std::fabs (ubb(i) - i) < 1e-12, + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/umfpack/umfpack_06.cc b/tests/umfpack/umfpack_06.cc index fccca4c220..154baea749 100644 --- a/tests/umfpack/umfpack_06.cc +++ b/tests/umfpack/umfpack_06.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2002 - 2014 by the deal.II authors +// Copyright (C) 2002 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -63,8 +63,8 @@ void test () umfpackb.solve(ubb); for (unsigned int i=0; i<4; ++i) - Assert (std::fabs (ubb(i) - i) < 1e-12, - ExcInternalError()); + AssertThrow (std::fabs (ubb(i) - i) < 1e-12, + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/umfpack/umfpack_07.cc b/tests/umfpack/umfpack_07.cc index 3e7647a292..3a4aba8d6c 100644 --- a/tests/umfpack/umfpack_07.cc +++ b/tests/umfpack/umfpack_07.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2002 - 2014 by the deal.II authors +// Copyright (C) 2002 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -91,8 +91,8 @@ void test () for (SparseMatrix::iterator p=B.begin(); p!=B.end(); ++p) if (p->column() != p->row()) - Assert (B(p->row(),p->column()) != B(p->column(),p->row()), - ExcInternalError()); + AssertThrow (B(p->row(),p->column()) != B(p->column(),p->row()), + ExcInternalError()); // for a number of different solution // vectors, make up a matching rhs vector diff --git a/tests/umfpack/umfpack_08.cc b/tests/umfpack/umfpack_08.cc index db2e855c98..1082f0d452 100644 --- a/tests/umfpack/umfpack_08.cc +++ b/tests/umfpack/umfpack_08.cc @@ -113,8 +113,8 @@ void test () for (SparseMatrix::iterator p=xB.begin(); p!=xB.end(); ++p) if (p->column() != p->row()) - Assert (xB(p->row(),p->column()) != xB(p->column(),p->row()), - ExcInternalError()); + AssertThrow (xB(p->row(),p->column()) != xB(p->column(),p->row()), + ExcInternalError()); // now copy stuff over for (SparseMatrix::const_iterator i = xB.begin(); i != xB.end(); ++i) diff --git a/tests/umfpack/umfpack_09.cc b/tests/umfpack/umfpack_09.cc index 016f4d85eb..04d660d9bc 100644 --- a/tests/umfpack/umfpack_09.cc +++ b/tests/umfpack/umfpack_09.cc @@ -113,8 +113,8 @@ void test () for (SparseMatrix::iterator p=xB.begin(); p!=xB.end(); ++p) if (p->column() != p->row()) - Assert (xB(p->row(),p->column()) != xB(p->column(),p->row()), - ExcInternalError()); + AssertThrow (xB(p->row(),p->column()) != xB(p->column(),p->row()), + ExcInternalError()); // now copy stuff over for (SparseMatrix::const_iterator i = xB.begin(); i != xB.end(); ++i) diff --git a/tests/umfpack/umfpack_10.cc b/tests/umfpack/umfpack_10.cc index 751ac630c8..696e37558c 100644 --- a/tests/umfpack/umfpack_10.cc +++ b/tests/umfpack/umfpack_10.cc @@ -90,8 +90,8 @@ void test () for (SparseMatrix::iterator p=B.begin(); p!=B.end(); ++p) if (p->column() != p->row()) - Assert (B(p->row(),p->column()) != B(p->column(),p->row()), - ExcInternalError()); + AssertThrow (B(p->row(),p->column()) != B(p->column(),p->row()), + ExcInternalError()); SparseMatrixEZ B_ez(dof_handler.n_dofs(), diff --git a/tests/umfpack/umfpack_11.cc b/tests/umfpack/umfpack_11.cc index 26a6e76b8a..b6c362a2ef 100644 --- a/tests/umfpack/umfpack_11.cc +++ b/tests/umfpack/umfpack_11.cc @@ -114,8 +114,8 @@ void test () for (SparseMatrix::iterator p=xB.begin(); p!=xB.end(); ++p) if (p->column() != p->row()) - Assert (xB(p->row(),p->column()) != xB(p->column(),p->row()), - ExcInternalError()); + AssertThrow (xB(p->row(),p->column()) != xB(p->column(),p->row()), + ExcInternalError()); // now copy stuff over for (SparseMatrix::const_iterator i = xB.begin(); i != xB.end(); ++i)