<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jun 10, 2015 at 9:55 AM, Tim Steinhoff <span dir="ltr"><<a href="mailto:kandanovian@gmail.com" target="_blank">kandanovian@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks for the quick reply!<br>
<br>
"Yes, however in order to get improved performance, you need type MATBAIJ."<br>
<br>
I considered MatSetType(A,MATAIJ); i.e. the non-block type since<br>
UMFPACK seems to require the seqaij type according to the summary<br>
page. So do I have to refrain from using the more amiable block-type<br>
if I want to make use of UMFPACK?<br></blockquote><div><br></div><div>Yes, I think so. What do you need in UMFPACK?</div><div><br></div><div>  Thanks,</div><div><br></div><div>    Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2015-06-10 16:45 GMT+02:00 Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>>:<br>
> On Wed, Jun 10, 2015 at 9:42 AM, Tim Steinhoff <<a href="mailto:kandanovian@gmail.com">kandanovian@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Hi all<br>
>><br>
>> I want to use Petsc to solve some linear systems via the built-in Krylov<br>
>> subspace methods as well as by means of UMFPACK.<br>
>><br>
>> The considered matrix is block sparse with blocks of size 6x6.<br>
>><br>
>> Here is what I came up with after taking a look at some of the examples<br>
>><br>
>> MPI_Comm comm;<br>
>> Mat A;<br>
>> PetscInt n = 10000; /* dimension of matrix */<br>
>> comm = PETSC_COMM_SELF;<br>
>> MatCreate(comm,&A);<br>
>> MatSetSizes(Amat,n,n,n,n);<br>
>> MatSetBlockSize(A,6);<br>
>> MatSetType(A,MATAIJ); /* UMFPACK compatible format due to comm =<br>
>> PETSC_COMM_SELF */<br>
>><br>
>> Questions:<br>
>> 1.<br>
>> I work on a single node with 2-8 cores. Hence, comm = PETSC_COMM_SELF; I<br>
>> guess. Is it correct in this contect to set MatSetSizes(Amat,n,n,n,n); with<br>
>> 4-times n?<br>
><br>
><br>
> Yes.<br>
><br>
>><br>
>> 2.<br>
>> After the above sequence of commands do I have to use something like<br>
>>   MatSeqAIJSetPreallocation(A,0,d_nnz); /* d_nnz <-> number of nonzeros<br>
>> per row */<br>
>> or is it possible to use<br>
>>   MatSeqBAIJSetPreallocation(A,6,0,db_nnz); /* db_nnz <-> number of block<br>
>> nonzeros per block row */<br>
><br>
><br>
> You should use this if using MATBAIJ.<br>
><br>
>><br>
>> In any case, is something like<br>
>>   MatSetValuesBlocked(A,1,idx_r,1,idx_c,myblockvals,INSERT_VALUES);<br>
>> to fill values of one block into the matrix A ok?<br>
><br>
><br>
> Yes, however in order to get improved performance, you need type MATBAIJ.<br>
><br>
>   Thanks,<br>
><br>
>     Matt<br>
><br>
>><br>
>> Regards<br>
>> Tim<br>
><br>
><br>
><br>
<span class="HOEnZb"><font color="#888888">><br>
> --<br>
> What most experimenters take for granted before they begin their experiments<br>
> is infinitely more interesting than any results to which their experiments<br>
> lead.<br>
> -- Norbert Wiener<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>