[petsc-dev] SNESCOMPOSITE with a VI underneath
Patrick Farrell
patrick.farrell at maths.ox.ac.uk
Tue Apr 14 08:50:57 CDT 2015
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.
- If the bounds are set on the SNESCOMPOSITE, have it use SNESVIComputeInactiveSetFnorm
to compute the residual norm.
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