[petsc-users] VISS and VIRS convergence problems
Jed Brown
jedbrown at mcs.anl.gov
Wed Oct 23 08:41:40 CDT 2013
Andrew, sorry about the silence.
Andrew.Wilkins at csiro.au writes:
> I've got a problem where I'm using viss or virs (petsc3.3) to enforce
> a lower bound on my solution. The actual application is unsaturated
> Darcy-Richards single-phase flow - slow water flow through a porous
> medium. As water is withdrawn from a region, the pressure drops, but
> physically the water pressure is bounded from below. The DE ensures
> this via a nonlinear relative permeability function which goes to zero
> at the lower-bound of pressure: permeability=0 means no water can flow
> from the region. However, in the linearization, the nonlinear solver
> won't know about this function going to zero (unless it just happens
> to end up right at the lower bound), so often the pressure goes into
> the unphysical region (pressure < lower) during the solution process.
Is the spatial discretization nominally monotone and you're only seeing
this due to attempt to take large time steps, or is there no discrete
positivity preservation?
> Therefore I'm using the VI solvers.
>
> First question - the -snes_vi_type appears to make no difference at all. What's it supposed to do?
Some parts of SNESVI* are in disarray and they are certainly not up to
the standard of the rest of PETSc. This documentation problem with
-snes_vi_type showed up in the refactoring commit below (between v3.2
and v3.3). We now use the SNES types SNESVISS and SNESVIRS (actually,
SNESVINEWTONSSLS and SNESVINEWTONRSLS in v3.4).
The RS stands for "reduced space"; these methods eliminate those
variables that are in contact while satisfying the inequality and
perform Newton iterations in the remaining subspace. The SS stands for
semi-smooth. They solve modified problems in the full space. SS
methods have some nicer nonlinear convergence properties, but the linear
systems are notoriously ill-conditioned.
commit c2fc9fa91a764ea1bc445c5db6fc55248852cdef
Author: Barry Smith <bsmith at mcs.anl.gov>
Date: Sat Nov 5 20:30:54 2011 -0500
reorganized SNESVI to two solvers SNESVIRS and SNESVISS in seperate directories without being intertwined though they share some common code
removed rsaug from being built since is broken
Hg-commit: 31c8ce4101ddfbfe4fc6d005d66ef14f58ee082a
include/petscsnes.h | 5 +-
include/private/snesimpl.h | 14 +
include/private/vecimpl.h | 1 +
src/docs/website/documentation/faq.html | 2 +-
src/mat/impls/sbaij/mpi/mpisbaij.c | 24 +-
src/snes/examples/tutorials/ex54.c | 3 +-
src/snes/examples/tutorials/ex55.c | 3 +-
src/snes/examples/tutorials/ex60.c | 5 +-
src/snes/examples/tutorials/ex61.c | 6 +-
src/snes/examples/tutorials/ex63.c | 5 +-
src/snes/examples/tutorials/ex633D_DB.c | 3 +-
src/snes/examples/tutorials/ex64.c | 5 +-
src/snes/examples/tutorials/ex65.c | 5 +-
src/snes/examples/tutorials/ex653D.c | 7 +-
src/snes/examples/tutorials/makefile | 2 +-
src/snes/impls/vi/makefile | 3 +-
src/snes/impls/vi/{ => rs}/makefile | 8 +-
src/snes/impls/vi/rs/virs.c | 795 ++++++++
src/snes/impls/vi/rs/virsimpl.h | 18 +
src/snes/impls/vi/{ => rsaug}/makefile | 8 +-
src/snes/impls/vi/{vi.c => rsaug/virsaug.c} | 0
.../vi/{viimpl.h => rsaug/virsaugimpl.h} | 2 +-
src/snes/impls/vi/{ => ss}/makefile | 8 +-
src/snes/impls/vi/ss/viss.c | 499 +++++
.../impls/vi/{viimpl.h => ss/vissimpl.h} | 18 +-
src/snes/impls/vi/vi.c | 1687 +---------------
src/snes/interface/snesregi.c | 6 +-
src/sys/examples/tests/makefile | 5 +-
.../tutorials/phasefield/biharmonic.c | 33 +-
src/ts/examples/tutorials/phasefield/heat.c | 52 +-
30 files changed, 1499 insertions(+), 1733 deletions(-)
> Second question - So far, viss has converged always, but virs
> sometimes gives problems. I've read in one email-thread that virs is
> preferred. Why is that?
The linear systems tend to be easier to solve. RS methods are not
immune to "chatter".
> I'm basing my comment on only about 10 tests, but I'm still interested
> in your replies. I'm pretty sure my jacobian is correct, as I have
> tested it using -snes_type=test, and also I have run using
> finite-differences, and still got the behaviour below. This is the
> type of behaviour I get:
>
> DT: 2.885464e+03
> Solving time step 48, time=406142.00...
> Initial |residual|_2 = 1.536061e-01
> NL step 0, |residual|_2 = 1.536061e-01
> 0 SNES VI Function norm 1.536061428302e-01 Active lower constraints 0/2 upper constraints 0/0 Percent of total 0 Percent of bounded 0
> 0 KSP Residual norm 1.536061428302e-01
> 1 KSP Residual norm 5.954022644970e-05
> 2 KSP Residual norm 1.874684877465e-07
> NL step 1, |residual|_2 = 2.508324e-02
> 1 SNES VI Function norm 2.508323951297e-02 Active lower constraints 0/2 upper constraints 0/0 Percent of total 0 Percent of bounded 0
> 0 KSP Residual norm 2.508323951297e-02
> 1 KSP Residual norm 1.744363683367e-05
> 2 KSP Residual norm 9.541678264164e-09
> Nonlinear solve did not converge due to DIVERGED_LOCAL_MIN iterations 1
> Solve Did NOT Converge!
> Solve failed... cutting timestep
> DT: 1.442732e+03
> Solving time step 48, time=404699.00...
> Initial |residual|_2 = 1.536061e-01
> NL step 0, |residual|_2 = 1.536061e-01
> 0 SNES VI Function norm 1.536061428302e-01 Active lower constraints 0/2 upper constraints 0/0 Percent of total 0 Percent of bounded 0
> 0 KSP Residual norm 1.536061428302e-01
> 1 KSP Residual norm 7.144446293019e-05
> 2 KSP Residual norm 2.783195631751e-07
> NL step 1, |residual|_2 = 2.513316e-02
> 1 SNES VI Function norm 2.513315575633e-02 Active lower constraints 0/2 upper constraints 0/0 Percent of total 0 Percent of bounded 0
> 0 KSP Residual norm 2.513315575633e-02
> 1 KSP Residual norm 2.187002762768e-05
> 2 KSP Residual norm 1.996619992363e-08
> Nonlinear solve did not converge due to DIVERGED_LINE_SEARCH iterations 1
Can you upgrade to petsc-3.4? (Or the 'maint' branch; 'master' is
reliable and newer, but has a couple interface changes that may or may
not affect your overall code.) Use -snes_linesearch_monitor to see what
is happening in the line search. This version of PETSc has new line
searches that may help with convergence.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131023/eb32e59b/attachment.pgp>
More information about the petsc-users
mailing list