-
Notifications
You must be signed in to change notification settings - Fork 2
Domain Class
Jacob Fields edited this page Jun 4, 2020
·
1 revision
The Domain class defines the physical region a PDE should be solved on. It also acts as a factory for Grid objects and contains the parameters to construct them correctly across all processors.
| Method | Description |
|---|---|
Domain() |
The constructor for a Domain object. By default, it sets the number of ghost points to 3, the bounds to [0,1.0] x [0,1.0], and the number of points to 11 in both x and y. |
~Domain() |
The destructor for Domain. It destroys the attached Grid. |
void setCFL(double cfl) |
Set the CFL factor. At the moment, this doesn't affect anything in the code itself; it's just a place to store the CFL. |
double getCFL() const |
Get the CFL factor. |
void setBounds(const pair2<double>& bounds |
Set the bounds for the domain with a pair of ordered pairs. |
const pair2<double>& getBounds() const |
Get the bounds for this domain as a pair of ordered pairs. |
void setGhostPoints(unsigned int n) |
Set the number of ghost points to use with Grid objects created by the Domain. |
unsigned int getGhostPoints() const |
Get the number of ghost points used by the Domain. |
const pair2<int>& getCommPartners() const |
Get a pair of ordered pairs corresponding to the ranks of the MPI communication partners at each boundary. |
bool hasBoundary(Boundary b) const |
Check if the Domain has a particular physical boundary for this processor. |
GridCoordinates getCoordinates() const |
Get the coordinate type (CARTESIAN or POLAR) for this Domain. |
bool isPeriodic() const |
Check if the angular boundary for polar coordinates on this Domain is periodic. |
Result buildMesh(unsigned int shp[2], GridCoordinates coord=CARTESIAN, bool periodic=false) |
Build a mesh of Grid objects across the Domain, one for each processor. The shp argument gives the total number of points for the grid in (x, y). The coord argument specifies the coordinates (CARTESIAN or POLAR) to use, and periodic specifies whether or not to apply a periodic y/angular boundary for use with polar coordinates. |