From aca068d7fb31a088c4d446165a13eccbfc08bbdc Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Wed, 28 Aug 2024 14:21:42 -0400 Subject: [PATCH] add test for simplex smoothing flags --- tests/simplex/smoothing_01.cc | 47 +++++++++++++++++++++++++++++++ tests/simplex/smoothing_01.output | 3 ++ 2 files changed, 50 insertions(+) create mode 100644 tests/simplex/smoothing_01.cc create mode 100644 tests/simplex/smoothing_01.output diff --git a/tests/simplex/smoothing_01.cc b/tests/simplex/smoothing_01.cc new file mode 100644 index 0000000000..8e8a45619f --- /dev/null +++ b/tests/simplex/smoothing_01.cc @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------ +// +// SPDX-License-Identifier: LGPL-2.1-or-later +// Copyright (C) 2020 - 2024 by the deal.II authors +// +// This file is part of the deal.II library. +// +// Part of the source code is dual licensed under Apache-2.0 WITH +// LLVM-exception OR LGPL-2.1-or-later. Detailed license information +// governing the source code and code contributions can be found in +// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II. +// +// ------------------------------------------------------------------------ + +// Check mesh smoothing for a simplex mesh + +#include + +#include + +#include +#include + +#include "../tests.h" + + +template +void +test() +{ + Triangulation tria(Triangulation::maximum_smoothing); + Triangulation hex_tria; + GridGenerator::hyper_cube(hex_tria); + hex_tria.refine_global(3); + GridGenerator::convert_hypercube_to_simplex_mesh(hex_tria, tria); + tria.refine_global(); + deallog << "cells: " << tria.n_active_cells() << std::endl; + deallog << "OK" << std::endl; +} + +int +main() +{ + initlog(); + + test<2>(); +} diff --git a/tests/simplex/smoothing_01.output b/tests/simplex/smoothing_01.output new file mode 100644 index 0000000000..296a1c0bbe --- /dev/null +++ b/tests/simplex/smoothing_01.output @@ -0,0 +1,3 @@ + +DEAL::cells: 2048 +DEAL::OK -- 2.39.5