[petsc-users] monitoring the convergence of fieldsplit 0 and 1
Matthew Knepley
knepley at gmail.com
Fri Apr 10 13:26:12 CDT 2015
On Fri, Apr 10, 2015 at 1:05 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
> > On Apr 10, 2015, at 12:58 PM, Matthew Knepley <knepley at gmail.com> wrote:
> >
> > On Fri, Apr 10, 2015 at 12:57 PM, Barry Smith <bsmith at mcs.anl.gov>
> wrote:
> >
> > > On Apr 10, 2015, at 8:07 AM, Klaij, Christiaan <C.Klaij at marin.nl>
> wrote:
> > >
> > > Barry,
> > >
> > > Sure, I can call PCFieldSplitGetSubKSP() to get the fieldsplit_0
> > > ksp and then KSPGetIterationNumber, but what does this number
> > > mean?
> > >
> > > It appears to be the number of iterations of the last time that
> > > the subsystem was solved, right? If so, this corresponds to the
> > > last iteration of the coupled system, how about all the previous
> > > iterations?
> >
> > If I added a KSPGetTotalIterations() would that help?
> >
> > Its hard to see how to define this consistently.
>
> Just count the number of iterations that KSP object has done since it
> was created. How could that be inconsistent?
Oh, you want the counts to be localized in the subKSP. This not nearly as
useful. For example, we could have left this
count in the KSP, but we hoist it to the SNES. I am fine totaling the
counts in the KSP, but I would propose custom
monitors as a way of hoisting the info to the next level.
Matt
> > I think this is better handled by custom monitors.
> > We could provide a default monitor for FieldSplit which does this.
> >
> > Matt
> >
> >
> > Barry
> >
> > >
> > > Chris
> > > ________________________________________
> > > From: Barry Smith <bsmith at mcs.anl.gov>
> > > Sent: Friday, April 10, 2015 2:48 PM
> > > To: Klaij, Christiaan
> > > Cc: petsc-users at mcs.anl.gov
> > > Subject: Re: [petsc-users] monitoring the convergence of fieldsplit 0
> and 1
> > >
> > > Chris,
> > >
> > > It appears you should call PCFieldSplitGetSubKSP() and then get
> the information you want out of the individual KSPs. If this doesn't work
> please let us know.
> > >
> > > Barry
> > >
> > >> On Apr 10, 2015, at 6:48 AM, Klaij, Christiaan <C.Klaij at marin.nl>
> wrote:
> > >>
> > >> A question when using PCFieldSplit: for each linear iteration of
> > >> the system, how many iterations for fielsplit 0 and 1?
> > >>
> > >> One way to find out is to run with -ksp_monitor,
> > >> -fieldsplit_0_ksp_monitor and -fieldsplit_0_ksp_monitor. This
> > >> gives the complete convergence history.
> > >>
> > >> Another way, suggested by Matt, is to use -ksp_monitor,
> > >> -fieldsplit_0_ksp_converged_reason and
> > >> -fieldsplit_1_ksp_converged_reason. This gives only the totals
> > >> for fieldsplit 0 and 1 (but without saying for which one).
> > >>
> > >> Both ways require to somehow process the output, which is a bit
> > >> inconvenient. Could KSPGetResidualHistory perhaps return (some)
> > >> information on the subsystems' convergence for processing inside
> > >> the code?
> > >>
> > >> Chris
> > >>
> > >>
> > >> dr. ir. Christiaan Klaij
> > >> CFD Researcher
> > >> Research & Development
> > >> E mailto:C.Klaij at marin.nl
> > >> T +31 317 49 33 44
> > >>
> > >>
> > >> MARIN
> > >> 2, Haagsteeg, P.O. Box 28, 6700 AA Wageningen, The Netherlands
> > >> T +31 317 49 39 11, F +31 317 49 32 45, I www.marin.nl
> > >>
> > >
> >
> >
> >
> >
> > --
> > 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
>
>
--
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150410/a6cfb042/attachment.html>
More information about the petsc-users
mailing list