 Defines an abstract grid volume mesh.  
More...
 Defines an abstract grid volume mesh.  
More...
#include <MeshViz/3Ddata/PbGrid3D.h>
 
  
 | Public Member Functions | |
| PbGrid3D (SbBool is_data_duplicate=TRUE) | |
| PbGrid3D (const PbGrid3D &mesh) | |
| ~PbGrid3D () | |
| PbGrid3D & | operator= (const PbGrid3D &mesh) | 
| void | setGeometry (int num_x, int num_y, int num_z, const float *x, const float *y, const float *z) | 
| void | getGeometry (int &num_x, int &num_y, int &num_z, const float *&x, const float *&y, const float *&z) const | 
| virtual SbVec3f | getNodeCoord (int nod_index) const =0 | 
| virtual SbVec3f | getNodeCoord (int i, int j, int k) const =0 | 
| void | getDim (int &num_x, int &num_y, int &num_z) const | 
| virtual void | getNodeOwnerCellsInd (int nod_index, PbArrayOfInt &owner_cells) const | 
| virtual void | getAdjacentCellsIndByNode (int cell_index, PbArrayOfInt &adjacent_cells) const | 
| virtual void | getAdjacentCellsIndByFacet (int cell_index, PbArrayOfInt &adjacent_cells) const | 
| void | getNodeIndices (int nod_index, int &i, int &j, int &k) const | 
| void | getCellIndices (int cell_index, int &i, int &j, int &k) const | 
 Defines an abstract grid volume mesh.
 Defines an abstract grid volume mesh. 
This class defines a mesh of which topology is a regular grid made of num_x * num_y * num_z nodes. Each node with index (i,j,k) in the mesh (except for points along the mesh border) is connected to six points with indices (i+1,j,k), (i,j+1,k), (i-1,j,k), (i,j-1,k), (i,j,k-1), (i,j,k+1).
The values on the mesh nodes are defined by the PbMesh::addValuesSet() method, where argument val is an array of num_x * num_y * num_z floats.
| PbGrid3D::PbGrid3D | ( | SbBool | is_data_duplicate = TRUE | ) |  [inline] | 
Constructor.
See also PbMesh for more explanations about data duplication.
| PbGrid3D::PbGrid3D | ( | const PbGrid3D & | mesh | ) | 
Copy constructor.
| PbGrid3D::~PbGrid3D | ( | ) | 
Destructor.
| virtual void PbGrid3D::getAdjacentCellsIndByFacet | ( | int | cell_index, | |
| PbArrayOfInt & | adjacent_cells | |||
| ) | const  [virtual] | 
Gets the list of index of cells that are adjacent (by a facet) to cell_index.
Two cells are adjacent by facet is they own at least one mesh's facet in common
Reimplemented from PbMesh.
| virtual void PbGrid3D::getAdjacentCellsIndByNode | ( | int | cell_index, | |
| PbArrayOfInt & | adjacent_cells | |||
| ) | const  [virtual] | 
Gets the list of index of cells that are adjacent (by a node) to cell_index.
Two cells are adjacent by a node is they own at least one mesh's node in common.
Reimplemented from PbMesh.
| void PbGrid3D::getCellIndices | ( | int | cell_index, | |
| int & | i, | |||
| int & | j, | |||
| int & | k | |||
| ) | const  [inline] | 
Calculates indices i,j,k that verify cell_index = (i*(num_y-1) + j)*(num_z-1) + k.
| void PbGrid3D::getDim | ( | int & | num_x, | |
| int & | num_y, | |||
| int & | num_z | |||
| ) | const  [inline] | 
Gets the dimensions num_x, num_y, num_z of the grid.
| void PbGrid3D::getGeometry | ( | int & | num_x, | |
| int & | num_y, | |||
| int & | num_z, | |||
| const float *& | x, | |||
| const float *& | y, | |||
| const float *& | z | |||
| ) | const | 
Gets the mesh geometry.
x-y-z must be used like a vector (i.e. x[n]).
| virtual SbVec3f PbGrid3D::getNodeCoord | ( | int | i, | |
| int | j, | |||
| int | k | |||
| ) | const  [pure virtual] | 
Gets the coordinates of a node defined by its i,j,k indices on the grid.
Implemented in PbCartesianGrid3D, PbParalCartesianGrid3D, and PbRegularCartesianGrid3D.
| virtual SbVec3f PbGrid3D::getNodeCoord | ( | int | nod_index | ) | const  [pure virtual] | 
Gets the coordinates of a node defined by its index.
Implements PbMesh.
Implemented in PbCartesianGrid3D, PbParalCartesianGrid3D, and PbRegularCartesianGrid3D.
| void PbGrid3D::getNodeIndices | ( | int | nod_index, | |
| int & | i, | |||
| int & | j, | |||
| int & | k | |||
| ) | const  [inline] | 
Calculates indices i,j,k that verify (i*num_y + j)*num_z + k.
| virtual void PbGrid3D::getNodeOwnerCellsInd | ( | int | nod_index, | |
| PbArrayOfInt & | owner_cells | |||
| ) | const  [virtual] | 
Gets the list of index of cells that own the node "nod_index".
Implements PbMesh.
Assignment operator.
Reimplemented from PbMesh3D.
Reimplemented in PbCartesianGrid3D, PbParalCartesianGrid3D, and PbRegularCartesianGrid3D.
| void PbGrid3D::setGeometry | ( | int | num_x, | |
| int | num_y, | |||
| int | num_z, | |||
| const float * | x, | |||
| const float * | y, | |||
| const float * | z | |||
| ) | 
Defines a volume mesh geometry.
The size of the x array depends on the derived class that calls this method. It is either num_x or num_x * num_y * num_z. Idem for y and z array.