#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 () | |
Constructor & Destructor Documentation
◆ SMDS_UnstructuredGrid()
|
protected |
Referenced by New().
◆ ~SMDS_UnstructuredGrid()
|
protected |
Member Function Documentation
◆ AllocateDiameters()
void SMDS_UnstructuredGrid::AllocateDiameters | ( | vtkIdType | MaxVtkID | ) |
Allocates data array for ball diameters.
- Parameters
-
MaxVtkID - max ID of a ball element
References SetBallDiameter().
◆ BuildDownwardConnectivity()
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().
◆ BuildLinks()
void SMDS_UnstructuredGrid::BuildLinks | ( | ) |
References SMDS_CellLinks::New().
Referenced by SMDS_Mesh::Clear(), compactGrid(), and SMDS_Mesh::SMDS_Mesh().
◆ CellIdToDownId()
int SMDS_UnstructuredGrid::CellIdToDownId | ( | int | vtkCellId | ) |
Referenced by GetParentVolumes().
◆ CleanDownwardConnectivity()
void SMDS_UnstructuredGrid::CleanDownwardConnectivity | ( | ) |
Referenced by BuildDownwardConnectivity(), and SMESHDS_Mesh::CleanDownWardConnectivity().
◆ compactGrid()
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().
◆ copyBloc()
|
protected |
Referenced by compactGrid().
◆ copyNodes()
|
protected |
Referenced by compactGrid().
◆ extrudeVolumeFromFace()
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.
- Parameters
-
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))
- Returns
- ok if success.
References getOrderedNodesOfFace(), and SMDS_MeshElement::getVtkId().
◆ GetBallDiameter()
double SMDS_UnstructuredGrid::GetBallDiameter | ( | vtkIdType | vtkID | ) | const |
Returns diameter of a ball element.
- Parameters
-
vtkID - vtk id of the ball element
◆ getDownArray()
SMDS_Downward* SMDS_UnstructuredGrid::getDownArray | ( | unsigned char | vtkType | ) |
◆ GetLinks()
vtkCellLinks* SMDS_UnstructuredGrid::GetLinks | ( | ) |
◆ GetMTime()
|
virtual |
◆ GetNeighbors()
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...).
- Parameters
-
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
- Returns
- number of neighbors
References SMDS_Downward::getCellDimension().
◆ GetNodeIds()
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.
- Parameters
-
nodeSet set of of vtk node id's to fill. downId downward connectivity id of the cell. downType type of cell.
◆ getOrderedNodesOfFace()
int SMDS_UnstructuredGrid::getOrderedNodesOfFace | ( | int | vtkVolId, |
int & | dim, | ||
std::vector< vtkIdType > & | orderedNodes | ||
) |
reorder the nodes of a face
- Parameters
-
vtkVolId vtk id of a volume containing the face, to get an orientation for the face. orderedNodes list of nodes to reorder (in out)
- Returns
- size of the list
References SMDS_Downward::getCellDimension(), and SMDS_Downward::getOrderedNodesOfFace().
Referenced by extrudeVolumeFromFace().
◆ GetParentVolumes() [1/2]
int SMDS_UnstructuredGrid::GetParentVolumes | ( | int * | volVtkIds, |
int | downId, | ||
unsigned char | downType | ||
) |
get the volumes containing a face or an edge of the downward structure The edge or face does not necessary belong to the vtkUnstructuredGrid
- Parameters
-
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().
◆ GetParentVolumes() [2/2]
int SMDS_UnstructuredGrid::GetParentVolumes | ( | int * | volVtkIds, |
int | vtkId | ||
) |
get the volumes containing a face or an edge of the grid The edge or face belongs to the vtkUnstructuredGrid
- Parameters
-
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().
◆ GetPoints()
|
virtual |
Referenced by SMDS_Mesh::adjustStructure(), and SMDS_Mesh::updateBoundingBox().
◆ InsertNextLinkedCell()
int SMDS_UnstructuredGrid::InsertNextLinkedCell | ( | int | type, |
int | npts, | ||
vtkIdType * | pts | ||
) |
◆ ModifyCellNodes()
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.
- Parameters
-
vtkVolId vtk id of the cell localClonedNodeIds map old node id to new node id.
Referenced by SMESHDS_Mesh::ModifyCellNodes().
◆ New()
|
static |
References SMDS_UnstructuredGrid().
Referenced by SMDS_Mesh::SMDS_Mesh().
◆ SetBallDiameter()
void SMDS_UnstructuredGrid::SetBallDiameter | ( | vtkIdType | vtkID, |
double | diameter | ||
) |
Sets diameter of a ball element.
- Parameters
-
vtkID - vtk id of the ball element diameter - diameter of the ball element
Referenced by AllocateDiameters().
◆ setCellIdToDownId()
void SMDS_UnstructuredGrid::setCellIdToDownId | ( | int | vtkCellId, |
int | downId | ||
) |
◆ setSMDS_mesh()
void SMDS_UnstructuredGrid::setSMDS_mesh | ( | SMDS_Mesh * | mesh | ) |
Referenced by SMDS_Mesh::SMDS_Mesh().
The documentation for this class was generated from the following files:
- src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx
- src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp