<div dir="ltr">You can lag the update of the Schur complement and use your solver as a preconditioner.<div>If your problems don't change much you might converge fast enough (ie, < 4 iterations with one solve per iteration), but what you have is not bad if the size of your auxiliary, p, space does not grow.<br><div><br></div><div>Mark</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 30, 2023 at 11:56 AM Karabelas, Elias (<a href="mailto:elias.karabelas@uni-graz.at" target="_blank">elias.karabelas@uni-graz.at</a>) <<a href="mailto:elias.karabelas@uni-graz.at" target="_blank">elias.karabelas@uni-graz.at</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">Dear Community,<br>
<br>
I have a linear system of the form<br>
<br>
|K B| du f1<br>
<br>
=<br>
<br>
|C D| dp f2<br>
<br>
where K is a big m x m sparsematrix that comes from some FE <br>
discretization, B is a coupling matrix (of the form m x 4), C is of the <br>
form (4 x m) and D is 4x4.<br>
<br>
I save B and C as 4 Vecs and D as a 4x4 double array. D might be <br>
singular so at the moment I use the following schur-complement approach <br>
to solve this system<br>
<br>
1) Calculate the vecs v1 = KSP(K,PrecK) * f1, invB = [ KSP(K, PrecK) * <br>
B[0], KSP(K, PrecK) * B[1], KSP(K, PrecK) * B[2], KSP(K, PrecK) * B[3] ]<br>
<br>
2) Build the schurcomplement S=[C ^ K^-1 B - D] via VecDots (C ^ K^-1 B <br>
[i, j] = VecDot(C[i], invB[j])<br>
<br>
3) invert S (this seems to be mostly non-singular) to get dp<br>
<br>
4) calculate du with dp<br>
<br>
So counting this, I need 5x to call KSP which can be expensive and I <br>
thought of somehow doing the Schur-Complement the other way around, <br>
however due to the (possible) singularity of D this seems like a bad <br>
idea (even using a pseudoinverse)<br>
<br>
Two things puzzle me here still<br>
<br>
A) Can this be done more efficiently?<br>
<br>
B) In case my above matrix is the Jacobian in a newton method, how do I <br>
make sure with any form of Schur Complement approach that I hit the <br>
correct residual reduction?<br>
<br>
Thanks<br>
<br>
Elias<br>
<br>
-- <br>
Dr. Elias Karabelas<br>
Universitätsassistent | PostDoc<br>
<br>
Institut für Mathematik & Wissenschaftliches Rechnen | Institute of Mathematics & Scientific Computing<br>
Universität Graz | University of Graz<br>
<br>
Heinrichstraße 36, 8010 Graz<br>
Tel.: +43/(0)316/380-8546<br>
E-Mail: <a href="mailto:elias.karabelas@uni-graz.at" target="_blank">elias.karabelas@uni-graz.at</a><br>
Web: <a href="https://ccl.medunigraz.at" rel="noreferrer" target="_blank">https://ccl.medunigraz.at</a><br>
<br>
Bitte denken Sie an die Umwelt, bevor Sie dieses E-Mail drucken. Danke!<br>
Please consider the environment before printing this e-mail. Thank you!<br>
<br>
</blockquote></div>