You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
petsc_to_psydac keeps stale values in out where the PETSc vector is zero #640
psydac.linalg.utilities.petsc_to_psydac(x, Xh, out=None) converts a PETSc vector x to a PSYDAC vector. If out is given, the result is written into it, but only the non-zero entries of x are copied (if value != 0:), and out is not zeroed beforehand. Hence, wherever x is zero, out keeps its previous values, and the result is wrong. This happens for both StencilVector and BlockVector outputs.
Copy all the local entries of x into out, including the zeros. PR #592, which vectorizes petsc_to_psydac, already does this; a regression test with a pre-filled out should be added there.
Activity