# [petsc-users] Customizeing MatSetValuesBlocked(...)

Jinquan Zhong jzhong at scsolutions.com
Thu Aug 9 10:50:43 CDT 2012

```•         A’x=b, where A’=[A^-1 U B]=
What does the notation above mean?

•  That means A’ consists A^-1 and B.  A’ is a sparse matrix at the order of 2 million.  B = sparse matrix at the order of 2 million to be mixed and mingled with A^-1.

"mingled" is not a very useful term. How about using an actual equation so we can have some clue what you mean.

o   I agree.  It is hard to have an accurate equation to for the structure of A’.  But if you are familiar with FEM,  you may know global stiffness matrix K=SIGMA_ij( K_ij ), the assembling process of elemental stiffness.  Here A’=K.

o   We partition the FEM domain into two physical pieces due to different operations they are defined for.  After completing each operation, we need to operate on A^-1_ij and B_i’j’ such that we can have K=A’=SIGMA_ij (A^-1_ij)+SIGMA_i’j’(B_i’j’).

If you have an "inverse" floating around, what sort of operator is it the inverse of.

•  A is a double complex matrix we have generated from a practical application using FEM.
Then there is no way A^{-1} should be stored as a dense matrix.

o   It is stored as a dense matrix in scalapack.  It stays in the same way in cores as scalapack finishes its inversion.  We could define A^-1 as dense matrix in PETSc.

o   Another constraint we have is we have to use direct solver for QA purposes.  This brings up the needs to convert the dense matrix into MATAIJ or MATMPIAIJ.  However, in PETSc, converting dense matrix-formatted A^-1 into MATAIJ/ MATMPIAIJ also takes lots of time.

Here is what I am looking at after all these discussion:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

·         Some function similar to MatCreateMPIAIJWithArrays<http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCreateMPIAIJWithArrays.html>(..,A^-1) with the additional capability to specify the location of upper-left corner of distributed A^-1 in A’, the global matrix.

·         The reason is that in CSR format defaulted in PETSc, the entire row has to be input in one rank. In this application, we have partitioned this row into different pieces due to the operation on ScaLAPACK. Due to large amount of data, there is no practical way that we can gather the entire portioned rows of A^-1 into on rank.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120809/5abf9adb/attachment-0001.html>
```

More information about the petsc-users mailing list