3 #ifndef DUNE_IDENTITYGRID_INTERSECTIONS_HH
4 #define DUNE_IDENTITYGRID_INTERSECTIONS_HH
16 template<
class Gr
id >
17 struct HostGridAccess;
28 template<
class Gr
idImp>
34 friend struct HostGridAccess< typename remove_const< GridImp >::
type >;
36 enum {dim=GridImp::dimension};
38 enum {dimworld=GridImp::dimensionworld};
41 typedef typename GridImp::ctype ctype;
43 typedef typename GridImp::HostGridType::template Codim<0>::Entity::LeafIntersectionIterator HostLeafIntersectionIterator;
47 typedef typename GridImp::template Codim<0>::EntityPointer
EntityPointer;
48 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
49 typedef typename GridImp::template Codim<1>::LocalGeometry
LocalGeometry;
50 typedef typename GridImp::template Codim<0>::Entity
Entity;
54 const HostLeafIntersectionIterator& hostIterator)
55 : identityGrid_(identityGrid),
56 hostIterator_(hostIterator)
75 return hostIterator_->boundary();
84 return hostIterator_->centerUnitOuterNormal();
89 return hostIterator_->neighbor();
95 return hostIterator_->boundaryId();
100 return hostIterator_->boundarySegmentIndex();
105 return hostIterator_->conforming();
110 return hostIterator_->type();
134 return Geometry( hostIterator_->geometry() );
140 return hostIterator_->indexInInside();
146 return hostIterator_->indexInOutside();
151 FieldVector<ctype, GridImp::dimensionworld>
outerNormal (
const FieldVector<ctype, GridImp::dimension-1>& local)
const {
152 return hostIterator_->outerNormal(local);
156 FieldVector<ctype, GridImp::dimensionworld>
integrationOuterNormal (
const FieldVector<ctype, GridImp::dimension-1>& local)
const {
157 return hostIterator_->integrationOuterNormal(local);
161 FieldVector<ctype, GridImp::dimensionworld>
unitOuterNormal (
const FieldVector<ctype, GridImp::dimension-1>& local)
const {
162 return hostIterator_->unitOuterNormal(local);
171 const GridImp* identityGrid_;
173 HostLeafIntersectionIterator hostIterator_;
180 template<
class Gr
idImp>
186 friend struct HostGridAccess< typename remove_const< GridImp >::
type >;
188 enum {dim=GridImp::dimension};
190 enum {dimworld=GridImp::dimensionworld};
193 typedef typename GridImp::ctype ctype;
195 typedef typename GridImp::HostGridType::template Codim<0>::Entity::LevelIntersectionIterator HostLevelIntersectionIterator;
200 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
202 typedef typename GridImp::template Codim<0>::Entity
Entity;
206 const HostLevelIntersectionIterator& hostIterator)
207 : identityGrid_(identityGrid), hostIterator_(hostIterator)
227 return hostIterator_->boundary();
236 return hostIterator_->centerUnitOuterNormal();
241 return hostIterator_->neighbor();
247 return hostIterator_->boundaryId();
252 return hostIterator_->boundarySegmentIndex();
257 return hostIterator_->conforming();
262 return hostIterator_->type();
286 return Geometry( hostIterator_->geometry() );
292 return hostIterator_->indexInInside();
298 return hostIterator_->indexInOutside();
303 FieldVector<ctype, dimworld>
outerNormal (
const FieldVector<ctype, dim-1>& local)
const {
304 return hostIterator_->outerNormal(local);
309 return hostIterator_->integrationOuterNormal(local);
313 FieldVector<ctype, dimworld>
unitOuterNormal (
const FieldVector<ctype, dim-1>& local)
const {
314 return hostIterator_->unitOuterNormal(local);
319 const GridImp* identityGrid_;
321 HostLevelIntersectionIterator hostIterator_;