chombo-discharge
Public Member Functions | Protected Attributes | List of all members
RealBox Class Reference

Rectangular box in real space. More...

#include <CD_RealBox.H>

Public Member Functions

 RealBox ()
 Default constructor. Must subsequently set the corners.
 
 RealBox (const RealVect a_lo, const RealVect a_hi)
 Full constructor. Sets corners from input arguments. More...
 
 RealBox (const Box a_box, const RealVect a_probLo, const Real a_dx)
 Full constructor. Sets corners from input box. More...
 
 ~RealBox ()
 Destructor (does nothing)
 
RealVect getLo () const
 Get low corner.
 
RealVect getHi () const
 Get high corner.
 
Vector< RealVect > getCorners () const
 Get all the corners of this box (4 in 2D, 8 in 3D);.
 
bool intersect (const RealBox &a_box) const
 Check if a_box intersects this box. This is done by checking if. More...
 
bool isPointInside (const RealVect a_point) const
 Check if a_point is inside this box. More...
 
bool isBoxInside (const RealBox &a_box) const
 Check if a_box is completely inside this box. For this to be true, all the corners of a_box must be completely inside this box. More...
 

Protected Attributes

RealVect m_lo
 Low corner.
 
RealVect m_hi
 High corner.
 

Detailed Description

Rectangular box in real space.

Constructor & Destructor Documentation

◆ RealBox() [1/2]

RealBox::RealBox ( const RealVect  a_lo,
const RealVect  a_hi 
)

Full constructor. Sets corners from input arguments.

Parameters
[in]a_loLow corner
[in]a_hiHigh corners

◆ RealBox() [2/2]

RealBox::RealBox ( const Box  a_box,
const RealVect  a_probLo,
const Real  a_dx 
)

Full constructor. Sets corners from input box.

Parameters
[in]a_boxIntVect-box
[in]a_probLoLower-left corner of physical domain
[in]a_dxGrid resolution.

This sets the low corner as a_probLo + a_box.lowEnd()*a_dx

Member Function Documentation

◆ intersect()

bool RealBox::intersect ( const RealBox a_box) const

Check if a_box intersects this box. This is done by checking if.

Parameters
[in]a_boxOther box

◆ isBoxInside()

bool RealBox::isBoxInside ( const RealBox a_box) const

Check if a_box is completely inside this box. For this to be true, all the corners of a_box must be completely inside this box.

Parameters
[in]a_boxOther box.

◆ isPointInside()

bool RealBox::isPointInside ( const RealVect  a_point) const

Check if a_point is inside this box.

Parameters
[in]a_pointInput point

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