Dune::GenericReferenceElement< ctype, dim > Class Template Reference
[Generic Reference Elements]

This class provides access to geometric and topological properties of a reference element. This includes its type, the number of subentities, the volume, and a method for checking if a point is inside. The embedding of each subentity into the reference element is also provided. More...

#include <dune/grid/common/genericreferenceelements.hh>

List of all members.

Classes

struct  Codim
 Collection of types depending on the codimension. More...
class  CornerStorage
struct  Destroy
struct  GeometryTraits
struct  Initialize
struct  MappingArray
 Stores all subentities of a given codimension.
class  SubEntityInfo
 Topological and geometric information about the subentities of a reference element. More...

Public Member Functions

int size (int c) const
 number of subentities of codimension c
int size (int i, int c, int cc) const
 number of subentities of codimension cc of subentity (i,c)
int subEntity (int i, int c, int ii, int cc) const
 obtain number of ii-th subentity with codim cc of (i,c)
const FieldVector< ctype, dim > & position (int i, int c) const
 position of the barycenter of entity (i,c)
bool checkInside (const FieldVector< ctype, dim > &local) const
 check if a coordinate is in the reference element
template<int codim>
bool checkInside (const FieldVector< ctype, dim-codim > &local, int i) const
 check if a local coordinate is in the reference element of the i-th subentity E with codimension c of the current reference element.
template<int codim>
FieldVector< ctype, dim > global (const FieldVector< ctype, dim-codim > &local, int i, int c) const
 map a local coordinate on subentity (i,codim) into the reference element
template<int codim>
FieldVector< ctype, dim > global (const FieldVector< ctype, dim-codim > &local, int i) const
 map a local coordinate on subentity (i,codim) into the reference element
template<int codim>
Codim< codim >::Mapping & mapping (int i) const
 obtain the embedding of subentity (i,codim) into the reference element
const GeometryType & type (int i, int c) const
 obtain the type of subentity (i,c)
unsigned int topologyId (int i, int c) const
double volume () const
 obtain the volume of the reference element
const FieldVector< ctype, dim > & volumeOuterNormal (int face) const
 obtain the volume outer normal of the reference element
template<class Topology >
void initializeTopology ()
 initialize the reference element

Friends

class GenericReferenceElementContainer< ctype, dim >

Detailed Description

template<class ctype, int dim>
class Dune::GenericReferenceElement< ctype, dim >

This class provides access to geometric and topological properties of a reference element. This includes its type, the number of subentities, the volume, and a method for checking if a point is inside. The embedding of each subentity into the reference element is also provided.

A singleton of this class for a given geometry type can be accessed through the GenericReferenceElements class.

Template Parameters:
ctype field type for coordinates
dim dimension of the reference element

Member Function Documentation

template<class ctype, int dim>
bool Dune::GenericReferenceElement< ctype, dim >::checkInside ( const FieldVector< ctype, dim > &  local  )  const [inline]

check if a coordinate is in the reference element

This method returns true if the given local coordinate is within this reference element.

Parameters:
[in] local coordinates of the point

Referenced by Dune::GenericReferenceElement< ctype, dim >::checkInside().

template<class ctype, int dim>
template<int codim>
bool Dune::GenericReferenceElement< ctype, dim >::checkInside ( const FieldVector< ctype, dim-codim > &  local,
int  i 
) const [inline]

check if a local coordinate is in the reference element of the i-th subentity E with codimension c of the current reference element.

Denote by E the i-th subentity of codimension codim of the current reference element. This method return true, if the given local coordinate is within the reference element for the entity E.

Template Parameters:
codim codimension of subentity E
Parameters:
[in] local coordinates of the point with respect to the reference element of E
[in] i number of subentity E (0 <= i < size( c ))

References Dune::GenericReferenceElement< ctype, dim >::checkInside().

template<class ctype, int dim>
template<int codim>
FieldVector< ctype, dim > Dune::GenericReferenceElement< ctype, dim >::global ( const FieldVector< ctype, dim-codim > &  local,
int  i 
) const [inline]

map a local coordinate on subentity (i,codim) into the reference element

Denote by E the i-th subentity of codimension codim of the current reference element. This method maps a point within the reference element of E into the current reference element.

Template Parameters:
codim codimension of subentity E
Parameters:
[in] local coordinates of the point with respect to the reference element of E
[in] i number of subentity E (0 <= i < size( codim ))
Note:
This method is just an alias for
  mapping< codim >( i ).global( local );

References Dune::GenericReferenceElement< ctype, dim >::global().

template<class ctype, int dim>
template<int codim>
FieldVector< ctype, dim > Dune::GenericReferenceElement< ctype, dim >::global ( const FieldVector< ctype, dim-codim > &  local,
int  i,
int  c 
) const [inline]

map a local coordinate on subentity (i,codim) into the reference element

Denote by E the i-th subentity of codimension codim of the current reference element. This method maps a point within the reference element of E into the current reference element.

Template Parameters:
codim codimension of subentity E
Parameters:
[in] local coordinates of the point with respect to the reference element of E
[in] i number of subentity E (0 <= i < size( c ))
[in] c codimension of subentity E
Note:
The runtime argument c is redundant and must equal codim.
This method is just an alias for
  mapping< codim >( i ).global( local );

Referenced by Dune::GenericReferenceElement< ctype, dim >::global().

