|
criptic v1
Cosmic Ray Interstellar Propagation Tool using Itô Calculus
|
Class that represents a 3D rectangular prism. More...
#include <RealBox.H>
Public Member Functions | |
| RealBox (const RealVec &lo_=zeroVec, const RealVec &hi_=zeroVec) | |
| Construct a RealBox from two vectors. | |
| RealBox (const RealVec *pts, const IdxType npts) | |
| Construct a RealBox that bounds an array of points. | |
| RealBox (const RealBox &rb1, const RealBox &rb2) | |
| Construct a RealBox that contains two other RealBox's. | |
| bool | contains (const RealVec &x) const |
| Is a point in the box? | |
| std::array< RealVec, 8 > | corners () const |
| Return all corners of the box. | |
| RealVec | size () const |
| Return size of box. | |
| RealBox | rotate (const RealTensor2 &rot) const |
| Rotate box and return a box containing it. | |
| void | gaussExtrema (const RealTensor2 &eta, Real &gMin, Real &gMax) const |
| Find extrema of a Gaussian function on a box. | |
| RealBox | operator+ (const RealVec &v) const |
| Displace the position of a RealBox by a vector v. | |
| RealBox | operator- (const RealVec &v) const |
| Displace the position of a RealBox by a vector -v. | |
Public Attributes | |
| RealVec | lo |
| RealVec | hi |
Class that represents a 3D rectangular prism.
This class represnts a 3D rectangular prism with edges aligned with the cardinal axes. It provides various geometric operations on such a structure. The RealBox class does not know anything about periodic boundary conditions.
Construct a RealBox from two vectors.
| lo_ | The lower left corner of the box |
| hi_ | The upper right corner of the box |
Construct a RealBox that bounds an array of points.
| pts | Array of points |
| npts | Number of points |
|
inline |
Is a point in the box?
| x | The point |
|
inline |
Return all corners of the box.
| void RealBox::gaussExtrema | ( | const RealTensor2 & | eta, |
| Real & | gMin, | ||
| Real & | gMax | ||
| ) | const |
Find extrema of a Gaussian function on a box.
| eta | Tensor in Gaussian kernel |
| gMin | Minimum of Gaussian |
| gMax | Maximum of Gaussian |
The function whose extrema are located is given by exp( -eta_ij x_i x_j / 2). Note that this function is not normalized, so the global maximum, which will be found if x = 0 is in the box, is unity. To normalize properly, divide the values returned by (2 pi)^(3/2) / det(eta)^(1/2).
|
inline |
|
inline |
|
inline |
|
inline |
Return size of box.
| RealVec criptic::RealBox::hi |
Coordinates of upper corner of box
| RealVec criptic::RealBox::lo |
Coordinates of lower corner of box