Updated ERT, now possible to read simplified MSW

Updated ERT to 3ac60303aa2dc58aed9420a24d9a881fec32076b
This commit is contained in:
Magne Sjaastad
2014-10-24 11:19:54 +02:00
parent 63a5dd24fe
commit a5e4e756af
144 changed files with 3544 additions and 1682 deletions

View File

@@ -55,6 +55,6 @@ public:
virtual void resultNames(QStringList* resultNames, std::vector<size_t>* resultDataItemCounts) = 0;
virtual bool results(const QString& resultName, size_t timeStep, size_t gridCount, std::vector<double>* values) = 0;
virtual void readWellData(well_info_type * well_info) = 0;
virtual void readWellData(well_info_type * well_info, bool importCompleteMswData) = 0;
virtual int readUnitsType() = 0;
};

View File

@@ -209,7 +209,7 @@ bool RifEclipseRestartFilesetAccess::results(const QString& resultName, size_t t
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RifEclipseRestartFilesetAccess::readWellData(well_info_type* well_info)
void RifEclipseRestartFilesetAccess::readWellData(well_info_type* well_info, bool importCompleteMswData)
{
if (!well_info) return;
@@ -221,7 +221,7 @@ void RifEclipseRestartFilesetAccess::readWellData(well_info_type* well_info)
int reportNumber = ecl_util_filename_report_nr(fileName);
if(reportNumber != -1)
{
well_info_add_wells(well_info, m_ecl_files[i], reportNumber);
well_info_add_wells(well_info, m_ecl_files[i], reportNumber, importCompleteMswData);
}
}
}

View File

@@ -48,7 +48,7 @@ public:
void resultNames(QStringList* resultNames, std::vector<size_t>* resultDataItemCounts);
bool results(const QString& resultName, size_t timeStep, size_t gridCount, std::vector<double>* values);
virtual void readWellData(well_info_type* well_info);
virtual void readWellData(well_info_type* well_info, bool importCompleteMswData);
virtual int readUnitsType();
private:

View File

@@ -146,13 +146,13 @@ bool RifEclipseUnifiedRestartFileAccess::results(const QString& resultName, size
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RifEclipseUnifiedRestartFileAccess::readWellData(well_info_type* well_info)
void RifEclipseUnifiedRestartFileAccess::readWellData(well_info_type* well_info, bool importCompleteMswData)
{
if (!well_info) return;
if (openFile())
{
well_info_add_UNRST_wells(well_info, m_ecl_file);
well_info_add_UNRST_wells(well_info, m_ecl_file, importCompleteMswData);
}
}

View File

@@ -49,7 +49,7 @@ public:
void resultNames(QStringList* resultNames, std::vector<size_t>* resultDataItemCounts);
bool results(const QString& resultName, size_t timeStep, size_t gridCount, std::vector<double>* values);
virtual void readWellData(well_info_type * well_info);
virtual void readWellData(well_info_type * well_info, bool importCompleteMswData);
virtual int readUnitsType();
private:

View File

@@ -453,10 +453,8 @@ bool RifReaderEclipseOutput::open(const QString& fileName, RigCaseData* eclipseC
progInfo.setNextProgressIncrement(8);
progInfo.setProgressDescription("Reading Well information");
if (isSimulationWellDataEnabled())
{
readWellCells(mainEclGrid);
}
readWellCells(mainEclGrid, isSimulationWellDataEnabled());
progInfo.setProgressDescription("Releasing reader memory");
ecl_grid_free( mainEclGrid );
@@ -1057,7 +1055,7 @@ void propagatePosContribDownwards(std::map<int, std::vector<SegmentPositionContr
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RifReaderEclipseOutput::readWellCells(const ecl_grid_type* mainEclGrid)
void RifReaderEclipseOutput::readWellCells(const ecl_grid_type* mainEclGrid, bool importCompleteMswData)
{
CVF_ASSERT(m_eclipseCase);
@@ -1066,7 +1064,7 @@ void RifReaderEclipseOutput::readWellCells(const ecl_grid_type* mainEclGrid)
well_info_type* ert_well_info = well_info_alloc(mainEclGrid);
if (!ert_well_info) return;
m_dynamicResultsAccess->readWellData(ert_well_info);
m_dynamicResultsAccess->readWellData(ert_well_info, importCompleteMswData);
RigMainGrid* mainGrid = m_eclipseCase->mainGrid();
std::vector<RigGridBase*> grids;
@@ -1129,7 +1127,7 @@ void RifReaderEclipseOutput::readWellCells(const ecl_grid_type* mainEclGrid)
wellResFrame.m_isOpen = well_state_is_open( ert_well_state );
if (well_state_is_MSW(ert_well_state))
if (importCompleteMswData && well_state_is_MSW(ert_well_state))
{
wellResults->setMultiSegmentWell(true);

View File

@@ -60,7 +60,7 @@ public:
private:
bool readActiveCellInfo();
void buildMetaData();
void readWellCells(const ecl_grid_type* mainEclGrid);
void readWellCells(const ecl_grid_type* mainEclGrid, bool importCompleteMswData);
std::string ertGridName( size_t gridNr );