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 >
16 ::AlbertaGridEntity (
const Grid &grid,
const ElementInfo &elementInfo,
int subEntity )
18 elementInfo_( elementInfo ),
19 subEntity_( subEntity )
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 >
80 elementInfo_ = elementInfo;
81 subEntity_ = subEntity;
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 >
116 return GeometryTypes::simplex( mydimension );
124 template<
int dim,
class Gr
id >
128 elementInfo_( elementInfo )
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 >
170 template<
int dim,
class Gr
id >
175 bool isBoundary =
false;
176 for(
int i = 0; i <
dim+1; ++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 >
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 >
244 elementInfo_ = elementInfo;
248 template<
int dim,
class Gr
id >
256 template<
int dim,
class Gr
id >
268 template<
int dim,
class Gr
id >
271 return GeometryTypes::simplex( mydimension );
275 template<
int dim,
class Gr
id >
288 template<
int dim,
class Gr
id >
295 template<
int dim,
class Gr
id >
296 inline typename AlbertaGridEntity< 0, dim, Grid >::LocalGeometry
301 const int orientation = (elementInfo_.
type() == 1 ? -1 : 1);
302 return LocalGeometry( LocalGeoProvider::instance().geometryInFather( indexInFather, orientation ) );
306 template<
int dim,
class Gr
id >
316 template<
int dim,
class Gr
id >
320 assert( elementInfo_ );
322 return IteratorImp( grid(), level(), maxlevel );
326 template<
int dim,
class Gr
id >
341 "entities are not fully implemented, yet." );
351 template<
int dim,
class Gr
id >
#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
ALBERTA EL Element
Definition misc.hh:54
Include standard header files.
int level() const
Definition elementinfo.hh:533
bool mightVanish() const
Definition elementinfo.hh:526
ElementInfo father() const
Definition elementinfo.hh:449
int type() const
Definition elementinfo.hh:540
bool isBoundary(int face) const
Definition elementinfo.hh:620
int indexInFather() const
Definition elementinfo.hh:457
Element * el() const
Definition elementinfo.hh:737
ALBERTA EL_INFO & elInfo() const
Definition elementinfo.hh:744
Definition hierarchiciterator.hh:29
Definition albertagrid/intersectioniterator.hh:27
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
static const int dimension
Definition albertagrid/entity.hh:57
const Grid & grid() const
obtain a reference to the grid
Definition albertagrid/entity.hh:142
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::Traits::template Codim< 0 >::GeometryImpl GeometryImpl
Definition albertagrid/entity.hh:211
const ElementInfo & elementInfo() const
Definition albertagrid/entity.hh:355
Grid::template Codim< 0 >::LocalGeometry LocalGeometry
Definition albertagrid/entity.hh:210
Definition albertagrid/geometry.hh:30
Definition albertagrid/geometry.hh:504
Definition albertagrid/intersectioniterator.hh:35
Definition albertagrid/intersectioniterator.hh:36
Grid abstract base class.
Definition common/grid.hh:375