Grid Class Reference
[Finite Element Mesh]
#include <Grid.h>
Detailed Description
To manipulate structured grids.Public Member Functions | |
| int | getCode (size_t i, size_t j, size_t k) const |
| Return code for a grid point. | |
| int | getCode (size_t i, size_t j) const |
| Return code for a grid point. | |
| int | getCode (int side) const |
| Return code for a side number. | |
| Point< double > | 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. | |
| Point< double > | getCoord (size_t i, size_t j) const |
| Return coordinates a point with label (i,j) in a 2-D grid. | |
| Point< double > | getCoord (size_t i) const |
| Return coordinates a point with label i in a 1-D grid. | |
| double | getHx () const |
| Return grid size in the x-direction. | |
| double | getHy () const |
| Return grid size in the y-direction. | |
| double | getHz () const |
| Return grid size in the z-direction. | |
| 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. | |
| size_t | getNz () const |
| Return number of grid intervals in the z-direction. | |
| double | getX (size_t i) const |
| Return x-coordinate of point with index i. | |
| const Point< double > & | getXMax () const |
| Return max. Coordinates of the domain. | |
| const Point< double > & | getXMin () const |
| Return min. Coordinates of the domain. | |
| Point2D< double > | getXY (size_t i, size_t j) const |
| Return coordinates of point with indices (i,j). | |
| Point< double > | getXYZ (size_t i, size_t j, size_t k) const |
| Return coordinates of point with indices (i,j,k). | |
| double | getY (size_t j) const |
| Return y-coordinate of point with index j. | |
| double | getZ (size_t k) const |
| Return z-coordinate of point with index k. | |
| Grid (double xm, double xM, double ym, double yM, double zm, double zM, size_t npx, size_t npy, size_t npz) | |
| Construct a 3-D structured grid given its extremal coordinates and number of intervals. | |
| Grid (double xm, double xM, double ym, double yM, size_t npx, size_t npy) | |
| Construct a 2-D structured grid given its extremal coordinates and number of intervals. | |
| Grid (double xm, double xM, size_t npx) | |
| Construct a 1-D structured grid given its extremal coordinates and number of intervals. | |
| Grid () | |
| Construct a default grid with 10 intervals in each direction. | |
| void | setCode (int side, int code) |
| Set a code for grid points. | |
| void | setDomain (double xmin, double xmax, double ymin, double ymax, double zmin, double zmax) |
| Set Dimensions of the domain: 3-D case. | |
| void | setDomain (double xmin, double xmax, double ymin, double ymax) |
| Set Dimensions of the domain: 2-D case. | |
| void | setDomain (double xmin, double xmax) |
| Set Dimensions of the domain: 1-D case. | |
| void | setNx (size_t nx) |
| Return number of grid intervals in the x-direction. | |
| void | setNy (size_t ny) |
| Define number of grid intervals in the x-direction. | |
| void | setNz (size_t nz) |
| Define number of grid intervals in the z-direction. | |
| void | setXMax (const Point< double > &x) |
| Set max. | |
| void | setXMin (const Point< double > &x) |
| Set min. | |
Constructor & Destructor Documentation
| Grid | ( | double | xm, | |
| double | xM, | |||
| size_t | npx | |||
| ) |
Construct a 1-D structured grid given its extremal coordinates and number of intervals.
- Parameters:
-
[in] xm Minimal value for x [in] xM Maximal value for x [in] npx Number of grid intervals in the x-direction
| Grid | ( | double | xm, | |
| double | xM, | |||
| double | ym, | |||
| double | yM, | |||
| size_t | npx, | |||
| size_t | npy | |||
| ) |
Construct a 2-D structured grid given its extremal coordinates and number of intervals.
- Parameters:
-
[in] xm Minimal value for x [in] xM Maximal value for x [in] ym Minimal value for y [in] yM Maximal value for y [in] npx Number of grid intervals in the x-direction [in] npy Number of grid intervals in the y-direction
| Grid | ( | double | xm, | |
| double | xM, | |||
| double | ym, | |||
| double | yM, | |||
| double | zm, | |||
| double | zM, | |||
| size_t | npx, | |||
| size_t | npy, | |||
| size_t | npz | |||
| ) |
Construct a 3-D structured grid given its extremal coordinates and number of intervals.
- Parameters:
-
[in] xm Minimal value for x [in] xM Maximal value for x [in] ym Minimal value for y [in] yM Maximal value for y [in] zm Minimal value for z [in] zM Maximal value for z [in] npx Number of grid intervals in the x-direction [in] npy Number of grid intervals in the y-direction [in] npz Number of grid intervals in the z-direction
Member Function Documentation
| int getCode | ( | size_t | i, | |
| size_t | j, | |||
| size_t | k | |||
| ) | const |
Return code for a grid point.
- Parameters:
-
[in] i i-th index for node for which code is to be returned. [in] j j-th index for node for which code is to be returned. [in] k k-th index for node for which code is to be returned.
| int getCode | ( | size_t | i, | |
| size_t | j | |||
| ) | const |
Return code for a grid point.
- Parameters:
-
[in] i i-th index for node for which code is to be returned. [in] j j-th index for node for which code is to be returned.
| int getCode | ( | int | side | ) | const |
Return code for a side number.
- Parameters:
-
[in] side Side for which code is returned. Possible values are: MIN_X, MAX_X, MIN_Y, MAX_Y, MIN_Z, MAX_Z
| size_t getNy | ( | ) | const |
Return number of grid intervals in the y-direction.
ny=0 for 1-D domains (segments)
| size_t getNz | ( | ) | const |
Return number of grid intervals in the z-direction.
nz=0 for 1-D (segments) and 2-D domains (rectangles)
| void setCode | ( | int | side, | |
| int | code | |||
| ) |
Set a code for grid points.
- Parameters:
-
[in] side Side for which code is assigned. Possible values are: MIN_X, MAX_X, MIN_Y, MAX_Y, MIN_Z, MAX_Z code [in] Code to assign.
| void setDomain | ( | double | xmin, | |
| double | xmax, | |||
| double | ymin, | |||
| double | ymax, | |||
| double | zmin, | |||
| double | zmax | |||
| ) |
Set Dimensions of the domain: 3-D case.
- Parameters:
-
[in] xmin Minimal value of x-coordinate [in] xmax Maximal value of x-coordinate [in] ymin Minimal value of y-coordinate [in] ymax Maximal value of y-coordinate [in] zmin Minimal value of z-coordinate [in] zmax Maximal value of z-coordinate
| void setDomain | ( | double | xmin, | |
| double | xmax, | |||
| double | ymin, | |||
| double | ymax | |||
| ) |
Set Dimensions of the domain: 2-D case.
- Parameters:
-
[in] xmin Minimal value of x-coordinate [in] xmax Maximal value of x-coordinate [in] ymin Minimal value of y-coordinate [in] ymax Maximal value of y-coordinate
| void setDomain | ( | double | xmin, | |
| double | xmax | |||
| ) |
Set Dimensions of the domain: 1-D case.
- Parameters:
-
[in] xmin Minimal value of x-coordinate [in] xmax Maximal value of x-coordinate
| void setXMax | ( | const Point< double > & | x | ) |
Set max.
coordinates of the domain.
- Parameters:
-
[in] x Maximal values of coordinates
| void setXMin | ( | const Point< double > & | x | ) |
Set min.
coordinates of the domain.
- Parameters:
-
[in] x Minimal values of coordinates