Reference documentation for deal.II version Git d228448 2017-10-17 21:17:08 +0200
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
 
void merge_with (const BoundingBox< spacedim, Number > &other_bbox)
 
bool point_inside (const Point< spacedim, Number > &p) const
 
double volume () const
 

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:

Definition at line 58 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 45 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 35 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 51 of file bounding_box.cc.


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