Reuse matrix and vector
Jed Brown
jed at 59A2.org
Tue Nov 10 06:08:45 CST 2009
jarunan at ascomp.ch wrote:
> The code is compiled with the optimized version of PETSc. The row
> indices and column indices for each row are sorted. Well, they are not
> sorted for diagonal or off-diagonal part.
I recommend using a debug version for all testing and only the optimized
for production/scalability. You should use
MatCreateMPIAIJWithSplitArrays() if you have these available separately.
But it sounds like you have one big array where each row has the
diagonal part followed by the off-diagonal part? This format can't be
used directly by PETSc, just preallocate with
MatMPIAIJSetPreallocation() and use MatSetValues().
Jed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20091110/8816bd37/attachment-0001.pgp>
More information about the petsc-users
mailing list