Special case wells with no open connections in ParallelWellInfo

This commit is contained in:
Joakim Hove
2021-08-31 17:31:45 +02:00
parent aba95a8263
commit 7bb3dba310
3 changed files with 26 additions and 8 deletions

View File

@@ -468,3 +468,14 @@ BOOST_AUTO_TEST_CASE(GlobalPerfFactoryParallel1)
testGlobalPerfFactoryParallel(1);
testGlobalPerfFactoryParallel(3);
}
BOOST_AUTO_TEST_CASE(EmptyWell) {
auto comm = Communication(Dune::MPIHelper::getCommunicator());
Opm::ParallelWellInfo pw({"WELL1", true}, comm);
pw.communicateFirstPerforation(false);
double local_p = 1;
auto global_p = pw.broadcastFirstPerforationValue(local_p);
BOOST_CHECK_EQUAL(local_p, global_p);
}