Added changes to include no of groups in InteHEAD
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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 != "") {
|
||||
|
||||
Reference in New Issue
Block a user