<div dir="ltr"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">Dear PETSc dev team,</span><div><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">   The documentation about MatCreateSBAIJ has following</span></div><div><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">"It is recommended that one use the </span><a href="https://petsc.org/main/docs/manualpages/Mat/MatCreate.html#MatCreate" style="font-family:"Times New Roman";font-size:medium">MatCreate</a><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">(), </span><a href="https://petsc.org/main/docs/manualpages/Mat/MatSetType.html#MatSetType" style="font-family:"Times New Roman";font-size:medium">MatSetType</a><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">() and/or </span><a href="https://petsc.org/main/docs/manualpages/Mat/MatSetFromOptions.html#MatSetFromOptions" style="font-family:"Times New Roman";font-size:medium">MatSetFromOptions</a><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">(), MatXXXXSetPreallocation() paradigm instead of this routine directly. [MatXXXXSetPreallocation() is, for example, </span><a href="https://petsc.org/main/docs/manualpages/Mat/MatSeqAIJSetPreallocation.html#MatSeqAIJSetPreallocation" style="font-family:"Times New Roman";font-size:medium">MatSeqAIJSetPreallocation</a><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">]"</span><br></div><div><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">   I currently call </span>MatCreateSBAIJ directly as follows:</div><div>MatCreateSBAIJ (with d_nnz and o_nnz)<br>MatSetValues (to add row by row)</div><div>MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);</div><div>MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);<br>MatSetOption(A, MAT_SYMMETRIC, PETSC_TRUE);<span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><br></span></div><div><br></div><div>   Two questions:</div><div>   (1) I am wondering whether what I am doing is the most efficient. </div><div><br></div><div>   (2) I try to find out how the matrix vector multiplication is implemented in PETSc for SBAIJ storage.</div><div><br></div><div>Thanks,</div><div>Sam</div></div>