[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SNES Convergence
- To: petsc-users@xxxxxxxxxxx
- Subject: Re: SNES Convergence
- From: "Matthew Knepley" <knepley@xxxxxxxxx>
- Date: Mon, 7 Jan 2008 15:35:33 -0600
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=fc8RKmq6uAGC32XVueLltB3sxsIC/Op+YqzLFp++xP8=; b=kG/FG+wyEcaIuewv3XmxQMBCX4HJI4UdjB46HvOLblZ3xLviW4oCdw8ZKrpSAO+JlyjKEd+rsl3Rqq0L6rSVzaBkxuLd95iuB+aHf2hv9UTuzrzIvb6/X6FSRzJxg1vMDnbhOGPGRZQAMITxasRqPmihq4xGuJSGNNVBpTAgeso=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=lxMdc3xcrmw4OEdo8cro+/fMERLJoO3cE0BLXmHQMEC7W3qohf/aU944MiA8tgtfA4sUWHobJ/EvmCC0CVr7Hpa9MOoj4NTuizcdIrtEP8yoCb3xND5IzPWDpROlQB7Lut5hqkBdjYh0RtEpj5IrJ6jD1tG6g5LuDNOq9Da7Lv0=
- In-reply-to: <44114ec40801071330y31ffbbb3x74923a3fa8c814be@mail.gmail.com>
- References: <44114ec40801071330y31ffbbb3x74923a3fa8c814be@mail.gmail.com>
- Reply-to: petsc-users@xxxxxxxxxxx
- Sender: owner-petsc-users@xxxxxxxxxxx
Are you sure that this problem (or at least what is coded) has real
solutions? The behavior you see, Newton crapping out due to small
updates, can easily happen when you have imaginary solutions,
such as x^2 + 2 = 0. I would first try to test it in a regime in which
you have an exact or asymptotic solution.
Matt
On Jan 7, 2008 3:30 PM, Sean Dettrick <sdettrick@xxxxxxxxx> wrote:
> Hi,
>
> I am solving a version of the Grad-Shafranov equation, F(x)=0, which but
> for some extra spatial dependences is similar in form to the 2D Bratu
> equation in snes/examples/tutorials/ex5.c. I started with the ex5.c code,
> introducing just enough changes to model the new system. The analytic
> Jacobian function appears to be correct, with a Norm of matrix ratio < 1.e9
> (found using -snes_type test).
>
> The problem I am having is that in most cases the SNES solver does not
> converge to a solution x of F(x)=0. Rather, what happens is that the fnorm
> (obtained in a monitor function) converges to some large non-zero value, and
> F(x) seems to get "stuck", i.e. it converges to a large non-zero result.
> Even though it is clearly not a solution, the -snes_converged_reason is
> reported as "Nonlinear solve converged due to CONVERGED_TR_DELTA". The
> intermediate KSP steps have -ksp_converged_reason reported as "Linear solve
> converged due to CONVERGED_STEP_LENGTH". I have been typically running with
> parameters -da_grid_x 100 -da_grid_y 101 -snes_converged_reason
> -ksp_converged_reason -snes_type tr -ksp_type gmres -snes_max_it 100.
>
> Does this sound like a familiar scenario with a familiar solution? Or can
> anyone point me to some documentation that describes the SNES tr and ls
> parameters in more detail than the manual.pdf?
> Or can anyone recommend the best SNES and KSP parameters for the Bratu
> example?
>
> Any help or advice would be greatly appreciated.
>
> Thanks,
> Sean Dettrick
>
--
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
From owner-petsc-users@xxxxxxxxxxx Mon Jan 7 15:35:43 2008
Received: (from listserv@localhost)
by mcs.anl.gov (8.11.6/8.9.3) id m07LZf867098
for petsc-users-outgoing; Mon, 7 Jan 2008 15:35:41 -0600
Received: from mailgw.mcs.anl.gov (mailgw.mcs.anl.gov [140.221.9.4])
by mcs.anl.gov (8.11.6/8.9.3) with ESMTP id m07LZc8143510
for <petsc-users@xxxxxxxxxxx>; Mon, 7 Jan 2008 15:35:38 -0600
Received: from localhost (localhost [127.0.0.1])
by mailgw.mcs.anl.gov (Postfix) with ESMTP id 2AF3F348014
for <petsc-users@xxxxxxxxxxx>; Mon, 7 Jan 2008 15:35:38 -0600 (CST)
Received: from bsmith.mcs.anl.gov (bsmith.mcs.anl.gov [140.221.10.17])
(using TLSv1 with cipher AES128-SHA (128/128 bits))
(No client certificate requested)
by mailgw.mcs.anl.gov (Postfix) with ESMTP id DE94634800F
for <petsc-users@xxxxxxxxxxx>; Mon, 7 Jan 2008 15:35:35 -0600 (CST)
Message-Id: <35015C1B-3FDA-448A-8F1B-9DEEC02434DB@xxxxxxxxxxx>
From: Barry Smith <bsmith@xxxxxxxxxxx>
To: petsc-users@xxxxxxxxxxx
In-Reply-To: <44114ec40801071330y31ffbbb3x74923a3fa8c814be@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v915)
Subject: Re: SNES Convergence
Date: Mon, 7 Jan 2008 15:35:35 -0600
References: <44114ec40801071330y31ffbbb3x74923a3fa8c814be@xxxxxxxxxxxxxx>
X-Mailer: Apple Mail (2.915)
X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at mailgw.mcs.anl.gov
X-Spam-Status: No, hits=-2.5 required=5.0
tests=EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,
REPLY_WITH_QUOTES,USER_AGENT_APPLEMAIL
version=2.55
X-Spam-Level:
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
X-MCS-Mail-Loop: petsc-users
Sender: owner-petsc-users@xxxxxxxxxxx
Precedence: bulk
Reply-To: petsc-users@xxxxxxxxxxx
Sean,
Can you run the ls version with the additional options -info -
snes_monitor and send
the results? You could also make a run with -snes_mf_operator and see
if that "converges"
in the same way or not (this is another check that the analytic
Jacobian is right/wrong).
Thanks
Barry
On Jan 7, 2008, at 3:30 PM, Sean Dettrick wrote:
> Hi,
>
> I am solving a version of the Grad-Shafranov equation, F(x)=0, which
> but for some extra spatial dependences is similar in form to the 2D
> Bratu equation in snes/examples/tutorials/ex5.c. I started with the
> ex5.c code, introducing just enough changes to model the new
> system. The analytic Jacobian function appears to be correct, with
> a Norm of matrix ratio < 1.e9 (found using -snes_type test).
>
> The problem I am having is that in most cases the SNES solver does
> not converge to a solution x of F(x)=0. Rather, what happens is
> that the fnorm (obtained in a monitor function) converges to some
> large non-zero value, and F(x) seems to get "stuck", i.e. it
> converges to a large non-zero result. Even though it is clearly not
> a solution, the -snes_converged_reason is reported as "Nonlinear
> solve converged due to CONVERGED_TR_DELTA". The intermediate KSP
> steps have -ksp_converged_reason reported as "Linear solve converged
> due to CONVERGED_STEP_LENGTH". I have been typically running with
> parameters -da_grid_x 100 -da_grid_y 101 -snes_converged_reason -
> ksp_converged_reason -snes_type tr -ksp_type gmres -snes_max_it 100.
>
> Does this sound like a familiar scenario with a familiar solution?
> Or can anyone point me to some documentation that describes the SNES
> tr and ls parameters in more detail than the manual.pdf?
> Or can anyone recommend the best SNES and KSP parameters for the
> Bratu example?
>
> Any help or advice would be greatly appreciated.
>
> Thanks,
> Sean Dettrick