def _remove_cells(self): r""" Remove the inactive cells of the model. Only works if exported to ParaView! """ ind = np.argwhere(self._actnum == 0) ghost_cells = np.zeros(self._num_cell, np.uint8) ghost_cells[ind] = VTK.get_duplicatecell() self._vtk_unstructured_grid.AllocateCellGhostArray() ghosts = self._vtk_unstructured_grid.GetCellGhostArray() for i in ghost_cells: ghosts.InsertNextTuple1(i)
def test_get_duplicatecell(self): assert VTK.get_duplicatecell() == 1