#include <SMDS_UnstructuredGrid.hxx>
Public Member Functions | |
void | AllocateDiameters (vtkIdType maxVtkID) |
Allocates data array for ball diameters. More... | |
void | BuildDownwardConnectivity (bool withEdges) |
void | BuildLinks () |
int | CellIdToDownId (int vtkCellId) |
void | CleanDownwardConnectivity () |
void | compactGrid (std::vector< int > &idNodesOldToNew, int newNodeSize, std::vector< int > &idCellsOldToNew, int newCellSize) |
SMDS_MeshCell * | extrudeVolumeFromFace (int vtkVolId, int domain1, int domain2, std::set< int > &originalNodes, std::map< int, std::map< int, int > > &nodeDomains, std::map< int, std::map< long, int > > &nodeQuadDomains) |
double | GetBallDiameter (vtkIdType vtkID) const |
Returns diameter of a ball element. More... | |
SMDS_Downward * | getDownArray (unsigned char vtkType) |
vtkCellLinks * | GetLinks () |
virtual VTK_MTIME_TYPE | GetMTime () |
int | GetNeighbors (int *neighborsVtkIds, int *downIds, unsigned char *downTypes, int vtkId, bool getSkin=false) |
void | GetNodeIds (std::set< int > &nodeSet, int downId, unsigned char downType) |
int | getOrderedNodesOfFace (int vtkVolId, int &dim, std::vector< vtkIdType > &orderedNodes) |
int | GetParentVolumes (int *volVtkIds, int downId, unsigned char downType) |
int | GetParentVolumes (int *volVtkIds, int vtkId) |
virtual vtkPoints * | GetPoints () |
int | InsertNextLinkedCell (int type, int npts, vtkIdType *pts) |
void | ModifyCellNodes (int vtkVolId, std::map< int, int > localClonedNodeIds) |
void | SetBallDiameter (vtkIdType vtkID, double diameter) |
Sets diameter of a ball element. More... | |
void | setCellIdToDownId (int vtkCellId, int downId) |
void | setSMDS_mesh (SMDS_Mesh *mesh) |
Static Public Member Functions | |
static SMDS_UnstructuredGrid * | New () |
Protected Member Functions | |
void | copyBloc (vtkUnsignedCharArray *newTypes, std::vector< int > &idCellsOldToNew, std::vector< int > &idNodesOldToNew, vtkCellArray *newConnectivity, vtkIdTypeArray *newLocations, vtkIdType *pointsCell, int &alreadyCopied, int start, int end) |
void | copyNodes (vtkPoints *newPoints, std::vector< int > &idNodesOldToNew, int &alreadyCopied, int start, int end) |
SMDS_UnstructuredGrid () | |
~SMDS_UnstructuredGrid () | |
|
protected |
Referenced by New().
|
protected |
void SMDS_UnstructuredGrid::AllocateDiameters | ( | vtkIdType | MaxVtkID | ) |
Allocates data array for ball diameters.
MaxVtkID | - max ID of a ball element |
References SetBallDiameter().
Referenced by DriverMED_R_SMESHDS_Mesh::Perform().
void SMDS_UnstructuredGrid::BuildDownwardConnectivity | ( | bool | withEdges | ) |
Build downward connectivity: to do only when needed because heavy memory load. Downward connectivity is no more valid if vtkUnstructuredGrid is modified.
References CleanDownwardConnectivity(), SMDS_Down2D::computeEdgesWithNodes(), SMDS_Down1D::computeFaces(), SMDS_Down3D::computeFacesWithNodes(), SMDS_Down2D::computeVolumeIds(), SMDS_Down2D::computeVolumeIdsFromNodesFace(), SMDS_Down1D::computeVtkCells(), ListElemByNodesType::elems, SMDS_Down2D::FindEdgeByNodes(), SMDS_Down3D::FindFaceByNodes(), SMDS_Downward::getCellDimension(), SMDS_Downward::getMaxId(), ListElemByNodesType::nbElems, SMDS_MeshInfo::NbHexas(), SMDS_MeshInfo::NbHexPrisms(), ElemByNodesType::nbNodes, SMDS_MeshInfo::NbPrisms(), SMDS_MeshInfo::NbPyramids(), SMDS_MeshInfo::NbTetras(), ElemByNodesType::nodeIds, SMDS_Down1D::setNodes(), SMDS_Down2D::setTempNodes(), counters::stats(), and ElemByNodesType::vtkType.
Referenced by SMESHDS_Mesh::BuildDownWardConnectivity().
void SMDS_UnstructuredGrid::BuildLinks | ( | ) |
References GetLinks(), and SMDS_CellLinks::New().
Referenced by SMDS_Mesh::Clear(), compactGrid(), and SMDS_Mesh::SMDS_Mesh().
Referenced by GetParentVolumes().
void SMDS_UnstructuredGrid::CleanDownwardConnectivity | ( | ) |
Referenced by BuildDownwardConnectivity(), and SMESHDS_Mesh::CleanDownWardConnectivity().
void SMDS_UnstructuredGrid::compactGrid | ( | std::vector< int > & | idNodesOldToNew, |
int | newNodeSize, | ||
std::vector< int > & | idCellsOldToNew, | ||
int | newCellSize | ||
) |
References BuildLinks(), copyBloc(), and copyNodes().
Referenced by SMESHDS_Mesh::compactMesh().
|
protected |
Referenced by compactGrid().
|
protected |
Referenced by compactGrid().
SMDS_MeshCell * SMDS_UnstructuredGrid::extrudeVolumeFromFace | ( | int | vtkVolId, |
int | domain1, | ||
int | domain2, | ||
std::set< int > & | originalNodes, | ||
std::map< int, std::map< int, int > > & | nodeDomains, | ||
std::map< int, std::map< long, int > > & | nodeQuadDomains | ||
) |
Create a volume (prism or hexahedron) by duplication of a face. Designed for use in creation of flat elements separating volume domains. A face separating two domains is shared by two volume cells. All the nodes are already created (for the two faces). Each original Node is associated to corresponding nodes in the domains. Some nodes may be duplicated for more than two domains, when domain separations intersect. In that case, even some of the nodes to use for the original face may be changed.
vtkVolId | vtk id of a volume containing the face, to get an orientation for the face. |
domain1 | domain of the original face |
domain2 | domain of the duplicated face |
originalNodes | the vtk node ids of the original face |
nodeDomains | map(original id --> map(domain --> duplicated node id)) |
References getOrderedNodesOfFace(), and SMDS_MeshElement::getVtkId().
double SMDS_UnstructuredGrid::GetBallDiameter | ( | vtkIdType | vtkID | ) | const |
Returns diameter of a ball element.
vtkID | - vtk id of the ball element |
SMDS_Downward * SMDS_UnstructuredGrid::getDownArray | ( | unsigned char | vtkType | ) |
vtkCellLinks * SMDS_UnstructuredGrid::GetLinks | ( | ) |
Referenced by BuildLinks(), and InsertNextLinkedCell().
|
virtual |
int SMDS_UnstructuredGrid::GetNeighbors | ( | int * | neighborsVtkIds, |
int * | downIds, | ||
unsigned char * | downTypes, | ||
int | vtkId, | ||
bool | getSkin = false |
||
) |
Get the neighbors of a cell. Only the neighbors having the dimension of the cell are taken into account (neighbors of a volume are the volumes sharing a face with this volume, neighbors of a face are the faces sharing an edge with this face...).
neighborsVtkIds | vector of neighbors vtk id's to fill (reserve enough space). |
downIds | downward id's of cells of dimension n-1, to fill (reserve enough space). |
downTypes | vtk types of cells of dimension n-1, to fill (reserve enough space). |
vtkId | the vtk id of the cell |
References SMDS_Downward::getCellDimension().
void SMDS_UnstructuredGrid::GetNodeIds | ( | std::set< int > & | nodeSet, |
int | downId, | ||
unsigned char | downType | ||
) |
get the node id's of a cell. The cell is defined by it's downward connectivity id and type.
nodeSet | set of of vtk node id's to fill. |
downId | downward connectivity id of the cell. |
downType | type of cell. |
int SMDS_UnstructuredGrid::getOrderedNodesOfFace | ( | int | vtkVolId, |
int & | dim, | ||
std::vector< vtkIdType > & | orderedNodes | ||
) |
reorder the nodes of a face
vtkVolId | vtk id of a volume containing the face, to get an orientation for the face. |
orderedNodes | list of nodes to reorder (in out) |
References SMDS_Downward::getCellDimension(), and SMDS_Downward::getOrderedNodesOfFace().
Referenced by extrudeVolumeFromFace().
get the volumes containing a face or an edge of the downward structure The edge or face does not necessary belong to the vtkUnstructuredGrid
volVtkIds | vector of parent volume ids to fill (reserve enough space!) |
downId | id in the downward structure |
downType | type of cell |
References SMDS_Downward::getCellDimension().
get the volumes containing a face or an edge of the grid The edge or face belongs to the vtkUnstructuredGrid
volVtkIds | vector of parent volume ids to fill (reserve enough space!) |
vtkId | vtk id of the face or edge |
References CellIdToDownId(), and SMDS_Downward::getCellDimension().
|
virtual |
Referenced by SMDS_Mesh::adjustStructure(), and SMDS_Mesh::updateBoundingBox().
References GetLinks().
void SMDS_UnstructuredGrid::ModifyCellNodes | ( | int | vtkVolId, |
std::map< int, int > | localClonedNodeIds | ||
) |
change some nodes in cell without modifying type or internal connectivity. Nodes inverse connectivity is maintained up to date.
vtkVolId | vtk id of the cell |
localClonedNodeIds | map old node id to new node id. |
Referenced by SMESHDS_Mesh::ModifyCellNodes().
|
static |
References SMDS_UnstructuredGrid().
Referenced by SMDS_Mesh::SMDS_Mesh().
void SMDS_UnstructuredGrid::SetBallDiameter | ( | vtkIdType | vtkID, |
double | diameter | ||
) |
Sets diameter of a ball element.
vtkID | - vtk id of the ball element |
diameter | - diameter of the ball element |
Referenced by AllocateDiameters().
void SMDS_UnstructuredGrid::setSMDS_mesh | ( | SMDS_Mesh * | mesh | ) |
Referenced by SMDS_Mesh::SMDS_Mesh().