From: heister Date: Wed, 30 May 2012 20:42:36 +0000 (+0000) Subject: update tests/bits/find_cell_6 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be30347913a2368daddda18017bfa837ff060d15;p=dealii-svn.git update tests/bits/find_cell_6 git-svn-id: https://svn.dealii.org/trunk@25577 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/bits/find_cell_6.cc b/tests/bits/find_cell_6.cc index ab1fb06b87..ea10481828 100644 --- a/tests/bits/find_cell_6.cc +++ b/tests/bits/find_cell_6.cc @@ -11,18 +11,8 @@ // //---------------------------- find_cell_5.cc --------------------------- -// find_active_cell_around_point() stops working if some cells are refined. -// this is most likely a rounding error, but it is frustrating. -// check2 triggers the following error: -/* -An error occurred in line <838> of file in function - std::pair::active_cell_iterator, dealii::Point > dealii::GridTools::find_active_cell_around_point(const dealii::Mapping&, const Container&, const dealii::Point&) [with int dim = 3, Container = dealii::Triangulation, int spacedim = 3, typename Container::active_cell_iterator = dealii::TriaActiveIterator >] -The violated condition was: - best_cell.first.state() == IteratorState::valid -The name and call sequence of the exception was: - ExcPointNotFound(p) -Additional Information: -The point <0.789000 0.313000 0.170000> could not be found inside any of the subcells of a coarse grid cell.*/ +// find_active_cell_around_point() stops working if some cells are refined in 3d. +// this is caused by a bug in GridTools::find_cells_adjacent_to_vertex that got fixed in r 25562. #include "../tests.h" #include @@ -67,10 +57,11 @@ void check2 () if (idx==21) cell->set_refine_flag(); } - tria.execute_coarsening_and_refinement (); + deallog << inside(tria, p2) << std::endl; - GridTools::find_active_cell_around_point(tria, p2); //triggers exception + + GridTools::find_active_cell_around_point(tria, p2); //triggered exception } void check1 () @@ -79,9 +70,9 @@ void check1 () GridGenerator::hyper_cube (tria); tria.refine_global (3); - for (int i=0;i<5;++i) + for (int i=0;i<3;++i) { - for (int j=0;j<10000;++j) + for (int j=0;j<1000;++j) { Point<3> p ((rand()%1000)/1000.0,(rand()%1000)/1000.0,(rand()%1000)/1000.0); if (!inside(tria, p)) diff --git a/tests/bits/find_cell_6/cmp/generic b/tests/bits/find_cell_6/cmp/generic index 1b77c2663d..e46c0ac61e 100644 --- a/tests/bits/find_cell_6/cmp/generic +++ b/tests/bits/find_cell_6/cmp/generic @@ -1,3 +1,3 @@ -DEAL::1.2 -DEAL::<0.00000 0.500000> <0.500000 0.500000> <0.00000 1.00000> <0.500000 1.00000> +DEAL::1 +DEAL::1