74 void setGeometry(
int num_x,
int num_y,
int num_z,
const float *x,
const float *
y,
const float *z);
81 void getGeometry(
int &num_x,
int &num_y,
int &num_z,
const float* &x,
const float* &
y,
const float* &z)
const;
96 void getDim(
int &num_x,
int &num_y,
int &num_z)
const { num_x = numX; num_y = numY; num_z = numZ;};
123 void getCellIndices(
int cell_index,
int &i,
int &j,
int &k)
const;
129 virtual int evaluateSkinFacesNum()
const {
130 return 2*((numZ-1)*(numY-1) + (numZ-1)*(numX-1) + (numX-1)*(numY-1));
133 int * getCellNodeIds(
int i,
int j,
int k)
const;
134 int * getCellNodeIds(
int cell_index)
const;
136 void print(FILE *fp)
const;
139 virtual void grid3DSkin(
PoMeshSkin *_PoMeshSkin)
const = 0;
142 void setDim(
int num_x,
int num_y,
int num_z);
143 virtual void setXYZGeometry(
int num_x,
int num_y,
int num_z,
const float *x,
const float *
y,
const float *z)=0;
144 virtual void getXYZGeometry(
const float* &x,
const float* &
y,
const float* &z)
const=0;
149 mutable int m_cellNodeIds[8];
163 k = nod_index % numZ;
164 tmp = (nod_index-k) / numZ;
173 int ny=numY-1, nz=numZ-1;
176 tmp = (cell_index-k) / nz;
183PbGrid3D::setDim(
int num_x,
int num_y,
int num_z)
188 numMeshNodes = numX * numY * numZ;
189 m_numMeshCells = (numX-1) * (numY-1) * (numZ-1);
194PbGrid3D::getCellNodeIds(
int cell_index)
const
198 return getCellNodeIds(i,j,k);
201#define NSI_(i,j,k) numZ*((j)+(i)*numY) + (k)
203PbGrid3D::getCellNodeIds(
int i,
int j,
int k)
const
205 m_cellNodeIds[4] = (m_cellNodeIds[0] =
NSI_(i ,j ,k )) + 1;
206 m_cellNodeIds[5] = (m_cellNodeIds[1] =
NSI_(i+1,j ,k )) + 1;
207 m_cellNodeIds[6] = (m_cellNodeIds[2] =
NSI_(i+1,j+1,k )) + 1;
208 m_cellNodeIds[7] = (m_cellNodeIds[3] =
NSI_(i ,j+1,k )) + 1;
209 return m_cellNodeIds;
#define TRUE
Possible value of SbBool.
DTEXT Dynamic array of int .
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines an abstract grid...
virtual void getNodeOwnerCellsInd(int nod_index, PbArrayOfInt &owner_cells) const
Gets the list of index of cells that own the node "nod_index".
void setGeometry(int num_x, int num_y, int num_z, const float *x, const float *y, const float *z)
Defines a volume mesh geometry.
void getNodeIndices(int nod_index, int &i, int &j, int &k) const
Calculates indices i,j,k that verify (i*num_y + j)*num_z + k.
virtual SbVec3f getNodeCoord(int nod_index) const =0
Gets the coordinates of a node defined by its index.
void getCellIndices(int cell_index, int &i, int &j, int &k) const
Calculates indices i,j,k that verify cell_index = (i*(num_y-1) + j)*(num_z-1) + k.
virtual SbVec3f getNodeCoord(int i, int j, int k) const =0
Gets the coordinates of a node defined by its i,j,k indices on the grid.
PbGrid3D & operator=(const PbGrid3D &mesh)
Assignment operator.
PbGrid3D(SbBool is_data_duplicate=TRUE)
Constructor.
PbGrid3D(const PbGrid3D &mesh)
Copy constructor.
virtual void getAdjacentCellsIndByNode(int cell_index, PbArrayOfInt &adjacent_cells) const
Gets the list of index of cells that are adjacent (by a node) to cell_index.
virtual void getAdjacentCellsIndByFacet(int cell_index, PbArrayOfInt &adjacent_cells) const
Gets the list of index of cells that are adjacent (by a facet) to cell_index.
void getDim(int &num_x, int &num_y, int &num_z) const
Gets the dimensions num_x, num_y, num_z of the grid.
void getGeometry(int &num_x, int &num_y, int &num_z, const float *&x, const float *&y, const float *&z) const
Gets the mesh geometry.
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines an abstract volu...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Representation of the me...