]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Modified the distributed periodicity test to catch the exception thrown in VectorTool...
authordaniel.arndt <daniel.arndt@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 12 Sep 2013 16:46:19 +0000 (16:46 +0000)
committerdaniel.arndt <daniel.arndt@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 12 Sep 2013 16:46:19 +0000 (16:46 +0000)
git-svn-id: https://svn.dealii.org/trunk@30679 0785d39b-7218-0410-832d-ea1e28bc413d

tests/mpi/periodicity_01.cc

index f4d80d3717112988d773b7646da234ef00b960bd..f243ef3dab2c8613ba36dae127ca071baab0a29c 100644 (file)
@@ -298,15 +298,16 @@ namespace Step40
   void LaplaceProblem<dim>::get_point_value
     (const Point<dim> point, const int proc, Vector<double> &value) const
   {
-    typename DoFHandler<dim>::active_cell_iterator cell
-      = GridTools::find_active_cell_around_point (dof_handler, point);
-    if (cell->is_locally_owned())
+    std::vector<double> tmp (value.size());
+    try
+    { 
       VectorTools::point_value (dof_handler, locally_relevant_solution,
                                 point, value);
-
-    std::vector<double> tmp (value.size());
-    for (unsigned int i=0; i<value.size(); ++i)
-      tmp[i]=value[i];
+      for (unsigned int i=0; i<value.size(); ++i)
+        tmp[i]=value[i];
+    }
+    catch (const VectorTools::ExcPointNotAvailableHere &)
+    {}
 
     std::vector<double> 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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.