<p dir="ltr"><br>
On Feb 14, 2014 12:11 AM, "Jed Brown" <<a href="mailto:jed@jedbrown.org">jed@jedbrown.org</a>> wrote:<br>
><br>
> I'm confronted with code that looks like this:<br>
><br>
> MatCreateShell(...,&B);<br>
> MatSetBlockSize(B,3);<br>
><br>
> This used to work, but then we made block sizes stricter and since<br>
> MatCreate_Shell calls PetscLayoutSetUp, we can't change the block size<br>
> later. Is there a sane way to fix this (perhaps leaving [rc]map->bs=-1<br>
> and collapsing it to 1 the first time it is actually used), or must we<br>
> replace that code with the following?<br>
><br>
> MatCreate(comm,&B);<br>
> MatSetBlockSize(B,3);<br>
> MatSetSizes(B,m,n,M,N);<br>
> MatSetType(B,MATSHELL);<br>
> MatShellSetContext(B,ctx);<br>
> MatSetUp(B);<br>
I think you need this or we need to change MatCreateShell</p>
<p dir="ltr"> Matt</p>