MCPcopy Create free account
hub / github.com/Kitware/VTK / ExplodeLinearCell

Method ExplodeLinearCell

Filters/General/vtkFiniteElementFieldDistributor.cxx:1478–1499  ·  view source on GitHub ↗

----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1476
1477//----------------------------------------------------------------------------
1478void vtkFiniteElementFieldDistributor::vtkInternals::ExplodeLinearCell(vtkIdType cellId,
1479 vtkPoints* oldPoints, vtkPoints* newPoints, vtkCellArray* oldCells, vtkCellArray* newCells,
1480 vtkUnsignedCharArray* newCellTypes, vtkPointData* oldPd, vtkPointData* newPd)
1481{
1482 vtkIdType oldNpts = 0, ind = newPoints->GetNumberOfPoints();
1483 const vtkIdType* oldPts = nullptr;
1484 double coord[3] = {};
1485
1486 oldCells->GetCellAtId(cellId, oldNpts, oldPts);
1487 newCellTypes->SetValue(cellId, this->RefElement);
1488 newCells->InsertNextCell(oldNpts);
1489
1490 for (vtkIdType i = 0; i < oldNpts; ++i, ++ind)
1491 {
1492 const auto& oldId = oldPts[i];
1493 oldPoints->GetPoint(oldId, coord);
1494 newPoints->InsertPoint(ind, coord);
1495 newCells->InsertCellPoint(ind);
1496 // copy over the non-dg fields from old -> new point data
1497 newPd->CopyData(oldPd, oldId, ind);
1498 }
1499}
1500
1501//----------------------------------------------------------------------------
1502void vtkFiniteElementFieldDistributor::vtkInternals::ExplodeHigherOrderCell(vtkIdType cellId,

Callers 1

ExplodeCellMethod · 0.95

Calls 8

InsertCellPointMethod · 0.80
GetNumberOfPointsMethod · 0.45
GetCellAtIdMethod · 0.45
SetValueMethod · 0.45
InsertNextCellMethod · 0.45
GetPointMethod · 0.45
InsertPointMethod · 0.45
CopyDataMethod · 0.45

Tested by

no test coverage detected