[petsc-users] Problems about Picard and NolinearGS
Matthew Knepley
knepley at gmail.com
Wed Dec 26 08:35:24 CST 2018
On Wed, Dec 26, 2018 at 8:50 AM Yingjie Wu via petsc-users <
petsc-users at mcs.anl.gov> wrote:
> Dear Petsc developers:
> Hi,
> 1. I tried to use the Picard solver in Petsc, but the program didn't
> converge. My program is still a thermal program that contains multiple
> physical fields, and is a PDEs' problem. The error message is as follows.
> The reason I use Picard is that it can guarantee convergence(though slow
> and expensive).
>
You can only guarantee convergence if your operator is a contraction. It
does not appear to be, or you would not need a line
search at all. The line search is failing. You could try a different line
search.
My guess is that since you have multiple fields, what you really need is a
nonlinear version of PCFIELDSPLIT. I have been meaning
to code this up, but have not done it yet since all the ways I can think of
doing it are really intrusive. You can put this together by hand
by making residual functions for the individual parts.
Thanks,
Matt
> I follow the ex15.c, but I don't use DM to organize the solution vector.
> So I try the SNESSetPicard().
> 0 SNES Function norm 2.91302e+08
> 0 KSP Residual norm 5.79907e+08
> 1 KSP Residual norm 1.46843e-05
> Linear solve converged due to CONVERGED_RTOL iterations 1
> 1 SNES Function norm 2.891e+08
> 0 KSP Residual norm 5.5989e+08
> 1 KSP Residual norm 4.21314e-06
> Linear solve converged due to CONVERGED_RTOL iterations 1
> 2 SNES Function norm 2.78289e+08
> 0 KSP Residual norm 5.53553e+08
> 1 KSP Residual norm 2.04076e-05
> Linear solve converged due to CONVERGED_RTOL iterations 1
> 3 SNES Function norm 2.77833e+08
> 0 KSP Residual norm 5.52907e+08
> 1 KSP Residual norm 2.09919e-05
> Linear solve converged due to CONVERGED_RTOL iterations 1
> 4 SNES Function norm 2.77821e+08
> 0 KSP Residual norm 5.52708e+08
> 1 KSP Residual norm 2.08677e-05
> Linear solve converged due to CONVERGED_RTOL iterations 1
> Nonlinear solve did not converge due to DIVERGED_LINE_SEARCH iterations 4
> SNES Object: 1 MPI processes
> type: newtonls
> maximum iterations=50, maximum function evaluations=10000
> tolerances: relative=1e-08, absolute=1e-50, solution=1e-08
> total number of linear solver iterations=5
> total number of function evaluations=34
> norm schedule ALWAYS
> SNESLineSearch Object: 1 MPI processes
> type: bt
> interpolation: cubic
> alpha=1.000000e-04
> maxstep=1.000000e+08, minlambda=1.000000e-12
> tolerances: relative=1.000000e-08, absolute=1.000000e-15,
> lambda=1.000000e-08
> maximum iterations=40
> KSP Object: 1 MPI processes
> type: gmres
> restart=30, using Classical (unmodified) Gram-Schmidt
> Orthogonalization with no iterative refinement
> happy breakdown tolerance 1e-30
> maximum iterations=10000, initial guess is zero
> tolerances: relative=1e-05, absolute=1e-50, divergence=10000.
> left preconditioning
> using PRECONDITIONED norm type for convergence test
> PC Object: 1 MPI processes
> type: lu
> out-of-place factorization
> tolerance for zero pivot 2.22045e-14
> matrix ordering: nd
> factor fill ratio given 5., needed 5.48356
> Factored matrix follows:
> Mat Object: 1 MPI processes
> type: seqaij
> rows=11368, cols=11368
> package used to perform factorization: petsc
> total: nonzeros=234554, allocated nonzeros=234554
> total number of mallocs used during MatSetValues calls =0
> not using I-node routines
> linear system matrix = precond matrix:
> Mat Object: 1 MPI processes
> type: seqaij
> rows=11368, cols=11368
> total: nonzeros=42774, allocated nonzeros=56840
> total number of mallocs used during MatSetValues calls =0
> not using I-node routines
> Are there any other examples of Picard methods? I'm very interested in
> this method.
>
> 2. I found that in ex15.c and ex19.c use the NonlinearGS. I know it's a
> iterative method. I don't know how to use this method in above examples.
> As for as I know, NonlinearGS is an iterative method parallel to subspace
> method. NonlinearGS should not be required if subspace methods are used.
>
NonlinearGS is really just an optimization. I would start with NASM if you
think this will work.
Thanks,
Matt
> Thanks,
> Yingjie
>
>
>
--
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
https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20181226/ee3de13d/attachment.html>
More information about the petsc-users
mailing list