From: wolf Date: Sat, 20 Feb 1999 15:32:18 +0000 (+0000) Subject: Work around a problem introduced by the ladt check-in. Problem: we X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d461e730924600cfcc34fb43bccc8e3153249a7;p=dealii-svn.git Work around a problem introduced by the ladt check-in. Problem: we can't access the accessor anymore. git-svn-id: https://svn.dealii.org/trunk@864 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/grid/tria_accessor.cc b/deal.II/deal.II/source/grid/tria_accessor.cc index 66f0985726..d580f5ebed 100644 --- a/deal.II/deal.II/source/grid/tria_accessor.cc +++ b/deal.II/deal.II/source/grid/tria_accessor.cc @@ -2020,12 +2020,25 @@ void CellAccessor::set_neighbor (const unsigned int i, const TriaIterator > &pointer) const { Assert (i::faces_per_cell, typename TriaSubstructAccessor::ExcInvalidNeighbor(i)); - tria->levels[present_level]-> - neighbors[present_index*GeometryInfo::faces_per_cell+i].first - = pointer->present_level; - tria->levels[present_level]-> - neighbors[present_index*GeometryInfo::faces_per_cell+i].second - = pointer->present_index; + + if (pointer.state() == valid) + { + tria->levels[present_level]-> + neighbors[present_index*GeometryInfo::faces_per_cell+i].first + = pointer->present_level; + tria->levels[present_level]-> + neighbors[present_index*GeometryInfo::faces_per_cell+i].second + = pointer->present_index; + } + else + { + tria->levels[present_level]-> + neighbors[present_index*GeometryInfo::faces_per_cell+i].first + = -1; + tria->levels[present_level]-> + neighbors[present_index*GeometryInfo::faces_per_cell+i].second + = -1; + }; };