[petsc-users] Changing block size.
    Andrew Spott 
    ansp6066 at colorado.edu
       
    Wed Dec  3 19:18:02 CST 2014
    
    
  
Awesome, thanks.  I ran into that bug and thought I was doing something wrong.
-Andrew
—
Andrew
On Wed, Dec 3, 2014 at 5:40 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>> On Dec 3, 2014, at 5:13 PM, Andrew Spott <ansp6066 at colorado.edu> wrote:
>> 
>> What is the easiest way to change the block size of a matrix?
>> 
>> I have a matrix that was saved with a block size of 1, and I would like to increase it upon load to a larger block size.  Is there a simple way of doing this?
>    Yes, declare it as a BAIJ before calling MatLoad() for example
>     Mat A;
>     MatCreate(comm,&A);
>     MatSetType(A,MATBAIJ);
>     MatLoad(A,viewer);
>     and pass the command line option -matload_block_size 2  
>     In the development version of PETSc you can skip the command line option and instead use 
>     MatSetBlockSize(A,2);   before the call to MatLoad().    There was a bug in the release version of PETSc that prevented this from previously working.
>    Barry
>> 
>> Thanks
>> 
>> -Andrew Spott
>> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141203/eecc7e1a/attachment.html>
    
    
More information about the petsc-users
mailing list