Commit b8e147e3 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Blocking rebase to master

parent 3880b40d
Pipeline #6063 failed with stage
in 80 minutes and 36 seconds
#pragma once
#include <amdis/linearalgebra/istl/HierarchicMatrix.hpp>
#include <amdis/linearalgebra/istl/HierarchicVector.hpp>
#include <amdis/linearalgebra/istl/MatrixBackend.hpp>
#include <amdis/linearalgebra/istl/VectorBackend.hpp>
......@@ -21,4 +23,24 @@ namespace AMDiS {
return residuum(A,x,b) / b.vector().two_norm();
}
#if HAVE_DUNE_BLOCKED
// ||b - A*x||
template <class T1, class C1, class RB, class CB, class T2, class T3>
auto residuum(ISTLHierarchicMatrix<T1,C1,RB,CB> const& A, ISTLHierarchicVector<T2,CB> const& x, ISTLHierarchicVector<T3,RB> const& b)
{
auto r = b.vector();
A.matrix().mmv(x.vector(), r);
return r.two_norm();
}
// ||b - A*x|| / ||b||
template <class T1, class C1, class RB, class CB, class T2, class T3>
auto relResiduum(ISTLHierarchicMatrix<T1,C1,RB,CB> const& A, ISTLHierarchicVector<T2,CB> const& x, ISTLHierarchicVector<T3,RB> const& b)
{
return residuum(A,x,b) / b.vector().two_norm();
}
#endif
} // end namespace AMDiS
......@@ -101,7 +101,7 @@ namespace AMDiS
Map::addCreator("ldl", ldl);
#endif
#if HAVE_SUITESPARSE_SPQR
#if HAVE_SUITESPARSE_SPQR && !HAVE_DUNE_BLOCKED
auto spqr = new Creator<Dune::SPQR<M>>;
Map::addCreator("spqr", spqr);
#endif
......
elliptMesh->global refinements: 4
elliptMesh->global refinements: 2
elliptMesh->num cells: 8 8
elliptMesh->overlap: 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment