On Mon, Sep 9, 2013 at 3:10 PM, Frank <[email protected]> wrote:
> Hi, > > I am solving Ax=b repeatedly, and A does not change all the time. I did > things like this: > > %1. Set up entries for matrix A%%% > CALL MATASSEMBLYBEGIN(A,MAT_FINAL_**ASSEMBLY,IERR) > CALL MATASSEMBLYEND(A,MAT_FINAL_**ASSEMBLY,IERR) > CALL MATSETOPTION(A,MAT_NEW_**NONZERO_LOCATIONS,PETSC_FALSE,**ierr) > CALL KSPSetOperators(ksp,A,A,SAME_**NONZERO_PATTERN,ierr) > > Call KSPSetOperators(ksp,A,A,SAME_**NONZERO_PATTERN,ierr) > > Do i=1,100 > % Set up entries for vector b%%%%% > CALL VECASSEMBLYBEGIN(b,IERR) > CALL VECASSEMBLYEND(b,IERR) > CALL KSPSolve(ksp,b,x,ierr) > ENDDO > > However, it does not work. I don't know why. Could anybody help me with > this? Thank you very much. > "Does not work" is an unacceptable bug report. With that you are likely to get an answer like "yes it does". Matt > Sincerely > Xingjun Fang > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener
