]> https://gitweb.dealii.org/ - dealii.git/commitdiff
added change long and real test
authorNicola Giuliani <ngiuliani@sissa.it>
Tue, 25 May 2021 10:55:17 +0000 (12:55 +0200)
committerNicola Giuliani <ngiuliani@sissa.it>
Thu, 27 May 2021 14:53:58 +0000 (16:53 +0200)
doc/news/changes/minor/20210525NicolaGiuliani [new file with mode: 0644]
tests/grid/tria_clear_user_data.cc [new file with mode: 0644]
tests/grid/tria_clear_user_data.output [new file with mode: 0644]

diff --git a/doc/news/changes/minor/20210525NicolaGiuliani b/doc/news/changes/minor/20210525NicolaGiuliani
new file mode 100644 (file)
index 0000000..493e218
--- /dev/null
@@ -0,0 +1,4 @@
+New: Fixed a bug in clear user data for standard Triangulation.
+<br>
+(Nicola Giuliani, 2021/05/25)
+
diff --git a/tests/grid/tria_clear_user_data.cc b/tests/grid/tria_clear_user_data.cc
new file mode 100644 (file)
index 0000000..45d6473
--- /dev/null
@@ -0,0 +1,47 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 1998 - 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.
+//
+// ---------------------------------------------------------------------
+
+
+// We assess the possibility of using clear user data in any dim.
+
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/grid/grid_out.h>
+#include <deal.II/grid/tria.h>
+
+#include "../tests.h"
+
+template <int dim>
+void
+test()
+{
+  Triangulation<dim> tria;
+  GridGenerator::hyper_cube(tria);
+  tria.clear_user_data();
+  deallog << 'Cleared user data in ' << dim << 'D' << std::endl;
+}
+
+
+int
+main()
+{
+  initlog();
+  deallog << std::setprecision(2);
+
+  test<1>();
+  test<2>();
+  test<3>();
+
+  return 0;
+}
diff --git a/tests/grid/tria_clear_user_data.output b/tests/grid/tria_clear_user_data.output
new file mode 100644 (file)
index 0000000..aa20771
--- /dev/null
@@ -0,0 +1,4 @@
+
+DEAL::Cleared user data in 1D
+DEAL::Cleared user data in 2D
+DEAL::Cleared user data in 3D

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.