3#include <amdis/linearalgebra/istl/MatrixBackend.hpp>
4#include <amdis/linearalgebra/istl/VectorBackend.hpp>
5#include <dune/istl/paamg/pinfo.hh>
11 template <
class Vec,
class Comm,
12 std::enable_if_t<!std::is_same_v<Comm,Dune::Amg::SequentialInformation>,
int> = 0>
13 auto normISTL(Vec
const& x, Comm
const& comm)
19 auto normISTL(Vec
const& x, Dune::Amg::SequentialInformation
const& comm)
28 template <
class T1,
class C1,
class T2,
class T3>
29 auto residuum(ISTLBCRSMatrix<T1,C1>
const& A, ISTLBlockVector<T2>
const& x, ISTLBlockVector<T3>
const& b)
32 A.matrix().mmv(x.vector(), r);
33 return Impl::normISTL(r, A.comm().impl());
37 template <
class T1,
class C1,
class T2,
class T3>
38 auto relResiduum(ISTLBCRSMatrix<T1,C1>
const& A, ISTLBlockVector<T2>
const& x, ISTLBlockVector<T3>
const& b)
40 return residuum(A,x,b) / Impl::normISTL(b.vector(), A.comm().impl());