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

Jed Brown jedbrown at mcs.anl.gov
Thu Aug 9 11:41:23 CDT 2012


On Thu, Aug 9, 2012 at 9:50 AM, Jinquan Zhong <jzhong at scsolutions.com>wrote:
>
>
>
> **
>
> "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.
>
This cannot be true because you say A' is the larger part sparse and part
dense matrix. Maybe you mean A rather than A'?


> ** **
>
> **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’).
>
The sum of the inverses are not the inverses of the sum. Can you back up
further to explain what underlying problem you are trying to solve?


> ****
>
>   ****
>
> ** **
>
> 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.
>
It should not be done this way. A^{-1} should not be stored explicitly.
Store the sparse finite element matrix A. Then when you want to "apply
A^{-1}", solve with the sparse matrix.


> ****
>
> **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.
>
Choose the right tool for the job. When I cook dinner tonight, I plan to
use a stove and a frying pan instead of a dump truck radiator and 200 feet
of 18 gauge copper wire woven into a basket.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120809/2ac5153d/attachment.html>


More information about the petsc-users mailing list