[petsc-users] SNESLineSearchSetPre/PostCheck()

Buesing, Henrik hbuesing at eonerc.rwth-aachen.de
Sat Dec 2 04:58:41 CST 2017


> >> > Dear all,
> >> >
> >> > So what is the difference between the pre and post check? When
> >> > should
> >> I use what?
> >>
> >> PreCheck runs before starting the line search, PostCheck runs after
> >> the line search has completed and (if relevant) the inequality projection.
> >
> > [Buesing, Henrik] What I did was using the PreCheck to change the step
> length if pressure or enthalpy went out of physical bounds (e.g. got
> negative).
> >
> > Is the impact on Newton's method doing this more severe or less than
> using the PostCheck?
> 
> You probably want to start your search in the feasible set so might as well
> use the precheck.

In my test example I see the following: Using the precheck and changing the step direction Y, Newton converges fine. Using the postcheck and changing the updated solution W and leaving the step direction Y as is, breaks Newton convergence. 

Henrik

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/SNES/SNESLineSearchPreCheck.html
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/SNES/SNESLineSearchPostCheck.html





More information about the petsc-users mailing list