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