27#ifndef EWOMS_PARALLEL_BICGSTAB_BACKEND_HH
28#define EWOMS_PARALLEL_BICGSTAB_BACKEND_HH
39namespace Opm::Linear {
41template <
class TypeTag>
42class ParallelBiCGStabSolverBackend;
46namespace Opm::Properties {
52{
using InheritsFrom = std::tuple<ParallelBaseLinearSolver>; };
56template<
class TypeTag>
62namespace Opm::Linear {
91template <
class TypeTag>
101 using OverlappingVector =
typename ParentType::OverlappingVector;
105 using MatrixBlock =
typename SparseMatrixAdapter::MatrixBlock;
109 ParallelPreconditioner>;
111 static_assert(std::is_same<SparseMatrixAdapter, IstlSparseMatrixAdapter<MatrixBlock> >::value,
112 "The ParallelIstlSolverBackend linear solver backend requires the IstlSparseMatrixAdapter");
116 : ParentType(simulator)
119 static void registerParameters()
121 ParentType::registerParameters();
123 Parameters::Register<Parameters::LinearSolverMaxError<Scalar>>
124 (
"The maximum residual error which the linear solver tolerates"
125 " without giving up");
131 std::shared_ptr<RawLinearSolver> prepareSolver_(ParallelOperator&
parOperator,
135 const auto& gridView = this->simulator_.gridView();
143 convCrit_.reset(
new CCC(gridView.comm(),
146 Parameters::Get<Parameters::LinearSolverMaxError<Scalar>>()));
153 verbosity = Parameters::Get<Parameters::LinearSolverVerbosity>();
155 bicgstabSolver->setMaxIterations(Parameters::Get<Parameters::LinearSolverMaxIterations>());
162 std::pair<bool,int> runSolver_(std::shared_ptr<RawLinearSolver>
solver)
164 bool converged =
solver->apply(*this->overlappingx_);
165 return std::make_pair(converged,
int(
solver->report().iterations()));
168 void cleanupSolver_()
171 std::unique_ptr<ConvergenceCriterion<OverlappingVector> > convCrit_;
Implements a preconditioned stabilized BiCG linear solver.
Implements a preconditioned stabilized BiCG linear solver.
Definition bicgstabsolver.hh:54
Convergence criterion which looks at the absolute value of the residual and fails if the linear solve...
Definition combinedcriterion.hh:56
An overlap aware linear operator usable by ISTL.
Definition overlappingoperator.hh:42
An overlap aware preconditioner for any ISTL linear solver.
Definition overlappingpreconditioner.hh:48
An overlap aware ISTL scalar product.
Definition overlappingscalarproduct.hh:42
Implements a generic linear solver abstraction.
Definition parallelbicgstabbackend.hh:93
Convergence criterion which looks at the absolute value of the residual and fails if the linear solve...
A sparse matrix interface backend for BCRSMatrix from dune-istl.
Declares the parameters for the black oil model.
Declares the properties required by the black oil model.
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition propertysystem.hh:235
Provides the common code which is required by most linear solvers.
The type of the linear solver to be used.
Definition linalgproperties.hh:38
Definition parallelbicgstabbackend.hh:52