From 0f83e47cc6bd714c42860b7ec28ca33fa6a5ab33 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Wed, 5 May 2021 12:16:54 -0400 Subject: [PATCH] Fix grid/twisted_parallelepiped --- tests/grid/twisted_parallelepiped_01.cc | 3 +- ... twisted_parallelepiped_01.release.output} | 0 tests/grid/twisted_parallelepiped_02.cc | 90 ------------------- 3 files changed, 2 insertions(+), 91 deletions(-) rename tests/grid/{twisted_parallelepiped_02.release.output => twisted_parallelepiped_01.release.output} (100%) delete mode 100644 tests/grid/twisted_parallelepiped_02.cc diff --git a/tests/grid/twisted_parallelepiped_01.cc b/tests/grid/twisted_parallelepiped_01.cc index b42c521cbd..ddede3fd7f 100644 --- a/tests/grid/twisted_parallelepiped_01.cc +++ b/tests/grid/twisted_parallelepiped_01.cc @@ -63,7 +63,8 @@ check_parallelepiped(std::ostream &logfile) Point origin; - Triangulation triangulation; + Triangulation triangulation(Triangulation::MeshSmoothing::none, + /*check_for_distorted_cells*/ true); std::vector subdivisions; try diff --git a/tests/grid/twisted_parallelepiped_02.release.output b/tests/grid/twisted_parallelepiped_01.release.output similarity index 100% rename from tests/grid/twisted_parallelepiped_02.release.output rename to tests/grid/twisted_parallelepiped_01.release.output diff --git a/tests/grid/twisted_parallelepiped_02.cc b/tests/grid/twisted_parallelepiped_02.cc deleted file mode 100644 index 89e5371d31..0000000000 --- a/tests/grid/twisted_parallelepiped_02.cc +++ /dev/null @@ -1,90 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2016 - 2018 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - - - -#include -#include -#include - -#include -#include -#include - -#include - -#include "../tests.h" - -/* - * Verify that the correct exception (ExcGridHasInvalidCell) is thrown when - * this function is called for invalid input. - */ - -template -void -check_parallelepiped() -{ - // Data structure defining dim coordinates that make up a - // parallelepiped. - std::array, dim> edges; - - switch (dim) - { - case 1: - edges[0][0] = -0.5; - break; - - case 2: - edges[0][1] = 0.5; - edges[1][0] = 0.5; - break; - - case 3: - edges[0][0] = 1.0; - edges[1][1] = 1.0; - edges[2][2] = -1.0; - break; - - default: - Assert(false, ExcInternalError()); - } - - Point origin; - - Triangulation triangulation; - std::vector subdivisions; - - try - { - GridGenerator::subdivided_parallelepiped( - triangulation, origin, edges, subdivisions, false); - } - catch (ExceptionBase &exc) - { - deallog.get_file_stream() << exc.get_exc_name() << std::endl; - } -} - -int -main() -{ - deal_II_exceptions::disable_abort_on_exception(); - initlog(); - - check_parallelepiped<1>(); - check_parallelepiped<2>(); - check_parallelepiped<3>(); - deallog.get_file_stream() << "OK" << std::endl; -} -- 2.39.5