12#ifndef DUMUX_LINEAR_ISTL_SOLVERS_HH
13#define DUMUX_LINEAR_ISTL_SOLVERS_HH
18#include <dune/common/exceptions.hh>
19#include <dune/common/shared_ptr.hh>
20#include <dune/common/version.hh>
21#include <dune/common/parallel/indexset.hh>
22#include <dune/common/parallel/mpicommunication.hh>
23#include <dune/grid/common/capabilities.hh>
24#include <dune/istl/solvers.hh>
25#include <dune/istl/solverfactory.hh>
26#include <dune/istl/owneroverlapcopy.hh>
27#include <dune/istl/scalarproducts.hh>
28#include <dune/istl/paamg/amg.hh>
29#include <dune/istl/paamg/pinfo.hh>
41#include <dune/istl/foreach.hh>
57template<
template<
class,
class,
class,
int>
class Preconditioner,
int blockLevel = 1>
61 template<
class OI,
class M>
62 auto operator() (OI opInfo,
const M& matrix,
const Dune::ParameterTree& config)
64#if DUNE_VERSION_LT(DUNE_ISTL,2,11)
65 using Matrix =
typename Dune::TypeListElement<0,
decltype(opInfo)>::type;
66 using Domain =
typename Dune::TypeListElement<1,
decltype(opInfo)>::type;
67 using Range =
typename Dune::TypeListElement<2,
decltype(opInfo)>::type;
69 using OpInfo = std::decay_t<
decltype(opInfo)>;
70 using Matrix =
typename OpInfo::matrix_type;
71 using Domain =
typename OpInfo::domain_type;
72 using Range =
typename OpInfo::range_type;
74 std::shared_ptr<Dune::Preconditioner<Domain, Range>> preconditioner
75 = std::make_shared<Preconditioner<Matrix, Domain, Range, blockLevel>>(matrix, config);
76 return preconditioner;
80template<
template<
class,
class,
class>
class Preconditioner>
83 template<
class OI,
class M>
84 auto operator() (OI opInfo,
const M& matrix,
const Dune::ParameterTree& config)
86#if DUNE_VERSION_LT(DUNE_ISTL,2,11)
87 using Matrix =
typename Dune::TypeListElement<0,
decltype(opInfo)>::type;
88 using Domain =
typename Dune::TypeListElement<1,
decltype(opInfo)>::type;
89 using Range =
typename Dune::TypeListElement<2,
decltype(opInfo)>::type;
91 using OpInfo = std::decay_t<
decltype(opInfo)>;
92 using Matrix =
typename OpInfo::matrix_type;
93 using Domain =
typename OpInfo::domain_type;
94 using Range =
typename OpInfo::range_type;
96 std::shared_ptr<Dune::Preconditioner<Domain, Range>> preconditioner
97 = std::make_shared<Preconditioner<Matrix, Domain, Range>>(matrix, config);
98 return preconditioner;
104template<
class M,
bool convert = false>
111template<
class V,
bool convert = false>
118template<
class LSTraits,
class LATraits,
bool convert,
bool parallel = LSTraits::canCommunicate>
121template<
class LSTraits,
class LATraits,
bool convert>
128 std::shared_ptr<typename LSTraits::template Sequential<M, V>::LinearOperator>,
129 std::shared_ptr<typename LSTraits::template ParallelOverlapping<M, V>::LinearOperator>,
130 std::shared_ptr<typename LSTraits::template ParallelNonoverlapping<M, V>::LinearOperator>
133 using type = std::variant<
134 std::shared_ptr<typename LSTraits::template Sequential<M, V>::LinearOperator>
139template<
class LSTraits,
class LATraits,
bool convert>
145 std::shared_ptr<typename LSTraits::template Sequential<M, V>::LinearOperator>
162 operator bool()
const {
return this->converged; }
170 class InverseOperator,
class PreconditionerFactory,
171 bool convertMultiTypeLATypes =
false>
177 using Scalar =
typename InverseOperator::real_type;
179 using ScalarProduct = Dune::ScalarProduct<typename InverseOperator::domain_type>;
181 static constexpr bool convertMultiTypeVectorAndMatrix
192 using Comm = Dune::OwnerOverlapCopyCommunication<Dune::bigunsignedint<96>,
int>;
196 using ParameterInitializer = std::variant<std::string, Dune::ParameterTree>;
204 if (Dune::MPIHelper::getCommunication().size() > 1)
205 DUNE_THROW(Dune::InvalidStateException,
"Using sequential constructor for parallel run. Use signature with gridView and dofMapper!");
207 initializeParameters_(params);
208 solverCategory_ = Dune::SolverCategory::sequential;
209 scalarProduct_ = std::make_shared<ScalarProduct>();
215 template <
class Gr
idView,
class DofMapper>
217 const DofMapper& dofMapper,
218 const ParameterInitializer& params =
"")
220 initializeParameters_(params, gridView.comm());
222 solverCategory_ = Detail::solverCategory<LinearSolverTraits>(gridView);
223 if constexpr (LinearSolverTraits::canCommunicate)
226 if (solverCategory_ != Dune::SolverCategory::sequential)
228 parallelHelper_ = std::make_shared<ParallelISTLHelper<LinearSolverTraits>>(gridView, dofMapper);
229 communication_ = std::make_shared<Comm>(gridView.comm(), solverCategory_);
230 scalarProduct_ = Dune::createScalarProduct<XVector>(*communication_, solverCategory_);
231 parallelHelper_->createParallelIndexSet(*communication_);
234 scalarProduct_ = std::make_shared<ScalarProduct>();
237 scalarProduct_ = std::make_shared<ScalarProduct>();
239 solverCategory_ = Dune::SolverCategory::sequential;
240 scalarProduct_ = std::make_shared<ScalarProduct>();
248 template <
class Gr
idView,
class DofMapper>
250 std::shared_ptr<ScalarProduct> scalarProduct,
251 const GridView& gridView,
252 const DofMapper& dofMapper,
253 const ParameterInitializer& params =
"")
255 initializeParameters_(params, gridView.comm());
257 scalarProduct_ = scalarProduct;
258 communication_ = communication;
259 if constexpr (LinearSolverTraits::canCommunicate)
261 if (solverCategory_ != Dune::SolverCategory::sequential)
263 parallelHelper_ = std::make_shared<ParallelISTLHelper<LinearSolverTraits>>(gridView, dofMapper);
264 parallelHelper_->createParallelIndexSet(communication);
274 {
return solveSequentialOrParallel_(A, x, b); }
281 linearOperator_ = makeParallelOrSequentialLinearOperator_(std::move(A));
282 solver_ = constructPreconditionedSolver_(linearOperator_);
290 {
setMatrix(Dune::stackobject_to_shared_ptr(A)); }
298 DUNE_THROW(Dune::InvalidStateException,
"Called solve(x, b) but no linear operator has been set");
300 return solveSequentialOrParallel_(x, b, *solver_);
306 Scalar
norm(
const XVector& x)
const
309 if constexpr (LinearSolverTraits::canCommunicate)
311 if (solverCategory_ == Dune::SolverCategory::nonoverlapping)
314 using GV =
typename LinearSolverTraits::GridView;
315 using DM =
typename LinearSolverTraits::DofMapper;
318 return scalarProduct_->norm(y);
322 if constexpr (convertMultiTypeVectorAndMatrix)
325 return scalarProduct_->norm(y);
328 return scalarProduct_->norm(x);
334 const std::string&
name()
const
344 params_[
"reduction"] = std::to_string(residReduction);
348 solver_ = constructPreconditionedSolver_(linearOperator_);
356 params_[
"maxit"] = std::to_string(maxIter);
360 solver_ = constructPreconditionedSolver_(linearOperator_);
372 initializeParameters_(params, communication_->communicator());
374 initializeParameters_(params);
376 initializeParameters_(params);
381 solver_ = constructPreconditionedSolver_(linearOperator_);
386 void initializeParameters_(
const ParameterInitializer& params)
388 if (std::holds_alternative<std::string>(params))
391 params_ = std::get<Dune::ParameterTree>(params);
394 template <
class Comm>
395 void initializeParameters_(
const ParameterInitializer& params,
const Comm& comm)
397 initializeParameters_(params);
400 if (comm.rank() != 0)
404 MatrixOperatorHolder makeSequentialLinearOperator_(std::shared_ptr<Matrix> A)
406 using SequentialTraits =
typename LinearSolverTraits::template Sequential<MatrixForSolver, XVectorForSolver>;
407 if constexpr (convertMultiTypeVectorAndMatrix)
411 return std::make_shared<typename SequentialTraits::LinearOperator>(M);
415 return std::make_shared<typename SequentialTraits::LinearOperator>(A);
419 template<
class ParallelTraits>
420 MatrixOperatorHolder makeParallelLinearOperator_(std::shared_ptr<Matrix> A, ParallelTraits = {})
424 prepareMatrixParallel<LinearSolverTraits, ParallelTraits>(*A, *parallelHelper_);
425 return std::make_shared<typename ParallelTraits::LinearOperator>(std::move(A), *communication_);
427 DUNE_THROW(Dune::InvalidStateException,
"Calling makeParallelLinearOperator for sequential run");
431 MatrixOperatorHolder makeParallelOrSequentialLinearOperator_(std::shared_ptr<Matrix> A)
433 return executeSequentialOrParallel_(
434 [&]{
return makeSequentialLinearOperator_(std::move(A)); },
435 [&](
auto traits){
return makeParallelLinearOperator_(std::move(A), traits); }
439 MatrixOperatorHolder makeSequentialLinearOperator_(Matrix& A)
440 {
return makeSequentialLinearOperator_(Dune::stackobject_to_shared_ptr<Matrix>(A)); }
442 MatrixOperatorHolder makeParallelOrSequentialLinearOperator_(Matrix& A)
443 {
return makeParallelOrSequentialLinearOperator_(Dune::stackobject_to_shared_ptr<Matrix>(A)); }
445 template<
class ParallelTraits>
446 MatrixOperatorHolder makeParallelLinearOperator_(Matrix& A, ParallelTraits = {})
447 {
return makeParallelLinearOperator_<ParallelTraits>(Dune::stackobject_to_shared_ptr<Matrix>(A)); }
449 IstlSolverResult solveSequential_(Matrix& A, XVector& x, BVector& b)
452 auto linearOperatorHolder = makeSequentialLinearOperator_(A);
453 auto solver = constructPreconditionedSolver_(linearOperatorHolder);
455 return solveSequential_(x, b, *solver);
458 IstlSolverResult solveSequential_(XVector& x, BVector& b, InverseOperator& solver)
const
460 Dune::InverseOperatorResult result;
461 if constexpr (convertMultiTypeVectorAndMatrix)
467 XVectorForSolver y(bTmp.size());
470 solver.apply(y, bTmp, result);
473 if (result.converged)
479 solver.apply(x, b, result);
485 IstlSolverResult solveSequentialOrParallel_(Matrix& A, XVector& x, BVector& b)
487 return executeSequentialOrParallel_(
488 [&]{
return solveSequential_(A, x, b); },
489 [&](
auto traits){
return solveParallel_(A, x, b, traits); }
493 IstlSolverResult solveSequentialOrParallel_(XVector& x, BVector& b, InverseOperator& solver)
const
495 return executeSequentialOrParallel_(
496 [&]{
return solveSequential_(x, b, solver); },
497 [&](
auto traits){
return solveParallel_(x, b, solver, traits); }
501 template<
class ParallelTraits>
502 IstlSolverResult solveParallel_(Matrix& A, XVector& x, BVector& b, ParallelTraits = {})
505 auto linearOperatorHolder = makeParallelLinearOperator_<ParallelTraits>(A);
506 auto solver = constructPreconditionedSolver_(linearOperatorHolder);
507 return solveParallel_<ParallelTraits>(x, b, *solver);
510 template<
class ParallelTraits>
511 IstlSolverResult solveParallel_(XVector& x, BVector& b, InverseOperator& solver, ParallelTraits = {})
const
515 prepareVectorParallel<LinearSolverTraits, ParallelTraits>(b, *parallelHelper_);
518 Dune::InverseOperatorResult result;
519 solver.apply(x, b, result);
522 DUNE_THROW(Dune::InvalidStateException,
"Calling makeParallelLinearOperator for sequential run");
527 std::shared_ptr<InverseOperator> constructPreconditionedSolver_(MatrixOperatorHolder& ops)
529 return std::visit([&](
auto&& op)
531 using LinearOperator =
typename std::decay_t<
decltype(op)>::element_type;
532 const auto& params = params_.sub(
"preconditioner");
533 using Prec = Dune::Preconditioner<typename LinearOperator::domain_type, typename LinearOperator::range_type>;
534#if DUNE_VERSION_GTE(DUNE_ISTL,2,11)
535 using OpTraits = Dune::OperatorTraits<LinearOperator>;
536 std::shared_ptr<Prec> prec = PreconditionerFactory{}(OpTraits{}, op, params);
538 using TL = Dune::TypeList<typename LinearOperator::matrix_type, typename LinearOperator::domain_type, typename LinearOperator::range_type>;
539 std::shared_ptr<Prec> prec = PreconditionerFactory{}(TL{}, op, params);
543#if DUNE_VERSION_LT(DUNE_ISTL,2,11)
544 if (prec->category() != op->category() && prec->category() == Dune::SolverCategory::sequential)
545 prec = Dune::wrapPreconditioner4Parallel(prec, op);
547 if constexpr (OpTraits::isParallel)
549 using Comm =
typename OpTraits::comm_type;
550 const Comm& comm = OpTraits::getCommOrThrow(op);
551 if (op->category() == Dune::SolverCategory::overlapping && prec->category() == Dune::SolverCategory::sequential)
552 prec = std::make_shared<Dune::BlockPreconditioner<typename OpTraits::domain_type, typename OpTraits::range_type,Comm> >(prec, comm);
553 else if (op->category() == Dune::SolverCategory::nonoverlapping && prec->category() == Dune::SolverCategory::sequential)
554 prec = std::make_shared<Dune::NonoverlappingBlockPreconditioner<Comm, Prec> >(prec, comm);
558 return std::make_shared<InverseOperator>(op, scalarProduct_, prec, params_);
562 template<
class Seq,
class Par>
563 decltype(
auto) executeSequentialOrParallel_(Seq&& sequentialAction, Par&& parallelAction)
const
568 if constexpr (isMultiTypeBlockMatrix<Matrix>::value || !LinearSolverTraits::canCommunicate)
569 return sequentialAction();
572 switch (solverCategory_)
574 case Dune::SolverCategory::sequential:
575 return sequentialAction();
576 case Dune::SolverCategory::nonoverlapping:
577 using NOTraits =
typename LinearSolverTraits::template ParallelNonoverlapping<Matrix, XVector>;
578 return parallelAction(NOTraits{});
579 case Dune::SolverCategory::overlapping:
580 using OTraits =
typename LinearSolverTraits::template ParallelOverlapping<Matrix, XVector>;
581 return parallelAction(OTraits{});
582 default: DUNE_THROW(Dune::InvalidStateException,
"Unknown solver category");
586 return sequentialAction();
591 std::shared_ptr<const ParallelHelper> parallelHelper_;
592 std::shared_ptr<Comm> communication_;
595 Dune::SolverCategory::Category solverCategory_;
596 std::shared_ptr<ScalarProduct> scalarProduct_;
599 MatrixOperatorHolder linearOperator_;
601 std::shared_ptr<InverseOperator> solver_;
603 Dune::ParameterTree params_;
627template<
class LSTraits,
class LATraits>
630 Dune::BiCGSTABSolver<typename LATraits::SingleTypeVector>,
652template<
class LSTraits,
class LATraits>
655 Dune::RestartedGMResSolver<typename LATraits::SingleTypeVector>,
678template<
class LSTraits,
class LATraits>
681 Dune::BiCGSTABSolver<typename LATraits::Vector>,
701template<
class LSTraits,
class LATraits>
704 Dune::CGSolver<typename LATraits::Vector>,
721template<
class LSTraits,
class LATraits>
724 Dune::BiCGSTABSolver<typename LATraits::SingleTypeVector>,
742template<
class LSTraits,
class LATraits>
745 Dune::CGSolver<typename LATraits::SingleTypeVector>,
765template<
class LSTraits,
class LATraits>
768 Dune::BiCGSTABSolver<typename LATraits::Vector>,
780template<
class LSTraits,
class LATraits,
template<
class M>
class Solver,
781 bool convertMultiTypeVectorAndMatrix = isMultiTypeBlockVector<typename LATraits::Vector>::value>
784 using Matrix =
typename LATraits::Matrix;
785 using XVector =
typename LATraits::Vector;
786 using BVector =
typename LATraits::Vector;
791 using InverseOperator = Dune::InverseOperator<XVectorForSolver, BVectorForSolver>;
800 return solve_(A, x, b);
809 DUNE_THROW(Dune::InvalidStateException,
"Called solve(x, b) but no linear operator has been set");
811 return solve_(x, b, *solver_);
819 if constexpr (convertMultiTypeVectorAndMatrix)
824 solver_ = std::make_shared<Solver<MatrixForSolver>>(*matrix_);
832 {
setMatrix(Dune::stackobject_to_shared_ptr(A)); }
839 return "Direct solver";
846 if constexpr (convertMultiTypeVectorAndMatrix)
849 Solver<MatrixForSolver> solver(AA, this->
verbosity() > 0);
850 return solve_(x, b, solver);
854 Solver<MatrixForSolver> solver(A, this->
verbosity() > 0);
855 return solve_(x, b, solver);
859 IstlSolverResult solve_(XVector& x,
const BVector& b, InverseOperator& solver)
const
861 Dune::InverseOperatorResult result;
863 if constexpr (convertMultiTypeVectorAndMatrix)
866 XVectorForSolver xx(bb.size());
867 solver.apply(xx, bb, result);
868 checkResult_(xx, result);
869 if (result.converged)
875 BVectorForSolver bTmp(b);
876 solver.apply(x, bTmp, result);
877 checkResult_(x, result);
883 void checkResult_(XVectorForSolver& x, Dune::InverseOperatorResult& result)
const
885 flatVectorForEach(x, [&](
auto&& entry, std::size_t){
886 using std::isnan, std::isinf;
887 if (isnan(entry) || isinf(entry))
888 result.converged =
false;
893 std::shared_ptr<MatrixForSolver> matrix_;
895 std::shared_ptr<InverseOperator> solver_;
901#include <dune/istl/superlu.hh>
913template<
class LSTraits,
class LATraits>
914using SuperLUIstlSolver = Detail::DirectIstlSolver<LSTraits, LATraits, Dune::SuperLU>;
921#include <dune/istl/umfpack.hh>
933template<
class LSTraits,
class LATraits>
934using UMFPackIstlSolver = Detail::DirectIstlSolver<LSTraits, LATraits, Dune::UMFPack, false>;
Direct dune-istl linear solvers.
Definition: istlsolvers.hh:783
void setMatrix(std::shared_ptr< Matrix > A)
Set the matrix A of the linear system Ax = b for reuse.
Definition: istlsolvers.hh:817
IstlSolverResult solve(const Matrix &A, XVector &x, const BVector &b)
Solve the linear system Ax = b.
Definition: istlsolvers.hh:798
std::string name() const
name of the linear solver
Definition: istlsolvers.hh:837
void setMatrix(Matrix &A)
Set the matrix A of the linear system Ax = b for reuse.
Definition: istlsolvers.hh:831
IstlSolverResult solve(XVector &x, const BVector &b)
Solve the linear system Ax = b using the matrix set with setMatrix.
Definition: istlsolvers.hh:806
Standard dune-istl iterative linear solvers.
Definition: istlsolvers.hh:173
IstlIterativeLinearSolver(const ParameterInitializer ¶ms="")
Constructor for sequential solvers.
Definition: istlsolvers.hh:202
void setMatrix(Matrix &A)
Set the matrix A of the linear system Ax = b for reuse.
Definition: istlsolvers.hh:289
void setResidualReduction(double residReduction)
Set the residual reduction tolerance.
Definition: istlsolvers.hh:342
void setMaxIter(std::size_t maxIter)
Set the maximum number of linear solver iterations.
Definition: istlsolvers.hh:354
IstlIterativeLinearSolver(const GridView &gridView, const DofMapper &dofMapper, const ParameterInitializer ¶ms="")
Constructor for parallel and sequential solvers.
Definition: istlsolvers.hh:216
const std::string & name() const
The name of the linear solver.
Definition: istlsolvers.hh:334
void setParams(const ParameterInitializer ¶ms)
Set the linear solver parameters.
Definition: istlsolvers.hh:368
IstlSolverResult solve(Matrix &A, XVector &x, BVector &b)
Solve the linear system Ax = b.
Definition: istlsolvers.hh:273
void setMatrix(std::shared_ptr< Matrix > A)
Set the matrix A of the linear system Ax = b for reuse.
Definition: istlsolvers.hh:279
IstlSolverResult solve(XVector &x, BVector &b) const
Solve the linear system Ax = b where A has been set with setMatrix.
Definition: istlsolvers.hh:295
IstlIterativeLinearSolver(std::shared_ptr< Comm > communication, std::shared_ptr< ScalarProduct > scalarProduct, const GridView &gridView, const DofMapper &dofMapper, const ParameterInitializer ¶ms="")
Constructor with custom scalar product and communication.
Definition: istlsolvers.hh:249
Scalar norm(const XVector &x) const
Compute the 2-norm of vector x.
Definition: istlsolvers.hh:306
Definition: istlsolvers.hh:59
auto operator()(OI opInfo, const M &matrix, const Dune::ParameterTree &config)
Definition: istlsolvers.hh:62
Definition: istlsolvers.hh:82
Definition: parallelhelpers.hh:29
Base class for linear solvers.
Definition: solver.hh:27
LinearSolver(const std::string ¶mGroup="")
Construct the solver.
Definition: solver.hh:43
int verbosity() const
the verbosity level
Definition: solver.hh:82
static void disableVerbosity(Dune::ParameterTree ¶ms)
Definition: linearsolverparameters.hh:97
static Dune::ParameterTree createParameterTree(const std::string ¶mGroup="")
Create a tree containing parameters required for the linear solvers and precondioners of the Dune IST...
Definition: linearsolverparameters.hh:47
A helper class that converts a Dune::MultiTypeBlockMatrix into a plain Dune::BCRSMatrix TODO: allow b...
Definition: matrixconverter.hh:35
static auto multiTypeToBCRSMatrix(const MultiTypeBlockMatrix &A)
Converts the matrix to a type the IterativeSolverBackend can handle.
Definition: matrixconverter.hh:46
Definition: parallelhelpers.hh:476
void makeNonOverlappingConsistent(Dune::BlockVector< Block, Alloc > &v) const
Make a vector consistent for non-overlapping domain decomposition methods.
Definition: parallelhelpers.hh:484
static void retrieveValues(MultiTypeBlockVector &x, const BlockVector &y)
Copies the entries of a Dune::BlockVector to a Dune::MultiTypeBlockVector.
Definition: matrixconverter.hh:229
static auto multiTypeToBlockVector(const MultiTypeBlockVector &b)
Converts a Dune::MultiTypeBlockVector to a plain 1x1 Dune::BlockVector.
Definition: matrixconverter.hh:203
constexpr std::size_t preconditionerBlockLevel() noexcept
Returns the block level for the preconditioner for a given matrix.
Definition: istlsolvers.hh:52
Define traits for linear algebra backends.
Generates a parameter tree required for the linear solvers and precondioners of the Dune ISTL.
Type traits to be used with matrix types.
A helper class that converts a Dune::MultiTypeBlockMatrix into a plain Dune::BCRSMatrix.
Definition: istlsolvers.hh:43
Dune::AMGCreator IstlAmgPreconditionerFactory
Definition: istlsolvers.hh:102
Definition: cvfelocalresidual.hh:28
Dune::SolverCategory::Category solverCategory(const GridView &gridView)
Definition: solvercategory.hh:20
LinearSolverTraitsImpl< GridGeometry, typename GridGeometry::DiscretizationMethod > LinearSolverTraits
The type traits required for using the IstlFactoryBackend.
Definition: linearsolvertraits.hh:37
Provides a helper class for nonoverlapping decomposition.
Dumux preconditioners for iterative solvers.
Base class for linear solvers.
Definition: istlsolvers.hh:154
IstlSolverResult(IstlSolverResult &&)=default
IstlSolverResult(const Dune::InverseOperatorResult &o)
Definition: istlsolvers.hh:159
IstlSolverResult(Dune::InverseOperatorResult &&o)
Definition: istlsolvers.hh:160
IstlSolverResult()=default
IstlSolverResult(const IstlSolverResult &)=default
std::decay_t< decltype(MatrixConverter< M >::multiTypeToBCRSMatrix(std::declval< M >()))> type
Definition: istlsolvers.hh:109
Definition: istlsolvers.hh:105
M type
Definition: istlsolvers.hh:105
typename VectorForSolver< typename LATraits::Vector, convert >::type V
Definition: istlsolvers.hh:143
std::variant< std::shared_ptr< typename LSTraits::template Sequential< M, V >::LinearOperator > > type
Definition: istlsolvers.hh:146
typename MatrixForSolver< typename LATraits::Matrix, convert >::type M
Definition: istlsolvers.hh:142
std::variant< std::shared_ptr< typename LSTraits::template Sequential< M, V >::LinearOperator >, std::shared_ptr< typename LSTraits::template ParallelOverlapping< M, V >::LinearOperator >, std::shared_ptr< typename LSTraits::template ParallelNonoverlapping< M, V >::LinearOperator > > type
Definition: istlsolvers.hh:131
typename VectorForSolver< typename LATraits::Vector, convert >::type V
Definition: istlsolvers.hh:125
typename MatrixForSolver< typename LATraits::Matrix, convert >::type M
Definition: istlsolvers.hh:124
Definition: istlsolvers.hh:119
std::decay_t< decltype(VectorConverter< V >::multiTypeToBlockVector(std::declval< V >()))> type
Definition: istlsolvers.hh:116
Definition: istlsolvers.hh:112
V type
Definition: istlsolvers.hh:112
Definition: linearalgebratraits.hh:51
V Vector
Definition: linearalgebratraits.hh:53
M Matrix
Definition: linearalgebratraits.hh:52
Helper type to determine whether a given type is a Dune::MultiTypeBlockMatrix.
Definition: matrix.hh:37
Helper type to determine whether a given type is a Dune::MultiTypeBlockVector.
Definition: vector.hh:22
Type traits to be used with vector types.