ParallelPAvgCalculator.hpp
Go to the documentation of this file.
1/*
2 Copyright 2023 Equinor ASA.
3
4 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef PARALLEL_PAVG_CALCULATOR_HPP
21#define PARALLEL_PAVG_CALCULATOR_HPP
22
23#include <opm/input/eclipse/Schedule/Well/PAvgCalculator.hpp>
24
26
27#include <functional>
28
29namespace Opm {
30 class GridDims;
31 class WellConnections;
32} // namespace Opm
33
34namespace Opm {
35
41template<class Scalar>
42class ParallelPAvgCalculator : public PAvgCalculator<Scalar>
43{
44public:
55 const GridDims& cellIndexMap,
56 const WellConnections& connections);
57
58private:
59 using Accumulator = typename PAvgCalculator<Scalar>::Accumulator;
60
62 std::reference_wrapper<const Parallel::Communication> comm_;
63
69 void collectGlobalContributions() override;
70};
71
72} // namespace Opm
73
74#endif // PARALLEL_PAVG_CALCULATOR_HPP
Definition: ParallelPAvgCalculator.hpp:43
ParallelPAvgCalculator(const Parallel::Communication &comm, const GridDims &cellIndexMap, const WellConnections &connections)
Dune::Communication< MPIComm > Communication
Definition: ParallelCommunication.hpp:30
Definition: blackoilboundaryratevector.hh:37