dolfinx icon indicating copy to clipboard operation
dolfinx copied to clipboard

Let dlx.la.Vector manage the scope of the petsc4py wrapper (#1)

Open uvilla opened this issue 1 year ago • 0 comments

This PR allows for a dlx.la.Vector (rather than a dlx.fem.Function) to manage the memory and the scope of the petsc4py.PETSc.vec object that wraps the underlying data.

The implementation of the property dlx.fem.Function.vector was also modified to delegate the creation of the wrapper to the underlying dlx.la.Vector.

All changes are backward compatible.

See also Issue #3061 @jorgensd @garth-wells @jhale

uvilla avatar Mar 07 '24 16:03 uvilla