MCPcopy Create free account
hub / github.com/FEniCS/dolfinx / __del__

Method __del__

python/dolfinx/fem/petsc.py:879–884  ·  view source on GitHub ↗

Destroy internally held PETSc objects.

(self)

Source from the content-addressed store, hash-verified

877 self.solver.getPC().setFieldSplitIS(*fieldsplit_IS)
878
879 def __del__(self):
880 """Destroy internally held PETSc objects."""
881 for obj in filter(
882 lambda obj: obj is not None, (self._solver, self._A, self._b, self._x, self._P_mat)
883 ):
884 obj.destroy()
885
886 def solve(self) -> _Function | Sequence[_Function]:
887 """Solve the problem.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected