[petsc-users] about ksp

Jed Brown jedbrown at mcs.anl.gov
Mon Aug 29 16:16:57 CDT 2011


On Mon, Aug 29, 2011 at 15:51, Likun Tan <likunt at andrew.cmu.edu> wrote:

> Instead of solving Ax=b with different right-hand-side sequentially, we
> can also form a sparse block diagonal matrix A and a vector b composed of
> all the elements. Then we can set values to each section of b concurrently
> and solve the enlarged system in parallel, is this an efficient way?
>

You can assemble a single AIJ matrix and then use MatCreateMAIJ() to make it
apply to a multi-vector. You can then make a larger vector and run a normal
Krylov method.

The only downside is that you won't get the usual property that the Krylov
method is spectrally adaptive to the right hand side (because there is only
one inner product for all the components), but this can work alright anyway.
Preconditioning will take more effort.

I think this is likely premature optimization for you. I recommend solving
the systems by calling KSPSolve() multiple times for now. Later, when
everything is working, you might experiment with ways to solve the systems
together.


>
> And also, I found MatCreateMPIBDiag()
>

This format was removed from PETSc a few years ago, but I don't think it's
what you want anyway.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110829/6ad212c0/attachment.htm>


More information about the petsc-users mailing list