MatSetValuesBlocked

Barry Smith bsmith at mcs.anl.gov
Fri Feb 16 20:38:13 CST 2007


  It is b) with the column oriented option it would be 1 5 9 13 2 6 ....

   Barry

I will add your example to the manual page to make this absolutly clear
for future users.


On Fri, 16 Feb 2007, Saikrishna V. Marella wrote:

> Hey guys,
> 
> How are the block matrices assembled when using
> MatSetValuesBlocked(mat,m,idxm[],n,idxn[],v[],addv).
> 
> Suppose m=n=2 and block size(bs) = 2 The matrix I am trying to assemble is
> 
> 1  2  | 3  4
> 5  6  | 7  8
> - - - | - - -
> 9  10 | 11 12 
> 13 14 | 15 16
> 
> The manual says, v[] should be row-oriented. For Block matrices what does
> that mean?
> 
> Should the array v[] being passed in look like
> 
> a) v[] = [1,2,5,6,3,4,7,8,9,10,13,14,11,12,15,16] 
>                 
>                    OR
> 
> b) v[] = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]
> 
> Thanks.
> Sai Marella.
> _____________________________________________________
> Saikrishna Marella, (PhD), Project Engineer
> CFD Research Corp. 215 Wynn Dr. Huntsville AL 35805
> Tel: 256-726-4954,(4800), Fax(4806) , svm at cfdrc.com
> Home Page:  http://www.cfdrc.com
> 




More information about the petsc-users mailing list