[petsc-dev] SNESCOMPOSITE with a VI underneath

Barry Smith bsmith at mcs.anl.gov
Tue Apr 14 16:14:41 CDT 2015


> On Apr 14, 2015, at 8:50 AM, Patrick Farrell <patrick.farrell at maths.ox.ac.uk> wrote:
> 
> Dear PETSc developers,
> 
> I have a nice algorithm for solving a variational inequality that arises in
> fracture mechanics --- first do some iterations of nonlinear Gauss-Seidel-Newton
> with the nonlinear fieldsplit I've implemented to acquire a good initial guess,
> and then switch to VINEWTONRSLS for its quadratic convergence.
> 
> I've implemented this via a multiplicative SNESCOMPOSITE with my SNES first and
> a VINEWTONRSLS SNES second. This converges very nicely, but there's a problem ---
> the outer SNESCOMPOSITE doesn't know that its problem is a VI, and hence
> it doesn't compute the problem residual norm correctly.
> 
> I have two fixes for this, a quick one and a more complicated one.
> 
> First, since the problem has actually converged and the inner solves don't make
> any further changes, I can set the -snes_stol on the SNESCOMPOSITE and have it
> converge that way. At the moment SNESCOMPOSITE doesn't support step norms, but
> I have made a patch to fix this:
> 
> https://bitbucket.org/petsc/petsc/pull-request/302/make-snescomposite-support-stol/diff
> 
> Second, the SNESCOMPOSITE residual norm calculation should do the right thing
> and understand that it's solving a VI. One way would make the following changes:
> 
> - snes->xl and snes->xu already exist in the SNES data structure.
> 
> - Modify SNESVISetVariableBounds to not set the SNESType to SNESVINEWTONRSLS;
>  I want to set the bounds on the SNESCOMPOSITE without having everything
>  lost on the composite structure. I don't think the user interface should
>  be coupled this way anyway; if the user wants a SNESVINEWTONRSLS the user
>  should call SNESSetType themselves.

   The problem is that since most SNES methods just ignore the bounds if we do not set the type to a method that supports bounds the user will not be solving the problem they think they are solving.  Perhaps we should just have all methods that ignore the bounds error out if the bounds are set rather than ignore them?



> 
> - If the bounds are set on the SNESCOMPOSITE, have it use SNESVIComputeInactiveSetFnorm
>  to compute the residual norm.

   This seems ok.

> 
> What do you think? If you think this is the right approach I'm happy to implement
> it.
> 
> Patrick




More information about the petsc-dev mailing list