mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Move Connection ordering attribute from Well to WellConnections
This commit is contained in:
parent
aab9bb8883
commit
805236ee22
@ -508,7 +508,8 @@ std::size_t packSize(const WellEconProductionLimits& data,
|
|||||||
std::size_t packSize(const WellConnections& data,
|
std::size_t packSize(const WellConnections& data,
|
||||||
Dune::MPIHelper::MPICommunicator comm)
|
Dune::MPIHelper::MPICommunicator comm)
|
||||||
{
|
{
|
||||||
return packSize(data.getHeadI(), comm) +
|
return packSize(data.ordering(), comm) +
|
||||||
|
packSize(data.getHeadI(), comm) +
|
||||||
packSize(data.getHeadJ(), comm) +
|
packSize(data.getHeadJ(), comm) +
|
||||||
packSize(data.getNumRemoved(), comm) +
|
packSize(data.getNumRemoved(), comm) +
|
||||||
packSize(data.getConnections(), comm);
|
packSize(data.getConnections(), comm);
|
||||||
@ -641,7 +642,6 @@ std::size_t packSize(const Well& data,
|
|||||||
packSize(data.getHeadJ(), comm) +
|
packSize(data.getHeadJ(), comm) +
|
||||||
packSize(data.getRefDepth(), comm) +
|
packSize(data.getRefDepth(), comm) +
|
||||||
packSize(data.wellType(), comm) +
|
packSize(data.wellType(), comm) +
|
||||||
packSize(data.getWellConnectionOrdering(), comm) +
|
|
||||||
packSize(data.units(), comm) +
|
packSize(data.units(), comm) +
|
||||||
packSize(data.udqUndefined(), comm) +
|
packSize(data.udqUndefined(), comm) +
|
||||||
packSize(data.getStatus(), comm) +
|
packSize(data.getStatus(), comm) +
|
||||||
@ -1411,6 +1411,7 @@ void pack(const WellConnections& data,
|
|||||||
std::vector<char>& buffer, int& position,
|
std::vector<char>& buffer, int& position,
|
||||||
Dune::MPIHelper::MPICommunicator comm)
|
Dune::MPIHelper::MPICommunicator comm)
|
||||||
{
|
{
|
||||||
|
pack(data.ordering(), buffer, position, comm);
|
||||||
pack(data.getHeadI(), buffer, position, comm);
|
pack(data.getHeadI(), buffer, position, comm);
|
||||||
pack(data.getHeadJ(), buffer, position, comm);
|
pack(data.getHeadJ(), buffer, position, comm);
|
||||||
pack(data.getNumRemoved(), buffer, position, comm);
|
pack(data.getNumRemoved(), buffer, position, comm);
|
||||||
@ -1548,7 +1549,6 @@ void pack(const Well& data,
|
|||||||
pack(data.getHeadJ(), buffer, position, comm);
|
pack(data.getHeadJ(), buffer, position, comm);
|
||||||
pack(data.getRefDepth(), buffer, position, comm);
|
pack(data.getRefDepth(), buffer, position, comm);
|
||||||
pack(data.wellType(), buffer, position, comm);
|
pack(data.wellType(), buffer, position, comm);
|
||||||
pack(data.getWellConnectionOrdering(), buffer, position, comm);
|
|
||||||
pack(data.units(), buffer, position, comm);
|
pack(data.units(), buffer, position, comm);
|
||||||
pack(data.udqUndefined(), buffer, position, comm);
|
pack(data.udqUndefined(), buffer, position, comm);
|
||||||
pack(data.getStatus(), buffer, position, comm);
|
pack(data.getStatus(), buffer, position, comm);
|
||||||
@ -2455,14 +2455,16 @@ void unpack(WellConnections& data,
|
|||||||
{
|
{
|
||||||
int headI, headJ;
|
int headI, headJ;
|
||||||
size_t numRemoved;
|
size_t numRemoved;
|
||||||
|
Connection::Order ordering;
|
||||||
std::vector<Connection> connections;
|
std::vector<Connection> connections;
|
||||||
|
|
||||||
|
unpack(ordering, buffer, position, comm),
|
||||||
unpack(headI, buffer, position, comm),
|
unpack(headI, buffer, position, comm),
|
||||||
unpack(headJ, buffer, position, comm),
|
unpack(headJ, buffer, position, comm),
|
||||||
unpack(numRemoved, buffer, position, comm),
|
unpack(numRemoved, buffer, position, comm),
|
||||||
unpack(connections, buffer, position, comm),
|
unpack(connections, buffer, position, comm),
|
||||||
|
|
||||||
data = WellConnections(headI, headJ, numRemoved, connections);
|
data = WellConnections(ordering, headI, headJ, numRemoved, connections);
|
||||||
}
|
}
|
||||||
|
|
||||||
void unpack(Well::WellProductionProperties& data,
|
void unpack(Well::WellProductionProperties& data,
|
||||||
@ -2668,7 +2670,6 @@ void unpack(Well& data,
|
|||||||
int headI, headJ;
|
int headI, headJ;
|
||||||
double ref_depth;
|
double ref_depth;
|
||||||
WellType wtype;
|
WellType wtype;
|
||||||
Connection::Order ordering;
|
|
||||||
UnitSystem units;
|
UnitSystem units;
|
||||||
double udq_undefined;
|
double udq_undefined;
|
||||||
Well::Status status;
|
Well::Status status;
|
||||||
@ -2696,7 +2697,6 @@ void unpack(Well& data,
|
|||||||
unpack(headJ, buffer, position, comm);
|
unpack(headJ, buffer, position, comm);
|
||||||
unpack(ref_depth, buffer, position, comm);
|
unpack(ref_depth, buffer, position, comm);
|
||||||
unpack(wtype, buffer, position, comm);
|
unpack(wtype, buffer, position, comm);
|
||||||
unpack(ordering, buffer, position, comm);
|
|
||||||
unpack(units, buffer, position, comm);
|
unpack(units, buffer, position, comm);
|
||||||
unpack(udq_undefined, buffer, position, comm);
|
unpack(udq_undefined, buffer, position, comm);
|
||||||
unpack(status, buffer, position, comm);
|
unpack(status, buffer, position, comm);
|
||||||
@ -2722,7 +2722,7 @@ void unpack(Well& data,
|
|||||||
unpack(*segments, buffer, position, comm);
|
unpack(*segments, buffer, position, comm);
|
||||||
}
|
}
|
||||||
data = Well(name, groupName, firstTimeStep, seqIndex, headI, headJ,
|
data = Well(name, groupName, firstTimeStep, seqIndex, headI, headJ,
|
||||||
ref_depth, wtype, ordering, units, udq_undefined, status,
|
ref_depth, wtype, units, udq_undefined, status,
|
||||||
drainageRadius, allowCrossFlow, automaticShutIn,
|
drainageRadius, allowCrossFlow, automaticShutIn,
|
||||||
guideRate, efficiencyFactor, solventFraction, prediction_mode,
|
guideRate, efficiencyFactor, solventFraction, prediction_mode,
|
||||||
econLimits, foamProperties, polymerProperties, brineProperties,
|
econLimits, foamProperties, polymerProperties, brineProperties,
|
||||||
|
@ -330,7 +330,7 @@ Opm::Well getFullWell()
|
|||||||
{
|
{
|
||||||
Opm::UnitSystem unitSystem;
|
Opm::UnitSystem unitSystem;
|
||||||
return Opm::Well("test1", "test2", 1, 2, 3, 4, 5.0,
|
return Opm::Well("test1", "test2", 1, 2, 3, 4, 5.0,
|
||||||
Opm::WellType(Opm::Phase::WATER), Opm::Connection::Order::DEPTH,
|
Opm::WellType(Opm::Phase::WATER),
|
||||||
unitSystem, 6.0, Opm::Well::Status::SHUT,
|
unitSystem, 6.0, Opm::Well::Status::SHUT,
|
||||||
7.0, true, false,
|
7.0, true, false,
|
||||||
Opm::Well::WellGuideRate{true, 1.0, Opm::Well::GuideRateTarget::COMB, 2.0},
|
Opm::Well::WellGuideRate{true, 1.0, Opm::Well::GuideRateTarget::COMB, 2.0},
|
||||||
@ -1473,7 +1473,7 @@ BOOST_AUTO_TEST_CASE(WellConnections)
|
|||||||
{9, 10, 11}, Opm::Connection::CTFKind::Defaulted,
|
{9, 10, 11}, Opm::Connection::CTFKind::Defaulted,
|
||||||
12, 13.0, 14.0, true,
|
12, 13.0, 14.0, true,
|
||||||
15, 16, 17.0);
|
15, 16, 17.0);
|
||||||
Opm::WellConnections val1(1, 2, 3, {conn, conn});
|
Opm::WellConnections val1(Opm::Connection::Order::TRACK, 1, 2, 3, {conn, conn});
|
||||||
auto val2 = PackUnpack(val1);
|
auto val2 = PackUnpack(val1);
|
||||||
DO_CHECKS(WellConnections)
|
DO_CHECKS(WellConnections)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user