IFEM  90A354
Functions
ISTLSolParams.C File Reference

Linear solver parameters for ISTL. More...

#include "ISTLSolParams.h"
#include "LinSolParams.h"
#include "ProcessAdm.h"
#include <dune/istl/overlappingschwarz.hh>
#include <dune/istl/paamg/amg.hh>
#include <dune/istl/matrixmatrix.hh>
#include <dune/common/version.hh>
#include <dune/istl/paamg/fastamg.hh>
#include <dune/istl/paamg/twolevelmethod.hh>
Include dependency graph for ISTLSolParams.C:

Functions

template<class Prec >
static ISTL::InverseOperator * setupWithPreType (const LinSolParams &solParams, ISTL::Operator &op, Prec &pre)
 Helper template for setting up a solver with the appropriate preconditioner type. More...
 
template<class Smoother >
static ISTL::Preconditioner * setupAMG (const LinSolParams &params, size_t block, ISTL::Operator &op, std::unique_ptr< ISTL::InverseOperator > *solver)
 Helper template for setting up an AMG preconditioner with a given smoother.
 
template<class Smoother , class FineSmoother >
static ISTL::Preconditioner * setupAMG2_full (const LinSolParams &params, size_t block, ISTL::Operator &op, std::unique_ptr< ISTL::InverseOperator > *solver, FineSmoother *fsmooth)
 Helper template for setting up a AMG preconditioner ! with fine smoother differing from the other levels.
 
template<class FineSmoother >
static ISTL::Preconditioner * setupAMG2_smoother (const LinSolParams &params, size_t block, ISTL::Operator &op, std::unique_ptr< ISTL::InverseOperator > *solver, FineSmoother *fsmooth)
 Helper template for setting up a AMG preconditioner smoother.
 
static ISTL::Preconditioner * setupAMG2 (const LinSolParams &params, size_t block, ISTL::Operator &op, std::unique_ptr< ISTL::InverseOperator > *solver)
 Helper template for setting up a AMG2 preconditioner.
 
template<class Type >
static ISTL::Preconditioner * setupSolver (Type *pre, ISTL::Operator &op, const LinSolParams &solParams, std::unique_ptr< ISTL::InverseOperator > *solver)
 Conditionally setup a KSP.
 

Detailed Description

Linear solver parameters for ISTL.

Date
Mar 10 2016
Author
Arne Morten Kvarving / SINTEF

Function Documentation

◆ setupWithPreType()

template<class Prec >
static ISTL::InverseOperator* setupWithPreType ( const LinSolParams solParams,
ISTL::Operator &  op,
Prec &  pre 
)
static

Helper template for setting up a solver with the appropriate preconditioner type.

We cannot instance using dynamic polymorphism, the solver need access to the real type for the preconditioner. We can however call the solver in the interface class scope afterwards.

References SettingMap::getDoubleValue(), SettingMap::getIntValue(), and SettingMap::getStringValue().

Referenced by setupAMG(), setupAMG2_full(), ISTLSolParams::setupPC(), and setupSolver().