<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Thank you very much for the fast answers and for the insight.<br>
</p>
<p>Indeed, I tried changing Richardson with Chebyshev (while keeping
fixed all the rest), and the method did converge in 39
iterations. <br>
</p>
<p>Richards and GMRES instead has a very slow convergence as you
were expecting (around one thousand iterations for a four digit
relative residual, at that point I terminated it), even if it had
come to convergence it would have been a waste for an SPD system.</p>
<p>Best,</p>
<p>Fabio<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">Il 18/03/22 23:14, Mark Adams ha
scritto:<br>
</div>
<blockquote type="cite"
cite="mid:CADOhEh4+wPgVWpcVgdEhg2xo7_6i_Tghe=f6uPJHJ6wGEtMXKA@mail.gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div dir="ltr">MG is not stable with richardson/jacobi, or at
least it is almost not stable.
<div>Yea I would guess gmres will go forever because it does not
care.</div>
<div>I think CG exists when it gets a negative number for beta
or whatever and it was probably -eps. </div>
<div>That is my guess.</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Mar 18, 2022 at 3:17
PM Barry Smith <<a href="mailto:bsmith@petsc.dev"
moz-do-not-send="true" class="moz-txt-link-freetext">bsmith@petsc.dev</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
The GAMG produced an indefinite operator. I don't know if
there is a way to detect why this happened or how to stop it.<br>
<br>
You can try -ksp_type gmres and see how that goes since it
can handle an indefinite preconditioner.<br>
<br>
<br>
<br>
> On Mar 18, 2022, at 11:53 AM, Fabio Durastante <<a
href="mailto:fabio.durastante@unipi.it" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">fabio.durastante@unipi.it</a>>
wrote:<br>
> <br>
> For the default case:<br>
> <br>
> Linear solve converged due to CONVERGED_ATOL iterations
14<br>
> <br>
> for the other it tells<br>
> <br>
> Linear solve did not converge due to
DIVERGED_INDEFINITE_PC iterations 2<br>
> <br>
> that again seems a bit strange to me, since this should
be a symmetric V-cycle built on smoothed aggregation that
should be definite (and symmetric).<br>
> <br>
> Fabio<br>
> <br>
> Il 18/03/22 16:47, Barry Smith ha scritto:<br>
>> Run with -ksp_converged_reason to have it print why
it has stopped the iteration.<br>
>> <br>
>> <br>
>>> On Mar 18, 2022, at 11:44 AM, Fabio Durastante
<<a href="mailto:fabio.durastante@unipi.it" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">fabio.durastante@unipi.it</a>>
wrote:<br>
>>> <br>
>>> Hi everybody,<br>
>>> <br>
>>> I'm trying to run the rotated anisotropy example
ex54f using CG and GAMG as preconditioner, I run it with the
command:<br>
>>> <br>
>>> mpirun -np 2 ./ex54f -ne 1011 \<br>
>>> -theta 18.0 \<br>
>>> -epsilon 100.0 \<br>
>>> -pc_type gamg \<br>
>>> -pc_gamg_type agg \<br>
>>> -log_view \<br>
>>> -log_trace \<br>
>>> -ksp_view \<br>
>>> -ksp_monitor \<br>
>>> -ksp_type cg \<br>
>>> -mg_levels_pc_type jacobi \<br>
>>> -mg_levels_ksp_type richardson \<br>
>>> -mg_levels_ksp_max_it 4 \<br>
>>> -ksp_atol 1e-9 \<br>
>>> -ksp_rtol 1e-12<br>
>>> <br>
>>> But the KSP CG seems to stop just after two
iterations:<br>
>>> <br>
>>> 0 KSP Residual norm 6.666655711717e-02<br>
>>> 1 KSP Residual norm 9.859661350927e-03<br>
>>> <br>
>>> I'm attaching the full log, the problem seems to
appear when I modify the value of epsilon, if I leave it to
the default (1.0) it prints<br>
>>> <br>
>>> 0 KSP Residual norm 5.862074869050e+00<br>
>>> 1 KSP Residual norm 5.132711016122e-01<br>
>>> 2 KSP Residual norm 1.198566629717e-01<br>
>>> 3 KSP Residual norm 1.992885901625e-02<br>
>>> 4 KSP Residual norm 4.919780086064e-03<br>
>>> 5 KSP Residual norm 1.417045143681e-03<br>
>>> 6 KSP Residual norm 3.559622318760e-04<br>
>>> 7 KSP Residual norm 9.270786187701e-05<br>
>>> 8 KSP Residual norm 1.886403709163e-05<br>
>>> 9 KSP Residual norm 2.940634415714e-06<br>
>>> 10 KSP Residual norm 5.015043022637e-07<br>
>>> 11 KSP Residual norm 9.760219712757e-08<br>
>>> 12 KSP Residual norm 2.320857464659e-08<br>
>>> 13 KSP Residual norm 4.563772507631e-09<br>
>>> 14 KSP Residual norm 8.896675476997e-10<br>
>>> <br>
>>> that is very strange because the case with
epsilon 1 should be easier.<br>
>>> <br>
>>> Any help with this would be great.<br>
>>> <br>
>>> Thank you very much,<br>
>>> <br>
>>> Fabio Durastante<br>
>>> <log_ex54f.txt><br>
<br>
</blockquote>
</div>
</blockquote>
</body>
</html>