Reference documentation for deal.II version 9.1.0-pre
Public Member Functions | List of all members
BoundingBox< spacedim, Number > Class Template Reference

#include <deal.II/base/bounding_box.h>

Public Member Functions

 BoundingBox ()=default
 
 BoundingBox (const std::pair< Point< spacedim, Number >, Point< spacedim, Number >> &boundary_points)
 
const std::pair< Point< spacedim, Number >, Point< spacedim, Number > > & get_boundary_points () const
 
NeighborType get_neighbor_type (const BoundingBox< spacedim, Number > &other_bbox) const
 
void merge_with (const BoundingBox< spacedim, Number > &other_bbox)
 
bool point_inside (const Point< spacedim, Number > &p) const
 
double volume () const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Detailed Description

template<int spacedim, typename Number = double>
class BoundingBox< spacedim, Number >

A class that represents a bounding box in a space with arbitrary dimension spacedim.

Objects of this class are used to represent bounding boxes. They are, among other uses, useful in parallel distributed meshes to give a general description the owners of each portion of the mesh.

Bounding boxes are represented by two vertices (bottom left and top right). Geometrically, a bounding box is:

Author
Giovanni Alzetta, 2017.

Definition at line 97 of file bounding_box.h.

Constructor & Destructor Documentation

template<int spacedim, typename Number = double>
BoundingBox< spacedim, Number >::BoundingBox ( )
default

Standard constructor. Creates an object that corresponds to an empty box, i.e. a degenerate box with both points being the origin.

template<int spacedim, typename Number = double>
BoundingBox< spacedim, Number >::BoundingBox ( const std::pair< Point< spacedim, Number >, Point< spacedim, Number >> &  boundary_points)

Standard constructor for non-empty boxes: it uses a pair of points which describe the box: one for the bottom and one for the top corner.

Member Function Documentation

template<int spacedim, typename Number >
const std::pair< Point< spacedim, Number >, Point< spacedim, Number > > & BoundingBox< spacedim, Number >::get_boundary_points ( ) const

Return the boundary_points

Definition at line 147 of file bounding_box.cc.

template<int spacedim, typename Number >
NeighborType BoundingBox< spacedim, Number >::get_neighbor_type ( const BoundingBox< spacedim, Number > &  other_bbox) const

Check if the current object and other_bbox are neighbors, i.e. if the boxes have dimension spacedim, check if their intersection is non empty.

Return an enumerator of type NeighborType.

Definition at line 58 of file bounding_box.cc.

template<int spacedim, typename Number >
void BoundingBox< spacedim, Number >::merge_with ( const BoundingBox< spacedim, Number > &  other_bbox)

Enlarge the current object so that it contains other_bbox . If the current object already contains other_bbox then it is not changed by this function.

Definition at line 42 of file bounding_box.cc.

template<int spacedim, typename Number >
bool BoundingBox< spacedim, Number >::point_inside ( const Point< spacedim, Number > &  p) const

Return true if the point is inside the Bounding Box, false otherwise.

Definition at line 21 of file bounding_box.cc.

template<int spacedim, typename Number >
double BoundingBox< spacedim, Number >::volume ( ) const

Compute the volume (i.e. the dim-dimensional measure) of the BoundingBox.

Definition at line 154 of file bounding_box.cc.

template<int spacedim, typename Number = double>
template<class Archive >
void BoundingBox< spacedim, Number >::serialize ( Archive &  ar,
const unsigned int  version 
)

Boost serialization function


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