]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add test for simplex smoothing flags 17629/head
authorTimo Heister <timo.heister@gmail.com>
Wed, 28 Aug 2024 18:21:42 +0000 (14:21 -0400)
committerTimo Heister <timo.heister@gmail.com>
Wed, 28 Aug 2024 18:31:13 +0000 (14:31 -0400)
tests/simplex/smoothing_01.cc [new file with mode: 0644]
tests/simplex/smoothing_01.output [new file with mode: 0644]

diff --git a/tests/simplex/smoothing_01.cc b/tests/simplex/smoothing_01.cc
new file mode 100644 (file)
index 0000000..8e8a456
--- /dev/null
@@ -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 <deal.II/dofs/dof_handler.h>
+
+#include <deal.II/fe/fe_simplex_p.h>
+
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/grid/tria.h>
+
+#include "../tests.h"
+
+
+template <int dim>
+void
+test()
+{
+  Triangulation<dim> tria(Triangulation<dim>::maximum_smoothing);
+  Triangulation<dim> 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 (file)
index 0000000..296a1c0
--- /dev/null
@@ -0,0 +1,3 @@
+
+DEAL::cells: 2048
+DEAL::OK

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.