1 #ifndef DUNE_IDENTITYGRID_INTERSECTIONS_HH
2 #define DUNE_IDENTITYGRID_INTERSECTIONS_HH
14 template<
class Gr
id >
26 template<
class Gr
idImp>
32 friend class HostGridAccess< typename remove_const< GridImp >::
type >;
34 enum {dim=GridImp::dimension};
36 enum {dimworld=GridImp::dimensionworld};
39 typedef typename GridImp::ctype ctype;
41 typedef typename GridImp::HostGridType::template Codim<0>::Entity::LeafIntersectionIterator HostLeafIntersectionIterator;
45 typedef typename GridImp::template Codim<0>::EntityPointer
EntityPointer;
46 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
47 typedef typename GridImp::template Codim<1>::LocalGeometry
LocalGeometry;
48 typedef typename GridImp::template Codim<0>::Entity
Entity;
52 const HostLeafIntersectionIterator& hostIterator)
53 : identityGrid_(identityGrid),
54 hostIterator_(hostIterator)
73 return hostIterator_->boundary();
82 return hostIterator_->centerUnitOuterNormal();
87 return hostIterator_->neighbor();
93 return hostIterator_->boundaryId();
98 return hostIterator_->boundarySegmentIndex();
103 return hostIterator_->conforming();
108 return hostIterator_->type();
132 return Geometry( hostIterator_->geometry() );
138 return hostIterator_->indexInInside();
144 return hostIterator_->indexInOutside();
149 FieldVector<ctype, GridImp::dimensionworld>
outerNormal (
const FieldVector<ctype, GridImp::dimension-1>& local)
const {
150 return hostIterator_->outerNormal(local);
154 FieldVector<ctype, GridImp::dimensionworld>
integrationOuterNormal (
const FieldVector<ctype, GridImp::dimension-1>& local)
const {
155 return hostIterator_->integrationOuterNormal(local);
159 FieldVector<ctype, GridImp::dimensionworld>
unitOuterNormal (
const FieldVector<ctype, GridImp::dimension-1>& local)
const {
160 return hostIterator_->unitOuterNormal(local);
169 const GridImp* identityGrid_;
171 HostLeafIntersectionIterator hostIterator_;
178 template<
class Gr
idImp>
184 friend class HostGridAccess< typename remove_const< GridImp >::
type >;
186 enum {dim=GridImp::dimension};
188 enum {dimworld=GridImp::dimensionworld};
191 typedef typename GridImp::ctype ctype;
193 typedef typename GridImp::HostGridType::template Codim<0>::Entity::LevelIntersectionIterator HostLevelIntersectionIterator;
198 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
200 typedef typename GridImp::template Codim<0>::Entity
Entity;
204 const HostLevelIntersectionIterator& hostIterator)
205 : identityGrid_(identityGrid), hostIterator_(hostIterator)
225 return hostIterator_->boundary();
234 return hostIterator_->centerUnitOuterNormal();
239 return hostIterator_->neighbor();
245 return hostIterator_->boundaryId();
250 return hostIterator_->boundarySegmentIndex();
255 return hostIterator_->conforming();
260 return hostIterator_->type();
284 return Geometry( hostIterator_->geometry() );
290 return hostIterator_->indexInInside();
296 return hostIterator_->indexInOutside();
301 FieldVector<ctype, dimworld>
outerNormal (
const FieldVector<ctype, dim-1>& local)
const {
302 return hostIterator_->outerNormal(local);
307 return hostIterator_->integrationOuterNormal(local);
311 FieldVector<ctype, dimworld>
unitOuterNormal (
const FieldVector<ctype, dim-1>& local)
const {
312 return hostIterator_->unitOuterNormal(local);
317 const GridImp* identityGrid_;
319 HostLevelIntersectionIterator hostIterator_;