<div dir="ltr">Dear Matt,<br>
<br>
I tried out what you said. I used the following example I found with google<br>
<br>
<a href="https://raw.githubusercontent.com/petsc/petsc/5edff71f342f05166073de0ae93226f0997d7fe9/src/snes/examples/tutorials/ex70.c">https://raw.githubusercontent.com/petsc/petsc/5edff71f342f05166073de0ae93226f0997d7fe9/src/snes/examples/tutorials/ex70.c</a><br>
<br>
So now I have some questions concerning that<br>
<br>
<br>
a) When I use pc_fieldsplit_precondition_schur selfp I get slower
convergence than with the user-provided Schur-Complement approximation
in this example code. However from what I saw this should coincide in
this case?<br>
<br>
b) I get a little confused with the settings of the inner and outer
solvers in fieldsplit. So if I understood it correctly
"-pc_fieldsplit_schur_fact_type upper" uses<br>
<br>
K -B^T<br>
0 S <br>
<br>
as preconditioner. Where K and S are inverted with the help of a KSP. So
what I don't get is how to tweak the inner solvers correctly. For
Example, In my own Implementation of preconditioned GMRES I also use the
same structure as above as preconditioner and I take K^-1 to be
approximated by the application of an AMG (in my case BoomerAMG) .
Further I take S = B diag(K)^-1 B^T and again use an AMG to invert S.
This results in my case in a good preconditioner. <br>
<br>
I tried now the same with this example and used<br>
<br>
-fieldsplit_0_ksp_type preonly -fieldsplit_0_pc_type hypre -fieldsplit_1_ksp_type preonly -fieldsplit_1_pc_type hypre<br>
<br>
However I get really slow convergence of the outer GMRES method. <br>
<br>
Can someone give me some insight into this?<br>
<br>
Best regards<br>
Elias<br>
<br>
<br>
<div class="">On 28.05.2015 18:02, Matthew Knepley wrote:<br>
</div>
<blockquote cite="mid:CAMYG4Gk-QAbk=95jpjH_GOBmfaFLOOfEamrA3TmXcuTjKs5Lcw@mail.gmail.com" type="cite">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, May 28, 2015 at 10:47 AM, Elias Karabelas <span dir="ltr"><<a href="mailto:elias.karabelas@medunigraz.at" target="_blank">elias.karabelas@medunigraz.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Dear Members,<br>
<br>
I want to solve a Block System arising from the Discretization of a stabilized Finite Element Formulation of the Stokes System.<br>
<br>
I have the following Block Structure<br>
<br>
A -B^T<br>
B C<br>
<br>
The Preconditioner I intend to use is a block preconditioner of the Form<br>
<br>
A -B^T<br>
S<br>
<br>
where S is an approximation of the Schur Complement. For applying the
inverse of the schur complement I want to use a Stabilized Least Squares
Commutator in the form<br>
<br>
S^-1 = (B diag(Q)^-1 B^T + C_1)^-1 (B diag(Q)^-1 A diag(Q)^-1 B^T + C_2) (B diag(Q)^-1 B^T + C_1)^-1<br>
<br>
where Q is the mass matrix and C_1 and C_2 are some additional stabilization matrices.<br>
<br>
I got from the Manual, that I can use the PCFieldSplit preconditioner
for generating the general Block preconditioner as indicated above. And I
also found that I can define some arbitrary PC with PCSHELL. My
question is, if it is possible to use PCSHELL to define the action of
S^-1 as indicated above.<br></blockquote><div><br></div><div>1) Use FieldSplit is the right PC to start with. Make sure you can do something simple like </div><div><br></div><div> A -B^T</div><div> C + B diag(A)^{-1} B^T</div><div><br></div><div>with it before we do the more complicated thing.</div><div><br></div><div>2) You will want to implement a PC for the (1,1) block. You can use a PCSHELL, which is simpler to setup, but</div><div> that means you will have to manually pull out the FieldSplit KSP and set it. If instead you define your own</div><div> PC implementation, its more boilerplate code, but you could specify this PC from the command line without</div><div> any FieldSplit specific code in your application.</div><div><br></div><div>3) Your PC will get two matrices, the MatSchurComplement, and the preconditioning matrix. If you set Q as the</div><div> preconditioning matrix, or really if you set</div><div><br></div><div> A 0</div><div> 0 Q</div><div> </div><div>as the global preconditioning matrix, then the subsolve for (1,1) will get the Schur Complement and Q, and I think</div><div>that is enough to build your Stabilized LSC PC.</div><div><br></div><div>Let me know if this makes sense to you.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Kind Regards<span class=""><font color="#888888"><br>
Elias Karabelas<br>
<br>
-- <br>
Elias Karabelas, Ph.D.<br>
<br>
Medical University of Graz<br>
Institute of Biophysics<br>
Harrachgasse 21/IV<br>
8010 Graz, Austria<br>
<br>
Phone: <a href="tel:%2B43%20316%20380%207759" value="+433163807759" target="_blank">+43 316 380 7759</a><br>
Email: <a href="mailto:elias.karabelas@medunigraz.at" target="_blank">elias.karabelas@medunigraz.at</a><br>
Web : <a href="http://forschung.medunigraz.at/fodok/staff?name=EliasKarabelas" target="_blank">http://forschung.medunigraz.at/fodok/staff?name=EliasKarabelas</a><br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">What
most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their
experiments lead.<br>-- Norbert Wiener</div>
</div></div>
</blockquote></div>