From 4eeaab3cbbac30979a6d16aea2c20a1511812358 Mon Sep 17 00:00:00 2001 From: wolf Date: Tue, 25 Apr 2006 15:03:47 +0000 Subject: [PATCH] Add a test that presently fails. git-svn-id: https://svn.dealii.org/trunk@12882 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/bits/find_cell_4.cc | 63 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 tests/bits/find_cell_4.cc diff --git a/tests/bits/find_cell_4.cc b/tests/bits/find_cell_4.cc new file mode 100644 index 0000000000..a5eac19e88 --- /dev/null +++ b/tests/bits/find_cell_4.cc @@ -0,0 +1,63 @@ +//---------------------------- find_cell_1.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2003, 2004, 2005, 2006 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------- find_cell_1.cc --------------------------- + + +// take a 3d mesh and check that we can find an arbitrary point's cell +// in it + +#include "../tests.h" +#include +#include +#include +#include +#include +#include +#include + +#include + + + + +void check (Triangulation<3> &tria) +{ + Point<3> p (0.75,0,0); + + Triangulation<3>::active_cell_iterator cell + = GridTools::find_active_cell_around_point (tria, p); + + deallog << cell << std::endl; + for (unsigned int v=0; v::vertices_per_cell; ++v) + deallog << "<" << cell->vertex(v) << "> "; + deallog << std::endl; + + Assert (p.distance (cell->center()) < cell->diameter()/2, + ExcInternalError()); +} + + +int main () +{ + std::ofstream logfile("find_cell_1/output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + Triangulation<3> coarse_grid; + GridGenerator::hyper_cube (coarse_grid); + coarse_grid.refine_global (3); + check (coarse_grid); +} + + + -- 2.39.5