mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-22 01:07:24 -06:00
Merge pull request #549 from blattms/scalarproduct-dune-2.7
Adapt to constification of Scalarproduct for 2.7.0 or newer.
This commit is contained in:
commit
e37cbe32d6
@ -64,8 +64,13 @@ public:
|
|||||||
: overlap_(overlap), comm_( Dune::MPIHelper::getCollectiveCommunication() )
|
: overlap_(overlap), comm_( Dune::MPIHelper::getCollectiveCommunication() )
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2,7)
|
||||||
|
field_type dot(const OverlappingBlockVector& x,
|
||||||
|
const OverlappingBlockVector& y) const override
|
||||||
|
#else
|
||||||
field_type dot(const OverlappingBlockVector& x,
|
field_type dot(const OverlappingBlockVector& x,
|
||||||
const OverlappingBlockVector& y) override
|
const OverlappingBlockVector& y) override
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
field_type sum = 0;
|
field_type sum = 0;
|
||||||
size_t numLocal = overlap_.numLocal();
|
size_t numLocal = overlap_.numLocal();
|
||||||
@ -78,7 +83,11 @@ public:
|
|||||||
return comm_.sum( sum );
|
return comm_.sum( sum );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2,7)
|
||||||
|
real_type norm(const OverlappingBlockVector& x) const override
|
||||||
|
#else
|
||||||
real_type norm(const OverlappingBlockVector& x) override
|
real_type norm(const OverlappingBlockVector& x) override
|
||||||
|
#endif
|
||||||
{ return std::sqrt(dot(x, x)); }
|
{ return std::sqrt(dot(x, x)); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user