Beispiel #1
0
void FixSTL::createTriangles(const QList<QVector<vtkIdType> > &triangles, vtkUnstructuredGrid *tetra_grid)
{
  QVector<vtkIdType> cells, nodes;
  QVector<int> _nodes;
  getAllCells(cells, tetra_grid);
  getNodesFromCells(cells, nodes, tetra_grid);
  createNodeMapping(nodes, _nodes, tetra_grid);
  QVector<bool> active(nodes.size(),false);
  foreach (QVector<vtkIdType> T, triangles) {
    active[_nodes[T[0]]] = true;
    active[_nodes[T[1]]] = true;
    active[_nodes[T[2]]] = true;
  };
Beispiel #2
0
void Iterator::getCells()
{
  if (!custom_iteration) {
    if (volume_iteration) {
      getAllVolumeCells(cells, m_Grid);
    } else {
      getAllSurfaceCells(cells, m_Grid);
    };
  };
  getNodesFromCells(cells, nodes, m_Grid);
  createCellMapping(cells, _cells, m_Grid);
  createNodeMapping(nodes, _nodes, m_Grid);
  createNodeToCell(cells, nodes, _nodes, n2c, m_Grid);
  createNodeToNode(cells, nodes, _nodes, n2n, m_Grid);
  createCellToCell(cells, c2c, m_Grid);
};