Encapsulation of the Orientation of the Faces of a Box. More...
#include <AMReX_Orientation.H>
Public Types | |
enum | Side { low = 0 , high = 1 } |
In each dimension a face is either low or high. More... | |
Public Member Functions | |
constexpr | Orientation () noexcept=default |
The default constructor. More... | |
AMREX_GPU_HOST_DEVICE | Orientation (int dir, Side side) noexcept |
Set the orientation of a side. More... | |
constexpr AMREX_GPU_HOST_DEVICE | Orientation (Direction dir, Side side) noexcept |
AMREX_GPU_HOST_DEVICE bool | operator== (const Orientation &o) const noexcept |
Logical equality. More... | |
AMREX_GPU_HOST_DEVICE bool | operator!= (const Orientation &o) const noexcept |
Logical inequality. More... | |
AMREX_GPU_HOST_DEVICE bool | operator< (const Orientation &o) const noexcept |
Less-than. More... | |
AMREX_GPU_HOST_DEVICE bool | operator<= (const Orientation &o) const noexcept |
Less-than or equal. More... | |
AMREX_GPU_HOST_DEVICE bool | operator> (const Orientation &o) const noexcept |
Greater-than. More... | |
AMREX_GPU_HOST_DEVICE bool | operator>= (const Orientation &o) const noexcept |
Greater-than or equal. More... | |
constexpr AMREX_GPU_HOST_DEVICE | operator int () const noexcept |
This conversion operator maps an orientation into a unique integer in the range [0 .. 2*AMREX_SPACEDIM-1] according to the above ordering. More... | |
AMREX_GPU_HOST_DEVICE Orientation | flip () const noexcept |
Return opposite orientation. More... | |
AMREX_GPU_HOST_DEVICE int | coordDir () const noexcept |
Returns the coordinate direction. More... | |
AMREX_GPU_HOST_DEVICE Side | faceDir () const noexcept |
Returns the orientation of the face – low or high. More... | |
AMREX_GPU_HOST_DEVICE bool | isLow () const noexcept |
Returns true if Orientation is low. More... | |
AMREX_GPU_HOST_DEVICE bool | isHigh () const noexcept |
Returns true if Orientation is high. More... | |
Static Public Member Functions | |
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE int | xlo () noexcept |
Int value of the x-lo-face. More... | |
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE int | xhi () noexcept |
Int value of the x-hi-face. More... | |
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE int | ylo () noexcept |
Int value of the y-lo-face. More... | |
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE int | yhi () noexcept |
Int value of the y-hi-face. More... | |
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE int | zlo () noexcept |
Int value of the z-lo-face. More... | |
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE int | zhi () noexcept |
Int value of the z-hi-face. More... | |
Private Member Functions | |
AMREX_GPU_HOST_DEVICE | Orientation (int v) noexcept |
Used internally. More... | |
Private Attributes | |
int | val = -1 |
The data. More... | |
Friends | |
class | OrientationIter |
std::istream & | operator>> (std::istream &is, Orientation &o) |
Read from an istream. More... | |
Encapsulation of the Orientation of the Faces of a Box.
This class encapsulates the orientation of the faces of a Box by providing an ordering of each of the faces of a Box in AMREX_SPACEDIM dimensions. This allows iterating over all the faces of a Box. The ordering first traverses the AMREX_SPACEDIM low sides from direction 0 .. AMREX_SPACEDIM-1 and then the AMREX_SPACEDIM high sides from direction 0 .. AMREX_SPACEDIM-1.
|
constexprdefaultnoexcept |
The default constructor.
|
inlinenoexcept |
Set the orientation of a side.
|
inlineconstexprnoexcept |
|
inlineprivatenoexcept |
Used internally.
|
inlinenoexcept |
Returns the coordinate direction.
|
inlinenoexcept |
Returns the orientation of the face – low or high.
|
inlinenoexcept |
Return opposite orientation.
|
inlinenoexcept |
Returns true if Orientation is high.
|
inlinenoexcept |
Returns true if Orientation is low.
|
inlineconstexprnoexcept |
This conversion operator maps an orientation into a unique integer in the range [0 .. 2*AMREX_SPACEDIM-1] according to the above ordering.
|
inlinenoexcept |
Logical inequality.
|
inlinenoexcept |
Less-than.
|
inlinenoexcept |
Less-than or equal.
|
inlinenoexcept |
Logical equality.
|
inlinenoexcept |
Greater-than.
|
inlinenoexcept |
Greater-than or equal.
|
inlinestaticconstexprnoexcept |
Int value of the x-hi-face.
|
inlinestaticconstexprnoexcept |
Int value of the x-lo-face.
|
inlinestaticconstexprnoexcept |
Int value of the y-hi-face.
|
inlinestaticconstexprnoexcept |
Int value of the y-lo-face.
|
inlinestaticconstexprnoexcept |
Int value of the z-hi-face.
|
inlinestaticconstexprnoexcept |
Int value of the z-lo-face.
|
friend |
Read from an istream.
|
friend |
|
private |
The data.