SMDS_UnstructuredGrid Class Reference

#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_MeshCellextrudeVolumeFromFace (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_DownwardgetDownArray (unsigned char vtkType)
 
vtkCellLinksGetLinks ()
 
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_UnstructuredGridNew ()
 

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()

SMDS_UnstructuredGrid::SMDS_UnstructuredGrid ( )
protected

Referenced by New().

◆ ~SMDS_UnstructuredGrid()

SMDS_UnstructuredGrid::~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().

Referenced by DriverMED_R_SMESHDS_Mesh::Perform().

◆ BuildDownwardConnectivity()

◆ BuildLinks()

void SMDS_UnstructuredGrid::BuildLinks ( )

◆ CellIdToDownId()

int SMDS_UnstructuredGrid::CellIdToDownId ( int  vtkCellId)

Referenced by GetParentVolumes().

◆ CleanDownwardConnectivity()

void SMDS_UnstructuredGrid::CleanDownwardConnectivity ( )

◆ compactGrid()

void SMDS_UnstructuredGrid::compactGrid ( std::vector< int > &  idNodesOldToNew,
int  newNodeSize,
std::vector< int > &  idCellsOldToNew,
int  newCellSize 
)

◆ copyBloc()

void SMDS_UnstructuredGrid::copyBloc ( vtkUnsignedCharArray *  newTypes,
std::vector< int > &  idCellsOldToNew,
std::vector< int > &  idNodesOldToNew,
vtkCellArray *  newConnectivity,
vtkIdTypeArray *  newLocations,
vtkIdType *  pointsCell,
int alreadyCopied,
int  start,
int  end 
)
protected

Referenced by compactGrid().

◆ copyNodes()

void SMDS_UnstructuredGrid::copyNodes ( vtkPoints *  newPoints,
std::vector< int > &  idNodesOldToNew,
int alreadyCopied,
int  start,
int  end 
)
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
vtkVolIdvtk id of a volume containing the face, to get an orientation for the face.
domain1domain of the original face
domain2domain of the duplicated face
originalNodesthe vtk node ids of the original face
nodeDomainsmap(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 ( )

Referenced by BuildLinks(), and InsertNextLinkedCell().

◆ GetMTime()

VTK_MTIME_TYPE SMDS_UnstructuredGrid::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
neighborsVtkIdsvector of neighbors vtk id's to fill (reserve enough space).
downIdsdownward id's of cells of dimension n-1, to fill (reserve enough space).
downTypesvtk types of cells of dimension n-1, to fill (reserve enough space).
vtkIdthe 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
nodeSetset of of vtk node id's to fill.
downIddownward connectivity id of the cell.
downTypetype of cell.

◆ getOrderedNodesOfFace()

int SMDS_UnstructuredGrid::getOrderedNodesOfFace ( int  vtkVolId,
int dim,
std::vector< vtkIdType > &  orderedNodes 
)

reorder the nodes of a face

Parameters
vtkVolIdvtk id of a volume containing the face, to get an orientation for the face.
orderedNodeslist 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
volVtkIdsvector of parent volume ids to fill (reserve enough space!)
downIdid in the downward structure
downTypetype 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
volVtkIdsvector of parent volume ids to fill (reserve enough space!)
vtkIdvtk id of the face or edge

References CellIdToDownId(), and SMDS_Downward::getCellDimension().

◆ GetPoints()

vtkPoints * SMDS_UnstructuredGrid::GetPoints ( )
virtual

◆ InsertNextLinkedCell()

int SMDS_UnstructuredGrid::InsertNextLinkedCell ( int  type,
int  npts,
vtkIdType *  pts 
)

References GetLinks().

◆ 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
vtkVolIdvtk id of the cell
localClonedNodeIdsmap old node id to new node id.

Referenced by SMESHDS_Mesh::ModifyCellNodes().

◆ New()

SMDS_UnstructuredGrid * SMDS_UnstructuredGrid::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: