Version: 9.12.0
SMDS_DownQuadTriangle Class Reference

#include <SMDS_Downward.hxx>

Inheritance diagram for SMDS_DownQuadTriangle:

Public Member Functions

virtual int getNumberOfUpCells (int cellId)
 
virtual const int * getUpCells (int cellId)
 
virtual const unsigned char * getUpTypes (int cellId)
 
virtual void getNodeIds (int cellId, std::set< int > &nodeSet)
 
virtual int getNumberOfDownCells (int cellId)
 Get the number of downward entities associated to a cell (always the same for a given vtk type of cell) More...
 
virtual const int * getDownCells (int cellId)
 get a pointer on the downward entities id's associated to a cell. More...
 
virtual const unsigned char * getDownTypes (int cellId)
 get a list of vtk cell types associated to downward entities of a given cell, in the same order than the downward entities id's list ( More...
 
virtual int getNodes (int, int *)
 
virtual void getOrderedNodesOfFace (int, std::vector< vtkIdType > &)
 
int getVtkCellId (int cellId)
 
int getMaxId ()
 

Static Public Member Functions

static int getCellDimension (unsigned char cellType)
 get the dimension of a cell (1,2,3 for 1D, 2D 3D) given the vtk cell type More...
 

Protected Member Functions

 SMDS_DownQuadTriangle (SMDS_UnstructuredGrid *grid)
 
 ~SMDS_DownQuadTriangle ()
 
virtual void computeEdgesWithNodes (int cellId, ListElemByNodesType &edgesWithNodes)
 
virtual void addDownCell (int cellId, int lowCellId, unsigned char aType)
 Id's are downward connectivity id's. More...
 
virtual void allocate (int nbElems)
 Resize the downward connectivity storage vector if needed. More...
 
virtual void compactStorage ()
 
virtual void addUpCell (int cellId, int upCellId, unsigned char aType)
 Id's are downward connectivity id's. More...
 
virtual int getNodeSet (int cellId, int *nodeSet)
 
int computeVolumeIds (int cellId, int *ids)
 Find in vtkUnstructuredGrid the volumes containing a face already stored in vtkUnstructuredGrid. More...
 
int computeVolumeIds (ElemByNodesType &faceByNodes, int *ids)
 Find in vtkUnstructuredGrid the volumes containing a face described by it's nodes Search the volumes containing a face, to store the info in SMDS_Down2D for later uses with SMDS_Down2D::getUpCells and SMDS_Down2D::getUpTypes. More...
 
int computeVolumeIdsFromNodesFace (int *nodes, int nbNodes, int *ids)
 Find in vtkUnstructuredGrid the volumes containing a face described by it's nodes Search the volumes containing a face, to store the info in SMDS_Down2D for later uses with SMDS_Down2D::getUpCells and SMDS_Down2D::getUpTypes. More...
 
void setTempNodes (int cellId, int vtkId)
 
void setTempNodes (int cellId, ElemByNodesType &faceByNodes)
 
bool isInFace (int cellId, int *pts, int npts)
 Find if all the nodes belongs to the face. More...
 
int FindEdgeByNodes (int cellId, ElemByNodesType &edgeByNodes)
 
int addCell (int vtkId=-1)
 Give or create an entry for downward connectivity structure relative to a cell. More...
 
virtual void initCell (int cellId)
 generic method do nothing. More...
 

Protected Attributes

std::vector< int > _upCellIds
 2 volumes max. More...
 
std::vector< unsigned char > _upCellTypes
 2 volume types per face More...
 
std::vector< int > _tempNodes
 temporary storage of nodes, until downward connectivity completion More...
 
int _nbNodes
 number of nodes in a face More...
 
SMDS_UnstructuredGrid_grid
 
int _maxId
 
int _nbDownCells
 the same number for all cells of a derived class More...
 
std::vector< int > _cellIds
 growing size: all the down cell id's, size = _maxId * _nbDownCells More...
 
std::vector< int > _vtkCellIds
 growing size: size = _maxId, either vtkId or -1 More...
 
std::vector< unsigned char > _cellTypes
 fixed size: the same vector for all cells of a derived class More...
 

Static Protected Attributes

static std::vector< int > _cellDimension
 conversion table: type --> dimension More...
 

Friends

class SMDS_UnstructuredGrid
 

Constructor & Destructor Documentation

◆ SMDS_DownQuadTriangle()

SMDS_DownQuadTriangle::SMDS_DownQuadTriangle ( SMDS_UnstructuredGrid grid)
protected

◆ ~SMDS_DownQuadTriangle()

SMDS_DownQuadTriangle::~SMDS_DownQuadTriangle ( )
protected

Member Function Documentation

◆ addCell()

int SMDS_Downward::addCell ( int  vtkId = -1)
protectedinherited

Give or create an entry for downward connectivity structure relative to a cell.

If the entry already exists, just return its id, otherwise, create it. The internal storage memory is allocated if needed. The SMDS_UnstructuredGrid::_cellIdToDownId vector is completed for vtkUnstructuredGrid cells.

