[petsc-users] How to change KSP tolerance during SNES steps
Matthew Knepley
knepley at gmail.com
Thu Apr 26 10:12:06 CDT 2012
On Thu, Apr 26, 2012 at 11:10 AM, behzad baghapour <
behzad.baghapour at gmail.com> wrote:
> 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 );
>
Here you would have to PCReset(), set the type again, and set the options
Matt
> 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..."
>
>
--
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120426/b6801feb/attachment.htm>
More information about the petsc-users
mailing list