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

   Matt

Reply via email to