46 :
public Dune::Preconditioner<typename SeqPreCond::domain_type,
47 typename SeqPreCond::range_type>
50 using domain_type =
typename SeqPreCond::domain_type;
51 using range_type =
typename SeqPreCond::range_type;
54 Dune::SolverCategory::Category
category()
const override
55 {
return Dune::SolverCategory::overlapping; }
58 : seqPreCond_(seqPreCond), overlap_(&overlap)
61 void pre(domain_type& x, range_type& y)
override
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);
101 void apply(domain_type& x,
const range_type& d)
override
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);
143 void post(domain_type& x)
override
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_;
Dune::SolverCategory::Category category() const override
the kind of computations supported by the operator. Either overlapping or non-overlapping
Definition overlappingpreconditioner.hh:54