[petsc-users] Using KSPSetOperators with SAME_NONZERO_PATTERN

TAY wee-beng zonexo at gmail.com
Thu Aug 28 03:33:13 CDT 2014


Hi,

I've been using :

call 
KSPSetOperators(ksp_semi_xyz,A_semi_xyz,A_semi_xyz,SAME_NONZERO_PATTERN,ierr)

in my code for a long time when solving for the linear equations.

However, recently I found that my code can't run properly (diverged, 
segmentation fault). After debugging, I realised that I had to change 
from the above to

call KSPSetOperators(ksp_semi_xyz,A_semi_xyz,A_semi_xyz,ierr)

May I know if something has changed in the new versions of PETSc?

-- 
Thank you

Yours sincerely,

TAY wee-beng



More information about the petsc-users mailing list