Hi. I am using the snes nasm for the global solver and snes newtonls for the local subdomain solver. I am trying to get the total number of Newton iterations for just one subdomain. I've tried: SNESNASMGetSNES(snes,0,&subsnes); SNESSolve(snes,NULL,u_initial); SNESGetNumberFunctionEvals(subsnes,&Newt_its); but this just gets me the number of Newton iterations just on the final nasm iteration. If I understand correctly, the information in the subsnes is repeatedly destroyed while the SNESSolve is running. Is there any way to extract the total subsnes iterations after the SNESSolve? If not, how would I extract the information?
On Wed, Oct 12, 2022 at 11:04 AM Takahashi, Tadanaga <[email protected]> wrote:
Hi. I am using the snes nasm for the global solver and snes newtonls for the local subdomain solver. I am trying to get the total number of Newton iterations for just one subdomain. I've tried:
SNESNASMGetSNES(snes,0,&subsnes); SNESSolve(snes,NULL,u_initial); SNESGetNumberFunctionEvals(subsnes,&Newt_its);
Here I think you want https://petsc.org/main/docs/manualpages/SNES/SNESGetIterationNumber/
but this just gets me the number of Newton iterations just on the final nasm iteration. If I understand correctly, the information in the subsnes is repeatedly destroyed while the SNESSolve is running. Is there any way to extract the total subsnes iterations after the SNESSolve? If not, how would I extract the information?
You are correct. This is an oversight by us. We need to keep track of this in the same way we track the number of linear iterations in SNES. Can you submit an issue for this? I can do it in November. Thanks, Matt -- 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/>
participants (2)
-
Matthew Knepley -
Takahashi, Tadanaga