#include <SMDS_Downward.hxx>
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 cellId, int *nodevec) |
virtual void | getOrderedNodesOfFace (int cellId, std::vector< vtkIdType > &orderedNodes) |
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_Down2D (SMDS_UnstructuredGrid *grid, int nbDownCells) | |
~SMDS_Down2D () | |
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 void | computeEdgesWithNodes (int cellId, ListElemByNodesType &facesWithNodes)=0 |
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... | |
virtual void | addDownCell (int cellId, int lowCellId, unsigned char aType) |
Id's are downward connectivity id's. 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 |
class | SMDS_Down1D |
|
protected |
References _nbNodes, _tempNodes, _upCellIds, and _upCellTypes.
|
protected |
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.
vtkId | for a vtkUnstructuredGrid cell or -1 (default) for a created downward cell. |
References SMDS_Downward::_grid, SMDS_Downward::_maxId, SMDS_Downward::_vtkCellIds, SMDS_Downward::allocate(), SMDS_UnstructuredGrid::CellIdToDownId(), SMDS_Downward::initCell(), and SMDS_UnstructuredGrid::setCellIdToDownId().
|
protectedvirtualinherited |
Id's are downward connectivity id's.
add a downward entity of dimension n-1 (cell or node) to a given cell.
Actual implementation is done in derived methods.
cellId | index of the parent cell (dimension n) in the downward structure relative to a vtk cell type. |
lowCellId | index of the children cell to add (dimension n-1) |
aType | vtk cell type of the cell to add (needed to find the SMDS_Downward structure containing the cell to add). |
Reimplemented in SMDS_DownQuadHexa, SMDS_DownHexa, SMDS_DownQuadPenta, SMDS_DownPenta, SMDS_DownQuadPyramid, SMDS_DownPyramid, SMDS_DownQuadTetra, SMDS_DownTetra, SMDS_DownQuadQuadrangle, SMDS_DownQuadrangle, SMDS_DownQuadTriangle, and SMDS_DownTriangle.
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.
cellId | index of the children cell (dimension n) in the downward structure relative to a vtk cell type. |
upCellId | index of the parent cell to add (dimension n+1) |
aType | vtk cell type of the cell to add (needed to find the SMDS_Downward structure containing the cell to add). |
Reimplemented from SMDS_Downward.
References _upCellIds, and _upCellTypes.
|
protectedvirtual |
Resize the downward connectivity storage vector if needed.
nbElems | total number of elements of the same type required |
Implements SMDS_Downward.
References SMDS_Downward::_cellIds, SMDS_Downward::_nbDownCells, _nbNodes, _tempNodes, _upCellIds, _upCellTypes, SMDS_Downward::_vtkCellIds, and SMDS_Mesh::chunkSize.
|
protectedvirtual |
Implements SMDS_Downward.
References SMDS_Downward::_cellIds, SMDS_Downward::_maxId, SMDS_Downward::_nbDownCells, _tempNodes, _upCellIds, _upCellTypes, and SMDS_Downward::_vtkCellIds.
|
protectedpure virtual |
Implemented in SMDS_DownQuadQuadrangle, SMDS_DownQuadrangle, SMDS_DownQuadTriangle, and SMDS_DownTriangle.
Referenced by SMDS_UnstructuredGrid::BuildDownwardConnectivity().
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.
cellId | the face cell id in vkUnstructuredGrid |
ids | a couple of vtkId, initialized at -1 (no parent volume) |
References SMDS_Downward::_grid, and computeVolumeIdsFromNodesFace().
Referenced by SMDS_UnstructuredGrid::BuildDownwardConnectivity().
|
protected |
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.
faceByNodes | |
ids | a couple of vtkId, initialized at -1 (no parent volume) |
References computeVolumeIdsFromNodesFace(), ElemByNodesType::nbNodes, and ElemByNodesType::nodeIds.
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.
pts | array of vtk node id's |
npts | number of nodes |
ids |
References SMDS_Downward::_grid, SMDS_Downward::getCellDimension(), and SMDS_UnstructuredGrid::GetLinks().
Referenced by SMDS_UnstructuredGrid::BuildDownwardConnectivity(), and computeVolumeIds().
|
protected |
References SMDS_Downward::_cellIds, SMDS_Downward::_cellTypes, SMDS_Downward::_grid, SMDS_Downward::_nbDownCells, SMDS_UnstructuredGrid::getDownArray(), SMDS_Downward::getNodeSet(), ElemByNodesType::nodeIds, and ElemByNodesType::vtkType.
Referenced by SMDS_UnstructuredGrid::BuildDownwardConnectivity().
|
staticinherited |
get the dimension of a cell (1,2,3 for 1D, 2D 3D) given the vtk cell type
cellType | vtk cell type |
References VTK_MAXTYPE.
Referenced by SMDS_UnstructuredGrid::BuildDownwardConnectivity(), SMDS_Down1D::computeFaces(), computeVolumeIdsFromNodesFace(), SMDS_Down1D::computeVtkCells(), SMESH_MeshEditor::CreateHoleSkin(), SMDS_UnstructuredGrid::GetNeighbors(), SMDS_UnstructuredGrid::getOrderedNodesOfFace(), SMDS_UnstructuredGrid::GetParentVolumes(), and SMDS_Downward::SMDS_Downward().
get a pointer on the downward entities id's associated to a cell.
cellId | index of the cell in the downward structure relative to a given vtk cell type. |
References SMDS_Downward::_cellIds, and SMDS_Downward::_nbDownCells.
Referenced by SMDS_Down1D::computeFaces(), SMESH_MeshEditor::CreateHoleSkin(), and SMESH_MeshEditor::DoubleNodesOnGroupBoundaries().
|
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 (
cellId | index of the cell in the downward structure relative to a vtk cell type. |
References SMDS_Downward::_cellTypes.
Referenced by SMDS_Down1D::computeFaces(), SMESH_MeshEditor::CreateHoleSkin(), and SMESH_MeshEditor::DoubleNodesOnGroupBoundaries().
|
inherited |
References SMDS_Downward::_maxId.
Referenced by SMDS_UnstructuredGrid::BuildDownwardConnectivity().
Reimplemented in SMDS_Down1D.
Referenced by SMESH_MeshEditor::CreateHoleSkin(), and SMESH_MeshEditor::DoubleNodesOnGroupBoundaries().
Reimplemented from SMDS_Downward.
References _nbNodes, and _tempNodes.
Get the number of downward entities associated to a cell (always the same for a given vtk type of cell)
cellId | not used here. |
References SMDS_Downward::_nbDownCells.
Referenced by SMDS_Down1D::computeFaces(), SMESH_MeshEditor::CreateHoleSkin(), and SMESH_MeshEditor::DoubleNodesOnGroupBoundaries().
Implements SMDS_Downward.
References _upCellIds.
|
virtualinherited |
Reimplemented in SMDS_DownQuadHexa, SMDS_DownHexa, SMDS_DownQuadPenta, SMDS_DownPenta, SMDS_DownQuadPyramid, SMDS_DownPyramid, SMDS_DownQuadTetra, and SMDS_DownTetra.
Referenced by SMDS_UnstructuredGrid::getOrderedNodesOfFace().
Implements SMDS_Downward.
References _upCellIds.
|
virtual |
Implements SMDS_Downward.
References _upCellTypes.
References SMDS_Downward::_vtkCellIds.
Referenced by SMESH_MeshEditor::CreateHoleSkin().
|
protectedvirtualinherited |
generic method do nothing.
see derived methods
cellId |
Reimplemented in SMDS_Down1D.
Referenced by SMDS_Downward::addCell().
Find if all the nodes belongs to the face.
cellId | the face cell Id |
nodeSet | set of node id's to be found in the face list of nodes |
References _nbNodes, and _tempNodes.
Referenced by SMDS_Down1D::computeFaces().
References SMDS_Downward::_grid, _nbNodes, and _tempNodes.
Referenced by SMDS_UnstructuredGrid::BuildDownwardConnectivity().
|
protected |
References _nbNodes, _tempNodes, ElemByNodesType::nbNodes, and ElemByNodesType::nodeIds.
|
friend |
|
friend |
|
staticprotectedinherited |
conversion table: type –> dimension
Referenced by SMDS_Downward::SMDS_Downward().
|
protectedinherited |
growing size: all the down cell id's, size = _maxId * _nbDownCells
Referenced by SMDS_DownTriangle::addDownCell(), SMDS_DownQuadTriangle::addDownCell(), SMDS_DownQuadrangle::addDownCell(), SMDS_DownQuadQuadrangle::addDownCell(), SMDS_DownTetra::addDownCell(), SMDS_DownQuadTetra::addDownCell(), SMDS_DownPyramid::addDownCell(), SMDS_DownQuadPyramid::addDownCell(), SMDS_DownPenta::addDownCell(), SMDS_DownQuadPenta::addDownCell(), SMDS_DownHexa::addDownCell(), SMDS_DownQuadHexa::addDownCell(), SMDS_Down1D::allocate(), allocate(), SMDS_Down3D::allocate(), SMDS_Down1D::compactStorage(), compactStorage(), SMDS_Down1D::computeFaces(), SMDS_Down1D::computeVtkCells(), FindEdgeByNodes(), SMDS_Down3D::FindFaceByNodes(), SMDS_Downward::getDownCells(), SMDS_Down1D::getNodeIds(), getNodeIds(), SMDS_Down1D::getNodeSet(), SMDS_Down1D::setNodes(), and SMDS_Downward::SMDS_Downward().
|
protectedinherited |
fixed size: the same vector for all cells of a derived class
Referenced by FindEdgeByNodes(), SMDS_Down3D::FindFaceByNodes(), SMDS_Downward::getDownTypes(), getNodeIds(), SMDS_DownEdge::SMDS_DownEdge(), SMDS_DownHexa::SMDS_DownHexa(), SMDS_DownPenta::SMDS_DownPenta(), SMDS_DownPyramid::SMDS_DownPyramid(), SMDS_DownQuadEdge::SMDS_DownQuadEdge(), SMDS_DownQuadHexa::SMDS_DownQuadHexa(), SMDS_DownQuadPenta::SMDS_DownQuadPenta(), SMDS_DownQuadPyramid::SMDS_DownQuadPyramid(), SMDS_DownQuadQuadrangle::SMDS_DownQuadQuadrangle(), SMDS_DownQuadrangle::SMDS_DownQuadrangle(), SMDS_DownQuadTetra::SMDS_DownQuadTetra(), SMDS_DownQuadTriangle::SMDS_DownQuadTriangle(), SMDS_DownTetra::SMDS_DownTetra(), SMDS_DownTriangle::SMDS_DownTriangle(), and SMDS_Downward::SMDS_Downward().
|
protectedinherited |
Referenced by SMDS_Downward::addCell(), SMDS_Down1D::computeFaces(), SMDS_DownTetra::computeFacesWithNodes(), SMDS_DownQuadTetra::computeFacesWithNodes(), SMDS_DownPyramid::computeFacesWithNodes(), SMDS_DownQuadPyramid::computeFacesWithNodes(), SMDS_DownPenta::computeFacesWithNodes(), SMDS_DownQuadPenta::computeFacesWithNodes(), SMDS_DownHexa::computeFacesWithNodes(), SMDS_DownQuadHexa::computeFacesWithNodes(), computeVolumeIds(), computeVolumeIdsFromNodesFace(), SMDS_Down1D::computeVtkCells(), FindEdgeByNodes(), SMDS_Down3D::FindFaceByNodes(), getNodeIds(), SMDS_Down3D::getNodeIds(), SMDS_DownTetra::getOrderedNodesOfFace(), SMDS_DownQuadTetra::getOrderedNodesOfFace(), SMDS_DownPyramid::getOrderedNodesOfFace(), SMDS_DownQuadPyramid::getOrderedNodesOfFace(), SMDS_DownPenta::getOrderedNodesOfFace(), SMDS_DownQuadPenta::getOrderedNodesOfFace(), SMDS_DownHexa::getOrderedNodesOfFace(), SMDS_DownQuadHexa::getOrderedNodesOfFace(), SMDS_Down1D::setNodes(), and setTempNodes().
|
protectedinherited |
|
protectedinherited |
the same number for all cells of a derived class
Referenced by SMDS_DownTriangle::addDownCell(), SMDS_DownQuadTriangle::addDownCell(), SMDS_DownQuadrangle::addDownCell(), SMDS_DownQuadQuadrangle::addDownCell(), SMDS_DownTetra::addDownCell(), SMDS_DownQuadTetra::addDownCell(), SMDS_DownPyramid::addDownCell(), SMDS_DownQuadPyramid::addDownCell(), SMDS_DownPenta::addDownCell(), SMDS_DownQuadPenta::addDownCell(), SMDS_DownHexa::addDownCell(), SMDS_DownQuadHexa::addDownCell(), SMDS_Down1D::allocate(), allocate(), SMDS_Down3D::allocate(), SMDS_Down1D::compactStorage(), compactStorage(), SMDS_Down1D::computeFaces(), SMDS_Down1D::computeVtkCells(), FindEdgeByNodes(), SMDS_Down3D::FindFaceByNodes(), SMDS_Downward::getDownCells(), SMDS_Down1D::getNodeIds(), getNodeIds(), SMDS_Down1D::getNodeSet(), SMDS_Downward::getNumberOfDownCells(), and SMDS_Down1D::setNodes().
|
protected |
number of nodes in a face
Referenced by allocate(), SMDS_DownTriangle::computeEdgesWithNodes(), SMDS_DownQuadTriangle::computeEdgesWithNodes(), SMDS_DownQuadrangle::computeEdgesWithNodes(), SMDS_DownQuadQuadrangle::computeEdgesWithNodes(), getNodeSet(), isInFace(), setTempNodes(), SMDS_Down2D(), SMDS_DownQuadQuadrangle::SMDS_DownQuadQuadrangle(), SMDS_DownQuadrangle::SMDS_DownQuadrangle(), SMDS_DownQuadTriangle::SMDS_DownQuadTriangle(), and SMDS_DownTriangle::SMDS_DownTriangle().
|
protected |
temporary storage of nodes, until downward connectivity completion
Referenced by allocate(), compactStorage(), SMDS_DownTriangle::computeEdgesWithNodes(), SMDS_DownQuadTriangle::computeEdgesWithNodes(), SMDS_DownQuadrangle::computeEdgesWithNodes(), SMDS_DownQuadQuadrangle::computeEdgesWithNodes(), getNodeSet(), isInFace(), setTempNodes(), and SMDS_Down2D().
|
protected |
2 volumes max.
per face
Referenced by addUpCell(), allocate(), compactStorage(), getNumberOfUpCells(), getUpCells(), and SMDS_Down2D().
|
protected |
2 volume types per face
Referenced by addUpCell(), allocate(), compactStorage(), getUpTypes(), and SMDS_Down2D().
|
protectedinherited |
growing size: size = _maxId, either vtkId or -1
Referenced by SMDS_Downward::addCell(), SMDS_Down1D::allocate(), allocate(), SMDS_Down3D::allocate(), SMDS_Down1D::compactStorage(), compactStorage(), SMDS_Down3D::getNodeIds(), SMDS_DownTetra::getOrderedNodesOfFace(), SMDS_DownQuadTetra::getOrderedNodesOfFace(), SMDS_DownPyramid::getOrderedNodesOfFace(), SMDS_DownQuadPyramid::getOrderedNodesOfFace(), SMDS_DownPenta::getOrderedNodesOfFace(), SMDS_DownQuadPenta::getOrderedNodesOfFace(), SMDS_DownHexa::getOrderedNodesOfFace(), SMDS_DownQuadHexa::getOrderedNodesOfFace(), and SMDS_Downward::getVtkCellId().