Skip to content
Snippets Groups Projects
Martin Beck's avatar
Martin Beck authored
[AMGBackend] fix AMGBackend for sequential grids and HAVE_MPI == 1

So far, the AMGBackend only worked for sequential grids if HAVE_MPI
was 0. This was due to the fact that AmgTraits distinguished between
parallel and sequential by evaluating HAVE_MPI. If HAVE_MPI was 1
but the Grid was sequential, this lead to compiler errors for the
constructor calls of the Communicator, LinearOperator and
ScalarProduct.

Do this properly now by using Dune::Capabilities for distinction
between the sequential and parallel case. For Dune 2.4, the
capability isParallel has to be used, while for Dune 3.0, it is
canCommunicate. The correct AmgTraits and constructor calls are
chosen by template specialization.

This solves FS#300.

See merge request !16
c1714f30
History