Hi, I do set my own KSP to SNES:

        ierr = SNESCreate(PETSC_COMM_WORLD, &snes); CHKERRQ(ierr);
        ierr = SNESSetKSP(snes, ksp); CHKERRQ(ierr);

I set the ksp solver type, tolerances etc. Then I register
FormFunction using SNESSetFunction, and implement it as;


PetscErrorCode FormFunction(SNES snes, Vec x, Vec f, void *ctx)

Now my question: is "x" in the signature above expected to be the same
as "x" obtained after a linear solve in the KSP object used in SNES
(that I pass inside ctx), or will "x" be generally differently-valued
due to e.g. the line search performed?

Thanks for any clarifications.

Dominik

Reply via email to