[Dune] calling ISTL solvers for dense matrices

Christian Engwer christian.engwer at uni-muenster.de
Wed Jun 28 11:10:13 CEST 2017


On Wed, Jun 28, 2017 at 09:23:42AM +0200, Markus Blatt wrote:
> Hi,
> 
> On Tue, Jun 27, 2017 at 10:01:47AM +0200, Christian Engwer wrote:
> > in complexmatrixtest ISTL krylov solvers are called for FieldMatrix
> > and FieldVector. Is this a feature we want to support? I was a bit
> > surprised and bitten by this usag. I tried to make ISTL work with
> > custom allocators, but this requires the solvers to ask for the
> > allocators in the vector in order to properly rebind te allocator for
> > internal data. This obviously fails for FieldVector, as it doesn't
> > need any allocator.
> > 
> 
> While I never used them for dense matrix, I have expected and would
> expect them to work. If they do, why change that?

As I said, this does not work anymore, if we need a particular
allocator. The GMRES (and some other solvers have similar problems)
have to allocate an std::vector of weights of the size of the restart
length. If the field type needs higher alignment, the std::vector has
to use the apprpriate allocator. This information is (usually) already
there, as the user passed in the according ISTL-vector we can deduce
the allocator by rebinding.


If we want to support FieldMatrix and sparse matrice (for DenseMatrix
it should work, or should be achievable, as that one could also export
an allocator), we could use s SFINAE to try to rebind the allocator
and fall back to std::allocator if there is no allocator defined.

Ciao
Christian





More information about the Dune mailing list