Commit 97419c6f authored by Timo Koch's avatar Timo Koch Committed by Bernd Flemisch
Browse files

[linear][istl] Add AMG-CG solver

parent 0d214d22
......@@ -387,6 +387,17 @@ using AMGBiCGSTABIstlSolver =
Detail::IstlAmgPreconditionerFactory
>;
/*!
* \ingroup Linear
* \brief An AMG preconditioned CG solver using dune-istl
*/
template<class LSTraits, class LATraits>
using AMGCGIstlSolver =
IstlIterativeLinearSolver<LSTraits, LATraits,
Dune::CGSolver<typename LATraits::SingleTypeVector>,
Detail::IstlAmgPreconditionerFactory
>;
/*!
* \ingroup Linear
......
......@@ -32,7 +32,9 @@
#include <dune/common/timer.hh>
#include <dune/grid/io/file/vtk.hh>
#include <dumux/linear/seqsolverbackend.hh>
#include <dumux/linear/algebratraits.hh>
#include <dumux/linear/linearsolvertraits.hh>
#include <dumux/linear/istlsolvers.hh>
#include <dumux/linear/pdesolver.hh>
#include <dumux/common/properties.hh>
......@@ -143,7 +145,8 @@ int main(int argc, char** argv)
using Assembler = FVAssembler<TypeTag, NUMDIFFMETHOD>;
auto assembler = std::make_shared<Assembler>(problem, gridGeometry, gridVariables);
using LinearSolver = SSORCGBackend;
using LinearSolver = AMGCGIstlSolver<LinearSolverTraits<GridGeometry>,
LinearAlgebraTraitsFromAssembler<Assembler>>;
auto linearSolver = std::make_shared<LinearSolver>();
// solver the linear problem
......
Supports Markdown
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