Proto
3.2
|
Represents a rectangular domain over which a problem can be defined, including periodic images. More...
#include <Proto_ProblemDomain.H>
Public Member Functions | |
ProblemDomain () | |
ProblemDomain (const Box &a_box, const Array< bool, DIM > a_isPeriodic) | |
Anisotropic Constructor. More... | |
ProblemDomain (const Box &a_box, bool a_isPeriodic) | |
Isotropic Constructor. More... | |
void | define (const Box &a_box, const Array< bool, DIM > a_isPeriodic) |
Define. More... | |
Box | operator & (Box a_box) const |
Box Intersection. More... | |
bool | contains (const Point &a_pt) const |
Contains Point. More... | |
Point | image (const Point &a_pt) const |
Periodic Image. More... | |
Box | image (const Box &a_box) const |
Periodic Image. More... | |
bool | coarsenable (Point a_boxSize) const |
Check If Coarsenable. More... | |
Point | sizes () const |
Query Size. More... | |
bool | operator== (const ProblemDomain &a_domain) const |
Equality. More... | |
bool | operator!= (const ProblemDomain &a_domain) const |
Inequality. More... | |
Box | box () const |
Get Box. More... | |
Array< bool, DIM > | periodicity () const |
Get Periodicity. More... | |
bool | isPeriodic (int a_dir) const |
Check Periodic Direction. More... | |
ProblemDomain | coarsen (Point a_refRatio) const |
Coarsen (Anisotropic) More... | |
ProblemDomain | coarsen (int a_refRatio) const |
Coarsen (Isotropic) More... | |
ProblemDomain | refine (Point a_refRatio) const |
Refine (Anisotropic) More... | |
ProblemDomain | refine (int a_refRatio) const |
Refine (Isotropic) More... | |
Protected Attributes | |
Box | m_box |
Array< bool, DIM > | m_isPeriodic |
bool | m_isDefined |
Represents a rectangular domain over which a problem can be defined, including periodic images.
A ProblemDomain is specified by a Box defining the rectangular set of Points over which a problem may be defined, plus an Array<bool,DIM> specifying whether or not each of the coordinate directions is periodic. The Box is assumed to have the low corner to be all Zeros, and specifies the overall range of indices that contain all the boxes in a DisjointBoxLayout.
|
inline |
|
inline |
Anisotropic Constructor.
Constructs a ProblemDomain with Box a_bx, and periodic directions given by a_periodic.
a_box | Domain Box |
a_isPeriodic | Periodic flags |
|
inline |
Isotropic Constructor.
Isotropic overload of the main constructor. Creates a ProblemDomain that is periodic or non-periodic in every direction
a_box | Domain Box |
a_isPeriodic | Periodic flag |
|
inline |
Define.
Lazily constructs a ProblemDomain with Box a_bx, and periodic directions given by a_periodic.
a_box | Domain Box |
a_isPeriodic | Periodic flags |
Box Intersection.
Returns the Box that is the intersection of a_bx with this->box() and all of its periodic images. Points in a_box which have no periodic image in the ProblemDomain are truncated.
This function does no periodic shifting. See image
for that functionality.
a_box | A Box |
|
inline |
Contains Point.
Checks if a_pt or any of it's periodic images are contained in this ProblemDomain.
a_pt | A Point |
|
inline |
Check If Coarsenable.
Returns true if *this can be tiled by boxes of size a_boxSize
. This is a requirement for using *this to construct a DisjointBoxLayout with Boxes of this size.
a_boxSize | A possibly anisotropic Box size |
|
inline |
|
inline |
Equality.
Two ProblemDomain objects are "==" if they have the same Box domain and periodicity.
a_domain | A ProblemDomain |
|
inline |
Inequality.
Two ProblemDomain objects are "==" if they have the same Box domain and periodicity.
a_domain | A ProblemDomain |
|
inline |
|
inline |
Get Periodicity.
References m_isPeriodic.
|
inline |
Check Periodic Direction.
Check if this domain is periodic in direction a_dir.
a_dir | A coordinate direction in [0,DIM) |
References coarsen(), m_isPeriodic, and refine().
|
inline |
Coarsen (Anisotropic)
Returns a ProblemDomain with a box given by this->box.coarsen(a_refRatio). Fails if this->coarsenable(a_refRatio) is false.
a_refRatio | A vector of refinement ratios |
Referenced by isPeriodic(), and Proto::DisjointBoxLayout::patchDomain().
|
inline |
Coarsen (Isotropic)
Returns a ProblemDomain with a box given by this->box.coarsen(a_refRatio). Fails if this->coarsenable(a_refRatio) is false
a_refRatio | An isotropic refinement ratio |
|
inline |
Refine (Anisotropic)
Returns a ProblemDomain with a box given by this->box.refine(a_refRatio).
a_refRatio | A vector of refinement ratios |
Referenced by isPeriodic().
|
inline |
Refine (Isotropic)
Returns a ProblemDomain with a box given by this->box.refine(a_refRatio).
a_refRatio | An isotropic refinement ratio |
|
protected |
Referenced by isPeriodic(), and periodicity().
|
protected |