"Sun, Hui" <[email protected]> writes:

> Sorry, maybe I see some difference. I'm reading line 1253 from 
> http://www.mcs.anl.gov/petsc/petsc-current/src/snes/examples/tutorials/ex48.c.html
>
> MatSetValuesBlockedStencil(B,8,rc,8,rc,&Ke[0][0],ADD_VALUES);
>
> The Ke is 16 by 16, but rc is of length 8, so that means a 2 by 2
> block is written into each stencil point of B. Is that correct? Now,
> why the compiler necessarily knows that Ke is of size 16 by 16?

Ke is declared that way in this example, but MatSetValuesBlockedStencil
just interprets the array passed as an m*bs by n*bs array in row-major
ordering.

Attachment: pgpVTzYHq7q6I.pgp
Description: PGP signature

Reply via email to