My Project
Summary.hpp
1 /*
2  Copyright 2016 Statoil 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 OPM_OUTPUT_SUMMARY_HPP
21 #define OPM_OUTPUT_SUMMARY_HPP
22 
23 #include <opm/output/data/Aquifer.hpp>
25 
26 #include <opm/input/eclipse/Schedule/Group/Group.hpp>
27 #include <opm/input/eclipse/Schedule/Well/PAvgCalculatorCollection.hpp>
28 
29 #include <cstddef>
30 #include <map>
31 #include <memory>
32 #include <string>
33 #include <unordered_map>
34 #include <utility>
35 #include <vector>
36 
37 namespace Opm {
38  class EclipseGrid;
39  class EclipseState;
40  class Schedule;
41  class SummaryConfig;
42  class SummaryState;
43  class Inplace;
44 } // namespace Opm
45 
46 namespace Opm { namespace data {
47  class Wells;
48  class GroupAndNetworkValues;
49  class InterRegFlowMap;
50 }} // namespace Opm::data
51 
52 namespace Opm { namespace out {
53 
54 class Summary {
55 public:
56  using GlobalProcessParameters = std::map<std::string, double>;
57  using RegionParameters = std::map<std::string, std::vector<double>>;
58  using BlockValues = std::map<std::pair<std::string, int>, double>;
59  using InterRegFlowValues = std::unordered_map<std::string, data::InterRegFlowMap>;
60 
61  Summary(const EclipseState& es,
62  const SummaryConfig& sumcfg,
63  const EclipseGrid& grid,
64  const Schedule& sched,
65  const std::string& basename = "",
66  const bool writeEsmry = false);
67 
68  ~Summary();
69 
70  void add_timestep(const SummaryState& st, const int report_step, bool isSubstep);
71 
72  void eval(SummaryState& summary_state,
73  const int report_step,
74  const double secs_elapsed,
75  const data::Wells& well_solution,
76  const data::GroupAndNetworkValues& group_and_nwrk_solution,
77  GlobalProcessParameters single_values,
78  const Inplace& initial_inplace,
79  const Inplace& inplace,
81  const RegionParameters& region_values = {},
82  const BlockValues& block_values = {},
83  const data::Aquifers& aquifers_values = {},
84  const InterRegFlowValues& interreg_flows = {}) const;
85 
86  void write(const bool is_final_summary = false) const;
87 
88  PAvgCalculatorCollection wbp_calculators(std::size_t report_step) const;
89 
90 private:
91  class SummaryImplementation;
92  std::unique_ptr<SummaryImplementation> pImpl_;
93 };
94 
95 }} // namespace Opm::out
96 
97 #endif //OPM_OUTPUT_SUMMARY_HPP
Facility for converting collection of region ID pairs into a sparse (CSR) adjacency matrix representa...
About cell information and dimension: The actual grid information is held in a pointer to an ERT ecl_...
Definition: EclipseGrid.hpp:54
Definition: EclipseState.hpp:55
Definition: Inplace.hpp:30
Definition: PAvgCalculatorCollection.hpp:35
Definition: Schedule.hpp:138
Definition: SummaryConfig.hpp:132
Definition: SummaryState.hpp:69
Definition: Groups.hpp:209
Definition: Wells.hpp:500
Definition: Summary.hpp:54
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29