BlackoilWellModelWBP.hpp
Go to the documentation of this file.
1/*
2 Copyright 2016 SINTEF ICT, Applied Mathematics.
3 Copyright 2016 - 2017 Statoil ASA.
4 Copyright 2017 Dr. Blatt - HPC-Simulation-Software & Services
5 Copyright 2016 - 2018 IRIS AS
6
7 This file is part of the Open Porous Media project (OPM).
8
9 OPM is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 OPM is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with OPM. If not, see <http://www.gnu.org/licenses/>.
21*/
22
23#ifndef OPM_BLACKOILWELLMODEL_WBP_HEADER_INCLUDED
24#define OPM_BLACKOILWELLMODEL_WBP_HEADER_INCLUDED
25
26#include <opm/output/data/Wells.hpp>
27
30
31#include <cstddef>
32#include <optional>
33#include <vector>
34
35namespace Opm {
36
37template<class Scalar> class BlackoilWellModelGeneric;
38
40template<class Scalar>
42{
43public:
45
48
50
52 makeWellSourceEvaluatorFactory(const std::vector<Well>::size_type wellIdx) const;
53
55
56 data::WellBlockAveragePressures
57 computeWellBlockAveragePressures(const Scalar gravity) const;
58
59private:
61 mutable ParallelWBPCalculation<Scalar> wbpCalculationService_;
62
63 struct WBPCalcID
64 {
65 std::optional<typename std::vector<WellInterfaceGeneric<Scalar>*>::size_type> openWellIdx_{};
66 std::size_t wbpCalcIdx_{};
67 };
68
69 std::vector<WBPCalcID> wbpCalcMap_{};
70};
71
72
73} // namespace Opm
74
75#endif
Class for handling the blackoil well model.
Definition: BlackoilWellModelGeneric.hpp:94
Class for handling the blackoil well model.
Definition: BlackoilWellModelWBP.hpp:42
void registerOpenWellsForWBPCalculation()
ParallelWBPCalculation< Scalar >::EvaluatorFactory makeWellSourceEvaluatorFactory(const std::vector< Well >::size_type wellIdx) const
void initializeSources(typename ParallelWBPCalculation< Scalar >::GlobalToLocal index, typename ParallelWBPCalculation< Scalar >::Evaluator eval)
data::WellBlockAveragePressures computeWellBlockAveragePressures(const Scalar gravity) const
BlackoilWellModelWBP(BlackoilWellModelGeneric< Scalar > &well_model)
Definition: ParallelWBPCalculation.hpp:51
typename ParallelPAvgDynamicSourceData< Scalar >::GlobalToLocal GlobalToLocal
Definition: ParallelWBPCalculation.hpp:55
typename ParallelPAvgDynamicSourceData< Scalar >::Evaluator Evaluator
Callback for evaluating WBPn source terms on the current MPI rank.
Definition: ParallelWBPCalculation.hpp:58
std::function< Evaluator()> EvaluatorFactory
Definition: ParallelWBPCalculation.hpp:63
Definition: blackoilboundaryratevector.hh:39