Dear PETSc dev team,
   The documentation about MatCreateSBAIJ has following
"It is recommended that one use the MatCreate
<https://petsc.org/main/docs/manualpages/Mat/MatCreate.html#MatCreate>(),
MatSetType
<https://petsc.org/main/docs/manualpages/Mat/MatSetType.html#MatSetType>()
and/or MatSetFromOptions
<https://petsc.org/main/docs/manualpages/Mat/MatSetFromOptions.html#MatSetFromOptions>(),
MatXXXXSetPreallocation() paradigm instead of this routine directly.
[MatXXXXSetPreallocation() is, for example, MatSeqAIJSetPreallocation
<https://petsc.org/main/docs/manualpages/Mat/MatSeqAIJSetPreallocation.html#MatSeqAIJSetPreallocation>
]"
   I currently call MatCreateSBAIJ directly as follows:
MatCreateSBAIJ (with d_nnz and o_nnz)
MatSetValues (to add row by row)
MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);
MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);
MatSetOption(A, MAT_SYMMETRIC, PETSC_TRUE);

   Two questions:
   (1) I am wondering whether what I am doing is the most efficient.

   (2) I try to find out how the matrix vector multiplication is
implemented in PETSc for SBAIJ storage.

Thanks,
Sam

Reply via email to