<div dir="ltr">Hello Barry,<div><br></div><div><i><b> I assume you are calling KSPSetOperators() before each new KSPSolve() so that it knows to solve a new system?</b></i><br></div><div><i><b><br></b></i></div><div>Yes, I do.</div><div><br></div><div>This looks like a good trick: KSPSetOperators(ksp,PETSC_NULL_MAT,PETSC_NULL_MAT)</div><div><br></div><div>So you would do: </div><div><br></div><div>1) KSPSetOperators(ksp,A,A)<br></div><div><br></div><div>2) KSPSolve(myksp, myrhs, mysol)<br></div><div><br></div><div>3) KSPSetOperators(ksp,PETSC_NULL_MAT,PETSC_NULL_MAT)<br></div><div><br></div><div>4) MatDestroy(A)</div><div><br></div><div>Am I right?</div><div><br></div><div>I'll have a try and I'll try to destroy the ksp of each equation as well. The second is more tedious because I'll have to reconstruct it every time. I'll do some tests to see if that helps. </div><div><br></div><div>Thanks a lot! </div><div><br></div><div><br></div><div><br></div></div>