chombo-discharge
Loading...
Searching...
No Matches
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.
 
 RealBox (const Box &a_box, const RealVect &a_origin, const Real a_dx)
 Full constructor. Sets corners from input box.
 
 ~RealBox ()=default
 Destructor (does nothing)
 
RealVect getLo () const
 Get low corner.
 
RealVect getHi () const
 Get high corner.
 
Vector< RealVectgetCorners () 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.
 
bool isPointInside (const RealVect &a_point) const
 Check if a_point is inside this box.
 
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.
 

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_origin,
const Real  a_dx 
)

Full constructor. Sets corners from input box.

Parameters
[in]a_boxIntVect-box
[in]a_originLower-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

◆ getCorners()

Vector< RealVect > RealBox::getCorners ( ) const

Get all the corners of this box (4 in 2D, 8 in 3D);.

Returns
Corners

◆ getHi()

RealVect RealBox::getHi ( ) const

Get high corner.

Returns
Hi

◆ getLo()

RealVect RealBox::getLo ( ) const

Get low corner.

Returns
Lo

◆ 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
Returns
True if intersection found, false otherwise

◆ 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.
Returns
True if box inside, false otherwise

◆ isPointInside()

bool RealBox::isPointInside ( const RealVect a_point) const

Check if a_point is inside this box.

Parameters
[in]a_pointInput point
Returns
True if point inside, false otherwise

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