From: Wolfgang Bangerth Date: Wed, 15 Jul 2009 14:55:26 +0000 (+0000) Subject: The meshes we create here are distorted. Right now we can't fix it, X-Git-Tag: v8.0.0~7472 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4f750250c43a84ef1176eb1d92d60cb780a713d;p=dealii.git The meshes we create here are distorted. Right now we can't fix it, but at least catch the exception that was thrown. git-svn-id: https://svn.dealii.org/trunk@19088 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/deal.II/grid_hyper_shell.cc b/tests/deal.II/grid_hyper_shell.cc index 9cea5745ab..fb4909fdaa 100644 --- a/tests/deal.II/grid_hyper_shell.cc +++ b/tests/deal.II/grid_hyper_shell.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2007, 2008 by the deal.II authors +// Copyright (C) 2007, 2008, 2009 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -39,7 +40,24 @@ void check (double r1, double r2, unsigned int n, bool) static const HyperShellBoundary boundary(center); tria.set_boundary(0, boundary); - tria.refine_global(2); + for (unsigned int i=0; i<2; ++i) + { + try + { + tria.refine_global(1); + } + catch (typename Triangulation::DistortedCellList &dcv) + { + deallog << "Found " << dcv.distorted_cells.size() + << " distorted cells" << std::endl; + + typename Triangulation::DistortedCellList + subset = GridTools::fix_up_distorted_child_cells (dcv, + tria); + Assert (subset.distorted_cells.size() == 0, + ExcInternalError()); + } + } GridOut grid_out; GridOutFlags::DX flags;