From 451d094c1917255a73b17694754654be455f2567 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Thu, 12 Sep 2013 16:46:19 +0000 Subject: [PATCH] Modified the distributed periodicity test to catch the exception thrown in VectorTools::point_value git-svn-id: https://svn.dealii.org/trunk@30679 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/mpi/periodicity_01.cc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/mpi/periodicity_01.cc b/tests/mpi/periodicity_01.cc index f4d80d3717..f243ef3dab 100644 --- a/tests/mpi/periodicity_01.cc +++ b/tests/mpi/periodicity_01.cc @@ -298,15 +298,16 @@ namespace Step40 void LaplaceProblem::get_point_value (const Point point, const int proc, Vector &value) const { - typename DoFHandler::active_cell_iterator cell - = GridTools::find_active_cell_around_point (dof_handler, point); - if (cell->is_locally_owned()) + std::vector tmp (value.size()); + try + { VectorTools::point_value (dof_handler, locally_relevant_solution, point, value); - - std::vector tmp (value.size()); - for (unsigned int i=0; i tmp2 (value.size()); MPI_Reduce(&(tmp[0]), &(tmp2[0]), value.size(), MPI_DOUBLE, @@ -490,9 +491,9 @@ namespace Step40 (triangulation, /*b_id1*/ 2*i, /*b_id2*/2*i+1, /*direction*/ i, periodicity_vector); - + triangulation.add_periodicity(periodicity_vector); - + triangulation.refine_global (1); } else -- 2.39.5