[Dune] Applying an ISTL InverseOperator to multiple right-hand sides

Christian Engwer christi at uni-hd.de
Sun May 2 21:27:27 CEST 2010


Dear Bard,

> In one of our projects we need to solve sparse systems of linear equations of the form
> 
>     Sx = r  (*)
> 
> with 'x' and 'r' being ordinary one-dimensional vectors of scalars.  The operator 'S' is symmetric and positive definite, so we've been using the CGSolver template from ISTL (with the Dune::Amg::AMG template as a preconditioner).  Now a need has arisen where we  would like to extend the system above to the form
> 
>     SX = R
> 
> where the number of right-hand sides (and solutions) is variable--though fixed (typically at three) during any one run.  So far we've assembled the system matrix once for each right hand side.  I'm probably missing something simple, but is there way in ISTL to have the solvers (e.g., the CGSolver or others) accept multiple right-hand sides (and solutions)?
> 
> For reference, these are the types/classes we're currently using to represent the system (*)
> 
>     BCRSMatrix< FieldMatrix<double, 1, 1> > S
>     BlockVector< FieldVector<double, 1> > x, r
> 
> whence we implement the linear solver as a suitable MatrixAdapter of 'S'.
> 
> Any and all information and comments is greatly appreciated.

perhaps I didn't get your point, but what exactly are you trying to
achieve? As you are solving your system using an iterative solver, the
computational costs will be same, no matter if you do
foreach rhs
  krylov-method
    preconditioner
or
krylov-method
  preconditioner
    foreach rhs
further more I'm not quite sure what the Krylov method should do when
you try to operate on multiple vectors, as each rhs will lead to a
different defect and thus to different search direction.

What do want to make sure is that you assemble the system matrix 
and construct the coarse space hierarchy in the AMG only once, but
there is no reason why you shouldn't be able to do so.

Christian





More information about the Dune mailing list