Parameters
vtkIdfor a vtkUnstructuredGrid cell or -1 (default) for a created downward cell.
Returns
the rank in downward[vtkType] structure.

References SMDS_Downward::_grid, SMDS_Downward::_maxId, SMDS_Downward::_vtkCellIds, SMDS_Downward::allocate(), SMDS_UnstructuredGrid::CellIdToDownId(), SMDS_Downward::initCell(), and SMDS_UnstructuredGrid::setCellIdToDownId().

◆ addDownCell()

void SMDS_DownQuadTriangle::addDownCell ( int  cellId,
int  lowCellId,
unsigned char  aType 
)
protectedvirtual

Id's are downward connectivity id's.

Reimplemented from SMDS_Downward.

References SMDS_Downward::_cellIds, and SMDS_Downward::_nbDownCells.

◆ addUpCell()

void SMDS_Down2D::addUpCell ( int  cellId,
int  upCellId,
unsigned char  aType 
)
protectedvirtualinherited

Id's are downward connectivity id's.

add a downward entity of dimension n+1 to a given cell.

Actual implementation is done in derived methods.

Parameters
cellIdindex of the children cell (dimension n) in the downward structure relative to a vtk cell type.
upCellIdindex of the parent cell to add (dimension n+1)
aTypevtk cell type of the cell to add (needed to find the SMDS_Downward structure containing the cell to add).

Reimplemented from SMDS_Downward.

References SMDS_Down2D::_upCellIds, and SMDS_Down2D::_upCellTypes.

◆ allocate()

void SMDS_Down2D::allocate ( int  nbElems)
protectedvirtualinherited

Resize the downward connectivity storage vector if needed.

Parameters
nbElemstotal number of elements of the same type required

Implements SMDS_Downward.

References SMDS_Downward::_cellIds, SMDS_Downward::_nbDownCells, SMDS_Down2D::_nbNodes, SMDS_Down2D::_tempNodes, SMDS_Down2D::_upCellIds, SMDS_Down2D::_upCellTypes, SMDS_Downward::_vtkCellIds, and SMDS_Mesh::chunkSize.

◆ compactStorage()

◆ computeEdgesWithNodes()

void SMDS_DownQuadTriangle::computeEdgesWithNodes ( int  cellId,
ListElemByNodesType edgesWithNodes 
)
protectedvirtual

◆ computeVolumeIds() [1/2]

int SMDS_Down2D::computeVolumeIds ( ElemByNodesType faceByNodes,
int *  ids 
)
protectedinherited

Find in vtkUnstructuredGrid the volumes containing a face described by it's nodes Search the volumes containing a face, to store the info in SMDS_Down2D for later uses with SMDS_Down2D::getUpCells and SMDS_Down2D::getUpTypes.

A face belongs to 0, 1 or 2 volumes, identified by their id in vtkUnstructuredGrid.

Parameters
faceByNodes
idsa couple of vtkId, initialized at -1 (no parent volume)
Returns
number of volumes (0, 1 or 2)

References SMDS_Down2D::computeVolumeIdsFromNodesFace(), ElemByNodesType::nbNodes, and ElemByNodesType::nodeIds.

◆ computeVolumeIds() [2/2]

int SMDS_Down2D::computeVolumeIds ( int  cellId,
int *  ids 
)
protectedinherited

Find in vtkUnstructuredGrid the volumes containing a face already stored in vtkUnstructuredGrid.

Search the volumes containing a face, to store the info in SMDS_Down2D for later uses with SMDS_Down2D::getUpCells and SMDS_Down2D::getUpTypes. A face belongs to 0, 1 or 2 volumes, identified by their id in vtkUnstructuredGrid.

Parameters
cellIdthe face cell id in vkUnstructuredGrid
idsa couple of vtkId, initialized at -1 (no parent volume)
Returns
number of volumes (0, 1 or 2)

References SMDS_Downward::_grid, and SMDS_Down2D::computeVolumeIdsFromNodesFace().

Referenced by SMDS_UnstructuredGrid::BuildDownwardConnectivity().

◆ computeVolumeIdsFromNodesFace()

int SMDS_Down2D::computeVolumeIdsFromNodesFace ( int *  pts,
int  npts,
int *  ids 
)
protectedinherited

Find in vtkUnstructuredGrid the volumes containing a face described by it's nodes Search the volumes containing a face, to store the info in SMDS_Down2D for later uses with SMDS_Down2D::getUpCells and SMDS_Down2D::getUpTypes.

A face belongs to 0, 1 or 2 volumes, identified by their id in vtkUnstructuredGrid.

Parameters
ptsarray of vtk node id's
nptsnumber of nodes
ids
Returns
number of volumes (0, 1 or 2)

References SMDS_Downward::_grid, SMDS_Downward::getCellDimension(), and SMDS_UnstructuredGrid::GetLinks().

Referenced by SMDS_UnstructuredGrid::BuildDownwardConnectivity(), and SMDS_Down2D::computeVolumeIds().

◆ FindEdgeByNodes()

◆ getCellDimension()

int SMDS_Downward::getCellDimension ( unsigned char  cellType)
staticinherited

◆ getDownCells()

