]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Work around a problem introduced by the ladt check-in. Problem: we
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 20 Feb 1999 15:32:18 +0000 (15:32 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 20 Feb 1999 15:32:18 +0000 (15:32 +0000)
can't access the accessor anymore.

git-svn-id: https://svn.dealii.org/trunk@864 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/tria_accessor.cc

index 66f0985726e11cbb3b7df7688b2cc6c4ca65fcc1..d580f5ebed0d220bb99c7ddda6aa6863a9e94059 100644 (file)
@@ -2020,12 +2020,25 @@ void CellAccessor<dim>::set_neighbor (const unsigned int i,
                                      const TriaIterator<dim,CellAccessor<dim> > &pointer) const {
   Assert (i<GeometryInfo<dim>::faces_per_cell,
          typename TriaSubstructAccessor<dim>::ExcInvalidNeighbor(i));
-  tria->levels[present_level]->
-    neighbors[present_index*GeometryInfo<dim>::faces_per_cell+i].first
-    = pointer->present_level;
-  tria->levels[present_level]->
-    neighbors[present_index*GeometryInfo<dim>::faces_per_cell+i].second
-    = pointer->present_index;
+
+  if (pointer.state() == valid)
+    {
+      tria->levels[present_level]->
+       neighbors[present_index*GeometryInfo<dim>::faces_per_cell+i].first
+       = pointer->present_level;
+      tria->levels[present_level]->
+       neighbors[present_index*GeometryInfo<dim>::faces_per_cell+i].second
+       = pointer->present_index;
+    }
+  else
+    {
+      tria->levels[present_level]->
+       neighbors[present_index*GeometryInfo<dim>::faces_per_cell+i].first
+       = -1;
+      tria->levels[present_level]->
+       neighbors[present_index*GeometryInfo<dim>::faces_per_cell+i].second
+       = -1;
+    };
 };
 
 

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.