From: Wolfgang Bangerth Date: Tue, 25 Apr 2006 15:14:41 +0000 (+0000) Subject: Another test that presently fails... X-Git-Tag: v8.0.0~11880 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02a3c9ce0a1b6aa0a56de03a3b9c9ba28d9eef80;p=dealii.git Another test that presently fails... git-svn-id: https://svn.dealii.org/trunk@12884 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/bits/find_cell_5.cc b/tests/bits/find_cell_5.cc new file mode 100644 index 0000000000..6004053d10 --- /dev/null +++ b/tests/bits/find_cell_5.cc @@ -0,0 +1,72 @@ +//---------------------------- find_cell_4.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_4.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.75,0.75); + + 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_4/output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + try + { + Triangulation<3> coarse_grid; + GridGenerator::hyper_cube (coarse_grid); + coarse_grid.refine_global (3); + check (coarse_grid); + } + catch (const std::exception &exc) + { + // we shouldn't get here... + deallog << "Caught an error..." << std::endl; + deallog << exc.what() << std::endl; + } +} + + +