[petsc-users] Matrix Create

Jed Brown jed at jedbrown.org
Fri Nov 7 05:20:11 CST 2014


吕超 <luchao at mail.iggcas.ac.cn> writes:

> Dear all,  
>
>       Now, I need create a big matrix, but only some rows have values,
>       other rows are all 0. The spy of the matrix looks like the
>       figure below.

You can create a matrix like this, but the default distribution is for
balancing rows.  Pass local sizes to MatSetSizes if you want something
different.

You'll get better performance if you scatter to the reduced space, then scatter back).

>       Can you tell me how to create this kind of matrix?
>
> Thank you for your help
>
> LV Chao
>
> 2014/11/7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141107/c727c4f8/attachment.pgp>


More information about the petsc-users mailing list