mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Renamed RigReservoir to RigEclipseCase
p4#: 20500
This commit is contained in:
@@ -247,7 +247,7 @@ TEST(RigReservoirTest, BasicTest)
|
||||
TEST(RigReservoirTest, WellTest)
|
||||
{
|
||||
cvf::ref<RifReaderEclipseOutput> readerInterfaceEcl = new RifReaderEclipseOutput;
|
||||
cvf::ref<RigReservoir> reservoir = new RigReservoir;
|
||||
cvf::ref<RigEclipseCase> reservoir = new RigEclipseCase;
|
||||
|
||||
// Location of test dataset received from Håkon Høgstøl in July 2011 with 10k active cells
|
||||
#ifdef WIN32
|
||||
|
||||
@@ -61,9 +61,9 @@ RifEclipseInputFileTools::~RifEclipseInputFileTools()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigReservoir* reservoir)
|
||||
bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigEclipseCase* eclipseCase)
|
||||
{
|
||||
CVF_ASSERT(reservoir);
|
||||
CVF_ASSERT(eclipseCase);
|
||||
|
||||
qint64 coordPos = -1;
|
||||
qint64 zcornPos = -1;
|
||||
@@ -154,7 +154,7 @@ bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigReservoi
|
||||
|
||||
progress.setProgress(6);
|
||||
|
||||
RifReaderEclipseOutput::transferGeometry(inputGrid, reservoir);
|
||||
RifReaderEclipseOutput::transferGeometry(inputGrid, eclipseCase);
|
||||
|
||||
progress.setProgress(7);
|
||||
progress.setProgressDescription("Cleaning up ...");
|
||||
@@ -176,7 +176,7 @@ bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigReservoi
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Read known properties from the input file
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::map<QString, QString> RifEclipseInputFileTools::readProperties(const QString &fileName, RigReservoir *reservoir)
|
||||
std::map<QString, QString> RifEclipseInputFileTools::readProperties(const QString &fileName, RigEclipseCase *reservoir)
|
||||
{
|
||||
CVF_ASSERT(reservoir);
|
||||
|
||||
@@ -282,9 +282,9 @@ std::vector< RifKeywordAndFilePos > RifEclipseInputFileTools::findKeywordsOnFile
|
||||
/// Reads the property data requested into the \a reservoir, overwriting any previous
|
||||
/// propeties with the same name.
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifEclipseInputFileTools::readProperty(const QString& fileName, RigReservoir* reservoir, const QString& eclipseKeyWord, const QString& resultName)
|
||||
bool RifEclipseInputFileTools::readProperty(const QString& fileName, RigEclipseCase* eclipseCase, const QString& eclipseKeyWord, const QString& resultName)
|
||||
{
|
||||
CVF_ASSERT(reservoir);
|
||||
CVF_ASSERT(eclipseCase);
|
||||
|
||||
FILE* filePointer = util_fopen(fileName.toLatin1().data(), "r");
|
||||
if (!filePointer) return false;
|
||||
@@ -294,13 +294,13 @@ bool RifEclipseInputFileTools::readProperty(const QString& fileName, RigReservoi
|
||||
if (eclKeyWordData)
|
||||
{
|
||||
QString newResultName = resultName;
|
||||
size_t resultIndex = reservoir->results(RifReaderInterface::MATRIX_RESULTS)->findScalarResultIndex(newResultName);
|
||||
size_t resultIndex = eclipseCase->results(RifReaderInterface::MATRIX_RESULTS)->findScalarResultIndex(newResultName);
|
||||
if (resultIndex == cvf::UNDEFINED_SIZE_T)
|
||||
{
|
||||
resultIndex = reservoir->results(RifReaderInterface::MATRIX_RESULTS)->addEmptyScalarResult(RimDefines::INPUT_PROPERTY, newResultName);
|
||||
resultIndex = eclipseCase->results(RifReaderInterface::MATRIX_RESULTS)->addEmptyScalarResult(RimDefines::INPUT_PROPERTY, newResultName);
|
||||
}
|
||||
|
||||
std::vector< std::vector<double> >& newPropertyData = reservoir->results(RifReaderInterface::MATRIX_RESULTS)->cellScalarResults(resultIndex);
|
||||
std::vector< std::vector<double> >& newPropertyData = eclipseCase->results(RifReaderInterface::MATRIX_RESULTS)->cellScalarResults(resultIndex);
|
||||
newPropertyData.resize(1);
|
||||
newPropertyData[0].resize(ecl_kw_get_size(eclKeyWordData), HUGE_VAL);
|
||||
ecl_kw_get_data_as_double(eclKeyWordData, newPropertyData[0].data());
|
||||
@@ -370,11 +370,11 @@ const std::vector<QString>& RifEclipseInputFileTools::knownPropertyKeywords()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifEclipseInputFileTools::writePropertyToTextFile(const QString& fileName, RigReservoir* reservoir, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord)
|
||||
bool RifEclipseInputFileTools::writePropertyToTextFile(const QString& fileName, RigEclipseCase* eclipseCase, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord)
|
||||
{
|
||||
CVF_ASSERT(reservoir);
|
||||
CVF_ASSERT(eclipseCase);
|
||||
|
||||
size_t resultIndex = reservoir->results(RifReaderInterface::MATRIX_RESULTS)->findScalarResultIndex(resultName);
|
||||
size_t resultIndex = eclipseCase->results(RifReaderInterface::MATRIX_RESULTS)->findScalarResultIndex(resultName);
|
||||
if (resultIndex == cvf::UNDEFINED_SIZE_T)
|
||||
{
|
||||
return false;
|
||||
@@ -386,7 +386,7 @@ bool RifEclipseInputFileTools::writePropertyToTextFile(const QString& fileName,
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector< std::vector<double> >& resultData = reservoir->results(RifReaderInterface::MATRIX_RESULTS)->cellScalarResults(resultIndex);
|
||||
std::vector< std::vector<double> >& resultData = eclipseCase->results(RifReaderInterface::MATRIX_RESULTS)->cellScalarResults(resultIndex);
|
||||
if (resultData.size() == 0)
|
||||
{
|
||||
return false;
|
||||
@@ -402,11 +402,11 @@ bool RifEclipseInputFileTools::writePropertyToTextFile(const QString& fileName,
|
||||
/// Create and write a result vector with values for all cells.
|
||||
/// undefinedValue is used for cells with no result
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifEclipseInputFileTools::writeBinaryResultToTextFile(const QString& fileName, RigReservoir* reservoir, RifReaderInterface::PorosityModelResultType porosityModel, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord, const double undefinedValue)
|
||||
bool RifEclipseInputFileTools::writeBinaryResultToTextFile(const QString& fileName, RigEclipseCase* eclipseCase, RifReaderInterface::PorosityModelResultType porosityModel, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord, const double undefinedValue)
|
||||
{
|
||||
CVF_ASSERT(reservoir);
|
||||
CVF_ASSERT(eclipseCase);
|
||||
|
||||
size_t resultIndex = reservoir->results(porosityModel)->findScalarResultIndex(resultName);
|
||||
size_t resultIndex = eclipseCase->results(porosityModel)->findScalarResultIndex(resultName);
|
||||
if (resultIndex == cvf::UNDEFINED_SIZE_T)
|
||||
{
|
||||
return false;
|
||||
@@ -418,7 +418,7 @@ bool RifEclipseInputFileTools::writeBinaryResultToTextFile(const QString& fileNa
|
||||
return false;
|
||||
}
|
||||
|
||||
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObject = reservoir->dataAccessObject(reservoir->mainGrid(), porosityModel, timeStep, resultIndex);
|
||||
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObject = eclipseCase->dataAccessObject(eclipseCase->mainGrid(), porosityModel, timeStep, resultIndex);
|
||||
if (dataAccessObject.isNull())
|
||||
{
|
||||
return false;
|
||||
@@ -426,11 +426,11 @@ bool RifEclipseInputFileTools::writeBinaryResultToTextFile(const QString& fileNa
|
||||
|
||||
std::vector<double> resultData;
|
||||
size_t i, j, k;
|
||||
for (k = 0; k < reservoir->mainGrid()->cellCountK(); k++)
|
||||
for (k = 0; k < eclipseCase->mainGrid()->cellCountK(); k++)
|
||||
{
|
||||
for (j = 0; j < reservoir->mainGrid()->cellCountJ(); j++)
|
||||
for (j = 0; j < eclipseCase->mainGrid()->cellCountJ(); j++)
|
||||
{
|
||||
for (i = 0; i < reservoir->mainGrid()->cellCountI(); i++)
|
||||
for (i = 0; i < eclipseCase->mainGrid()->cellCountI(); i++)
|
||||
{
|
||||
double resultValue = dataAccessObject->cellScalar(i, j, k);
|
||||
if (resultValue == HUGE_VAL)
|
||||
@@ -519,9 +519,9 @@ void RifEclipseInputFileTools::findGridKeywordPositions(const QString& filename,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifEclipseInputFileTools::readPropertyAtFilePosition(const QString& fileName, RigReservoir* reservoir, const QString& eclipseKeyWord, qint64 filePos, const QString& resultName)
|
||||
bool RifEclipseInputFileTools::readPropertyAtFilePosition(const QString& fileName, RigEclipseCase* eclipseCase, const QString& eclipseKeyWord, qint64 filePos, const QString& resultName)
|
||||
{
|
||||
CVF_ASSERT(reservoir);
|
||||
CVF_ASSERT(eclipseCase);
|
||||
|
||||
FILE* filePointer = util_fopen(fileName.toLatin1().data(), "r");
|
||||
if (!filePointer) return false;
|
||||
@@ -532,13 +532,13 @@ bool RifEclipseInputFileTools::readPropertyAtFilePosition(const QString& fileNam
|
||||
if (eclKeyWordData)
|
||||
{
|
||||
QString newResultName = resultName;
|
||||
size_t resultIndex = reservoir->results(RifReaderInterface::MATRIX_RESULTS)->findScalarResultIndex(newResultName);
|
||||
size_t resultIndex = eclipseCase->results(RifReaderInterface::MATRIX_RESULTS)->findScalarResultIndex(newResultName);
|
||||
if (resultIndex == cvf::UNDEFINED_SIZE_T)
|
||||
{
|
||||
resultIndex = reservoir->results(RifReaderInterface::MATRIX_RESULTS)->addEmptyScalarResult(RimDefines::INPUT_PROPERTY, newResultName);
|
||||
resultIndex = eclipseCase->results(RifReaderInterface::MATRIX_RESULTS)->addEmptyScalarResult(RimDefines::INPUT_PROPERTY, newResultName);
|
||||
}
|
||||
|
||||
std::vector< std::vector<double> >& newPropertyData = reservoir->results(RifReaderInterface::MATRIX_RESULTS)->cellScalarResults(resultIndex);
|
||||
std::vector< std::vector<double> >& newPropertyData = eclipseCase->results(RifReaderInterface::MATRIX_RESULTS)->cellScalarResults(resultIndex);
|
||||
newPropertyData.resize(1);
|
||||
newPropertyData[0].resize(ecl_kw_get_size(eclKeyWordData), HUGE_VAL);
|
||||
ecl_kw_get_data_as_double(eclKeyWordData, newPropertyData[0].data());
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "RifReaderInterface.h"
|
||||
|
||||
|
||||
class RigReservoir;
|
||||
class RigEclipseCase;
|
||||
class QFile;
|
||||
|
||||
|
||||
@@ -52,19 +52,19 @@ public:
|
||||
RifEclipseInputFileTools();
|
||||
virtual ~RifEclipseInputFileTools();
|
||||
|
||||
static bool openGridFile(const QString& fileName, RigReservoir* reservoir);
|
||||
static bool openGridFile(const QString& fileName, RigEclipseCase* eclipseCase);
|
||||
|
||||
// Returns map of assigned resultName and Eclipse Keyword.
|
||||
static std::map<QString, QString> readProperties(const QString& fileName, RigReservoir* reservoir);
|
||||
static bool readProperty (const QString& fileName, RigReservoir* reservoir, const QString& eclipseKeyWord, const QString& resultName );
|
||||
static bool readPropertyAtFilePosition (const QString& fileName, RigReservoir* reservoir, const QString& eclipseKeyWord, qint64 filePos, const QString& resultName );
|
||||
static std::map<QString, QString> readProperties(const QString& fileName, RigEclipseCase* eclipseCase);
|
||||
static bool readProperty (const QString& fileName, RigEclipseCase* eclipseCase, const QString& eclipseKeyWord, const QString& resultName );
|
||||
static bool readPropertyAtFilePosition (const QString& fileName, RigEclipseCase* eclipseCase, const QString& eclipseKeyWord, qint64 filePos, const QString& resultName );
|
||||
|
||||
static std::vector< RifKeywordAndFilePos > findKeywordsOnFile(const QString &fileName);
|
||||
|
||||
static const std::vector<QString>& knownPropertyKeywords();
|
||||
|
||||
static bool writePropertyToTextFile(const QString& fileName, RigReservoir* reservoir, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord);
|
||||
static bool writeBinaryResultToTextFile(const QString& fileName, RigReservoir* reservoir, RifReaderInterface::PorosityModelResultType porosityModel, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord, const double undefinedValue);
|
||||
static bool writePropertyToTextFile(const QString& fileName, RigEclipseCase* eclipseCase, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord);
|
||||
static bool writeBinaryResultToTextFile(const QString& fileName, RigEclipseCase* eclipseCase, RifReaderInterface::PorosityModelResultType porosityModel, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord, const double undefinedValue);
|
||||
|
||||
private:
|
||||
static void writeDataToTextFile(QFile* file, const QString& eclipseKeyWord, const std::vector<double>& resultData);
|
||||
|
||||
@@ -57,9 +57,9 @@ RifReaderEclipseInput::~RifReaderEclipseInput()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Open file and read geometry into given reservoir object
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifReaderEclipseInput::open(const QString& fileName, RigReservoir* reservoir)
|
||||
bool RifReaderEclipseInput::open(const QString& fileName, RigEclipseCase* eclipseCase)
|
||||
{
|
||||
CVF_ASSERT(reservoir);
|
||||
CVF_ASSERT(eclipseCase);
|
||||
|
||||
// Make sure everything's closed
|
||||
close();
|
||||
@@ -84,9 +84,9 @@ bool RifReaderEclipseInput::open(const QString& fileName, RigReservoir* reservoi
|
||||
// create InputProperty object
|
||||
|
||||
bool isOk = false;
|
||||
if (reservoir->mainGrid()->gridPointDimensions() == cvf::Vec3st(0,0,0))
|
||||
if (eclipseCase->mainGrid()->gridPointDimensions() == cvf::Vec3st(0,0,0))
|
||||
{
|
||||
isOk = RifEclipseInputFileTools::openGridFile(fileName, reservoir);
|
||||
isOk = RifEclipseInputFileTools::openGridFile(fileName, eclipseCase);
|
||||
}
|
||||
|
||||
return isOk;
|
||||
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
virtual ~RifReaderEclipseInput();
|
||||
|
||||
// Virtual interface implementation
|
||||
virtual bool open(const QString& fileName, RigReservoir* reservoir);
|
||||
virtual bool open(const QString& fileName, RigEclipseCase* eclipseCase);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -230,9 +230,9 @@ void RifReaderEclipseOutput::close()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Read geometry from file given by name into given reservoir object
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifReaderEclipseOutput::transferGeometry(const ecl_grid_type* mainEclGrid, RigReservoir* reservoir)
|
||||
bool RifReaderEclipseOutput::transferGeometry(const ecl_grid_type* mainEclGrid, RigEclipseCase* eclipseCase)
|
||||
{
|
||||
CVF_ASSERT(reservoir);
|
||||
CVF_ASSERT(eclipseCase);
|
||||
|
||||
if (!mainEclGrid)
|
||||
{
|
||||
@@ -240,10 +240,10 @@ bool RifReaderEclipseOutput::transferGeometry(const ecl_grid_type* mainEclGrid,
|
||||
return false;
|
||||
}
|
||||
|
||||
RigActiveCellInfo* activeCellInfo = reservoir->activeCellInfo();
|
||||
RigActiveCellInfo* activeCellInfo = eclipseCase->activeCellInfo();
|
||||
CVF_ASSERT(activeCellInfo);
|
||||
|
||||
RigMainGrid* mainGrid = reservoir->mainGrid();
|
||||
RigMainGrid* mainGrid = eclipseCase->mainGrid();
|
||||
{
|
||||
cvf::Vec3st gridPointDim(0,0,0);
|
||||
gridPointDim.x() = ecl_grid_get_nx(mainEclGrid) + 1;
|
||||
@@ -332,9 +332,9 @@ bool RifReaderEclipseOutput::transferGeometry(const ecl_grid_type* mainEclGrid,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Open file and read geometry into given reservoir object
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifReaderEclipseOutput::open(const QString& fileName, RigReservoir* reservoir)
|
||||
bool RifReaderEclipseOutput::open(const QString& fileName, RigEclipseCase* eclipseCase)
|
||||
{
|
||||
CVF_ASSERT(reservoir);
|
||||
CVF_ASSERT(eclipseCase);
|
||||
caf::ProgressInfo progInfo(100, "");
|
||||
|
||||
progInfo.setProgressDescription("Reading Grid");
|
||||
@@ -360,7 +360,7 @@ bool RifReaderEclipseOutput::open(const QString& fileName, RigReservoir* reservo
|
||||
progInfo.setNextProgressIncrement(10);
|
||||
progInfo.setProgressDescription("Transferring grid geometry");
|
||||
|
||||
if (!transferGeometry(mainEclGrid, reservoir)) return false;
|
||||
if (!transferGeometry(mainEclGrid, eclipseCase)) return false;
|
||||
progInfo.incrementProgress();
|
||||
|
||||
progInfo.setProgressDescription("Releasing reader memory");
|
||||
@@ -370,19 +370,19 @@ bool RifReaderEclipseOutput::open(const QString& fileName, RigReservoir* reservo
|
||||
progInfo.setProgressDescription("Reading Result index");
|
||||
progInfo.setNextProgressIncrement(60);
|
||||
|
||||
m_reservoir = reservoir;
|
||||
m_reservoir = eclipseCase;
|
||||
|
||||
reservoir->results(RifReaderInterface::MATRIX_RESULTS)->setReaderInterface(this);
|
||||
reservoir->results(RifReaderInterface::FRACTURE_RESULTS)->setReaderInterface(this);
|
||||
eclipseCase->results(RifReaderInterface::MATRIX_RESULTS)->setReaderInterface(this);
|
||||
eclipseCase->results(RifReaderInterface::FRACTURE_RESULTS)->setReaderInterface(this);
|
||||
|
||||
// Build results meta data
|
||||
if (!buildMetaData(reservoir)) return false;
|
||||
if (!buildMetaData(eclipseCase)) return false;
|
||||
progInfo.incrementProgress();
|
||||
|
||||
progInfo.setNextProgressIncrement(8);
|
||||
progInfo.setProgressDescription("Reading Well information");
|
||||
|
||||
readWellCells(reservoir);
|
||||
readWellCells(eclipseCase);
|
||||
|
||||
|
||||
return true;
|
||||
@@ -391,7 +391,7 @@ bool RifReaderEclipseOutput::open(const QString& fileName, RigReservoir* reservo
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Build meta data - get states and results info
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifReaderEclipseOutput::buildMetaData(RigReservoir* reservoir)
|
||||
bool RifReaderEclipseOutput::buildMetaData(RigEclipseCase* eclipseCase)
|
||||
{
|
||||
CVF_ASSERT(m_reservoir.notNull());
|
||||
CVF_ASSERT(m_fileSet.size() > 0);
|
||||
@@ -579,9 +579,9 @@ bool RifReaderEclipseOutput::dynamicResult(const QString& result, PorosityModelR
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifReaderEclipseOutput::readWellCells(RigReservoir* reservoir)
|
||||
void RifReaderEclipseOutput::readWellCells(RigEclipseCase* eclipseCase)
|
||||
{
|
||||
CVF_ASSERT(reservoir);
|
||||
CVF_ASSERT(eclipseCase);
|
||||
|
||||
if (m_dynamicResultsAccess.isNull()) return;
|
||||
|
||||
@@ -590,9 +590,9 @@ void RifReaderEclipseOutput::readWellCells(RigReservoir* reservoir)
|
||||
|
||||
m_dynamicResultsAccess->readWellData(ert_well_info);
|
||||
|
||||
RigMainGrid* mainGrid = reservoir->mainGrid();
|
||||
RigMainGrid* mainGrid = eclipseCase->mainGrid();
|
||||
std::vector<RigGridBase*> grids;
|
||||
reservoir->allGrids(&grids);
|
||||
eclipseCase->allGrids(&grids);
|
||||
|
||||
cvf::Collection<RigWellResults> wells;
|
||||
caf::ProgressInfo progress(well_info_get_num_wells(ert_well_info), "");
|
||||
@@ -752,7 +752,7 @@ void RifReaderEclipseOutput::readWellCells(RigReservoir* reservoir)
|
||||
|
||||
well_info_free(ert_well_info);
|
||||
|
||||
reservoir->setWellResults(wells);
|
||||
eclipseCase->setWellResults(wells);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -43,18 +43,18 @@ public:
|
||||
RifReaderEclipseOutput();
|
||||
virtual ~RifReaderEclipseOutput();
|
||||
|
||||
bool open(const QString& fileName, RigReservoir* reservoir);
|
||||
bool open(const QString& fileName, RigEclipseCase* eclipseCase);
|
||||
void close();
|
||||
|
||||
bool staticResult(const QString& result, PorosityModelResultType matrixOrFracture, std::vector<double>* values);
|
||||
bool dynamicResult(const QString& result, PorosityModelResultType matrixOrFracture, size_t stepIndex, std::vector<double>* values);
|
||||
|
||||
static bool transferGeometry(const ecl_grid_type* mainEclGrid, RigReservoir* reservoir);
|
||||
static bool transferGeometry(const ecl_grid_type* mainEclGrid, RigEclipseCase* eclipseCase);
|
||||
|
||||
private:
|
||||
void ground();
|
||||
bool buildMetaData(RigReservoir* reservoir);
|
||||
void readWellCells(RigReservoir* reservoir);
|
||||
bool buildMetaData(RigEclipseCase* eclipseCase);
|
||||
void readWellCells(RigEclipseCase* eclipseCase);
|
||||
|
||||
void extractResultValuesBasedOnPorosityModel(PorosityModelResultType matrixOrFracture, std::vector<double>* values, const std::vector<double>& fileValues);
|
||||
|
||||
@@ -67,7 +67,7 @@ private:
|
||||
QString m_fileName; // Name of file used to start accessing Eclipse output files
|
||||
QStringList m_fileSet; // Set of files in filename's path with same base name as filename
|
||||
|
||||
cvf::ref<RigReservoir> m_reservoir;
|
||||
cvf::ref<RigEclipseCase> m_reservoir;
|
||||
|
||||
QList<QDateTime> m_timeSteps;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <QStringList>
|
||||
|
||||
|
||||
class RigReservoir;
|
||||
class RigEclipseCase;
|
||||
|
||||
//==================================================================================================
|
||||
//
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
RifReaderInterface() {}
|
||||
virtual ~RifReaderInterface() {}
|
||||
|
||||
virtual bool open(const QString& fileName, RigReservoir* reservoir) = 0;
|
||||
virtual bool open(const QString& fileName, RigEclipseCase* eclipseCase) = 0;
|
||||
virtual void close() = 0;
|
||||
|
||||
virtual bool staticResult(const QString& result, PorosityModelResultType matrixOrFracture, std::vector<double>* values) = 0;
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifReaderMockModel::open(const QString& fileName, RigReservoir* reservoir)
|
||||
bool RifReaderMockModel::open(const QString& fileName, RigEclipseCase* eclipseCase)
|
||||
{
|
||||
m_reservoirBuilder.populateReservoir(reservoir);
|
||||
m_reservoirBuilder.populateReservoir(eclipseCase);
|
||||
|
||||
m_reservoir = reservoir;
|
||||
m_reservoir = eclipseCase;
|
||||
|
||||
RigReservoirCellResults* cellResults = reservoir->results(RifReaderInterface::MATRIX_RESULTS);
|
||||
RigReservoirCellResults* cellResults = eclipseCase->results(RifReaderInterface::MATRIX_RESULTS);
|
||||
|
||||
|
||||
QList<QDateTime> dates;
|
||||
@@ -170,8 +170,8 @@ void RifReaderMockModel::addLocalGridRefinement(const cvf::Vec3st& minCellPositi
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifReaderMockModel::populateReservoir(RigReservoir* reservoir)
|
||||
void RifReaderMockModel::populateReservoir(RigEclipseCase* eclipseCase)
|
||||
{
|
||||
m_reservoirBuilder.populateReservoir(reservoir);
|
||||
m_reservoirBuilder.populateReservoir(eclipseCase);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,17 +33,17 @@ public:
|
||||
|
||||
void addLocalGridRefinement(const cvf::Vec3st& minCellPosition, const cvf::Vec3st& maxCellPosition, const cvf::Vec3st& singleCellRefinementFactors);
|
||||
|
||||
virtual bool open( const QString& fileName, RigReservoir* reservoir );
|
||||
virtual bool open( const QString& fileName, RigEclipseCase* eclipseCase );
|
||||
virtual void close();
|
||||
|
||||
virtual bool staticResult( const QString& result, RifReaderInterface::PorosityModelResultType matrixOrFracture, std::vector<double>* values );
|
||||
virtual bool dynamicResult( const QString& result, RifReaderInterface::PorosityModelResultType matrixOrFracture, size_t stepIndex, std::vector<double>* values );
|
||||
|
||||
private:
|
||||
void populateReservoir(RigReservoir* reservoir);
|
||||
void populateReservoir(RigEclipseCase* eclipseCase);
|
||||
bool inputProperty( const QString& propertyName, std::vector<double>* values );
|
||||
|
||||
RigReservoirBuilderMock m_reservoirBuilder;
|
||||
cvf::ref<RigReservoir> m_reservoir;
|
||||
cvf::ref<RigEclipseCase> m_reservoir;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user