27 #ifndef EWOMS_PARALLEL_ISTL_BACKEND_HH
28 #define EWOMS_PARALLEL_ISTL_BACKEND_HH
34 namespace Properties {
79 template <
class TypeTag>
84 typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
86 typedef typename GET_PROP_TYPE(TypeTag, LinearSolverWrapper) LinearSolverWrapper;
89 typedef typename ParentType::OverlappingVector OverlappingVector;
93 typedef typename LinearSolverWrapper::RawSolver RawLinearSolver;
95 typedef typename GET_PROP_TYPE(TypeTag, JacobianMatrix) Matrix;
96 typedef typename GET_PROP_TYPE(TypeTag, GlobalEqVector) Vector;
110 LinearSolverWrapper::registerParameters();
116 std::shared_ptr<RawLinearSolver> prepareSolver_(ParallelOperator& parOperator,
117 ParallelScalarProduct& parScalarProduct,
118 ParallelPreconditioner& parPreCond)
120 return solverWrapper_.get(parOperator,
125 void cleanupSolver_()
127 solverWrapper_.cleanup();
130 bool runSolver_(std::shared_ptr<RawLinearSolver> solver)
132 Dune::InverseOperatorResult result;
133 solver->apply(*this->overlappingx_, *this->overlappingb_, result);
134 return result.converged;
137 LinearSolverWrapper solverWrapper_;
143 namespace Properties {
150 Ewoms::Linear::SolverWrapperBiCGStab<TypeTag>);
153 PreconditionerWrapper,
154 Ewoms::Linear::PreconditionerWrapperILU0<TypeTag>);
157 SET_INT_PROP(ParallelIstlLinearSolver, GMResRestart, 10);
An overlap aware ISTL scalar product.
Definition: overlappingscalarproduct.hh:41
Provides all unmodified linear solvers from dune-istl.
Definition: parallelistlbackend.hh:80
An overlap aware linear operator usable by ISTL.
Definition: overlappingoperator.hh:39
#define NEW_TYPE_TAG(...)
Define a new type tag.
Definition: propertysystem.hh:169
Provides the common code which is required by most linear solvers.
Definition: parallelbasebackend.hh:142
#define INHERITS_FROM(...)
Syntactic sugar for NEW_TYPE_TAG.
Definition: propertysystem.hh:230
#define SET_INT_PROP(EffTypeTagName, PropTagName,...)
Set a property to a simple constant integer value.
Definition: propertysystem.hh:345
static void registerParameters()
Register all run-time parameters for the linear solver.
Definition: parallelbasebackend.hh:187
static void registerParameters()
Register all run-time parameters for the linear solver.
Definition: parallelistlbackend.hh:106
An overlap aware preconditioner for any ISTL linear solver.
Definition: overlappingpreconditioner.hh:44
Provides wrapper classes for the iterative linear solvers available in dune-istl. ...
Manages the initializing and running of time dependent problems.
Definition: simulator.hh:75
#define NEW_PROP_TAG(PTagName)
Define a property tag.
Definition: propertysystem.hh:247
#define SET_TYPE_PROP(EffTypeTagName, PropTagName,...)
Set a property which defines a type.
Definition: propertysystem.hh:377
Provides the common code which is required by most linear solvers.