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

Method CleanCells

IO/Geometry/vtkFLUENTReader.cxx:3723–3757  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

3721
3722//------------------------------------------------------------------------------
3723void vtkFLUENTReader::CleanCells()
3724{
3725 std::vector<int> t;
3726 for (Cell& cell : this->Cells)
3727 {
3728 if (((cell.type == 1) && (cell.faceIndices.size() != 3)) ||
3729 ((cell.type == 2) && (cell.faceIndices.size() != 4)) ||
3730 ((cell.type == 3) && (cell.faceIndices.size() != 4)) ||
3731 ((cell.type == 4) && (cell.faceIndices.size() != 6)) ||
3732 ((cell.type == 5) && (cell.faceIndices.size() != 5)) ||
3733 ((cell.type == 6) && (cell.faceIndices.size() != 5)))
3734 {
3735
3736 // Copy faces
3737 t.clear();
3738 for (size_t j = 0; j < cell.faceIndices.size(); j++)
3739 {
3740 t.push_back(cell.faceIndices[j]);
3741 }
3742
3743 // Clear Faces
3744 cell.faceIndices.clear();
3745
3746 // Copy the faces that are not flagged back into the cell
3747 for (size_t j = 0; j < t.size(); j++)
3748 {
3749 if ((this->Faces[t[j]].child == 0) && (this->Faces[t[j]].ncgChild == 0) &&
3750 (this->Faces[t[j]].interfaceFaceChild == 0))
3751 {
3752 cell.faceIndices.push_back(t[j]);
3753 }
3754 }
3755 }
3756 }
3757}
3758
3759//------------------------------------------------------------------------------
3760void vtkFLUENTReader::PopulateCellNodes()

Callers 1

RequestDataMethod · 0.95

Calls 3

sizeMethod · 0.45
clearMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected