From cb0b564d723324234721058a232dd4cf863c1dde Mon Sep 17 00:00:00 2001 From: Doug Shi-Dong Date: Tue, 11 Aug 2020 08:42:17 -0400 Subject: [PATCH] Update distorted_cells tests. --- tests/bits/distorted_cells_01.cc | 5 ++++ tests/bits/distorted_cells_01.debug.output | 6 ++--- tests/bits/distorted_cells_02.cc | 9 ++----- tests/bits/distorted_cells_02.debug.output | 4 +-- tests/bits/distorted_cells_07.cc | 31 +++++++++++++--------- tests/bits/distorted_cells_07.debug.output | 6 ++--- 6 files changed, 33 insertions(+), 28 deletions(-) diff --git a/tests/bits/distorted_cells_01.cc b/tests/bits/distorted_cells_01.cc index 953d4dadb6..28833dcb1e 100644 --- a/tests/bits/distorted_cells_01.cc +++ b/tests/bits/distorted_cells_01.cc @@ -83,6 +83,11 @@ check(const unsigned int testcase) Assert(dcv.distorted_cells.front() == coarse_grid.begin(0), ExcInternalError()); } + catch (ExceptionBase &exc) + { + deallog << exc.get_exc_name() << std::endl; + flag = true; + } Assert(flag == true, ExcInternalError()); } diff --git a/tests/bits/distorted_cells_01.debug.output b/tests/bits/distorted_cells_01.debug.output index c9864839e9..561bb9a823 100644 --- a/tests/bits/distorted_cells_01.debug.output +++ b/tests/bits/distorted_cells_01.debug.output @@ -1,13 +1,13 @@ DEAL::Pinched cell in 1d -DEAL::1 distorted cells +DEAL::ExcGridHasInvalidCell(cell_no) DEAL::Pinched cell in 2d DEAL::1 distorted cells DEAL::Pinched cell in 3d DEAL::1 distorted cells DEAL::Twisted cell in 1d -DEAL::1 distorted cells +DEAL::ExcGridHasInvalidCell(cell_no) DEAL::Twisted cell in 2d -DEAL::1 distorted cells +DEAL::ExcGridHasInvalidCell(cell_no) DEAL::Twisted cell in 3d DEAL::1 distorted cells diff --git a/tests/bits/distorted_cells_02.cc b/tests/bits/distorted_cells_02.cc index 2f90510122..74700a80f6 100644 --- a/tests/bits/distorted_cells_02.cc +++ b/tests/bits/distorted_cells_02.cc @@ -53,18 +53,13 @@ check() { gi.read_ucd(in); } - catch (typename Triangulation::DistortedCellList &dcv) + catch (ExceptionBase &exc) { + deallog << exc.get_exc_name() << std::endl; flag = true; - - deallog << dcv.distorted_cells.size() << " distorted cells" << std::endl; - Assert(dcv.distorted_cells.front() == coarse_grid.begin(0), - ExcInternalError()); } Assert(flag == true, ExcInternalError()); - Assert(coarse_grid.n_levels() == 1, ExcInternalError()); - Assert(coarse_grid.n_active_cells() == 1, ExcInternalError()); } diff --git a/tests/bits/distorted_cells_02.debug.output b/tests/bits/distorted_cells_02.debug.output index 09b3dbd5c5..ca25752a09 100644 --- a/tests/bits/distorted_cells_02.debug.output +++ b/tests/bits/distorted_cells_02.debug.output @@ -1,3 +1,3 @@ -DEAL::1 distorted cells -DEAL::1 distorted cells +DEAL::ExcGridHasInvalidCell(cell_no) +DEAL::ExcGridHasInvalidCell(cell_no) diff --git a/tests/bits/distorted_cells_07.cc b/tests/bits/distorted_cells_07.cc index 34150657a1..0b47b7fcfc 100644 --- a/tests/bits/distorted_cells_07.cc +++ b/tests/bits/distorted_cells_07.cc @@ -74,23 +74,28 @@ check(const unsigned int testcase) catch (typename Triangulation::DistortedCellList &dcv) { flag = true; - } - - Assert(flag == true, ExcInternalError()); - // now build an FEValues object and compute quadrature points on that cell - FE_Nothing dummy; - QGauss quadrature(2); - FEValues fe_values(dummy, quadrature, update_JxW_values); - // should throw an assertion - try - { - fe_values.reinit(coarse_grid.begin()); + // now build an FEValues object and compute quadrature points on that cell + FE_Nothing dummy; + QGauss quadrature(2); + FEValues fe_values(dummy, quadrature, update_JxW_values); + // should throw an assertion + try + { + fe_values.reinit(coarse_grid.begin()); + } + catch (ExceptionBase &e) + { + deallog << e.get_exc_name() << std::endl; + } } - catch (ExceptionBase &e) + catch (ExceptionBase &exc) { - deallog << e.get_exc_name() << std::endl; + deallog << exc.get_exc_name() << std::endl; + flag = true; } + + Assert(flag == true, ExcInternalError()); } diff --git a/tests/bits/distorted_cells_07.debug.output b/tests/bits/distorted_cells_07.debug.output index 79c048a783..f8403476bd 100644 --- a/tests/bits/distorted_cells_07.debug.output +++ b/tests/bits/distorted_cells_07.debug.output @@ -1,7 +1,7 @@ DEAL::Twisted cell in 1d -DEAL::(typename Mapping::ExcDistortedMappedCell(cell->center(), det, point)) +DEAL::ExcGridHasInvalidCell(cell_no) DEAL::Twisted cell in 2d -DEAL::(typename Mapping::ExcDistortedMappedCell(cell->center(), det, point)) +DEAL::ExcGridHasInvalidCell(cell_no) DEAL::Twisted cell in 3d -DEAL::(typename Mapping::ExcDistortedMappedCell(cell->center(), det, point)) +DEAL::(typename Mapping::ExcDistortedMappedCell( cell->center(), det, point)) -- 2.39.5