Make sure that the tree is updated correctly after reading WELSPECS

This commit is contained in:
Kristian Flikka
2014-02-14 12:36:26 +01:00
parent 46b3a364d8
commit 56c3dd2085
3 changed files with 8 additions and 5 deletions

View File

@@ -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);

View File

@@ -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

View File

@@ -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