<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hello,</p>
<p><br>
</p>
<p>I have a DMStag grid with one dof on each edge and face center. </p>
<p>I want to use a PCFieldSplit preconditioner on a Jacobian matrix that I assume is already split but I am not sure how to determine the fields. </p>
<p>In the DMStag examples (ex2.c and ex3.c), the function PCFieldSplitSetDetectSaddlePoint is used to <font size="3">determine those </font><font size="3">fields based on zero diagonal entries. In my case, I have a Jacobian matrix that does not have </font>zero<font size="3"> diagonal
entries. </font></p>
<p><font size="3"><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;">Can I use that </span></font><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;">PCFieldSplitSetDetectSaddlePoint in this case? </span></p>
<p><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;">If not, how should I do? </span></p>
<p><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;">Should</span><font size="3"><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;"> I do like this example (</span></font><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;">https://www.mcs.anl.gov/petsc/petsc-master/src/ksp/ksp/tutorials/ex43.c.html)</span><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;">: </span></p>
<p><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;">const PetscInt Bfields[1] = {0},Efields[1] = {1};</span></p>
<p><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;">KSPGetPC(ksp,&pc);</span></p>
<p><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;">PCFieldSplitSetBlockSize(pc,2);</span></p>
<p><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;">PCFieldSplitSetFields(pc,"B",1,Bfields,Bfields); PCFieldSplitSetFields(pc,"E",1,Efields,Efields); </span></p>
<p><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;">where my B unknowns are defined on face centers and E unknowns are defined on edge centers?</span></p>
<p><br>
</p>
<p>One last thing, I do not know which field comes first. Is it the one defined for face dofs or edge dofs.</p>
<p><br>
</p>
<p>Thank you.</p>
<p>Best regards,</p>
<p><br>
</p>
<p>Zakariae</p>
<p></p>
</div>
</body>
</html>