#include <ProblemDomain.H>
Collaboration diagram for ProblemDomain:
Public Member Functions | |
ProblemDomain () | |
The default constructor. The constructed domain box is empty. | |
ProblemDomain (const Box &a_domBox) | |
Construct ProblemDomain with a_domBox as computational domain. | |
ProblemDomain (const Box &a_domBox, const bool *a_isPeriodic) | |
Construct ProblemDomain with a_domBox as computational domain. | |
ProblemDomain (const IntVect &small, const IntVect &big) | |
Construct a ProblemDomain. | |
ProblemDomain (const IntVect &small, const IntVect &big, const bool *a_isPeriodic) | |
Construct a ProblemDomain. | |
ProblemDomain (const IntVect &small, const int *vec_len) | |
Construct ProblemDomain with specified lengths. | |
ProblemDomain (const IntVect &small, const int *vec_len, const bool *a_isPeriodic) | |
Construct ProblemDomain with specified lengths. | |
ProblemDomain (const ProblemDomain &a_src) | |
The copy constructor. | |
void | define (const Box &a_domBox) |
Construct ProblemDomain with a_domBox as computational domain. | |
void | define (const Box &a_domBox, const bool *a_isPeriodic) |
Construct ProblemDomain with a_domBox as computational domain. | |
void | define (const IntVect &small, const IntVect &big) |
Construct a ProblemDomain. | |
void | define (const IntVect &small, const IntVect &big, const bool *a_isPeriodic) |
Construct a ProblemDomain. | |
void | define (const IntVect &small, const int *vec_len) |
Construct ProblemDomain with specified lengths. | |
void | define (const IntVect &small, const int *vec_len, const bool *a_isPeriodic) |
Construct ProblemDomain with specified lengths. | |
void | define (const ProblemDomain &a_src) |
The copy constructor. | |
const Box & | domainBox () const |
Returns the logical computational domain. | |
bool | isPeriodic (int a_dir) const |
Returns true if BC is periodic in direction a_dir. | |
bool | isPeriodic () const |
Returns true is BC is periodic in _any_ direction. | |
ShiftIterator | shiftIterator () const |
Returns the shiftIterator for this ProblemDomain. | |
bool | isEmpty () const |
Returns true if this ProblemDomain is empty or undefined. | |
bool | contains (const IntVect &p) const |
Returns true if argument is contained within this ProblemDomain. | |
bool | image (IntVect &p) const |
Returns the periodic image of this IntVect inside of the ProblemDomain. | |
bool | contains (const Box &b) const |
Returns true if argument is contained within this ProblemDomain. | |
bool | contains_box (const Box &b) const |
Equivalent to contains() function. | |
bool | intersects (const Box &a_box) const |
Returns true if this ProblemDomain and the argument intersect. | |
bool | intersectsNotEmpty (const Box &a_box) const |
Returns true if this ProblemDomain and the argument intersect. | |
bool | intersects (const Box &box1, const Box &box2) const |
Returns true if box1 and box2 or any of their periodic images intersect. | |
bool | operator== (const ProblemDomain &a_otherDomain) |
Returns true if the two domain are equivalent. | |
ProblemDomain & | operator= (const ProblemDomain &b) |
The assignment operator. | |
void | setPeriodic (int a_dir, bool a_isPeriodic) |
Sets whether BC is periodic in direction a_dir (true == periodic). | |
ProblemDomain & | grow (int i) |
Grows (or shrinks) the domain Box by i in all directions. | |
ProblemDomain & | grow (const IntVect &v) |
Grow this ProblemDomain. | |
ProblemDomain & | grow (int idir, int n_cell) |
Grow this ProblemDomain. | |
ProblemDomain & | growLo (int idir, int n_cell=1) |
Grow this ProblemDomain on the low side. | |
ProblemDomain & | growHi (int idir, int n_cell=1) |
Grow this ProblemDomain on the high side. | |
Box | operator & (const Box &a_b) const |
Returns the Box intersection of this ProblemDomain and a_b. | |
ProblemDomain & | refine (int a_refinement_ratio) |
Refine this problem domain. | |
ProblemDomain & | refine (const IntVect &a_refinement_ratio) |
Refine this ProblemDomain. | |
ProblemDomain & | coarsen (int a_refinement_ratio) |
Coarsen this ProblemDomain. | |
ProblemDomain & | coarsen (const IntVect &refinement_ratio) |
Coarsen this ProblemDomain. | |
void | dumpOn (std::ostream &strm) const |
Gives more detail than printOn. | |
Protected Attributes | |
bool | m_isPeriodic [SpaceDim] |
Box | m_domainBox |
ShiftIterator | m_shiftIt |
Friends | |
class | HDF5Handle |
void | operator &= (Box &a_box, const ProblemDomain &a_probdomain) |
Modifies a_box to be the intersection of a_box and a_probdomain. | |
Box | operator & (const Box &a_box, const ProblemDomain &a_probdomain) |
Returns a Box which is the interesection of a_box and a_probdomain. | |
ProblemDomain | grow (const ProblemDomain &pd, int i) |
Returns a ProblemDomain with a domainBox grown by the given amount. | |
ProblemDomain | grow (const ProblemDomain &pd, const IntVect &v) |
Returns a grown version of pd. | |
Box | bdryLo (const ProblemDomain &a_pd, int a_dir, int a_len=1) |
Returns a face-centered Box at the low side of a_pd. | |
Box | bdryHi (const ProblemDomain &a_pd, int a_dir, int a_len=1) |
Returns a face-centered Box at the high side of a_pd. | |
Box | adjCellLo (const ProblemDomain &a_pd, int a_dir, int a_len=1) |
Returns the cell-centered Box adjacent to the low side of a_pd. | |
Box | adjCellHi (const ProblemDomain &a_pd, int a_dir, int a_len=1) |
Returns the cell-centered Box adjacent to the low side of a_pd. | |
ProblemDomain | refine (const ProblemDomain &a_probdomain, int a_refinement_ratio) |
Return a ProblemDomain which is a refinement of a_probdomain. | |
ProblemDomain | refine (const ProblemDomain &a_probdomain, const IntVect &a_refinement_ratio) |
Refinement function. | |
ProblemDomain | coarsen (const ProblemDomain &a_probdomain, int a_refinement_ratio) |
Coarsening function. | |
ProblemDomain | coarsen (const ProblemDomain &a_probdomain, const IntVect &a_refinement_ratio) |
Coarsening function. | |
std::ostream & | operator<< (std::ostream &os, const ProblemDomain &bx) |
Write an ASCII representation to the ostream. | |
std::istream & | operator>> (std::istream &is, ProblemDomain &bx) |
Read from istream. |
ProblemDomain is a class which facilitates the application of physical boundary conditions, both periodic and non-periodic. This class contains much of the functionality of the Box class, since logically the computational domain is generally a Box.
Intersection with a ProblemDomain object will result in only removing regions which are outside the physical domain in non-periodic directions. Regions outside the logical computational domain in periodic directions will be treated as ghost cells which can be filled with an exchange() function or through suitable interpolation from a coarser domain.
Since ProblemDomain will contain a Box, it is a dimension dependent class, so SpaceDim must be defined as either 1, 2, or 3 when compiling.
Note that this implementation of ProblemDomain is inherently cell-centered.
|
The default constructor. The constructed domain box is empty.
|
|
Construct ProblemDomain with a_domBox as computational domain. This constructor defaults to non-periodic domain |
|
Construct ProblemDomain with a_domBox as computational domain. a_isPeriodic is a SpaceDim array of bools; if true, the physical boundary condition is periodic in the coordinate direction. False means a non-periodic BC. |
|
Construct a ProblemDomain. It is an error if small is greater than big. Defaults to non-periodic domain. |
|
Construct a ProblemDomain. It is an error if small is greater than big. a_isPeriodic is a SpaceDim array of bools; if true, the physical boundary condition is periodic in the coordinate direction. False means a non-periodic BC. |
|
Construct ProblemDomain with specified lengths. It is an error if the lengths are negative. Defaults to non-periodic domain. |
|
Construct ProblemDomain with specified lengths. It is an error if the lengths are negative. a_isPeriodic is a SpaceDim array of bools; if true, the physical boundary condition is periodic in the coordinate direction. False means a non-periodic BC. |
|
The copy constructor.
|
|
Coarsen this ProblemDomain. Modifies this ProblemDomain by coarsening by given (positive) refinement ratio. The Empty ProblemDomain is not modified by this function. |
|
Coarsen this ProblemDomain. Modifies this ProblemDomain by coarsening it by given (positive) refinement ratio. The Empty ProblemDomain is not modified by this function. |
|
Returns true if argument is contained within this ProblemDomain. It is an error if the Box is not cell-centered. An empty ProblemDomain does not contain any Box. An entirely periodic domain contains any Box. |
|
Returns true if argument is contained within this ProblemDomain. An empty ProblemDomain does not contain and is not contained by any ProblemDomain, including itself. Note also that in a periodic Direction, any index is valid, since the domain is infinite in that direction. |
|
Equivalent to contains() function.
|
|
The copy constructor.
|
|
Construct ProblemDomain with specified lengths. It is an error if the lengths are negative. a_isPeriodic is a SpaceDim array of bools; if true, the physical boundary condition is periodic in the coordinate direction. False means a non-periodic BC. |
|
Construct ProblemDomain with specified lengths. It is an error if the lengths are negative. Defaults to non-periodic domain. |
|
Construct a ProblemDomain. It is an error if small is greater than big. a_isPeriodic is a SpaceDim array of bools; if true, the physical boundary condition is periodic in the coordinate direction. False means a non-periodic BC. |
|
Construct a ProblemDomain. It is an error if small is greater than big. Defaults to non-periodic domain. |
|
Construct ProblemDomain with a_domBox as computational domain. a_isPeriodic is a SpaceDim array of bools; if true, the physical boundary condition is periodic in the coordinate direction. False means a non-periodic BC. |
|
Construct ProblemDomain with a_domBox as computational domain. This constructor defaults to non-periodic domain |
|
Returns the logical computational domain.
|
|
Gives more detail than printOn. Useful for exiting due to an error. |
|
Grow this ProblemDomain. Modifies this ProblemDomain by growing it on the low and high end by n_cell cells in direction idir. |
|
Grow this ProblemDomain. Modifies this ProblemDomain by growing the domainBox in each direction by the specified amount |
|
Grows (or shrinks) the domain Box by i in all directions.
|
|
Grow this ProblemDomain on the high side. Modifies this ProblemDomain by growing it on the high end by n_Cell cells in direction idir |
|
Grow this ProblemDomain on the low side. Modifies this ProblemDomain by growing it on the low end by n_cell cells in direction idir. |
|
Returns the periodic image of this IntVect inside of the ProblemDomain. Return true if the domain contains this IntVect, returning the image in 'p', otherwise returns false |
|
Returns true if box1 and box2 or any of their periodic images intersect. (useful for checking disjointness) |
|
Returns true if this ProblemDomain and the argument intersect. It is an error if a_box is not cell-centered. An empty ProblemDomain does not intersect any Box. This will do nothing in periodic directions (since a periodic domain is infinite in the periodic direction. If periodic in all dimensions, this will always return true. |
|
Returns true if this ProblemDomain and the argument intersect. It is an error if a_box is not cell-centered. This routine does not perform the check to see if *this or b are empty Boxes. It is the callers responsibility to ensure that this never happens. If you are unsure, the use the .intersects(..) routine. In periodic directions, will always return true. |
|
Returns true if this ProblemDomain is empty or undefined.
|
|
Returns true is BC is periodic in _any_ direction.
|
|
Returns true if BC is periodic in direction a_dir.
|
|
Returns the Box intersection of this ProblemDomain and a_b. The Box MUST be cell-centered. The intersection of the Empty ProblemDomain and any Box is the Empty Box. This operator does nothing in periodic directions (since a periodic domain is an infinite domain). |
|
The assignment operator.
|
|
Returns true if the two domain are equivalent.
|
|
Refine this ProblemDomain. Modifies this ProblemDomain by refining it by given (positive) refinement ratio. The Empty ProblemDomain is not modified by this function. |
|
Refine this problem domain. Modifies this ProblemDomain by refining it by given (positive) refinement ratio. The Empty ProblemDomain is not modified by this function. |
|
Sets whether BC is periodic in direction a_dir (true == periodic).
|
|
Returns the shiftIterator for this ProblemDomain. The shiftIterator is defined based on the periodicity of this ProblemDomain. |
|
Returns the cell-centered Box adjacent to the low side of a_pd. Returns the cell centered Box of the given length adjacent to the argument ProblemDomain on the high end along the given coordinate direction. The return Box is identical to the argument ProblemDomain in the other directions. The return Box and the argument ProblemDomain have an empty intersection. NOTES:
Directions are zero-based. It is an error if not 0 <= dir < SpaceDim. The neighbor of an Empty ProblemDomain is an Empty Box of the appropriate type. If a_dir is a periodic direction, will return an empty Box. |
|
Returns the cell-centered Box adjacent to the low side of a_pd. Returns the cell centered Box of the given length adjacent to the argument ProblemDomain on the low end along the given coordinate direction. The return Box is identical to the argument ProblemDomain in the other directions. The return ProblemDomain and the argument ProblemDomain have an empty intersection. NOTES:
Directions are zero-based. It is an error if not 0 <= dir < SpaceDim. The neighbor of an Empty ProblemDomain is an Empty Box of the appropriate type. If a_dir is a periodic direction, will return an empty Box as well. |
|
Returns a face-centered Box at the high side of a_pd. Returns the edge-centered Box (in direction a_dir) defining the high side of the argument ProblemDomain. The return Box will have the given length in the given direction. Directions are zero-based. It is an error if not 0 <= dir < SpaceDim. The neighbor of an Empty ProblemDomain is an Empty Box of the appropriate type. If a_dir is a periodic direction, will return an empty Box. |
|
Returns a face-centered Box at the low side of a_pd. Returns the edge-centered Box (in direction a_dir) defining the low side of the argument ProblemDomain. The output Box will have the given length in the given direction. Directions are zero-based. It is an error if not 0 <= dir < SpaceDim. The neighbor of an Empty ProblemDomain is an Empty Box of the appropriate type. If a_dir is a periodic direction, will return an empty Box. |
|
Coarsening function. Returns a ProblemDomain that is the argument ProblemDomain coarsened by given (positive) refinement ratio. The Empty ProblemDomain is not modified by this function. |
|
Coarsening function. Returns a ProblemDomain that is the argument ProblemDomain coarsened by given (positive) refinement ratio. The Empty ProblemDomain is not modified by this function. |
|
Returns a grown version of pd. Returns a ProblemDomain that is the argument ProblemDomain with a DomainBox grown by the given amount. |
|
Returns a ProblemDomain with a domainBox grown by the given amount.
|
|
|
|
Returns a Box which is the interesection of a_box and a_probdomain.
|
|
Modifies a_box to be the intersection of a_box and a_probdomain.
|
|
Write an ASCII representation to the ostream.
|
|
Read from istream.
|
|
Refinement function. Returns a ProblemDomain that is the argument ProblemDomain refined by given (positive) refinement ratio. The Empty ProblemDomain is not modified by this function. |
|
Return a ProblemDomain which is a refinement of a_probdomain. Returns a ProblemDomain that is the argument ProblemDomain refined by given (positive) refinement ratio. The Empty ProblemDomain is not modified by this function. |
|
Domain index extents |
|
Periodicity info |
|
Shift iterator for this ProblemDomain |