SummaryNode.hpp
Go to the documentation of this file.
1/*
2 Copyright 2020 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 OPM_IO_SUMMARYNODE_HPP
21#define OPM_IO_SUMMARYNODE_HPP
22
23#include <functional>
24#include <optional>
25#include <string>
26#include <unordered_set>
27
28namespace Opm { namespace EclIO {
29
31 enum class Category {
32 Well,
33 Group,
34 Field,
35 Region,
36 Block,
38 Segment,
39 Aquifer,
40 Node,
41 Miscellaneous,
42 Network,
43 Well_Lgr,
44 Block_Lgr,
45 Connection_Lgr
46 };
47
48 enum class Type {
49 Rate,
50 Total,
51 Ratio,
52 Pressure,
53 Count,
54 Mode,
55 ProdIndex,
56 Undefined,
57 };
58
63 int number;
65 int lgri;
66 int lgrj;
67 int lgrk;
68
70
71 std::optional<std::string> fip_region;
72
74
76
79
80 bool is_user_defined() const;
81
82 static Category category_from_keyword(const std::string&, const std::unordered_set<std::string> &miscellaneous_keywords = {});
83
84 std::optional<std::string> display_name() const;
85 std::optional<std::string> display_number() const;
86 std::optional<std::string> display_number(number_renderer) const;
87
88 bool isRegionToRegion() const;
89 std::pair<int, int> regionToRegionNumbers() const;
90
93 static std::string create_key_lgr_block(const std::string& keyword, const std::string& lgrname, int i, int j, int k);
94
95};
96
97}} // namespace Opm::EclIO
98
99#endif // OPM_IO_SUMMARYNODE_HPP
const char *const string
Definition: cJSON.h:170
Definition: parser/eclipse/EclipseState/Schedule/Well/connection.hpp:45
Definition: parser/eclipse/EclipseState/Schedule/Group/group.hpp:36
Definition: parser/eclipse/EclipseState/Schedule/MSW/segment.hpp:37
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:58
std::function< double(double, double)> function
Definition: Operate.hpp:28
Definition: A.hpp:4
T min(const T v0, const T v1)
Definition: exprtk.hpp:1400
Definition: SummaryNode.hpp:30
std::optional< std::string > display_number(number_renderer) const
int lgri
Definition: SummaryNode.hpp:65
static std::string create_key_lgr_block(const std::string &keyword, const std::string &lgrname, int i, int j, int k)
bool is_user_defined() const
static Category category_from_keyword(const std::string &, const std::unordered_set< std::string > &miscellaneous_keywords={})
std::optional< std::string > fip_region
Definition: SummaryNode.hpp:71
static std::string create_key_lgr_well(const std::string &keyword, const std::string &wgname, const std::string &lgrname)
std::string lgrname
Definition: SummaryNode.hpp:64
size_t smspecKeywordIndex
Definition: SummaryNode.hpp:69
std::pair< int, int > regionToRegionNumbers() const
static std::string create_key_lgr_completion(const std::string &keyword, const std::string &wgname, const std::string &lgrname, int i, int j, int k)
int number
Definition: SummaryNode.hpp:63
std::optional< std::string > display_name() const
Category
Definition: SummaryNode.hpp:31
static constexpr int default_number
Definition: SummaryNode.hpp:73
std::optional< std::string > display_number() const
bool isRegionToRegion() const
std::string keyword
Definition: SummaryNode.hpp:59
std::string wgname
Definition: SummaryNode.hpp:62
Type type
Definition: SummaryNode.hpp:61
int lgrk
Definition: SummaryNode.hpp:67
std::string unique_key() const
Type
Definition: SummaryNode.hpp:48
int lgrj
Definition: SummaryNode.hpp:66
std::string unique_key(number_renderer) const
Category category
Definition: SummaryNode.hpp:60
std::function< std::string(const SummaryNode &)> number_renderer
Definition: SummaryNode.hpp:77