[petsc-dev] xlocal = da.getLocalVec() .. da.restoreLocalVec(xlocal) skip the restore

Barry Smith bsmith at petsc.dev
Wed Feb 1 17:33:27 CST 2023

  Would it be possible to rig the xlocal obtained from self.da.getLocalVec()  to automatically trigger the da.restoreLocalVec() when the xlocal goes out of scope so that the user does not need to explicitly make the call. If so, how should I go about implementing it?


More information about the petsc-dev mailing list