3#ifndef DUNE_ALBERTA_ENTITY_CC
4#define DUNE_ALBERTA_ENTITY_CC
12 template<
int codim,
int dim,
class Gr
id>
13 inline AlbertaGridEntity< codim, dim, Grid >
14 ::AlbertaGridEntity (
const Grid &grid,
const ElementInfo &elementInfo,
int subEntity )
16 elementInfo_( elementInfo ),
17 subEntity_( subEntity )
20 template<
int codim,
int dim,
class Gr
id>
28 template<
int codim,
int dim,
class Gr
id>
36 template<
int codim,
int dim,
class Gr
id >
44 template<
int codim,
int dim,
class Gr
id >
52 if( (e1 == NULL) && (e2 == NULL) )
54 return ((e1 == e2) && (subEntity_ == other.subEntity_));
58 template<
int codim,
int dim,
class Gr
id >
62 return &(elementInfo_.elInfo());
66 template<
int codim,
int dim,
class Gr
id >
74 template<
int codim,
int dim,
class Gr
id >
78 elementInfo_ = elementInfo;
79 subEntity_ = subEntity;
83 template<
int codim,
int dim,
class Gr
id >
87 setElement( other.elementInfo_, other.subEntity_ );
91 template<
int codim,
int dim,
class Gr
id >
94 assert( elementInfo_.level() == grid().levelProvider() ( elementInfo_ ) );
95 return elementInfo_.level();
99 template<
int codim,
int dim,
class Gr
id >
105 assert( elementInfo_ );
106 const CoordReader coordReader( grid(), elementInfo_, subEntity_ );
107 return Geometry( GeometryImpl( coordReader ) );
111 template<
int codim,
int dim,
class Gr
id >
114 return GeometryTypes::simplex( mydimension );
122 template<
int dim,
class Gr
id >
126 elementInfo_( elementInfo )
131 template<
int dim,
class Gr
id >
138 template<
int dim,
class Gr
id >
146 template<
int dim,
class Gr
id >
154 template<
int dim,
class Gr
id >
157 return grid().levelProvider().isNew( elementInfo_ );
161 template<
int dim,
class Gr
id >
168 template<
int dim,
class Gr
id >
173 bool isBoundary =
false;
174 for(
int i = 0; i <
dim+1; ++i )
180 template<
int dim,
class Gr
id >
188 template<
int dim,
class Gr
id >
191 return elementInfo_.isLeaf();
195 template<
int dim,
class Gr
id >
204 template<
int dim,
class Gr
id >
205 template<
int codim >
210 return EntityImpl(
grid(), elementInfo_,
grid().generic2alberta(
codim, i ) );
214 template<
int dim,
class Gr
id >
218 return &(elementInfo_.
elInfo());
222 template<
int dim,
class Gr
id >
225 assert( elementInfo_.
level() ==
grid().levelProvider() ( elementInfo_ ) );
226 return elementInfo_.
level();
230 template<
int dim,
class Gr
id >
238 template<
int dim,
class Gr
id >
242 elementInfo_ = elementInfo;
246 template<
int dim,
class Gr
id >
254 template<
int dim,
class Gr
id >
266 template<
int dim,
class Gr
id >
269 return GeometryTypes::simplex( mydimension );
273 template<
int dim,
class Gr
id >
286 template<
int dim,
class Gr
id >
293 template<
int dim,
class Gr
id >
294 inline typename AlbertaGridEntity< 0, dim, Grid >::LocalGeometry
299 const int orientation = (elementInfo_.
type() == 1 ? -1 : 1);
300 return LocalGeometry( LocalGeoProvider::instance().geometryInFather( indexInFather, orientation ) );
304 template<
int dim,
class Gr
id >
314 template<
int dim,
class Gr
id >
318 assert( elementInfo_ );
320 return IteratorImp( grid(), level(), maxlevel );
324 template<
int dim,
class Gr
id >
339 "entities are not fully implemented, yet." );
349 template<
int dim,
class Gr
id >
#define ALBERTA
Definition albertaheader.hh:27
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:28
@ InteriorEntity
all interior entities
Definition gridenums.hh:29
ALBERTA EL Element
Definition misc.hh:52
Include standard header files.
int level() const
Definition elementinfo.hh:531
bool mightVanish() const
Definition elementinfo.hh:524
ElementInfo father() const
Definition elementinfo.hh:447
int type() const
Definition elementinfo.hh:538
bool isBoundary(int face) const
Definition elementinfo.hh:618
int indexInFather() const
Definition elementinfo.hh:455
Element * el() const
Definition elementinfo.hh:735
ALBERTA EL_INFO & elInfo() const
Definition elementinfo.hh:742
Definition hierarchiciterator.hh:27
Definition albertagrid/intersectioniterator.hh:25
Definition albertagrid/entity.hh:44
void clearElement()
Definition entity.cc:68
ALBERTA EL_INFO * getElInfo() const
needed for the LevelIterator and LeafIterator
Definition entity.cc:60
int level() const
level of this element
Definition entity.cc:92
void setElement(const ElementInfo &elementInfo, int subEntity)
Definition entity.cc:76
PartitionType partitionType() const
return partition type of this entity
Definition entity.cc:38
Grid::template Codim< codim >::Geometry Geometry
Definition albertagrid/entity.hh:67
void setEntity(const This &other)
Definition entity.cc:85
const ElementInfo & elementInfo() const
Definition albertagrid/entity.hh:128
Geometry geometry() const
geometry of this entity
Definition entity.cc:101
static const int dimension
Definition albertagrid/entity.hh:55
const Grid & grid() const
obtain a reference to the grid
Definition albertagrid/entity.hh:140
int subEntity() const
obtain number of the subentity within the element (in ALBERTA numbering)
Definition albertagrid/entity.hh:146
Alberta::ElementInfo< dimension > ElementInfo
Definition albertagrid/entity.hh:69
GeometryType type() const
type of geometry of this entity
Definition entity.cc:112
bool equals(const This &other) const
equality of entities
Definition entity.cc:46
Definition albertagrid/entity.hh:183
Grid::Traits::template Codim< 0 >::GeometryImpl GeometryImpl
Definition albertagrid/entity.hh:209
const ElementInfo & elementInfo() const
Definition albertagrid/entity.hh:353
Grid::template Codim< 0 >::LocalGeometry LocalGeometry
Definition albertagrid/entity.hh:208
Definition albertagrid/geometry.hh:28
Definition albertagrid/geometry.hh:472
Definition albertagrid/intersectioniterator.hh:33
Definition albertagrid/intersectioniterator.hh:34
Grid abstract base class.
Definition common/grid.hh:372