If what you want to do is apply a block preconditioner to a matrix arising from a regular<br>grid, DA can already do this automatically. This uses the PCFieldSplit, and can be<br>completely controlled from the command line. It is designed to do these sorts of things.<br>
<br>I do not understand your last question.<br><br>  Matt<br><br><div class="gmail_quote">On Fri, Jan 29, 2010 at 11:29 AM, Michel Cancelliere <span dir="ltr">&lt;<a href="mailto:fernandez858@gmail.com">fernandez858@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Thank you for your promptly response,  i will use unsorted inex set as<br>
you suggest (because my submatrices are very large (4 submatrices N/2<br>
x N/2 from the original one Nx N),<br>
I realize that i cannot use block matrices because the reordering<br>
split within the blocks and the resulting matrices are not block<br>
matrices anymore. In terms of performance how much can affect this to<br>
the code, in the sense if i apply for example an ILU preconditioner to<br>
a block matrix (baij) and solve the same system but this time using an<br>
aij matrix ? not sure if it is clear<br>
<br>
Thanks<br>
Michel<br>
<br>
<br>
<br>
<br>
On 1/29/10, Jed Brown &lt;<a href="mailto:jed@59a2.org">jed@59a2.org</a>&gt; wrote:<br>
&gt; On Fri, 29 Jan 2010 09:43:05 -0600 (CST), <a href="mailto:abhyshr@mcs.anl.gov">abhyshr@mcs.anl.gov</a> wrote:<br>
&gt;&gt; Instead of calling MatGetSubMatrix to get each submatrix you can use<br>
&gt;&gt; MatGetSubMatrices to extract several submatrices at once. See<br>
&gt;&gt; <a href="http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatGetSubMatrices.html#MatGetSubMatrices" target="_blank">http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatGetSubMatrices.html#MatGetSubMatrices</a>.<br>

&gt;<br>
&gt; I don&#39;t think Michel was asking to extract multiple matrices.  In<br>
&gt; serial, MatGetSubMatrices is implemented by calling MatGetSubMatrix so<br>
&gt; there is no weaker assumption on index set sortedness.<br>
&gt;<br>
&gt; Jed<br>
&gt;<br>
</blockquote></div><br><br clear="all"><br>-- <br>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<br>