const int * SMDS_Downward::getDownCells ( int  cellId)
virtualinherited

get a pointer on the downward entities id's associated to a cell.

See also
SMDS_Downward::getNumberOfDownCells for the number of downward entities.
SMDS_Downward::getDownTypes for the vtk cell types associated to the downward entities.
Parameters
cellIdindex of the cell in the downward structure relative to a given vtk cell type.
Returns
table of downward entities id's.

References SMDS_Downward::_cellIds, and SMDS_Downward::_nbDownCells.

Referenced by SMDS_Down1D::computeFaces(), SMESH_MeshEditor::CreateHoleSkin(), and SMESH_MeshEditor::DoubleNodesOnGroupBoundaries().

◆ getDownTypes()

const unsigned char * SMDS_Downward::getDownTypes ( int  cellId)
virtualinherited

get a list of vtk cell types associated to downward entities of a given cell, in the same order than the downward entities id's list (

See also
SMDS_Downward::getDownCells).
Parameters
cellIdindex of the cell in the downward structure relative to a vtk cell type.
Returns
table of downward entities types.

References SMDS_Downward::_cellTypes.

Referenced by SMDS_Down1D::computeFaces(), SMESH_MeshEditor::CreateHoleSkin(), and SMESH_MeshEditor::DoubleNodesOnGroupBoundaries().

◆ getMaxId()

int SMDS_Downward::getMaxId ( )
inherited

◆ getNodeIds()

void SMDS_Down2D::getNodeIds ( int  cellId,
std::set< int > &  nodeSet 
)
virtualinherited

◆ getNodes()

virtual int SMDS_Downward::getNodes ( int  ,
int *   
)
virtualinherited

◆ getNodeSet()

int SMDS_Down2D::getNodeSet ( int  cellId,
int *  nodeSet 
)
protectedvirtualinherited

Reimplemented from SMDS_Downward.

References SMDS_Down2D::_nbNodes, and SMDS_Down2D::_tempNodes.

◆ getNumberOfDownCells()

int SMDS_Downward::getNumberOfDownCells ( int  cellId)
virtualinherited

Get the number of downward entities associated to a cell (always the same for a given vtk type of cell)

Parameters
cellIdnot used here.
Returns

References SMDS_Downward::_nbDownCells.

Referenced by SMDS_Down1D::computeFaces(), SMESH_MeshEditor::CreateHoleSkin(), and SMESH_MeshEditor::DoubleNodesOnGroupBoundaries().

◆ getNumberOfUpCells()

int SMDS_Down2D::getNumberOfUpCells ( int  cellId)
virtualinherited

Implements SMDS_Downward.

References SMDS_Down2D::_upCellIds.

◆ getOrderedNodesOfFace()

virtual void SMDS_Downward::getOrderedNodesOfFace ( int  ,
std::vector< vtkIdType > &   
)
virtualinherited

◆ getUpCells()

const int * SMDS_Down2D::getUpCells ( int  cellId)
virtualinherited

Implements SMDS_Downward.

References SMDS_Down2D::_upCellIds.

◆ getUpTypes()

const unsigned char * SMDS_Down2D::getUpTypes ( int  cellId)
virtualinherited

Implements SMDS_Downward.

References SMDS_Down2D::_upCellTypes.

◆ getVtkCellId()

int SMDS_Downward::getVtkCellId ( int  cellId)
inherited

◆ initCell()

void SMDS_Downward::initCell ( int  cellId)
protectedvirtualinherited

generic method do nothing.

see derived methods

Parameters
cellId

Reimplemented in SMDS_Down1D.

Referenced by SMDS_Downward::addCell().

◆ isInFace()

bool SMDS_Down2D::isInFace ( int  cellId,
int *  pts,
int  npts 
)
protectedinherited

Find if all the nodes belongs to the face.

Parameters
cellIdthe face cell Id
nodeSetset of node id's to be found in the face list of nodes
Returns

References SMDS_Down2D::_nbNodes, and SMDS_Down2D::_tempNodes.

Referenced by SMDS_Down1D::computeFaces().

◆ setTempNodes() [1/2]

void SMDS_Down2D::setTempNodes ( int  cellId,
ElemByNodesType faceByNodes 
)
protectedinherited

◆ setTempNodes() [2/2]

void SMDS_Down2D::setTempNodes ( int  cellId,
int  vtkId 
)
protectedinherited

Friends And Related Function Documentation

◆ SMDS_UnstructuredGrid

friend class SMDS_UnstructuredGrid
friend

Field Documentation

◆ _cellDimension

vector< int > SMDS_Downward::_cellDimension
staticprotectedinherited

conversion table: type --> dimension

Referenced by SMDS_Downward::SMDS_Downward().

◆ _cellIds

◆ _cellTypes

◆ _grid

◆ _maxId

◆ _nbDownCells

◆ _nbNodes

◆ _tempNodes

◆ _upCellIds

std::vector<int> SMDS_Down2D::_upCellIds
protectedinherited

◆ _upCellTypes

std::vector<unsigned char> SMDS_Down2D::_upCellTypes
protectedinherited

◆ _vtkCellIds