From b11d6b755d4055ab01297c4fa7faf5151fdd8662 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Wed, 13 May 2020 02:59:32 +0200 Subject: [PATCH] Failing test on find active cell around point. --- .../grid/find_active_cell_around_point_04.cc | 50 +++++++++++++++++++ ...d_point_04.mpirun=2.with_p4est=true.output | 3 ++ 2 files changed, 53 insertions(+) create mode 100644 tests/grid/find_active_cell_around_point_04.cc create mode 100644 tests/grid/find_active_cell_around_point_04.mpirun=2.with_p4est=true.output 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 index 0000000000..4891c9b429 --- /dev/null +++ b/tests/grid/find_active_cell_around_point_04.cc @@ -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 + +#include + +#include +#include +#include + +#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 index 0000000000..b28b04f643 --- /dev/null +++ b/tests/grid/find_active_cell_around_point_04.mpirun=2.with_p4est=true.output @@ -0,0 +1,3 @@ + + + -- 2.39.5