Merge pull request #2370 from atgeirr/update-group-class

Update for upstream changes to Group.
This commit is contained in:
Atgeirr Flø Rasmussen 2020-02-28 10:03:24 +01:00 committed by GitHub
commit 94f0bd2af6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -1532,6 +1532,7 @@ std::size_t packSize(const Group& data,
packSize(data.type(), comm) +
packSize(data.getGroupEfficiencyFactor(), comm) +
packSize(data.getTransferGroupEfficiencyFactor(), comm) +
packSize(data.isAvailableForGroupControl(), comm) +
packSize(data.getGroupNetVFPTable(), comm) +
packSize(data.parent(), comm) +
packSize(data.iwells(), comm) +
@ -3375,6 +3376,7 @@ void pack(const Group& data,
pack(data.type(), buffer, position, comm);
pack(data.getGroupEfficiencyFactor(), buffer, position, comm);
pack(data.getTransferGroupEfficiencyFactor(), buffer, position, comm);
pack(data.isAvailableForGroupControl(), buffer, position, comm);
pack(data.getGroupNetVFPTable(), buffer, position, comm);
pack(data.parent(), buffer, position, comm);
pack(data.iwells(), buffer, position, comm);
@ -5913,6 +5915,7 @@ void unpack(Group& data,
Group::GroupType type;
double groupEfficiencyFactor;
bool transferGroupEfficiencyFactor;
bool availableForGroupControl;
int groupNetVFPTable;
std::string parent;
IOrderSet<std::string> wells, groups;
@ -5927,6 +5930,7 @@ void unpack(Group& data,
unpack(type, buffer, position, comm);
unpack(groupEfficiencyFactor, buffer, position, comm);
unpack(transferGroupEfficiencyFactor, buffer, position, comm);
unpack(availableForGroupControl, buffer, position, comm);
unpack(groupNetVFPTable, buffer, position, comm);
unpack(parent, buffer, position, comm);
unpack(wells, buffer, position, comm);
@ -5936,6 +5940,7 @@ void unpack(Group& data,
data = Group(name, insert_index, initStep, udqUndefined,
units, type, groupEfficiencyFactor,
transferGroupEfficiencyFactor,
availableForGroupControl,
groupNetVFPTable, parent, wells, groups,
injection, production);
}

View File

@ -1786,7 +1786,7 @@ BOOST_AUTO_TEST_CASE(Group)
std::map<Opm::Phase, Opm::Group::GroupInjectionProperties> injection;
Opm::Group val1("test1", 1, 2, 3.0, unitSystem,
Opm::Group::GroupType::PRODUCTION,
4.0, true, 5, "test2",
4.0, true, false, 5, "test2",
Opm::IOrderSet<std::string>({"test3", "test4"}, {"test3","test4"}),
Opm::IOrderSet<std::string>({"test5", "test6"}, {"test5","test6"}),
injection,
@ -2225,7 +2225,7 @@ BOOST_AUTO_TEST_CASE(Schedule)
std::map<Opm::Phase, Opm::Group::GroupInjectionProperties> injection;
groups.insert({"test", {{std::make_shared<Opm::Group>("test1", 1, 2, 3.0, unitSystem,
Opm::Group::GroupType::PRODUCTION,
4.0, true, 5, "test2",
4.0, true, false, 5, "test2",
Opm::IOrderSet<std::string>({"test3", "test4"}, {"test3","test4"}),
Opm::IOrderSet<std::string>({"test5", "test6"}, {"test5","test6"}),
injection,