]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Failing test.
authorLuca Heltai <luca.heltai@sissa.it>
Tue, 19 Jul 2022 09:33:03 +0000 (11:33 +0200)
committerLuca Heltai <luca.heltai@sissa.it>
Mon, 25 Jul 2022 13:23:09 +0000 (16:23 +0300)
tests/grid/grid_has_hanging_nodes.cc [new file with mode: 0644]
tests/grid/grid_has_hanging_nodes.output [new file with mode: 0644]

diff --git a/tests/grid/grid_has_hanging_nodes.cc b/tests/grid/grid_has_hanging_nodes.cc
new file mode 100644 (file)
index 0000000..e00e6b1
--- /dev/null
@@ -0,0 +1,42 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2022 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.
+//
+// ---------------------------------------------------------------------
+
+// Check that has hanging nodes works correctly for anysotropic refinement
+
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/grid/tria.h>
+
+#include "../tests.h"
+
+int
+main()
+{
+  initlog();
+  Triangulation<2> tria;
+  GridGenerator::hyper_cube(tria);
+  tria.begin_active()->set_refine_flag(RefinementCase<2>::cut_x);
+  tria.execute_coarsening_and_refinement();
+  tria.begin_active()->set_refine_flag(RefinementCase<2>::cut_x);
+  tria.execute_coarsening_and_refinement();
+
+  if (tria.has_hanging_nodes() == false)
+    {
+      deallog << "OK" << std::endl;
+    }
+  else
+    {
+      deallog << "NOT OK" << std::endl;
+    }
+}
diff --git a/tests/grid/grid_has_hanging_nodes.output b/tests/grid/grid_has_hanging_nodes.output
new file mode 100644 (file)
index 0000000..0fd8fc1
--- /dev/null
@@ -0,0 +1,2 @@
+
+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.