Summary.hpp
Go to the documentation of this file.
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
24
25#include <map>
26#include <memory>
27#include <string>
28#include <utility>
29#include <vector>
30
31namespace Opm {
32 class EclipseGrid;
33 class EclipseState;
34 class Schedule;
35 class SummaryConfig;
36 class SummaryState;
37} // namespace Opm
38
39namespace Opm { namespace data {
40 class WellRates;
41 class Group;
42}} // namespace Opm::data
43
44namespace Opm { namespace out {
45
46class Summary {
47public:
48 using GlobalProcessParameters = std::map<std::string, double>;
49 using RegionParameters = std::map<std::string, std::vector<double>>;
50 using BlockValues = std::map<std::pair<std::string, int>, double>;
51
53 const SummaryConfig& sumcfg,
54 const EclipseGrid& grid,
55 const Schedule& sched,
56 const std::string& basename = "");
57
59
60 void add_timestep(const SummaryState& st, const int report_step);
61
62 void eval(SummaryState& summary_state,
63 const int report_step,
64 const double secs_elapsed,
65 const EclipseState& es,
66 const Schedule& schedule,
67 const data::WellRates& well_solution,
68 const data::Group& group_solution,
69 const GlobalProcessParameters& single_values,
70 const RegionParameters& region_values = {},
71 const BlockValues& block_values = {}) const;
72
73 void write() const;
74
75
76private:
77 class SummaryImplementation;
78 std::unique_ptr<SummaryImplementation> pImpl_;
79};
80
81}} // namespace Opm::out
82
83#endif //OPM_OUTPUT_SUMMARY_HPP
const char *const string
Definition: cJSON.h:170
Definition: EclipseGrid.hpp:54
Definition: EclipseState.hpp:63
Definition: Schedule.hpp:113
Definition: SummaryConfig.hpp:123
Definition: SummaryState.hpp:65
Definition: Groups.hpp:55
Definition: Wells.hpp:299
Definition: Summary.hpp:46
std::map< std::pair< std::string, int >, double > BlockValues
Definition: Summary.hpp:50
Summary(const EclipseState &es, const SummaryConfig &sumcfg, const EclipseGrid &grid, const Schedule &sched, const std::string &basename="")
void eval(SummaryState &summary_state, const int report_step, const double secs_elapsed, const EclipseState &es, const Schedule &schedule, const data::WellRates &well_solution, const data::Group &group_solution, const GlobalProcessParameters &single_values, const RegionParameters &region_values={}, const BlockValues &block_values={}) const
std::map< std::string, std::vector< double > > RegionParameters
Definition: Summary.hpp:49
void add_timestep(const SummaryState &st, const int report_step)
std::map< std::string, double > GlobalProcessParameters
Definition: Summary.hpp:48
void write() const
@ Group
Definition: custom-opm-common/opm-common/opm/output/eclipse/VectorItems/well.hpp:68
Definition: A.hpp:4
std::string basename(const std::string &fname)
static std::string data()
Definition: exprtk.hpp:40022