[petsc-users] PC FieldSplit - How to Count the Iterations

Smith, Barry F. bsmith at mcs.anl.gov
Wed Mar 14 08:52:25 CDT 2018

> On Mar 14, 2018, at 8:47 AM, Sonia Pozzi <sonia.pozzi at usi.ch> wrote:
> Dear PETSc Developers and Users,
> I’m working with PCFieldSplit preconditioner (Schur complement based approach). 
> To count the number of iterations I’m taking the info from subksp_0 and subksp_1.
> I understand that the number of its for subksp_1 are related to the call for the solution of the Schur complement.
> What is the number of its that I get from subksp_0? Is it the total number of calls or is it just related to the last solution for A00?
> In the second case, is there a strategy to have the total number?

  In the master branch of the repository KSPGetTotalIterations() gets the total over all the solves done so far for that KSP while KSPGetIterationNumber() is the number in the last linear solve.


> My best regards and thank you,
> Sonia Pozzi
> Ph.D. Student
> Group of Prof. Rolf Krause
> Institute of Computational Science
> Università della Svizzera italiana
> Center for Computation Medicine in Cardiology
> Via Giuseppe Buffi, 13
> CH-6900 Lugano
> Switzerland
> Email: pozzis at usi.ch 
> Phone: +41 58 666 4972

More information about the petsc-users mailing list