]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Failing test on find active cell around point.
authorLuca Heltai <luca.heltai@sissa.it>
Wed, 13 May 2020 00:59:32 +0000 (02:59 +0200)
committerMatthias Maier <tamiko@43-1.org>
Fri, 15 May 2020 00:27:18 +0000 (19:27 -0500)
tests/grid/find_active_cell_around_point_04.cc [new file with mode: 0644]
tests/grid/find_active_cell_around_point_04.mpirun=2.with_p4est=true.output [new file with mode: 0644]

diff --git a/tests/grid/find_active_cell_around_point_04.cc b/tests/grid/find_active_cell_around_point_04.cc
new file mode 100644 (file)
index 0000000..4891c9b
--- /dev/null
@@ -0,0 +1,50 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2017 - 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.
+//
+// ---------------------------------------------------------------------
+
+// Check for a bug discovered in step-70
+
+#include <deal.II/base/utilities.h>
+
+#include <deal.II/distributed/tria.h>
+
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/grid/grid_tools.h>
+#include <deal.II/grid/grid_tools_cache.h>
+
+#include "../tests.h"
+
+int
+main(int argc, char **argv)
+{
+  Utilities::MPI::MPI_InitFinalize init(argc, argv);
+  MPILogInitAll                    log;
+
+  parallel::distributed::Triangulation<2> tria(
+    MPI_COMM_WORLD,
+    typename Triangulation<2>::MeshSmoothing(
+      Triangulation<2>::smoothing_on_refinement |
+      Triangulation<2>::smoothing_on_coarsening));
+
+  GridGenerator::hyper_cube(tria, -1, 1);
+  tria.refine_global(5);
+  GridTools::Cache<2> cache(tria);
+
+  Point<2> p(0.239367, 0.341747);
+
+  auto res1 = GridTools::find_active_cell_around_point(cache, p).first;
+  auto res2 = GridTools::find_active_cell_around_point(tria, p);
+
+  Assert(res1 == res2, ExcInternalError());
+}
diff --git a/tests/grid/find_active_cell_around_point_04.mpirun=2.with_p4est=true.output b/tests/grid/find_active_cell_around_point_04.mpirun=2.with_p4est=true.output
new file mode 100644 (file)
index 0000000..b28b04f
--- /dev/null
@@ -0,0 +1,3 @@
+
+
+

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.