[petsc-users] Matrix Sparsity
Jed Brown
jed at 59A2.org
Wed Apr 13 05:11:39 CDT 2011
On Wed, Apr 13, 2011 at 12:02, <domenico.borzacchiello at univ-st-etienne.fr>wrote:
> I checked it and noticed that I was using an unnecessary stencil width of
> 2 (Box) and having 4 DOFs gave me a 4x5^3 = 500 non zero entries per row.
> But even if I set it to 1 and Star it'll result in 4x7 = 28 nnz while I
> need 17 at most. This means my matrices will always be double the needed
> size (roughly). How can I control this?
>
You can use
http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-dev/docs/manualpages/DM/DMDASetBlockFills.html
(named
DASetBlockFills in petsc-3.1) with the AIJ matrix format. But the storage
costs are quite similar if you store those extra few nonzeros and use the
BAIJ format, and then you benefit from faster sparse matrix kernels so the
actual run time could be less than using the less regular nonzero structure
in AIJ. Also, BAIJ smooths all the components together which makes the
smoother stronger, thus you may converge in fewer iterations.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110413/60af6462/attachment.htm>
More information about the petsc-users
mailing list