<div dir="ltr"><div dir="ltr">Barry,<div><br></div><div>Thank you for the reply. I am a beginner. I was confused with the following statement in the manual</div><div><br></div><div>" If the matrices are
stored as interlaced then PCFieldSplitSetFields() can be called repeatedly to indicate which
fields belong to each block. " <br></div><div><br></div><div>Does it mean that we need to set each row number which field does it belong to? </div><div><br></div><div>If I set the block size to 3 and set</div><div> -pc_fieldsplit_0_fields 0,1<br>
-pc_fieldsplit_1_fields 2<br>
<br></div><div>In what format is Petsc expecting for the matrix to be assembled? In other words, how does Petsc know where the entries of A00, A01, A10 and A11 are located?</div><div><br></div><div>thanks,</div><div>Raju.</div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 31, 2020 at 7:21 PM Barry Smith <<a href="mailto:bsmith@petsc.dev">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>
-pc_fieldsplit_block_size 3 (you may not need this if the code sets the block size to 3).<br>
<br>
-pc_fieldsplit_0_fields 0,1<br>
-pc_fieldsplit_1_fields 2<br>
<br>
<br>
<br>
<br>
<br>
> On Jul 31, 2020, at 7:05 PM, Raju Mandhapati via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<br>
> <br>
> Hello,<br>
> <br>
> I have a matrix assembled in interlaced format. I am not able to follow how to use fieldsplit. Is there a good example to show how to do this. My variable are in this format [ {u1,v1,p1}, {u2,v2,p2}, ....,{un,vn,pn}], where n is the number of grid points and u,v,p are the velocity and pressure components. The matrix is assembled as<br>
> <br>
> [ uu11 uv11 up11 uu12 uv12 up12 ......<br>
> vu11 vv11 vp11 vu12 vv12 vp12 .......<br>
> pu11 pv11 pp11 pu12 pv12 pp12 ......<br>
> <br>
> uu21 uv21 up21 uu22 uv22 up22 ......<br>
> vu21 vv21 vp21 vu22 vv22 vp22 .......<br>
> pu21 pv21 pp21 pu22 pv22 pp22 ......<br>
> <br>
> .<br>
> .<br>
> <br>
> ]<br>
> <br>
> I want to split u and v fields as one block and p field as another block.<br>
> <br>
> Any help would be appreciated.<br>
> <br>
> Raju.<br>
> <br>
> <br>
> <br>
<br>
</blockquote></div></div>