41 :
public Dune::ScalarProduct<OverlappingBlockVector>
44 using field_type =
typename OverlappingBlockVector::field_type;
46 using CollectiveCommunication =
typename Dune::Communication<typename Dune::MPIHelper::MPICommunicator>;
47 using real_type =
typename Dune::ScalarProduct<OverlappingBlockVector>::real_type;
50 Dune::SolverCategory::Category
category()
const override
51 {
return Dune::SolverCategory::overlapping; }
55 comm_( Dune::MPIHelper::getCommunication() )
58 field_type dot(
const OverlappingBlockVector& x,
59 const OverlappingBlockVector& y)
const override
62 size_t numLocal = overlap_.numLocal();
63 for (
unsigned localIdx = 0; localIdx < numLocal; ++localIdx) {
64 if (overlap_.iAmMasterOf(
static_cast<int>(localIdx)))
65 sum += x[localIdx] * y[localIdx];
69 return comm_.sum( sum );
72 real_type norm(
const OverlappingBlockVector& x)
const override
73 {
return std::sqrt(dot(x, x)); }
76 const Overlap& overlap_;
77 const CollectiveCommunication comm_;
Dune::SolverCategory::Category category() const override
the kind of computations supported by the operator. Either overlapping or non-overlapping
Definition overlappingscalarproduct.hh:50