template<class ctype, int dim>
template<class Topology >
void Dune::GenericReferenceElement< ctype, dim >::initializeTopology (  )  [inline]

initialize the reference element

Template Parameters:
Topology topology of the desired reference element
Note:
The dimension of the topology must match dim.
template<class ctype, int dim>
template<int codim>
Codim< codim >::Mapping& Dune::GenericReferenceElement< ctype, dim >::mapping ( int  i  )  const [inline]

obtain the embedding of subentity (i,codim) into the reference element

Denote by E the i-th subentity of codimension codim of the current reference element. This method returns a Dune::GenericGeometry::HybridMapping HybridMapping that maps the reference element of E into the current reference element.

This method can be used in a GenericGeometry to represent subentities of the current reference element.

Template Parameters:
codim codimension of subentity E
Parameters:
[in] i number of subentity E (0 <= i < size( codim ))
template<class ctype, int dim>
const FieldVector< ctype, dim >& Dune::GenericReferenceElement< ctype, dim >::position ( int  i,
int  c 
) const [inline]

position of the barycenter of entity (i,c)

Denote by E the i-th subentity of codimension c of the current reference element. This method returns the coordinates of the center of gravity of E within the current reference element.

Parameters:
[in] i number of subentity E (0 <= i < size( c ))
[in] c codimension of subentity E

Referenced by Dune::GeometryDefaultImplementation< mydimension, coorddimension, GridImp, Geometry >::center(), Dune::AlbertaGridIntersectionBase< Grid >::centerIntegrationOuterNormal(), and Dune::GeometryDefaultImplementation< mydimension, coorddimension, GridImp, Geometry >::volume().

template<class ctype, int dim>
int Dune::GenericReferenceElement< ctype, dim >::size ( int  i,
int  c,
int  cc 
) const [inline]

number of subentities of codimension cc of subentity (i,c)

Denote by E the i-th subentity of codimension c of the current reference element. This method returns the number of subentities of codimension cc of the current reference element, that are also a subentity of E.

Parameters:
[in] i number of subentity E (0 <= i < size( c ))
[in] c codimension of subentity E
[in] cc codimension whose size is desired (c <= cc <= dim)
template<class ctype, int dim>
int Dune::GenericReferenceElement< ctype, dim >::subEntity ( int  i,
int  c,
int  ii,
int  cc 
) const [inline]

obtain number of ii-th subentity with codim cc of (i,c)

Denote by E the i-th subentity of codimension c of the current reference element. And denote by S the ii-th subentity of codimension (cc-c) of E. Then, S is a also a subentity of codimension c of the current reference element. This method returns the number of S with respect to the current reference element.

Parameters:
[in] i number of subentity E (0 <= i < size( c ))
[in] c codimension of subentity E
[in] ii number of subentity S (with respect to E)
[in] cc codimension of subentity S (c <= cc <= dim)

Referenced by Dune::GeoGrid::PartitionIteratorFilter< codim, Ghost_Partition, Grid >::apply(), Dune::GeoGrid::PartitionIteratorFilter< codim, Overlap_Partition, Grid >::apply(), Dune::GeoGrid::PartitionIteratorFilter< codim, Interior_Partition, Grid >::apply(), Dune::GeoGrid::CoordVector< mydim, Grid, true >::calculate(), Dune::DuneGridFormatParser::setOrientation(), Dune::AlbertaGridIndexSet< dim, dimworld >::subIndex(), Dune::AlbertaGridHierarchicIndexSet< dim, dimworld >::subIndex(), Dune::GeoGrid::EntityBase< codim, Grid, true >::subIndex(), and Dune::DGFWriter< GV >::write().

template<class ctype, int dim>
unsigned int Dune::GenericReferenceElement< ctype, dim >::topologyId ( int  i,
int  c 
) const [inline]
template<class ctype, int dim>
const GeometryType& Dune::GenericReferenceElement< ctype, dim >::type ( int  i,
int  c 
) const [inline]

obtain the type of subentity (i,c)

Denote by E the i-th subentity of codimension c of the current reference element. This method returns the GeometryType of E.

Parameters:
[in] i number of subentity E (0 <= i < size( c ))
[in] c codimension of subentity E

Referenced by Dune::GeoGrid::EntityBase< codim, Grid, true >::type().

template<class ctype, int dim>
double Dune::GenericReferenceElement< ctype, dim >::volume (  )  const [inline]
template<class ctype, int dim>
const FieldVector< ctype, dim >& Dune::GenericReferenceElement< ctype, dim >::volumeOuterNormal ( int  face  )  const [inline]

obtain the volume outer normal of the reference element

The volume outer normal is the outer normal whose length coincides with the face's volume.

Parameters:
[in] face index of the face, whose normal is desired

Referenced by Dune::GeoGrid::Intersection< const GeometryGrid< HostGrid, CoordFunction, Allocator >, HostGrid::Traits::LeafIntersection >::integrationOuterNormal(), and Dune::GenericGeometry::BasicGeometry< mydim, GenericGeometry::DefaultGeometryTraits< ctype, coorddim, coorddim > >::normal().


Friends And Related Function Documentation

template<class ctype, int dim>
friend class GenericReferenceElementContainer< ctype, dim > [friend]

The documentation for this class was generated from the following file:

Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].