From: Wolfgang Bangerth Date: Tue, 27 Apr 2021 21:48:03 +0000 (-0600) Subject: Add test. X-Git-Tag: v9.3.0-rc1~166^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F12106%2Fhead;p=dealii.git Add test. --- diff --git a/tests/simplex/get_boundary_ids_01.cc b/tests/simplex/get_boundary_ids_01.cc new file mode 100644 index 0000000000..b4c118001f --- /dev/null +++ b/tests/simplex/get_boundary_ids_01.cc @@ -0,0 +1,54 @@ +// Copyright (C) 2020 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 + +#include +#include +#include + +#include "../tests.h" + +// Check that Triangulation::get_boundary_ids() works for +// simplices. This used to crash. + +using namespace dealii; + +template +void +test_in_unit_cube() +{ + Triangulation tria; + GridGenerator::subdivided_hyper_cube_with_simplices(tria, 1); + + for (const auto b : tria.get_boundary_ids()) + deallog << b << ' '; + deallog << std::endl; +} + +int +main() +{ + initlog(); + + test_in_unit_cube<2>(); + test_in_unit_cube<3>(); +} diff --git a/tests/simplex/get_boundary_ids_01.with_simplex_support=on.output b/tests/simplex/get_boundary_ids_01.with_simplex_support=on.output new file mode 100644 index 0000000000..faa88a9cc1 --- /dev/null +++ b/tests/simplex/get_boundary_ids_01.with_simplex_support=on.output @@ -0,0 +1,3 @@ + +DEAL::0 +DEAL::0