[petsc-users] Conversion between AIJ & BAIJ
Jed Brown
jed at jedbrown.org
Tue Jan 20 16:41:27 CST 2015
Chung-Kan Huang <ckhuangf at gmail.com> writes:
> Hi,
>
> Does PETSc provide means for conversion between AIJ & BAIJ.
Did you try MatConvert?
> My matrix is created as AIJ because it makes life easy for most part of the
> applications
Why does the assembly code know what format it is assembling? All the
same MatSetValues should work after MatSetType(A,MATBAIJ).
> but some part of applications actually get some benefits with BAIJ.
> So I wonder if a matrix can exist as two idenfities and I can use
> either format depend on which one is more convenient at run time.
Yes, it's idiomatic to set a prefix and call MatSetFromOptions, then use
-yourprefix_mat_type baij at run-time.
-------------- 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/20150120/2d4f1c33/attachment.pgp>
More information about the petsc-users
mailing list