Make sure that the tree is updated correctly after reading WELSPECS
This commit is contained in:
@@ -142,7 +142,8 @@ namespace Opm {
|
||||
checkWELSPECSConsistency(currentWell, record);
|
||||
|
||||
addWellToGroup( getGroup(groupName) , getWell(wellName) , currentStep);
|
||||
needNewTree = handleGroupFromWELSPECS(record->getItem(1)->getString(0), newTree);
|
||||
bool treeChanged = handleGroupFromWELSPECS(groupName, newTree);
|
||||
needNewTree = needNewTree || treeChanged;
|
||||
}
|
||||
if (needNewTree) {
|
||||
m_rootGroupTree->add(currentStep, newTree);
|
||||
|
||||
@@ -226,7 +226,8 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_WELSPECS_AND_GRUPTREE_correct_iter_function)
|
||||
int iter_counted = 0;
|
||||
|
||||
for (auto iter=root->begin(); iter != root->end(); ++iter) {
|
||||
iter_counted++;
|
||||
std::cout << "Child of FIELD: " << (*iter).second->name() << std::endl;
|
||||
iter_counted++;
|
||||
}
|
||||
BOOST_CHECK_EQUAL(2, iter_counted);
|
||||
// Time 1, a new group added in tree
|
||||
|
||||
@@ -5,9 +5,10 @@ START
|
||||
SCHEDULE
|
||||
|
||||
WELSPECS
|
||||
'W_1' 'GROUP_BJARNE' 30 37 1* 'OIL' 7* /
|
||||
'W_2' 'GROUP_BJARNE' 20 51 1* 'OIL' 7* /
|
||||
'W_3' 'GROUP_ODD' 31 18 1* 'OIL' 7* /
|
||||
'W_1' 'GROUP_BJARNE' 30 37 1* 'OIL' 7* /
|
||||
'W_3' 'GROUP_ODD' 31 18 1* 'OIL' 7* /
|
||||
'W_2' 'GROUP_BJARNE' 20 51 1* 'OIL' 7* /
|
||||
|
||||
/
|
||||
|
||||
TSTEP
|
||||
|
||||
Reference in New Issue
Block a user