BEM++  2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | Private Member Functions | List of all members
Bempp::GridView Class Referenceabstract

Abstract wrapper of a grid view. More...

#include </home/wojtek/Projects/BEM/bempp-sven/bempp/lib/grid/grid_view.hpp>

Inheritance diagram for Bempp::GridView:
Bempp::ConcreteGridView< DuneGridView >

Public Member Functions

virtual ~GridView ()
 
virtual int dim () const =0
 Dimension of the grid.
 
virtual int dimWorld () const =0
 Dimension of the space containing the grid.
 
virtual const IndexSetindexSet () const =0
 The index set.
 
virtual const MapperelementMapper () const =0
 The element mapper.
 
virtual size_t entityCount (int codim) const =0
 Number of entities with codimension codim.
 
virtual size_t entityCount (const GeometryType &type) const =0
 Number of entities with geometry type type.
 
virtual bool containsEntity (const Entity< 0 > &e) const =0
 True if the entity e of codimension 0 is contained in this grid view. More...
 
virtual bool containsEntity (const Entity< 1 > &e) const =0
 True if the entity e of codimension 1 is contained in this grid view. More...
 
virtual bool containsEntity (const Entity< 2 > &e) const =0
 True if the entity e of codimension 2 is contained in this grid view. More...
 
virtual bool containsEntity (const Entity< 3 > &e) const =0
 True if the entity e of codimension 3 is contained in this grid view. More...
 
template<int codim>
std::auto_ptr< EntityIterator
< codim > > 
entityIterator () const
 Iterator over entities of codimension codim contained in this view.
 
void getRawElementData (arma::Mat< float > &vertices, arma::Mat< int > &elementCorners, arma::Mat< char > &auxData) const
 Get raw data describing the geometry of all codim-0 entities contained in this grid view. More...
 
void getRawElementData (arma::Mat< double > &vertices, arma::Mat< int > &elementCorners, arma::Mat< char > &auxData) const
 
void getRawElementData (arma::Mat< double > &vertices, arma::Mat< int > &elementCorners, arma::Mat< char > &auxData, std::vector< int > &domainIndices) const
 Get raw data describing the geometry of all codim-0 entities contained in this grid view. More...
 
void getRawElementData (arma::Mat< float > &vertices, arma::Mat< int > &elementCorners, arma::Mat< char > &auxData, std::vector< int > &domainIndices) const
 
virtual const
ReverseElementMapper
reverseElementMapper () const =0
 Mapping from codim-0 entity index to entity pointer. More...
 
virtual std::auto_ptr< VtkWritervtkWriter (Dune::VTK::DataMode dm=Dune::VTK::conforming) const =0
 Create a VtkWriter for this grid view. More...
 
template<>
std::auto_ptr< EntityIterator< 0 > > entityIterator () const
 
template<>
std::auto_ptr< EntityIterator< 1 > > entityIterator () const
 
template<>
std::auto_ptr< EntityIterator< 2 > > entityIterator () const
 
template<>
std::auto_ptr< EntityIterator< 3 > > entityIterator () const
 

Private Member Functions

virtual void getRawElementDataDoubleImpl (arma::Mat< double > &vertices, arma::Mat< int > &elementCorners, arma::Mat< char > &auxData, std::vector< int > *domainIndices) const =0
 
virtual void getRawElementDataFloatImpl (arma::Mat< float > &vertices, arma::Mat< int > &elementCorners, arma::Mat< char > &auxData, std::vector< int > *domainIndices) const =0
 
virtual std::auto_ptr
< EntityIterator< 0 > > 
entityCodim0Iterator () const =0
 Iterator over entities of codimension 0 contained in this view.
 
virtual std::auto_ptr
< EntityIterator< 1 > > 
entityCodim1Iterator () const =0
 Iterator over entities of codimension 1 contained in this view.
 
virtual std::auto_ptr
< EntityIterator< 2 > > 
entityCodim2Iterator () const =0
 Iterator over entities of codimension 2 contained in this view.
 
virtual std::auto_ptr
< EntityIterator< 3 > > 
entityCodim3Iterator () const =0
 Iterator over entities of codimension 3 contained in this view.
 

Detailed Description

Abstract wrapper of a grid view.

Constructor & Destructor Documentation

virtual Bempp::GridView::~GridView ( )
inlinevirtual

Destructor

Member Function Documentation

virtual bool Bempp::GridView::containsEntity ( const Entity< 0 > &  e) const
pure virtual

True if the entity e of codimension 0 is contained in this grid view.

Note
If e is not an element of the grid, then the result of containsEntity() is undefined.

Implemented in Bempp::ConcreteGridView< DuneGridView >.

virtual bool Bempp::GridView::containsEntity ( const Entity< 1 > &  e) const
pure virtual

True if the entity e of codimension 1 is contained in this grid view.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Implemented in Bempp::ConcreteGridView< DuneGridView >.

virtual bool Bempp::GridView::containsEntity ( const Entity< 2 > &  e) const
pure virtual

True if the entity e of codimension 2 is contained in this grid view.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Implemented in Bempp::ConcreteGridView< DuneGridView >.

virtual bool Bempp::GridView::containsEntity ( const Entity< 3 > &  e) const
pure virtual

True if the entity e of codimension 3 is contained in this grid view.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Implemented in Bempp::ConcreteGridView< DuneGridView >.

void Bempp::GridView::getRawElementData ( arma::Mat< float > &  vertices,
arma::Mat< int > &  elementCorners,
arma::Mat< char > &  auxData 
) const
inline

Get raw data describing the geometry of all codim-0 entities contained in this grid view.

Parameters
[out]verticesOn output, a 2D array whose (i,j)th element is the ith coordinate of the vertex of index j.
[out]elementCornersOn output, a 2D array whose (i,j)th element is the index of the ith corner of jth codim-0 entity, or -1 if this entity has less than i-1 corners.
[out]auxDataAuxiliary data, to be used in future to describe the geometry of curvilinear elements. Currently this argument is always set to an empty matrix.This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void Bempp::GridView::getRawElementData ( arma::Mat< double > &  vertices,
arma::Mat< int > &  elementCorners,
arma::Mat< char > &  auxData 
) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void Bempp::GridView::getRawElementData ( arma::Mat< double > &  vertices,
arma::Mat< int > &  elementCorners,
arma::Mat< char > &  auxData,
std::vector< int > &  domainIndices 
) const
inline

Get raw data describing the geometry of all codim-0 entities contained in this grid view.

This overload takes an additional argument, domainIndices, which on output contains indices of the grid domains to which the corresponding elements from elementCorners belong.

void Bempp::GridView::getRawElementData ( arma::Mat< float > &  vertices,
arma::Mat< int > &  elementCorners,
arma::Mat< char > &  auxData,
std::vector< int > &  domainIndices 
) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

virtual const ReverseElementMapper& Bempp::GridView::reverseElementMapper ( ) const
pure virtual

Mapping from codim-0 entity index to entity pointer.

Note that this object is not updated when the grid is adapted. In that case you need to create a new grid view and obtain a new reference to the reverse element mapper.

Implemented in Bempp::ConcreteGridView< DuneGridView >.

virtual std::auto_ptr<VtkWriter> Bempp::GridView::vtkWriter ( Dune::VTK::DataMode  dm = Dune::VTK::conforming) const
pure virtual

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