Added changes to include no of groups in InteHEAD

This commit is contained in:
Jostein Alvestad
2018-04-24 14:03:29 +02:00
parent 0f26e2e958
commit 79d0081369
2 changed files with 20 additions and 2 deletions

View File

@@ -375,8 +375,7 @@ namespace {
// ---------------------------------------------------------------------
Opm::RestartIO::DoubHEAD::DoubHEAD()
: data_(Index::NUMBER_OF_ITEMS, 0.0)
//: data_(Index::NUMBER_OF_ITEMS, -1.0e20)
: data_(Index::NUMBER_OF_ITEMS, -1.0e20)
{
// Numbers below have unknown usage, values have been determined by
// experiments to be constant across a range of reference cases.

View File

@@ -1715,6 +1715,25 @@ namespace Opm {
return groups;
}
std::vector< const Group* > Schedule::getGroups(size_t timeStep) const {
if (timeStep >= m_timeMap.size()) {
throw std::invalid_argument("Timestep to large");
}
auto defined = [=]( const Group& g ) {
return g.hasBeenDefined( timeStep );
};
std::vector< const Group* > groups;
for( const auto& group : m_groups ) {
if( !defined( group ) ) continue;
groups.push_back( &group );
}
return groups;
}
void Schedule::addWellToGroup( Group& newGroup, Well& well , size_t timeStep) {
const std::string currentGroupName = well.getGroupName(timeStep);
if (currentGroupName != "") {