[petsc-users] How to change KSP tolerance during SNES steps

behzad baghapour behzad.baghapour at gmail.com
Thu Apr 26 10:10:48 CDT 2012


Here is my procedure:

Define:

KSP mon_ksp;
PC mon_pre;
.
.
.
if( res_n < 1e-1 && c_test == 0 )
{
        KSPGetPC  ( mon_ksp,  &mon_pre );
        ierr = PCFactorSetLevels( mon_pre, 4 ); CHKERRQ( ierr );
        KSPSetPC  ( mon_ksp,   mon_pre );
        SNESSetKSP( snes, mon_ksp );
        ierr = SNESSetUp( snes ); CHKERRQ( ierr );
        c_test = 1;
}

and did get the error: "Object is in wrong state..."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120426/0ed5fc5b/attachment.htm>


More information about the petsc-users mailing list