Skip to content

[AMGBackend] fix AMGBackend for sequential grids and HAVE_MPI == 1

Bernd Flemisch requested to merge feature/FS300-fix-AMGBackend into master

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.

Merge request reports