Make Structure for Per-Group Summary Data from Simulator

This commit adds a level of indirection to the current per-group
summary quantities that is directly assigned by the simulator.  In
particular, introduce a new structure named

    GroupData

that contains a 'GroupConstraints' object and make the per-group
values into 'map<string, GroupData>' rather than the current
'map<string, GroupConstraints>'.  This is in preparation of adding
support for reporting group-level production/injection guiderates
(Gx[IP]GR) to the summary file.

Update tests and APIs accordingly.
This commit is contained in:
Bård Skaflestad
2020-06-27 15:44:50 +02:00
parent c7b93797b6
commit 68b4f38464
6 changed files with 92 additions and 67 deletions

View File

@@ -31,8 +31,8 @@
#include <cctype>
#include <ctime>
#include <opm/output/data/Wells.hpp>
#include <opm/output/data/Groups.hpp>
#include <opm/output/data/Wells.hpp>
#include <opm/output/eclipse/Summary.hpp>
#include <opm/parser/eclipse/Python/Python.hpp>
@@ -294,22 +294,22 @@ static data::Wells result_wells(const bool w3_injector = true) {
return wellrates;
}
static data::Group result_groups() {
static data::GroupValues result_groups() {
data::Group groups;
data::currentGroupConstraints cgc_group;
data::GroupValues groups;
data::GroupConstraints cgc_group;
cgc_group.set(p_cmode::NONE, i_cmode::VREP, i_cmode::RATE);
groups.emplace("G_1", cgc_group);
groups["G_1"].currentControl = cgc_group;
cgc_group.set(p_cmode::ORAT, i_cmode::RESV, i_cmode::FLD);
groups.emplace("G_2", cgc_group);
groups["G_2"].currentControl = cgc_group;
cgc_group.set(p_cmode::GRAT, i_cmode::REIN, i_cmode::VREP);
groups.emplace("G_3", cgc_group);
groups["G_3"].currentControl = cgc_group;
cgc_group.set(p_cmode::NONE, i_cmode::NONE, i_cmode::NONE);
groups.emplace("FIELD", cgc_group);
groups["FIELD"].currentControl = cgc_group;
return groups;
@@ -394,7 +394,7 @@ struct setup {
Schedule schedule;
SummaryConfig config;
data::Wells wells;
data::Group groups;
data::GroupValues groups;
std::string name;
WorkArea ta;