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

Abstract wrapper of a grid. More...

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

Inheritance diagram for Bempp::Grid:
Bempp::ConcreteGrid< DuneGrid >

Public Member Functions

virtual ~Grid ()
 Destructor.
 
virtual std::auto_ptr< GridViewlevelView (size_t level) const =0
 View of the entities on grid level level.
 
virtual std::auto_ptr< GridViewleafView () const =0
 View of the leaf entities.
 
virtual GridParameters::Topology topology () const =0
 Return the topology of the grid.
 
virtual std::auto_ptr
< GeometryFactory
elementGeometryFactory () const =0
 Factory able to construct empty geometries of codimension 0 compatible with this grid. More...
 
virtual shared_ptr< GridbarycentricGrid () const =0
 Return a barycentrically refined grid based on the LeafView.
 
virtual bool hasBarycentricGrid () const =0
 Return true if a barycentric refinement of this grid has been created.
 
virtual bool isBarycentricRepresentationOf (const Grid &other) const
 Return true if this grid is a barycentric representation of other, i.e. if this grid was created by other.barycentricGrid().
 
virtual const IdSetglobalIdSet () const =0
 Reference to the grid's global id set.
 
void getBoundingBox (arma::Col< double > &lowerBound, arma::Col< double > &upperBound) const
 Get bounding box. More...
 
Grid parameters
virtual int dim () const =0
 Dimension of the grid.
 
virtual int dimWorld () const =0
 Dimension of the space containing the grid.
 
virtual int maxLevel () const =0
 Maximum level defined in this grid. More...
 

Related Functions

(Note that these are not member functions.)

std::vector< bool > areInside (const Grid &grid, const arma::Mat< double > &points)
 Check whether points are inside or outside a closed grid. More...
 
double maxDistance (const Grid &grid1, const Grid &grid2)
 Return an upper bound on the maximum distance between elements belonging to two grids. More...
 

Detailed Description

Abstract wrapper of a grid.

Member Function Documentation

virtual std::auto_ptr<GeometryFactory> Bempp::Grid::elementGeometryFactory ( ) const
pure virtual

Factory able to construct empty geometries of codimension 0 compatible with this grid.

Note
For internal use.
Todo:
Provide implementations for other codimensions.

Implemented in Bempp::ConcreteGrid< DuneGrid >.

void Bempp::Grid::getBoundingBox ( arma::Col< double > &  lowerBound,
arma::Col< double > &  upperBound 
) const

Get bounding box.

The grid lies in the box defined by the inequalities lowerBound(i) <= x_i <= upperBound(i), where x_i is the ith coordinate.

References dimWorld(), and leafView().

Referenced by maxDistance().

virtual int Bempp::Grid::maxLevel ( ) const
pure virtual

Maximum level defined in this grid.

Levels are numbered 0 ... maxLevel() with 0 the coarsest level.

Implemented in Bempp::ConcreteGrid< DuneGrid >.

Friends And Related Function Documentation

std::vector< bool > areInside ( const Grid grid,
const arma::Mat< double > &  points 
)
related

Check whether points are inside or outside a closed grid.

Parameters
[in]gridA grid representing a closed 2D surface embedded in a 3D space.
[in]pointsA 2D array of dimensions (3, n) whose (i, j)th element is the i'th coordinate of j'th point.
Returns
A vector of length n whose j'th element is true if the j'th point lies inside grid, false otherwise.
Note
The results produced by this function are undefined if the grid does not represent a closed surface.
This function has only been tested for triangular grids.
The implementation assumes that no grid vertices are separated by less than 1e-9.

References dim(), dimWorld(), Bempp::Entity< 0 >::geometry(), Bempp::Geometry::getCorners(), and leafView().

double maxDistance ( const Grid grid1,
const Grid grid2 
)
related

Return an upper bound on the maximum distance between elements belonging to two grids.

Note
The returned number is an upper bound rather than an exact value (it is calculated from the bounding boxes of the two grids)

References dimWorld(), and getBoundingBox().


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