2012-05-18 02:45:23 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2014-09-23 08:04:57 -05:00
|
|
|
// Copyright (C) 2011- Statoil ASA
|
|
|
|
// Copyright (C) 2013- Ceetron Solutions AS
|
|
|
|
// Copyright (C) 2011-2012 Ceetron AS
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2012-05-18 02:45:23 -05:00
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2012-05-18 02:45:23 -05:00
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2012-05-18 02:45:23 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2012-06-26 09:10:41 -05:00
|
|
|
#include "RifEclipseRestartFilesetAccess.h"
|
2018-02-02 08:44:28 -06:00
|
|
|
#include "RiaStringEncodingTools.h"
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "RifEclipseOutputFileTools.h"
|
2018-02-02 07:17:10 -06:00
|
|
|
|
2013-02-06 06:44:27 -06:00
|
|
|
#include "cafProgressInfo.h"
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2017-06-26 03:25:08 -05:00
|
|
|
#include "ert/ecl/ecl_file.h"
|
|
|
|
#include "ert/ecl/ecl_nnc_data.h"
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "ert/ecl/ecl_nnc_geometry.h"
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
/// Constructor
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2013-01-30 07:13:50 -06:00
|
|
|
RifEclipseRestartFilesetAccess::RifEclipseRestartFilesetAccess()
|
|
|
|
: RifEclipseRestartDataAccess()
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
/// Destructor
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2012-06-26 09:10:41 -05:00
|
|
|
RifEclipseRestartFilesetAccess::~RifEclipseRestartFilesetAccess()
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
for ( size_t i = 0; i < m_ecl_files.size(); i++ )
|
2013-04-29 06:13:42 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( m_ecl_files[i] )
|
2013-04-29 06:13:42 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
ecl_file_close( m_ecl_files[i] );
|
2013-04-29 06:13:42 -05:00
|
|
|
}
|
|
|
|
|
2018-10-10 03:17:07 -05:00
|
|
|
m_ecl_files[i] = nullptr;
|
2013-04-29 06:13:42 -05:00
|
|
|
}
|
2012-05-18 02:45:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
/// Open files
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2013-03-05 06:49:34 -06:00
|
|
|
bool RifEclipseRestartFilesetAccess::open()
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2023-09-27 01:07:49 -05:00
|
|
|
if ( !m_fileNames.empty() )
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::ProgressInfo progInfo( m_fileNames.size(), "" );
|
2013-03-05 06:10:26 -06:00
|
|
|
|
|
|
|
int i;
|
2019-09-06 03:40:57 -05:00
|
|
|
for ( i = 0; i < m_fileNames.size(); i++ )
|
2013-03-05 06:10:26 -06:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
progInfo.setProgressDescription( m_fileNames[i] );
|
2013-02-06 06:44:27 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
openTimeStep( i );
|
2013-02-06 06:44:27 -06:00
|
|
|
|
2013-03-05 06:10:26 -06:00
|
|
|
progInfo.incrementProgress();
|
|
|
|
}
|
2012-05-18 02:45:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2013-02-27 07:01:36 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2013-02-27 07:01:36 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RifEclipseRestartFilesetAccess::setRestartFiles( const QStringList& fileSet )
|
2013-02-27 07:01:36 -06:00
|
|
|
{
|
|
|
|
close();
|
|
|
|
m_ecl_files.clear();
|
|
|
|
|
|
|
|
m_fileNames = fileSet;
|
2020-02-12 04:43:15 -06:00
|
|
|
m_fileNames.sort(); // To make sure they are sorted in increasing *.X000N order. Hack. Should probably be actual
|
|
|
|
// time stored on file.
|
2013-02-27 07:01:36 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
for ( int i = 0; i < m_fileNames.size(); i++ )
|
2013-02-27 07:01:36 -06:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
m_ecl_files.push_back( nullptr );
|
2013-02-27 07:01:36 -06:00
|
|
|
}
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
CVF_ASSERT( m_fileNames.size() == static_cast<int>( m_ecl_files.size() ) );
|
2013-02-27 07:01:36 -06:00
|
|
|
}
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
/// Close files
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2020-02-12 04:13:38 -06:00
|
|
|
void RifEclipseRestartFilesetAccess::close()
|
|
|
|
{
|
|
|
|
}
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2013-03-05 06:10:26 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2013-03-05 06:10:26 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RifEclipseRestartFilesetAccess::setTimeSteps( const std::vector<QDateTime>& timeSteps )
|
2013-03-05 06:10:26 -06:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
CVF_ASSERT( (size_t)m_fileNames.size() == timeSteps.size() );
|
2013-03-05 06:10:26 -06:00
|
|
|
m_timeSteps = timeSteps;
|
|
|
|
}
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
/// Get the number of time steps
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2013-02-07 01:41:40 -06:00
|
|
|
size_t RifEclipseRestartFilesetAccess::timeStepCount()
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2013-03-05 06:10:26 -06:00
|
|
|
return m_timeSteps.size();
|
2012-05-18 02:45:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
/// Get the time steps
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2023-02-26 03:48:40 -06:00
|
|
|
void RifEclipseRestartFilesetAccess::timeSteps( std::vector<QDateTime>* timeSteps, std::vector<double>* daysSinceSimulationStart )
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2023-09-27 01:07:49 -05:00
|
|
|
if ( m_timeSteps.empty() )
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2013-03-05 06:10:26 -06:00
|
|
|
size_t numSteps = m_fileNames.size();
|
|
|
|
size_t i;
|
2019-09-06 03:40:57 -05:00
|
|
|
for ( i = 0; i < numSteps; i++ )
|
2013-03-05 06:10:26 -06:00
|
|
|
{
|
2013-03-18 05:40:39 -05:00
|
|
|
std::vector<QDateTime> stepTime;
|
2019-09-06 03:40:57 -05:00
|
|
|
std::vector<double> stepDays;
|
|
|
|
|
|
|
|
openTimeStep( i );
|
2013-02-05 03:51:32 -06:00
|
|
|
|
2020-04-06 05:15:28 -05:00
|
|
|
size_t perTimeStepEmptyKeywords = 0;
|
|
|
|
RifEclipseOutputFileTools::timeSteps( m_ecl_files[i], &stepTime, &stepDays, &perTimeStepEmptyKeywords );
|
2013-02-27 07:01:36 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( stepTime.size() == 1 )
|
2013-03-05 06:10:26 -06:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
m_timeSteps.push_back( stepTime[0] );
|
|
|
|
m_daysSinceSimulationStart.push_back( stepDays[0] );
|
2013-03-05 06:10:26 -06:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
m_timeSteps.push_back( QDateTime() );
|
|
|
|
m_daysSinceSimulationStart.push_back( 0.0 );
|
2013-03-05 06:10:26 -06:00
|
|
|
}
|
2012-05-18 02:45:23 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
*timeSteps = m_timeSteps;
|
2017-04-26 02:39:17 -05:00
|
|
|
*daysSinceSimulationStart = m_daysSinceSimulationStart;
|
2012-05-18 02:45:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
/// Get list of result names
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2024-06-18 06:03:48 -05:00
|
|
|
std::vector<RifEclipseKeywordValueCount> RifEclipseRestartFilesetAccess::keywordValueCounts()
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
CVF_ASSERT( timeStepCount() > 0 );
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
for ( int i = 0; i < m_fileNames.size(); i++ )
|
2013-02-05 03:51:32 -06:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
openTimeStep( i );
|
2013-02-05 03:51:32 -06:00
|
|
|
}
|
2016-07-14 06:35:32 -05:00
|
|
|
|
2023-05-09 04:41:56 -05:00
|
|
|
return RifEclipseOutputFileTools::keywordValueCounts( m_ecl_files );
|
2012-05-18 02:45:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
/// Get result values for given time step
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2023-02-26 03:48:40 -06:00
|
|
|
bool RifEclipseRestartFilesetAccess::results( const QString& resultName, size_t timeStep, size_t gridCount, std::vector<double>* values )
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( timeStep >= timeStepCount() )
|
2013-02-27 07:01:36 -06:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
openTimeStep( timeStep );
|
2013-02-27 07:01:36 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( !m_ecl_files[timeStep] )
|
2016-10-25 02:00:52 -05:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
size_t fileGridCount = ecl_file_get_num_named_kw( m_ecl_files[timeStep], resultName.toLatin1().data() );
|
2012-08-31 12:12:47 -05:00
|
|
|
|
|
|
|
// No results for this result variable for current time step found
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( fileGridCount == 0 ) return true;
|
2012-08-31 12:12:47 -05:00
|
|
|
|
2013-01-30 07:13:50 -06:00
|
|
|
// Result handling depends on presents of result values for all grids
|
2020-04-06 05:15:28 -05:00
|
|
|
if ( fileGridCount < gridCount )
|
2012-08-31 12:12:47 -05:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2020-04-06 05:15:28 -05:00
|
|
|
// NB : 6X simulator can report multiple keywords for one time step. The additional keywords do not contain and
|
|
|
|
// data imported by ResInsight. We read all blocks of data, also empty to simplify the logic.
|
|
|
|
// See https://github.com/OPM/ResInsight/issues/5763
|
|
|
|
|
|
|
|
for ( size_t i = 0; i < fileGridCount; i++ )
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2013-02-27 07:01:36 -06:00
|
|
|
std::vector<double> gridValues;
|
2013-02-05 03:51:32 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( !RifEclipseOutputFileTools::keywordData( m_ecl_files[timeStep], resultName, i, &gridValues ) )
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
values->insert( values->end(), gridValues.begin(), gridValues.end() );
|
2012-05-18 02:45:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2017-06-26 03:25:08 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
bool RifEclipseRestartFilesetAccess::dynamicNNCResults( const ecl_grid_type* grid,
|
|
|
|
size_t timeStep,
|
|
|
|
std::vector<double>* waterFlux,
|
|
|
|
std::vector<double>* oilFlux,
|
|
|
|
std::vector<double>* gasFlux )
|
2017-06-26 03:25:08 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( timeStep > timeStepCount() )
|
2017-06-26 03:25:08 -05:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
openTimeStep( timeStep );
|
2017-06-26 03:25:08 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( !m_ecl_files[timeStep] )
|
2017-06-26 03:25:08 -05:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
ecl_file_view_type* summaryView = ecl_file_get_global_view( m_ecl_files[timeStep] );
|
2017-06-26 03:25:08 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
RifEclipseOutputFileTools::transferNncFluxData( grid, summaryView, waterFlux, oilFlux, gasFlux );
|
2017-06-26 03:25:08 -05:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RifEclipseRestartFilesetAccess::readWellData( well_info_type* well_info, bool importCompleteMswData )
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( !well_info ) return;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
for ( size_t i = 0; i < m_ecl_files.size(); i++ )
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
openTimeStep( i );
|
2013-02-27 07:01:36 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( m_ecl_files[i] )
|
2013-01-24 03:41:28 -06:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
int reportNumber = RifEclipseRestartFilesetAccess::reportNumber( m_ecl_files[i] );
|
|
|
|
if ( reportNumber != -1 )
|
2016-10-25 02:00:52 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
well_info_add_wells( well_info, m_ecl_files[i], reportNumber, importCompleteMswData );
|
2016-10-25 02:00:52 -05:00
|
|
|
}
|
2013-01-24 03:41:28 -06:00
|
|
|
}
|
2012-05-18 02:45:23 -05:00
|
|
|
}
|
|
|
|
}
|
2013-02-27 07:01:36 -06:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2013-02-27 07:01:36 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RifEclipseRestartFilesetAccess::openTimeStep( size_t timeStep )
|
2013-02-27 07:01:36 -06:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
CVF_ASSERT( timeStep < m_ecl_files.size() );
|
2013-02-27 07:01:36 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( m_ecl_files[timeStep] == nullptr )
|
2013-02-27 07:01:36 -06:00
|
|
|
{
|
2023-04-13 00:05:53 -05:00
|
|
|
int index = static_cast<int>( timeStep );
|
2023-02-26 03:48:40 -06:00
|
|
|
ecl_file_type* ecl_file = ecl_file_open( RiaStringEncodingTools::toNativeEncoded( m_fileNames[index] ).data(), ECL_FILE_CLOSE_STREAM );
|
2013-02-27 07:01:36 -06:00
|
|
|
|
|
|
|
m_ecl_files[timeStep] = ecl_file;
|
2017-11-10 02:43:51 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( ecl_file )
|
2017-11-10 02:43:51 -06:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
auto phases = RifEclipseOutputFileTools::findAvailablePhases( ecl_file );
|
2017-11-10 02:43:51 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
m_availablePhases.insert( phases.begin(), phases.end() );
|
2017-11-10 02:43:51 -06:00
|
|
|
}
|
2013-02-27 07:01:36 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-01-29 03:09:30 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-01-29 03:09:30 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
int RifEclipseRestartFilesetAccess::reportNumber( const ecl_file_type* ecl_file )
|
2018-01-29 03:09:30 -06:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( !ecl_file ) return -1;
|
2018-01-29 03:09:30 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
const char* eclFileName = ecl_file_get_src_file( ecl_file );
|
|
|
|
QString fileNameUpper( eclFileName );
|
2018-01-29 03:09:30 -06:00
|
|
|
fileNameUpper = fileNameUpper.toUpper();
|
|
|
|
|
|
|
|
// Convert to upper case, as ecl_util_filename_report_nr does not handle lower case file extensions
|
2019-09-06 03:40:57 -05:00
|
|
|
int reportNumber = ecl_util_filename_report_nr( RiaStringEncodingTools::toNativeEncoded( fileNameUpper ).data() );
|
2018-01-29 03:09:30 -06:00
|
|
|
|
|
|
|
return reportNumber;
|
|
|
|
}
|
|
|
|
|
2014-08-27 07:05:29 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2014-08-27 07:05:29 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
int RifEclipseRestartFilesetAccess::readUnitsType()
|
|
|
|
{
|
2018-02-18 11:56:43 -06:00
|
|
|
ecl_file_type* ecl_file = nullptr;
|
2014-08-27 07:05:29 -05:00
|
|
|
|
2023-09-27 01:07:49 -05:00
|
|
|
if ( !m_ecl_files.empty() )
|
2014-08-27 07:05:29 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
openTimeStep( 0 );
|
2014-08-27 07:05:29 -05:00
|
|
|
ecl_file = m_ecl_files[0];
|
|
|
|
}
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
return RifEclipseOutputFileTools::readUnitsType( ecl_file );
|
2014-08-27 07:05:29 -05:00
|
|
|
}
|
|
|
|
|
2017-11-10 02:43:51 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-11-10 02:43:51 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
std::set<RiaDefines::PhaseType> RifEclipseRestartFilesetAccess::availablePhases() const
|
|
|
|
{
|
|
|
|
return m_availablePhases;
|
|
|
|
}
|
|
|
|
|
2014-10-29 03:34:57 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2014-10-29 03:34:57 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
std::vector<int> RifEclipseRestartFilesetAccess::reportNumbers()
|
|
|
|
{
|
|
|
|
std::vector<int> reportNr;
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
for ( const auto* ecl_file : m_ecl_files )
|
2014-10-29 03:34:57 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( ecl_file )
|
2014-10-29 03:34:57 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
int reportNumber = RifEclipseRestartFilesetAccess::reportNumber( ecl_file );
|
|
|
|
if ( reportNumber != -1 )
|
2018-01-29 03:09:30 -06:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
reportNr.push_back( reportNumber );
|
2018-01-29 03:09:30 -06:00
|
|
|
}
|
2014-10-29 03:34:57 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return reportNr;
|
|
|
|
}
|