To manipulate structured grids. More...
Public Member Functions | |
Grid () | |
Construct a default grid with 10 intervals in each direction. | |
Grid (real_t xm, real_t xM, size_t npx) | |
Construct a 1-D structured grid given its extremal coordinates and number of intervals. More... | |
Grid (real_t xm, real_t xM, real_t ym, real_t yM, size_t npx, size_t npy) | |
Construct a 2-D structured grid given its extremal coordinates and number of intervals. More... | |
Grid (Point< real_t > m, Point< real_t > M, size_t npx, size_t npy) | |
Construct a 2-D structured grid given its extremal coordinates and number of intervals. More... | |
Grid (real_t xm, real_t xM, real_t ym, real_t yM, real_t zm, real_t zM, size_t npx, size_t npy, size_t npz) | |
Construct a 3-D structured grid given its extremal coordinates and number of intervals. More... | |
Grid (Point< real_t > m, Point< real_t > M, size_t npx, size_t npy, size_t npz) | |
Construct a 3-D structured grid given its extremal coordinates and number of intervals. More... | |
~Grid () | |
Destructor. | |
void | setXMin (const Point< real_t > &x) |
Set min. coordinates of the domain. More... | |
void | setXMax (const Point< real_t > &x) |
void | setDomain (real_t xmin, real_t xmax) |
Set Dimensions of the domain: 1-D case. More... | |
void | setDomain (real_t xmin, real_t xmax, real_t ymin, real_t ymax) |
Set Dimensions of the domain: 2-D case. More... | |
void | setDomain (real_t xmin, real_t xmax, real_t ymin, real_t ymax, real_t zmin, real_t zmax) |
Set Dimensions of the domain: 3-D case. More... | |
void | setDomain (Point< real_t > xmin, Point< real_t > xmax) |
Set Dimensions of the domain: 3-D case. More... | |
const Point< real_t > & | getXMin () const |
Return min. Coordinates of the domain. | |
const Point< real_t > & | getXMax () const |
Return max. Coordinates of the domain. | |
void | setN (size_t nx, size_t ny=0, size_t nz=0) |
Set number of grid intervals in the x , y and z -directions. More... | |
void | setX (const Vect< real_t > &x) |
Set node x-coordinates of grid. More... | |
void | setXY (const Vect< real_t > &x, const Vect< real_t > &y) |
Set node x- and y-coordinates of grid. More... | |
void | setXYZ (const Vect< real_t > &x, const Vect< real_t > &y, const Vect< real_t > &z) |
Set node x-, y- and z-coordinates of grid. More... | |
void | setNbDOF (size_t n) |
Set number of degrees of freedom for a node [Default: 1 ]. | |
size_t | getNx () const |
Return number of grid intervals in the x -direction. | |
size_t | getNy () const |
Return number of grid intervals in the y -direction. More... | |
size_t | getNz () const |
Return number of grid intervals in the z-direction. More... | |
real_t | getHx () const |
Return grid size in the x-direction. | |
real_t | getHy () const |
Return grid size in the y-direction. | |
real_t | getHz () const |
Return grid size in the z-direction. | |
Point< real_t > | getCoord (size_t i) const |
Return coordinates a point with label i in a 1-D grid. | |
Point< real_t > | getCoord (size_t i, size_t j) const |
Return coordinates a point with label (i,j) in a 2-D grid. | |
Point< real_t > | getCoord (size_t i, size_t j, size_t k) const |
Return coordinates a point with label (i,j,k) in a 3-D grid. | |
size_t | getNbNodes () const |
Return total number of grid nodes. | |
size_t | getNbDOF () const |
Return total number of dof. | |
real_t | getX (size_t i) const |
Return x-coordinate of point with index i | |
real_t | getY (size_t j) const |
Return y-coordinate of point with index j | |
real_t | getZ (size_t k) const |
Return z-coordinate of point with index k | |
Point2D< real_t > | getXY (size_t i, size_t j) const |
Return coordinates of point with indices (i,j) | |
Point< real_t > | getXYZ (size_t i, size_t j, size_t k) const |
Return coordinates of point with indices (i,j,k) | |
real_t | getCenter (size_t i) const |
Return coordinates of center of a 1-D cell with indices i , i+1 | |
Point< real_t > | getCenter (size_t i, size_t j) const |
Return coordinates of center of a 2-D cell with indices (i,j) , (i+1,j) , (i+1,j+1) , (i,j+1) | |
Point< real_t > | getCenter (size_t i, size_t j, size_t k) const |
Return coordinates of center of a 3-D cell with indices (i,j,k) , (i+1,j,k) , (i+1,j+1,k) , (i,j+1,k) , (i,j,k+1) , (i+1,j,k+1) , (i+1,j+1,k+1) , (i,j+1,k+1) | |
void | setCode (string exp, int code) |
Set a code for some grid points. More... | |
void | setCode (int side, int code) |
Set a code for grid points on sides. More... | |
int | getCode (int side) const |
Return code for a side number. More... | |
int | getCode (size_t i, size_t j) const |
Return code for a grid point. More... | |
int | getCode (size_t i, size_t j, size_t k) const |
Return code for a grid point. More... | |
size_t | getDim () const |
Return space dimension. | |
void | Deactivate (size_t i) |
Change state of a cell from active to inactive (1-D grid) More... | |
void | Deactivate (size_t i, size_t j) |
Change state of a cell from active to inactive (2-D grid) More... | |
void | Deactivate (size_t i, size_t j, size_t k) |
Change state of a cell from active to inactive (2-D grid) More... | |
int | isActive (size_t i) const |
Say if cell is active or not (1-D grid) More... | |
int | isActive (size_t i, size_t j) const |
Say if cell is active or not (2-D grid) More... | |
int | isActive (size_t i, size_t j, size_t k) const |
Say if cell is active or not (3-D grid) More... | |
To manipulate structured grids.