Chung-Kan Huang <[email protected]> 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.

Attachment: signature.asc
Description: PGP signature

Reply via email to