5#ifndef DUNE_ALBERTA_ENTITY_CC
6#define DUNE_ALBERTA_ENTITY_CC
14 template<
int codim,
int dim,
class Gr
id>
15 inline AlbertaGridEntity< codim, dim, Grid >
22 template<
int codim,
int dim,
class Gr
id>
30 template<
int codim,
int dim,
class Gr
id>
38 template<
int codim,
int dim,
class Gr
id >
46 template<
int codim,
int dim,
class Gr
id >
54 if( (e1 == NULL) && (e2 == NULL) )
56 return ((e1 == e2) && (subEntity_ == other.subEntity_));
60 template<
int codim,
int dim,
class Gr
id >
64 return &(elementInfo_.elInfo());
68 template<
int codim,
int dim,
class Gr
id >
76 template<
int codim,
int dim,
class Gr
id >
85 template<
int codim,
int dim,
class Gr
id >
89 setElement( other.elementInfo_, other.subEntity_ );
93 template<
int codim,
int dim,
class Gr
id >
96 assert( elementInfo_.level() ==
grid().levelProvider() ( elementInfo_ ) );
97 return elementInfo_.level();
101 template<
int codim,
int dim,
class Gr
id >
107 assert( elementInfo_ );
108 const CoordReader coordReader(
grid(), elementInfo_, subEntity_ );
109 return Geometry( GeometryImpl( coordReader ) );
113 template<
int codim,
int dim,
class Gr
id >
124 template<
int dim,
class Gr
id >
133 template<
int dim,
class Gr
id >
140 template<
int dim,
class Gr
id >
148 template<
int dim,
class Gr
id >
156 template<
int dim,
class Gr
id >
159 return grid().levelProvider().isNew( elementInfo_ );
163 template<
int dim,
class Gr
id >
166 return elementInfo_.mightVanish();
170 template<
int dim,
class Gr
id >
174 assert( elementInfo_ );
175 bool isBoundary =
false;
176 for(
int i = 0; i < dim+1; ++i )
177 isBoundary |= elementInfo_.isBoundary( i );
182 template<
int dim,
class Gr
id >
190 template<
int dim,
class Gr
id >
193 return elementInfo_.isLeaf();
197 template<
int dim,
class Gr
id >
206 template<
int dim,
class Gr
id >
207 template<
int codim >
208 inline typename Grid::template Codim< codim >::Entity
212 return EntityImpl(
grid(), elementInfo_,
grid().generic2alberta( codim, i ) );
216 template<
int dim,
class Gr
id >
220 return &(elementInfo_.elInfo());
224 template<
int dim,
class Gr
id >
227 assert( elementInfo_.level() ==
grid().levelProvider() ( elementInfo_ ) );
228 return elementInfo_.level();
232 template<
int dim,
class Gr
id >
240 template<
int dim,
class Gr
id >
248 template<
int dim,
class Gr
id >
256 template<
int dim,
class Gr
id >
262 assert( elementInfo_ );
263 const CoordReader coordReader(
grid(), elementInfo_, 0 );
268 template<
int dim,
class Gr
id >
275 template<
int dim,
class Gr
id >
276 inline typename Grid::template Codim< 0 >::Entity
281 assert( elementInfo_ );
282 const ElementInfo fatherInfo = elementInfo_.father();
284 return EntityImpl(
grid(), fatherInfo, 0 );
288 template<
int dim,
class Gr
id >
289 inline int AlbertaGridEntity< 0, dim, Grid >::nChild ()
const
295 template<
int dim,
class Gr
id >
300 const int indexInFather = elementInfo_.indexInFather();
301 const int orientation = (elementInfo_.type() == 1 ? -1 : 1);
306 template<
int dim,
class Gr
id >
310 assert( elementInfo_ );
312 return IteratorImp(
grid(), elementInfo_, maxlevel );
316 template<
int dim,
class Gr
id >
320 assert( elementInfo_ );
322 return IteratorImp(
grid(),
level(), maxlevel );
326 template<
int dim,
class Gr
id >
330 assert( elementInfo_ );
337 if(
getElInfo()->opp_vertex[ i ] == 127 )
340 DUNE_THROW( NotImplemented,
"AlbertaGrid: Intersections on outside "
341 "entities are not fully implemented, yet." );
346 typename AlbertaGridLeafIntersectionIterator::Begin begin;
351 template<
int dim,
class Gr
id >
355 assert( elementInfo_ );
356 typename AlbertaGridLeafIntersectionIterator::End end;
#define ALBERTA
Definition albertaheader.hh:29
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:30
@ InteriorEntity
all interior entities
Definition gridenums.hh:31
Include standard header files.
Definition agrid.hh:60
ALBERTA EL Element
Definition misc.hh:54
int indexInFather() const
Definition elementinfo.hh:457
Element * el() const
Definition elementinfo.hh:737
Definition albertagrid/entity.hh:46
void clearElement()
Definition entity.cc:70
ALBERTA EL_INFO * getElInfo() const
needed for the LevelIterator and LeafIterator
Definition entity.cc:62
int level() const
level of this element
Definition entity.cc:94
void setElement(const ElementInfo &elementInfo, int subEntity)
Definition entity.cc:78
PartitionType partitionType() const
return partition type of this entity
Definition entity.cc:40
Grid::template Codim< codim >::Geometry Geometry
Definition albertagrid/entity.hh:69
void setEntity(const This &other)
Definition entity.cc:87
const ElementInfo & elementInfo() const
Definition albertagrid/entity.hh:130
Geometry geometry() const
geometry of this entity
Definition entity.cc:103
const Grid & grid() const
obtain a reference to the grid
Definition albertagrid/entity.hh:142
static const int mydimension
Definition albertagrid/entity.hh:59
int subEntity() const
obtain number of the subentity within the element (in ALBERTA numbering)
Definition albertagrid/entity.hh:148
Alberta::ElementInfo< dimension > ElementInfo
Definition albertagrid/entity.hh:71
GeometryType type() const
type of geometry of this entity
Definition entity.cc:114
bool equals(const This &other) const
equality of entities
Definition entity.cc:48
Definition albertagrid/entity.hh:185
Grid::HierarchicIterator HierarchicIterator
Definition albertagrid/entity.hh:213
friend class AlbertaGridHierarchicIterator< Grid >
Definition albertagrid/entity.hh:192
Grid::Traits::template Codim< 0 >::GeometryImpl GeometryImpl
Definition albertagrid/entity.hh:211
Entity father() const
Definition entity.cc:277
int level() const
level of this element
Definition entity.cc:225
const ElementInfo & elementInfo() const
Definition albertagrid/entity.hh:355
Grid::template Codim< codim >::Entity subEntity(int i) const
Definition entity.cc:209
LocalGeometry geometryInFather() const
Location of this element relative to the father's reference element.
Definition entity.cc:297
AlbertaGridEntity(const Grid &grid)
constructor
Definition entity.cc:135
Grid::template Codim< 0 >::Geometry Geometry
Definition albertagrid/entity.hh:209
bool hasBoundaryIntersections() const
Returns true, if entity has intersections with boundary.
Definition entity.cc:172
int boundaryId() const
index of the boundary which is associated with the entity, 0 for inner entities
Definition entity.cc:149
bool mightVanish() const
Might the entity vanish during the next adaptation cycle?
Definition entity.cc:164
static const int dimension
Definition albertagrid/entity.hh:196
AlbertaGridLeafIntersectionIterator ileafend() const
Reference to one past the last intersection with neighbor.
Definition entity.cc:353
static const int mydimension
Definition albertagrid/entity.hh:198
Alberta::ElementInfo< dimension > ElementInfo
Definition albertagrid/entity.hh:218
Grid::template Codim< 0 >::LocalGeometry LocalGeometry
Definition albertagrid/entity.hh:210
const Grid & grid() const
obtain a reference to the grid
Definition albertagrid/entity.hh:367
HierarchicIterator hbegin(int maxlevel) const
Definition entity.cc:308
AlbertaGridLeafIntersectionIterator ileafbegin() const
Definition entity.cc:328
Dune::AlbertaGridLeafIntersectionIterator< Grid > AlbertaGridLeafIntersectionIterator
Definition albertagrid/entity.hh:215
bool isNew() const
Was the entity created during the last adaptation cycle?
Definition entity.cc:157
Definition albertagrid/geometry.hh:30
Definition albertagrid/geometry.hh:504
Grid abstract base class.
Definition common/grid.hh:375