On Mon, Mar 16, 2020 at 4:32 PM Xiaodong Liu <[email protected]> wrote:
> Hi, all, > > I am testing KSPSetInitialGuessNonzero using the case > > > https://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/examples/tutorials/ex50.c.html > > This case is special. WIth zero initial guess, 1 iteration can deliver the > exact solution. But when I tried true for KSPSetInitialGuessNonzero, it > shows the same convergence history as false. > > Does the code change KSPSetInitialGuessNonzero to false automatically? > For that flag to make any difference, you have to pass in a nonzero vector to KSPSolve(). This example does not do that. Were you doing that? Thanks, Matt > Take care. > > Thanks, > > Xiaodong Liu, PhD > X: Computational Physics Division > Los Alamos National Laboratory > P.O. Box 1663, > Los Alamos, NM 87544 > 505-709-0534 > -- 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 https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
