3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Classes | Public Types | Public Member Functions | List of all members
Dumux::BoundingBoxTree< GeometricEntitySet > Class Template Reference

An axis-aligned bounding box volume tree implementation. More...

#include <dumux/common/geometry/boundingboxtree.hh>

Description

template<class GeometricEntitySet>
class Dumux::BoundingBoxTree< GeometricEntitySet >

An axis-aligned bounding box volume tree implementation.

The class constructs a hierarchical structure of bounding box volumes around grid entities. This class can be used to efficiently compute intersections between a grid and other geometrical object. It only implements the intersection of two of such bounding box trees, so that two independent grids can be intersected.

Template Parameters
GeometricEntitySethas the following requirements
  • export dimensionworld, ctype
  • a size() member function returning the number of entities
  • begin() and end() member function returning at least forward iterators to entities
  • an index() method returning a consecutive index given an entity
  • an entity() method returning an entity given the consecutive index
  • entities have the following requirements:
    • a member function geometry() returning a geometry with the member functions
      • corner() and corners() returning global coordinates and number of corners

Public Types

using EntitySet = GeometricEntitySet
 the type of entity set this tree was built with More...
 

Public Member Functions

 BoundingBoxTree ()=default
 Default Constructor. More...
 
 BoundingBoxTree (std::shared_ptr< const GeometricEntitySet > set)
 Constructor with gridView. More...
 
void build (std::shared_ptr< const GeometricEntitySet > set)
 Build up bounding box tree for a grid with leafGridView. More...
 
const EntitySetentitySet () const
 the entity set this tree was built with More...
 
const BoundingBoxNode & getBoundingBoxNode (std::size_t nodeIdx) const
 Interface to be used by other bounding box trees. More...
 
const ctype * getBoundingBoxCoordinates (std::size_t nodeIdx) const
 Get an existing bounding box for a given node. More...
 
std::size_t numBoundingBoxes () const
 Get the number of bounding boxes currently in the tree. More...
 
bool isLeaf (const BoundingBoxNode &node, std::size_t nodeIdx) const
 

Member Typedef Documentation

◆ EntitySet

template<class GeometricEntitySet >
using Dumux::BoundingBoxTree< GeometricEntitySet >::EntitySet = GeometricEntitySet

the type of entity set this tree was built with

Constructor & Destructor Documentation

◆ BoundingBoxTree() [1/2]

template<class GeometricEntitySet >
Dumux::BoundingBoxTree< GeometricEntitySet >::BoundingBoxTree ( )
default

Default Constructor.

◆ BoundingBoxTree() [2/2]

template<class GeometricEntitySet >
Dumux::BoundingBoxTree< GeometricEntitySet >::BoundingBoxTree ( std::shared_ptr< const GeometricEntitySet >  set)
inline

Constructor with gridView.

Member Function Documentation

◆ build()

template<class GeometricEntitySet >
void Dumux::BoundingBoxTree< GeometricEntitySet >::build ( std::shared_ptr< const GeometricEntitySet >  set)
inline

Build up bounding box tree for a grid with leafGridView.

◆ entitySet()

template<class GeometricEntitySet >
const EntitySet & Dumux::BoundingBoxTree< GeometricEntitySet >::entitySet ( ) const
inline

the entity set this tree was built with

◆ getBoundingBoxCoordinates()

template<class GeometricEntitySet >
const ctype * Dumux::BoundingBoxTree< GeometricEntitySet >::getBoundingBoxCoordinates ( std::size_t  nodeIdx) const
inline

Get an existing bounding box for a given node.

◆ getBoundingBoxNode()

template<class GeometricEntitySet >
const BoundingBoxNode & Dumux::BoundingBoxTree< GeometricEntitySet >::getBoundingBoxNode ( std::size_t  nodeIdx) const
inline

Interface to be used by other bounding box trees.

Get an existing bounding box for a given node

◆ isLeaf()

template<class GeometricEntitySet >
bool Dumux::BoundingBoxTree< GeometricEntitySet >::isLeaf ( const BoundingBoxNode &  node,
std::size_t  nodeIdx 
) const
inline

Check whether a bounding box node is a leaf node Leaf nodes have itself as child0

◆ numBoundingBoxes()

template<class GeometricEntitySet >
std::size_t Dumux::BoundingBoxTree< GeometricEntitySet >::numBoundingBoxes ( ) const
inline

Get the number of bounding boxes currently in the tree.


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