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 typedef typename GenericGeometry::SimplexTopology< mydimension >::type Topology;
115 return GeometryType( Topology() );
123 template<
int dim,
class Gr
id >
127 elementInfo_( elementInfo )
132 template<
int dim,
class Gr
id >
139 template<
int dim,
class Gr
id >
147 template<
int dim,
class Gr
id >
155 template<
int dim,
class Gr
id >
158 return grid().levelProvider().isNew( elementInfo_ );
162 template<
int dim,
class Gr
id >
169 template<
int dim,
class Gr
id >
174 bool isBoundary =
false;
175 for(
int i = 0; i < dim+1; ++i )
181 template<
int dim,
class Gr
id >
189 template<
int dim,
class Gr
id >
192 return elementInfo_.isLeaf();
196 template<
int dim,
class Gr
id >
205 template<
int dim,
class Gr
id >
206 template<
int codim >
207 inline typename Grid::template Codim< codim >::Entity
211 return EntityImpl(
grid(), elementInfo_,
grid().generic2alberta(
codim, i ) );
215 template<
int dim,
class Gr
id >
219 return &(elementInfo_.
elInfo());
223 template<
int dim,
class Gr
id >
226 assert( elementInfo_.
level() ==
grid().levelProvider() ( elementInfo_ ) );
227 return elementInfo_.
level();
231 template<
int dim,
class Gr
id >
239 template<
int dim,
class Gr
id >
243 elementInfo_ = elementInfo;
247 template<
int dim,
class Gr
id >
255 template<
int dim,
class Gr
id >
267 template<
int dim,
class Gr
id >
270 typedef typename GenericGeometry::SimplexTopology< mydimension >::type Topology;
271 return GeometryType( Topology() );
275 template<
int dim,
class Gr
id >
276 inline typename Grid::template Codim< 0 >::Entity
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:27
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:28
@ InteriorEntity
all interior entities
Definition gridenums.hh:29
Include standard header files.
Definition agrid.hh:60
ALBERTA EL Element
Definition misc.hh:51
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:29
Definition albertagrid/intersectioniterator.hh:25
Definition albertagrid/entity.hh:47
void clearElement()
Definition entity.cc:68
int twist() const
obtain twist
Definition albertagrid/entity.hh:132
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:70
void setEntity(const This &other)
Definition entity.cc:85
const ElementInfo & elementInfo() const
Definition albertagrid/entity.hh:108
Geometry geometry() const
geometry of this entity
Definition entity.cc:101
static const int dimension
Definition albertagrid/entity.hh:58
const Grid & grid() const
obtain a reference to the grid
Definition albertagrid/entity.hh:120
int subEntity() const
obtain number of the subentity within the element (in ALBERTA numbering)
Definition albertagrid/entity.hh:126
Alberta::ElementInfo< dimension > ElementInfo
Definition albertagrid/entity.hh:72
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:163
Grid::Traits::template Codim< 0 >::GeometryImpl GeometryImpl
Definition albertagrid/entity.hh:190
Grid::template Codim< 0 >::LocalGeometry LocalGeometry
Definition albertagrid/entity.hh:189
Definition albertagrid/geometry.hh:28
Definition albertagrid/geometry.hh:474
Definition albertagrid/intersectioniterator.hh:33
Definition albertagrid/intersectioniterator.hh:34
Grid abstract base class.
Definition common/grid.hh:373