Go to the documentation of this file.
27#ifndef EWOMS_OVERLAPPING_PRECONDITIONER_HH
28#define EWOMS_OVERLAPPING_PRECONDITIONER_HH
32#include <opm/common/Exceptions.hpp>
34#include <dune/istl/preconditioner.hh>
36#include <dune/common/version.hh>
44template < class SeqPreCond, class Overlap>
46 : public Dune::Preconditioner<typename SeqPreCond::domain_type,
47 typename SeqPreCond::range_type>
54 Dune::SolverCategory::Category category() const override
55 { return Dune::SolverCategory::overlapping; }
58 : seqPreCond_(seqPreCond), overlap_(&overlap)
67 seqPreCond_.pre(x, y);
68 short localSuccess = 1;
69 MPI_Allreduce(&localSuccess,
78 short localSuccess = 0;
79 MPI_Allreduce(&localSuccess,
91 throw NumericalProblem( "Preconditioner threw an exception in pre() method on some process.");
93 seqPreCond_.pre(x, y);
104 if (overlap_->peerSet().size() > 0) {
112 seqPreCond_.apply(x, d);
113 short localSuccess = 1;
114 MPI_Allreduce(&localSuccess,
123 short localSuccess = 0;
124 MPI_Allreduce(&localSuccess,
136 throw NumericalProblem( "Preconditioner threw an exception on some process.");
140 seqPreCond_.apply(x, d);
150 short localSuccess = 1;
151 MPI_Allreduce(&localSuccess,
160 short localSuccess = 0;
161 MPI_Allreduce(&localSuccess,
173 throw NumericalProblem( "Preconditioner threw an exception in post() method on "
181 SeqPreCond& seqPreCond_;
182 const Overlap *overlap_;
An overlap aware preconditioner for any ISTL linear solver. Definition: overlappingpreconditioner.hh:48
void post(domain_type &x) override Definition: overlappingpreconditioner.hh:143
void pre(domain_type &x, range_type &y) override Definition: overlappingpreconditioner.hh:61
typename SeqPreCond::range_type range_type Definition: overlappingpreconditioner.hh:51
Dune::SolverCategory::Category category() const override the kind of computations supported by the operator. Either overlapping or non-overlapping Definition: overlappingpreconditioner.hh:54
void apply(domain_type &x, const range_type &d) override Definition: overlappingpreconditioner.hh:101
typename SeqPreCond::domain_type domain_type Definition: overlappingpreconditioner.hh:50
OverlappingPreconditioner(SeqPreCond &seqPreCond, const Overlap &overlap) Definition: overlappingpreconditioner.hh:57
Definition: blackoilboundaryratevector.hh:37
|