Changes in WellConnection ordering

1. If the well is MSW the connections in the WellConnection class is sorted in
   output order in the ::order() method, and retained that way.

2. Add method WellConnection::output() which return a vector of connection
   pointers sorted in output order.
This commit is contained in:
Joakim Hove
2020-03-19 10:42:06 +01:00
parent 03efd5e589
commit c7d3603184
5 changed files with 54 additions and 33 deletions

View File

@@ -102,6 +102,12 @@ BOOST_AUTO_TEST_CASE(WellCOMPDATtestTRACK) {
for (size_t k = 0; k < completions.size(); ++k) {
BOOST_CHECK_EQUAL(completions.get( k ).getK(), k);
}
// Output / input ordering
const auto& output_connections = completions.output(grid);
std::vector<int> expected = {0,2,3,4,5,6,7,8,1};
for (size_t k = 0; k < completions.size(); ++k)
BOOST_CHECK_EQUAL( expected[k], output_connections[k]->getK());
}