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:
@@ -30,7 +30,7 @@
|
||||
#include "RimProject.h"
|
||||
|
||||
class RIProcess;
|
||||
class RigReservoir;
|
||||
class RigEclipseCase;
|
||||
class RimReservoir;
|
||||
class Drawable;
|
||||
class RiaSocketServer;
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -96,8 +96,8 @@ void RivCellEdgeGeometryGenerator::addCellEdgeResultsToDrawableGeo(
|
||||
const RigGridBase* grid = dynamic_cast<const RigGridBase*>(generator->activeGrid());
|
||||
CVF_ASSERT(grid != NULL);
|
||||
|
||||
RigReservoir* reservoir = cellResultSlot->reservoirView()->eclipseCase()->reservoirData();
|
||||
CVF_ASSERT(reservoir != NULL);
|
||||
RigEclipseCase* eclipseCase = cellResultSlot->reservoirView()->eclipseCase()->reservoirData();
|
||||
CVF_ASSERT(eclipseCase != NULL);
|
||||
|
||||
cvf::ref<cvf::StructGridScalarDataAccess> cellCenterDataAccessObject = NULL;
|
||||
if (cellResultSlot->hasResult())
|
||||
@@ -109,7 +109,7 @@ void RivCellEdgeGeometryGenerator::addCellEdgeResultsToDrawableGeo(
|
||||
}
|
||||
|
||||
RifReaderInterface::PorosityModelResultType porosityModel = RigReservoirCellResults::convertFromProjectModelPorosityModel(cellResultSlot->porosityModel());
|
||||
cellCenterDataAccessObject = reservoir->dataAccessObject(grid, porosityModel, timeStepIndex, cellResultSlot->gridScalarIndex());
|
||||
cellCenterDataAccessObject = eclipseCase->dataAccessObject(grid, porosityModel, timeStepIndex, cellResultSlot->gridScalarIndex());
|
||||
}
|
||||
|
||||
CVF_ASSERT(cellEdgeResultSlot->hasResult());
|
||||
@@ -128,7 +128,7 @@ void RivCellEdgeGeometryGenerator::addCellEdgeResultsToDrawableGeo(
|
||||
{
|
||||
// Assuming static values to be mapped onto cell edge, always using time step zero
|
||||
// TODO: Now hardcoded matrix results, should it be possible to use fracture results?
|
||||
daObj = reservoir->dataAccessObject(grid, RifReaderInterface::MATRIX_RESULTS, 0, resultIndices[cubeFaceIdx]);
|
||||
daObj = eclipseCase->dataAccessObject(grid, RifReaderInterface::MATRIX_RESULTS, 0, resultIndices[cubeFaceIdx]);
|
||||
}
|
||||
|
||||
cellEdgeDataAccessObjects.push_back(daObj.p());
|
||||
|
||||
@@ -223,8 +223,8 @@ void RivGridPartMgr::updateCellResultColor(size_t timeStepIndex, RimResultSlot*
|
||||
|
||||
RifReaderInterface::PorosityModelResultType porosityModel = RigReservoirCellResults::convertFromProjectModelPorosityModel(cellResultSlot->porosityModel());
|
||||
|
||||
RigReservoir* reservoir = cellResultSlot->reservoirView()->eclipseCase()->reservoirData();
|
||||
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObject = reservoir->dataAccessObject(m_grid.p(), porosityModel, resTimeStepIdx, scalarSetIndex);
|
||||
RigEclipseCase* eclipseCase = cellResultSlot->reservoirView()->eclipseCase()->reservoirData();
|
||||
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObject = eclipseCase->dataAccessObject(m_grid.p(), porosityModel, resTimeStepIdx, scalarSetIndex);
|
||||
|
||||
if (dataAccessObject.isNull()) return;
|
||||
|
||||
|
||||
@@ -26,13 +26,13 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirPartMgr::clearAndSetReservoir(const RigReservoir* reservoir)
|
||||
void RivReservoirPartMgr::clearAndSetReservoir(const RigEclipseCase* eclipseCase)
|
||||
{
|
||||
m_allGrids.clear();
|
||||
if (reservoir)
|
||||
if (eclipseCase)
|
||||
{
|
||||
std::vector<const RigGridBase*> grids;
|
||||
reservoir->allGrids(&grids);
|
||||
eclipseCase->allGrids(&grids);
|
||||
for (size_t i = 0; i < grids.size() ; ++i)
|
||||
{
|
||||
m_allGrids.push_back(new RivGridPartMgr(grids[i], i) );
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace cvf
|
||||
class RimResultSlot;
|
||||
class RimCellEdgeResultSlot;
|
||||
class RivGridPartMgr;
|
||||
class RigReservoir;
|
||||
class RigEclipseCase;
|
||||
|
||||
|
||||
//==================================================================================================
|
||||
@@ -43,7 +43,7 @@ class RigReservoir;
|
||||
class RivReservoirPartMgr: public cvf::Object
|
||||
{
|
||||
public:
|
||||
void clearAndSetReservoir(const RigReservoir* reservoir);
|
||||
void clearAndSetReservoir(const RigEclipseCase* eclipseCase);
|
||||
void setTransform(cvf::Transform* scaleTransform);
|
||||
void setCellVisibility(size_t gridIndex, cvf::UByteArray* cellVisibilities );
|
||||
|
||||
|
||||
@@ -125,10 +125,10 @@ void RivReservoirViewPartMgr::scheduleGeometryRegen(ReservoirGeometryCacheType g
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirViewPartMgr::clearGeometryCache(ReservoirGeometryCacheType geomType)
|
||||
{
|
||||
RigReservoir* reservoir = NULL;
|
||||
RigEclipseCase* eclipseCase = NULL;
|
||||
if (m_reservoirView != NULL && m_reservoirView->eclipseCase())
|
||||
{
|
||||
reservoir = m_reservoirView->eclipseCase()->reservoirData();
|
||||
eclipseCase = m_reservoirView->eclipseCase()->reservoirData();
|
||||
}
|
||||
|
||||
if (geomType == PROPERTY_FILTERED)
|
||||
@@ -138,7 +138,7 @@ void RivReservoirViewPartMgr::clearGeometryCache(ReservoirGeometryCacheType geom
|
||||
m_propFilteredGeometryFramesNeedsRegen[i] = true;
|
||||
if (m_propFilteredGeometryFrames[i].notNull())
|
||||
{
|
||||
m_propFilteredGeometryFrames[i]->clearAndSetReservoir(reservoir);
|
||||
m_propFilteredGeometryFrames[i]->clearAndSetReservoir(eclipseCase);
|
||||
m_propFilteredGeometryFrames[i]->setTransform(m_scaleTransform.p());
|
||||
}
|
||||
}
|
||||
@@ -150,7 +150,7 @@ void RivReservoirViewPartMgr::clearGeometryCache(ReservoirGeometryCacheType geom
|
||||
m_propFilteredWellGeometryFramesNeedsRegen[i] = true;
|
||||
if (m_propFilteredWellGeometryFrames[i].notNull())
|
||||
{
|
||||
m_propFilteredWellGeometryFrames[i]->clearAndSetReservoir(reservoir);
|
||||
m_propFilteredWellGeometryFrames[i]->clearAndSetReservoir(eclipseCase);
|
||||
m_propFilteredWellGeometryFrames[i]->setTransform(m_scaleTransform.p());
|
||||
}
|
||||
}
|
||||
@@ -158,7 +158,7 @@ void RivReservoirViewPartMgr::clearGeometryCache(ReservoirGeometryCacheType geom
|
||||
else
|
||||
{
|
||||
m_geometriesNeedsRegen[geomType] = true;
|
||||
m_geometries[geomType].clearAndSetReservoir(reservoir);
|
||||
m_geometries[geomType].clearAndSetReservoir(eclipseCase);
|
||||
m_geometries[geomType].setTransform(m_scaleTransform.p());
|
||||
}
|
||||
}
|
||||
@@ -224,7 +224,7 @@ void RivReservoirViewPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicL
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirViewPartMgr::createGeometry(ReservoirGeometryCacheType geometryType)
|
||||
{
|
||||
RigReservoir* res = m_reservoirView->eclipseCase()->reservoirData();
|
||||
RigEclipseCase* res = m_reservoirView->eclipseCase()->reservoirData();
|
||||
m_geometries[geometryType].clearAndSetReservoir(res);
|
||||
m_geometries[geometryType].setTransform(m_scaleTransform.p());
|
||||
std::vector<RigGridBase*> grids;
|
||||
@@ -246,8 +246,8 @@ void RivReservoirViewPartMgr::createGeometry(ReservoirGeometryCacheType geometry
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirViewPartMgr::computeVisibility(cvf::UByteArray* cellVisibility, ReservoirGeometryCacheType geometryType, RigGridBase* grid, size_t gridIdx)
|
||||
{
|
||||
RigReservoir* reservoir = m_reservoirView->eclipseCase()->reservoirData();
|
||||
RigActiveCellInfo* activeCellInfo = reservoir->activeCellInfo();
|
||||
RigEclipseCase* eclipseCase = m_reservoirView->eclipseCase()->reservoirData();
|
||||
RigActiveCellInfo* activeCellInfo = eclipseCase->activeCellInfo();
|
||||
|
||||
switch (geometryType)
|
||||
{
|
||||
@@ -370,7 +370,7 @@ void RivReservoirViewPartMgr::computeVisibility(cvf::UByteArray* cellVisibility,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirViewPartMgr::createPropertyFilteredGeometry(size_t frameIndex)
|
||||
{
|
||||
RigReservoir* res = m_reservoirView->eclipseCase()->reservoirData();
|
||||
RigEclipseCase* res = m_reservoirView->eclipseCase()->reservoirData();
|
||||
|
||||
if ( frameIndex >= m_propFilteredGeometryFrames.size())
|
||||
{
|
||||
@@ -417,7 +417,7 @@ void RivReservoirViewPartMgr::createPropertyFilteredGeometry(size_t frameIndex)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirViewPartMgr::createPropertyFilteredWellGeometry(size_t frameIndex)
|
||||
{
|
||||
RigReservoir* res = m_reservoirView->eclipseCase()->reservoirData();
|
||||
RigEclipseCase* res = m_reservoirView->eclipseCase()->reservoirData();
|
||||
|
||||
if ( frameIndex >= m_propFilteredWellGeometryFrames.size())
|
||||
{
|
||||
@@ -605,9 +605,9 @@ void RivReservoirViewPartMgr::computePropertyVisibility(cvf::UByteArray* cellVis
|
||||
const RimCellFilter::FilterModeType filterType = (*pfIt)->filterMode();
|
||||
|
||||
RifReaderInterface::PorosityModelResultType porosityModel = RigReservoirCellResults::convertFromProjectModelPorosityModel((*pfIt)->resultDefinition()->porosityModel());
|
||||
RigReservoir* reservoir = propFilterColl->reservoirView()->eclipseCase()->reservoirData();
|
||||
RigEclipseCase* eclipseCase = propFilterColl->reservoirView()->eclipseCase()->reservoirData();
|
||||
|
||||
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObject = reservoir->dataAccessObject(grid, porosityModel, timeStepIndex, scalarResultIndex);
|
||||
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObject = eclipseCase->dataAccessObject(grid, porosityModel, timeStepIndex, scalarResultIndex);
|
||||
CVF_ASSERT(dataAccessObject.notNull());
|
||||
|
||||
#pragma omp parallel for schedule(dynamic)
|
||||
|
||||
@@ -72,7 +72,7 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex)
|
||||
|
||||
if (m_rimReservoirView.isNull()) return;
|
||||
|
||||
RigReservoir* rigReservoir = m_rimReservoirView->eclipseCase()->reservoirData();
|
||||
RigEclipseCase* rigReservoir = m_rimReservoirView->eclipseCase()->reservoirData();
|
||||
|
||||
RimWell* well = m_rimWell;
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ void RivWellPipesPartMgr::calculateWellPipeCenterline( std::vector< std::vector
|
||||
|
||||
bool isAutoDetectBranches = m_rimReservoirView->wellCollection()->isAutoDetectingBranches();
|
||||
|
||||
RigReservoir* rigReservoir = m_rimReservoirView->eclipseCase()->reservoirData();
|
||||
RigEclipseCase* rigReservoir = m_rimReservoirView->eclipseCase()->reservoirData();
|
||||
RigWellResults* wellResults = m_rimWell->wellResults();
|
||||
|
||||
const RigWellResultFrame& staticWellFrame = m_rimWell->wellResults()->m_staticWellCells;
|
||||
|
||||
@@ -82,8 +82,8 @@ void RimInputReservoir::openDataFileSet(const QStringList& filenames)
|
||||
|
||||
if (m_rigReservoir.isNull())
|
||||
{
|
||||
RigReservoir* reservoir = new RigReservoir;
|
||||
m_rigReservoir = reservoir;
|
||||
RigEclipseCase* eclipseCase = new RigEclipseCase;
|
||||
m_rigReservoir = eclipseCase;
|
||||
}
|
||||
|
||||
// First find and read the grid data
|
||||
@@ -168,15 +168,15 @@ bool RimInputReservoir::openEclipseGridFile()
|
||||
}
|
||||
else
|
||||
{
|
||||
RigReservoir* reservoir = new RigReservoir;
|
||||
RigEclipseCase* eclipseCase = new RigEclipseCase;
|
||||
readerInterface = new RifReaderEclipseInput;
|
||||
if (!readerInterface->open(m_gridFileName, reservoir))
|
||||
if (!readerInterface->open(m_gridFileName, eclipseCase))
|
||||
{
|
||||
delete reservoir;
|
||||
delete eclipseCase;
|
||||
return false;
|
||||
}
|
||||
|
||||
m_rigReservoir = reservoir;
|
||||
m_rigReservoir = eclipseCase;
|
||||
loadAndSyncronizeInputProperties();
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ void RimInputReservoir::removeProperty(RimInputProperty* inputProperty)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<RifReaderInterface> RimInputReservoir::createMockModel(QString modelName)
|
||||
{
|
||||
cvf::ref<RigReservoir> reservoir = new RigReservoir;
|
||||
cvf::ref<RigEclipseCase> reservoir = new RigEclipseCase;
|
||||
cvf::ref<RifReaderMockModel> mockFileInterface = new RifReaderMockModel;
|
||||
|
||||
if (modelName == "Input Mock Debug Model Simple")
|
||||
|
||||
@@ -53,7 +53,7 @@ RimReservoir::RimReservoir()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigReservoir* RimReservoir::reservoirData()
|
||||
RigEclipseCase* RimReservoir::reservoirData()
|
||||
{
|
||||
return m_rigReservoir.p();
|
||||
}
|
||||
@@ -61,7 +61,7 @@ RigReservoir* RimReservoir::reservoirData()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigReservoir* RimReservoir::reservoirData() const
|
||||
const RigEclipseCase* RimReservoir::reservoirData() const
|
||||
{
|
||||
return m_rigReservoir.p();
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
class QString;
|
||||
|
||||
class RigReservoir;
|
||||
class RigEclipseCase;
|
||||
class RigGridBase;
|
||||
class RimReservoirView;
|
||||
|
||||
@@ -46,8 +46,8 @@ public:
|
||||
|
||||
virtual bool openEclipseGridFile() = 0;
|
||||
|
||||
RigReservoir* reservoirData();
|
||||
const RigReservoir* reservoirData() const;
|
||||
RigEclipseCase* reservoirData();
|
||||
const RigEclipseCase* reservoirData() const;
|
||||
|
||||
RimReservoirView* createAndAddReservoirView();
|
||||
void removeReservoirView(RimReservoirView* reservoirView);
|
||||
@@ -71,6 +71,6 @@ protected:
|
||||
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
|
||||
|
||||
protected:
|
||||
cvf::ref<RigReservoir> m_rigReservoir;
|
||||
cvf::ref<RigEclipseCase> m_rigReservoir;
|
||||
};
|
||||
|
||||
|
||||
@@ -835,20 +835,20 @@ bool RimReservoirView::pickInfo(size_t gridIndex, size_t cellIndex, const cvf::V
|
||||
|
||||
if (m_reservoir)
|
||||
{
|
||||
const RigReservoir* reservoir = m_reservoir->reservoirData();
|
||||
if (reservoir)
|
||||
const RigEclipseCase* eclipseCase = m_reservoir->reservoirData();
|
||||
if (eclipseCase)
|
||||
{
|
||||
size_t i = 0;
|
||||
size_t j = 0;
|
||||
size_t k = 0;
|
||||
if (reservoir->grid(gridIndex)->ijkFromCellIndex(cellIndex, &i, &j, &k))
|
||||
if (eclipseCase->grid(gridIndex)->ijkFromCellIndex(cellIndex, &i, &j, &k))
|
||||
{
|
||||
// Adjust to 1-based Eclipse indexing
|
||||
i++;
|
||||
j++;
|
||||
k++;
|
||||
|
||||
cvf::Vec3d domainCoord = point + reservoir->grid(gridIndex)->displayModelOffset();
|
||||
cvf::Vec3d domainCoord = point + eclipseCase->grid(gridIndex)->displayModelOffset();
|
||||
|
||||
pickInfoText->sprintf("Hit grid %u, cell [%u, %u, %u], intersection point: [E: %.2f, N: %.2f, Depth: %.2f]", static_cast<unsigned int>(gridIndex), static_cast<unsigned int>(i), static_cast<unsigned int>(j), static_cast<unsigned int>(k), domainCoord.x(), domainCoord.y(), -domainCoord.z());
|
||||
return true;
|
||||
@@ -868,14 +868,14 @@ void RimReservoirView::appendCellResultInfo(size_t gridIndex, size_t cellIndex,
|
||||
|
||||
if (m_reservoir && m_reservoir->reservoirData())
|
||||
{
|
||||
const RigReservoir* reservoir = m_reservoir->reservoirData();
|
||||
const RigGridBase* grid = reservoir->grid(gridIndex);
|
||||
const RigActiveCellInfo* activeCellInfo = reservoir->activeCellInfo();
|
||||
const RigEclipseCase* eclipseCase = m_reservoir->reservoirData();
|
||||
const RigGridBase* grid = eclipseCase->grid(gridIndex);
|
||||
const RigActiveCellInfo* activeCellInfo = eclipseCase->activeCellInfo();
|
||||
|
||||
if (this->cellResult()->hasResult())
|
||||
{
|
||||
RifReaderInterface::PorosityModelResultType porosityModel = RigReservoirCellResults::convertFromProjectModelPorosityModel(cellResult()->porosityModel());
|
||||
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObject = reservoir->dataAccessObject(grid, porosityModel, m_currentTimeStep, this->cellResult()->gridScalarIndex());
|
||||
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObject = eclipseCase->dataAccessObject(grid, porosityModel, m_currentTimeStep, this->cellResult()->gridScalarIndex());
|
||||
if (dataAccessObject.notNull())
|
||||
{
|
||||
double scalarValue = dataAccessObject->cellScalar(cellIndex);
|
||||
@@ -896,7 +896,7 @@ void RimReservoirView::appendCellResultInfo(size_t gridIndex, size_t cellIndex,
|
||||
|
||||
// Cell edge results are static, results are loaded for first time step only
|
||||
RifReaderInterface::PorosityModelResultType porosityModel = RigReservoirCellResults::convertFromProjectModelPorosityModel(cellResult()->porosityModel());
|
||||
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObject = reservoir->dataAccessObject(grid, porosityModel, 0, resultIndices[idx]);
|
||||
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObject = eclipseCase->dataAccessObject(grid, porosityModel, 0, resultIndices[idx]);
|
||||
if (dataAccessObject.notNull())
|
||||
{
|
||||
double scalarValue = dataAccessObject->cellScalar(cellIndex);
|
||||
@@ -1034,11 +1034,11 @@ void RimReservoirView::updateLegends()
|
||||
return;
|
||||
}
|
||||
|
||||
RigReservoir* reservoir = m_reservoir->reservoirData();
|
||||
CVF_ASSERT(reservoir);
|
||||
RigEclipseCase* eclipseCase = m_reservoir->reservoirData();
|
||||
CVF_ASSERT(eclipseCase);
|
||||
|
||||
RifReaderInterface::PorosityModelResultType porosityModel = RigReservoirCellResults::convertFromProjectModelPorosityModel(cellResult()->porosityModel());
|
||||
RigReservoirCellResults* results = reservoir->results(porosityModel);
|
||||
RigReservoirCellResults* results = eclipseCase->results(porosityModel);
|
||||
CVF_ASSERT(results);
|
||||
|
||||
if (this->cellResult()->hasResult())
|
||||
|
||||
@@ -69,15 +69,15 @@ bool RimResultReservoir::openEclipseGridFile()
|
||||
return false;
|
||||
}
|
||||
|
||||
RigReservoir* reservoir = new RigReservoir;
|
||||
RigEclipseCase* eclipseCase = new RigEclipseCase;
|
||||
readerInterface = new RifReaderEclipseOutput;
|
||||
if (!readerInterface->open(fname, reservoir))
|
||||
if (!readerInterface->open(fname, eclipseCase))
|
||||
{
|
||||
delete reservoir;
|
||||
delete eclipseCase;
|
||||
return false;
|
||||
}
|
||||
|
||||
m_rigReservoir = reservoir;
|
||||
m_rigReservoir = eclipseCase;
|
||||
}
|
||||
|
||||
progInfo.incrementProgress();
|
||||
@@ -102,7 +102,7 @@ bool RimResultReservoir::openEclipseGridFile()
|
||||
cvf::ref<RifReaderInterface> RimResultReservoir::createMockModel(QString modelName)
|
||||
{
|
||||
cvf::ref<RifReaderMockModel> mockFileInterface = new RifReaderMockModel;
|
||||
cvf::ref<RigReservoir> reservoir = new RigReservoir;
|
||||
cvf::ref<RigEclipseCase> reservoir = new RigEclipseCase;
|
||||
|
||||
if (modelName == "Result Mock Debug Model Simple")
|
||||
{
|
||||
|
||||
@@ -200,22 +200,22 @@ protected:
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<cvf::StructGridScalarDataAccess> RigGridScalarDataAccessFactory::createDataAccessObject(const RigGridBase* grid,
|
||||
const RigReservoir* reservoir,
|
||||
const RigEclipseCase* eclipseCase,
|
||||
RifReaderInterface::PorosityModelResultType porosityModel,
|
||||
size_t timeStepIndex,
|
||||
size_t scalarSetIndex)
|
||||
{
|
||||
CVF_ASSERT(grid);
|
||||
CVF_ASSERT(reservoir);
|
||||
CVF_ASSERT(reservoir->results(porosityModel));
|
||||
CVF_ASSERT(reservoir->activeCellInfo());
|
||||
CVF_ASSERT(eclipseCase);
|
||||
CVF_ASSERT(eclipseCase->results(porosityModel));
|
||||
CVF_ASSERT(eclipseCase->activeCellInfo());
|
||||
|
||||
if (!grid || !reservoir || !reservoir->results(porosityModel) || !reservoir->activeCellInfo())
|
||||
if (!grid || !eclipseCase || !eclipseCase->results(porosityModel) || !eclipseCase->activeCellInfo())
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const std::vector< std::vector<double> > & scalarSetResults = reservoir->results(porosityModel)->cellScalarResults(scalarSetIndex);
|
||||
const std::vector< std::vector<double> > & scalarSetResults = eclipseCase->results(porosityModel)->cellScalarResults(scalarSetIndex);
|
||||
if (timeStepIndex >= scalarSetResults.size())
|
||||
{
|
||||
return NULL;
|
||||
@@ -224,17 +224,17 @@ cvf::ref<cvf::StructGridScalarDataAccess> RigGridScalarDataAccessFactory::create
|
||||
const std::vector<double>* resultValues = &(scalarSetResults[timeStepIndex]);
|
||||
|
||||
|
||||
bool useGlobalActiveIndex = reservoir->results(porosityModel)->isUsingGlobalActiveIndex(scalarSetIndex);
|
||||
bool useGlobalActiveIndex = eclipseCase->results(porosityModel)->isUsingGlobalActiveIndex(scalarSetIndex);
|
||||
if (useGlobalActiveIndex)
|
||||
{
|
||||
if (porosityModel == RifReaderInterface::MATRIX_RESULTS)
|
||||
{
|
||||
cvf::ref<cvf::StructGridScalarDataAccess> object = new RigGridMatrixActiveCellsScalarDataAccess(grid, resultValues, reservoir->activeCellInfo());
|
||||
cvf::ref<cvf::StructGridScalarDataAccess> object = new RigGridMatrixActiveCellsScalarDataAccess(grid, resultValues, eclipseCase->activeCellInfo());
|
||||
return object;
|
||||
}
|
||||
else
|
||||
{
|
||||
cvf::ref<cvf::StructGridScalarDataAccess> object = new RigGridFractureActiveCellsScalarDataAccess(grid, resultValues, reservoir->activeCellInfo());
|
||||
cvf::ref<cvf::StructGridScalarDataAccess> object = new RigGridFractureActiveCellsScalarDataAccess(grid, resultValues, eclipseCase->activeCellInfo());
|
||||
return object;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class RigGridScalarDataAccessFactory
|
||||
{
|
||||
public:
|
||||
static cvf::ref<cvf::StructGridScalarDataAccess> createDataAccessObject(const RigGridBase* grid,
|
||||
const RigReservoir* reservoir,
|
||||
const RigEclipseCase* eclipseCase,
|
||||
RifReaderInterface::PorosityModelResultType porosityModel,
|
||||
size_t timeStepIndex,
|
||||
size_t scalarSetIndex);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigReservoir::RigReservoir()
|
||||
RigEclipseCase::RigEclipseCase()
|
||||
{
|
||||
m_mainGrid = new RigMainGrid();
|
||||
|
||||
@@ -36,7 +36,7 @@ RigReservoir::RigReservoir()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigReservoir::~RigReservoir()
|
||||
RigEclipseCase::~RigEclipseCase()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -44,7 +44,7 @@ RigReservoir::~RigReservoir()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigReservoir::computeFaults()
|
||||
void RigEclipseCase::computeFaults()
|
||||
{
|
||||
std::vector<RigGridBase*> grids;
|
||||
allGrids(&grids);
|
||||
@@ -59,7 +59,7 @@ void RigReservoir::computeFaults()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigReservoir::allGrids(std::vector<RigGridBase*>* grids)
|
||||
void RigEclipseCase::allGrids(std::vector<RigGridBase*>* grids)
|
||||
{
|
||||
CVF_ASSERT(grids);
|
||||
|
||||
@@ -73,7 +73,7 @@ void RigReservoir::allGrids(std::vector<RigGridBase*>* grids)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigReservoir::allGrids(std::vector<const RigGridBase*>* grids) const
|
||||
void RigEclipseCase::allGrids(std::vector<const RigGridBase*>* grids) const
|
||||
{
|
||||
CVF_ASSERT(grids);
|
||||
size_t i;
|
||||
@@ -86,7 +86,7 @@ void RigReservoir::allGrids(std::vector<const RigGridBase*>* grids) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Get grid by index. The main grid has index 0, so the first lgr has index 1
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigGridBase* RigReservoir::grid(size_t index) const
|
||||
const RigGridBase* RigEclipseCase::grid(size_t index) const
|
||||
{
|
||||
return m_mainGrid->gridByIndex(index);
|
||||
}
|
||||
@@ -94,7 +94,7 @@ const RigGridBase* RigReservoir::grid(size_t index) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigReservoir::computeWellCellsPrGrid()
|
||||
void RigEclipseCase::computeWellCellsPrGrid()
|
||||
{
|
||||
// If we have computed this already, return
|
||||
if (m_wellCellsInGrid.size()) return;
|
||||
@@ -157,7 +157,7 @@ void RigReservoir::computeWellCellsPrGrid()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigReservoir::setWellResults(const cvf::Collection<RigWellResults>& data)
|
||||
void RigEclipseCase::setWellResults(const cvf::Collection<RigWellResults>& data)
|
||||
{
|
||||
m_wellResults = data;
|
||||
m_wellCellsInGrid.clear();
|
||||
@@ -167,7 +167,7 @@ void RigReservoir::setWellResults(const cvf::Collection<RigWellResults>& data)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::UByteArray* RigReservoir::wellCellsInGrid(size_t gridIndex)
|
||||
cvf::UByteArray* RigEclipseCase::wellCellsInGrid(size_t gridIndex)
|
||||
{
|
||||
computeWellCellsPrGrid();
|
||||
CVF_ASSERT(gridIndex < m_wellCellsInGrid.size());
|
||||
@@ -178,7 +178,7 @@ cvf::UByteArray* RigReservoir::wellCellsInGrid(size_t gridIndex)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigCell& RigReservoir::cellFromWellResultCell(const RigWellResultCell& wellResultCell)
|
||||
RigCell& RigEclipseCase::cellFromWellResultCell(const RigWellResultCell& wellResultCell)
|
||||
{
|
||||
size_t gridIndex = wellResultCell.m_gridIndex;
|
||||
size_t gridCellIndex = wellResultCell.m_gridCellIndex;
|
||||
@@ -192,7 +192,7 @@ RigCell& RigReservoir::cellFromWellResultCell(const RigWellResultCell& wellResul
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigReservoir::findSharedSourceFace(cvf::StructGridInterface::FaceType& sharedSourceFace,const RigWellResultCell& sourceWellCellResult, const RigWellResultCell& otherWellCellResult) const
|
||||
bool RigEclipseCase::findSharedSourceFace(cvf::StructGridInterface::FaceType& sharedSourceFace,const RigWellResultCell& sourceWellCellResult, const RigWellResultCell& otherWellCellResult) const
|
||||
{
|
||||
size_t gridIndex = sourceWellCellResult.m_gridIndex;
|
||||
size_t gridCellIndex = sourceWellCellResult.m_gridCellIndex;
|
||||
@@ -263,7 +263,7 @@ public:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigReservoir::computeActiveCellData()
|
||||
void RigEclipseCase::computeActiveCellData()
|
||||
{
|
||||
CellRangeBB matrixModelActiveBB;
|
||||
CellRangeBB fractureModelActiveBB;
|
||||
@@ -292,7 +292,7 @@ void RigReservoir::computeActiveCellData()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigReservoir::computeCachedData()
|
||||
void RigEclipseCase::computeCachedData()
|
||||
{
|
||||
computeFaults();
|
||||
computeActiveCellData();
|
||||
@@ -302,7 +302,7 @@ void RigReservoir::computeCachedData()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigActiveCellInfo* RigReservoir::activeCellInfo()
|
||||
RigActiveCellInfo* RigEclipseCase::activeCellInfo()
|
||||
{
|
||||
return &m_activeCellInfo;
|
||||
}
|
||||
@@ -310,7 +310,7 @@ RigActiveCellInfo* RigReservoir::activeCellInfo()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigActiveCellInfo* RigReservoir::activeCellInfo() const
|
||||
const RigActiveCellInfo* RigEclipseCase::activeCellInfo() const
|
||||
{
|
||||
return &m_activeCellInfo;
|
||||
}
|
||||
@@ -318,7 +318,7 @@ const RigActiveCellInfo* RigReservoir::activeCellInfo() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigReservoir::computeActiveCellsGeometryBoundingBox()
|
||||
void RigEclipseCase::computeActiveCellsGeometryBoundingBox()
|
||||
{
|
||||
if (m_mainGrid.isNull())
|
||||
{
|
||||
@@ -358,7 +358,7 @@ void RigReservoir::computeActiveCellsGeometryBoundingBox()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigReservoirCellResults* RigReservoir::results(RifReaderInterface::PorosityModelResultType porosityModel)
|
||||
RigReservoirCellResults* RigEclipseCase::results(RifReaderInterface::PorosityModelResultType porosityModel)
|
||||
{
|
||||
if (porosityModel == RifReaderInterface::MATRIX_RESULTS)
|
||||
{
|
||||
@@ -371,7 +371,7 @@ RigReservoirCellResults* RigReservoir::results(RifReaderInterface::PorosityModel
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigReservoirCellResults* RigReservoir::results(RifReaderInterface::PorosityModelResultType porosityModel) const
|
||||
const RigReservoirCellResults* RigEclipseCase::results(RifReaderInterface::PorosityModelResultType porosityModel) const
|
||||
{
|
||||
if (porosityModel == RifReaderInterface::MATRIX_RESULTS)
|
||||
{
|
||||
@@ -384,7 +384,7 @@ const RigReservoirCellResults* RigReservoir::results(RifReaderInterface::Porosit
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<cvf::StructGridScalarDataAccess> RigReservoir::dataAccessObject(const RigGridBase* grid, RifReaderInterface::PorosityModelResultType porosityModel, size_t timeStepIndex, size_t scalarSetIndex) const
|
||||
cvf::ref<cvf::StructGridScalarDataAccess> RigEclipseCase::dataAccessObject(const RigGridBase* grid, RifReaderInterface::PorosityModelResultType porosityModel, size_t timeStepIndex, size_t scalarSetIndex) const
|
||||
{
|
||||
if (timeStepIndex != cvf::UNDEFINED_SIZE_T &&
|
||||
scalarSetIndex != cvf::UNDEFINED_SIZE_T)
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
class RigReservoirCellResults;
|
||||
|
||||
|
||||
class RigReservoir: public cvf::Object
|
||||
class RigEclipseCase: public cvf::Object
|
||||
{
|
||||
public:
|
||||
RigReservoir();
|
||||
~RigReservoir();
|
||||
RigEclipseCase();
|
||||
~RigEclipseCase();
|
||||
|
||||
RigMainGrid* mainGrid() { return m_mainGrid.p(); }
|
||||
const RigMainGrid* mainGrid() const { return m_mainGrid.p(); }
|
||||
|
||||
@@ -170,15 +170,15 @@ void RigReservoirBuilderMock::appendCells(size_t nodeStartIndex, size_t cellCoun
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigReservoirBuilderMock::populateReservoir(RigReservoir* reservoir)
|
||||
void RigReservoirBuilderMock::populateReservoir(RigEclipseCase* eclipseCase)
|
||||
{
|
||||
std::vector<cvf::Vec3d>& mainGridNodes = reservoir->mainGrid()->nodes();
|
||||
std::vector<cvf::Vec3d>& mainGridNodes = eclipseCase->mainGrid()->nodes();
|
||||
appendNodes(m_minWorldCoordinate, m_maxWorldCoordinate, cellDimension(), mainGridNodes);
|
||||
size_t mainGridNodeCount = mainGridNodes.size();
|
||||
size_t mainGridCellCount = mainGridNodeCount / 8;
|
||||
|
||||
// Must create cells in main grid here, as this information is used when creating LGRs
|
||||
appendCells(0, mainGridCellCount, reservoir->mainGrid(), reservoir->mainGrid()->cells());
|
||||
appendCells(0, mainGridCellCount, eclipseCase->mainGrid(), eclipseCase->mainGrid()->cells());
|
||||
|
||||
size_t totalCellCount = mainGridCellCount;
|
||||
|
||||
@@ -206,9 +206,9 @@ void RigReservoirBuilderMock::populateReservoir(RigReservoir* reservoir)
|
||||
}
|
||||
|
||||
// Create local grid and set local grid dimensions
|
||||
RigLocalGrid* localGrid = new RigLocalGrid(reservoir->mainGrid());
|
||||
reservoir->mainGrid()->addLocalGrid(localGrid);
|
||||
localGrid->setParentGrid(reservoir->mainGrid());
|
||||
RigLocalGrid* localGrid = new RigLocalGrid(eclipseCase->mainGrid());
|
||||
eclipseCase->mainGrid()->addLocalGrid(localGrid);
|
||||
localGrid->setParentGrid(eclipseCase->mainGrid());
|
||||
|
||||
localGrid->setIndexToStartOfCells(mainGridNodes.size() / 8);
|
||||
cvf::Vec3st gridPointDimensions(
|
||||
@@ -221,13 +221,13 @@ void RigReservoirBuilderMock::populateReservoir(RigReservoir* reservoir)
|
||||
size_t cellIdx;
|
||||
for (cellIdx = 0; cellIdx < mainGridIndicesWithSubGrid.size(); cellIdx++)
|
||||
{
|
||||
RigCell& cell = reservoir->mainGrid()->cells()[mainGridIndicesWithSubGrid[cellIdx]];
|
||||
RigCell& cell = eclipseCase->mainGrid()->cells()[mainGridIndicesWithSubGrid[cellIdx]];
|
||||
|
||||
caf::SizeTArray8& indices = cell.cornerIndices();
|
||||
int nodeIdx;
|
||||
for (nodeIdx = 0; nodeIdx < 8; nodeIdx++)
|
||||
{
|
||||
bb.add(reservoir->mainGrid()->nodes()[indices[nodeIdx]]);
|
||||
bb.add(eclipseCase->mainGrid()->nodes()[indices[nodeIdx]]);
|
||||
}
|
||||
// Deactivate cell in main grid
|
||||
cell.setSubGrid(localGrid);
|
||||
@@ -237,13 +237,13 @@ void RigReservoirBuilderMock::populateReservoir(RigReservoir* reservoir)
|
||||
appendNodes(bb.min(), bb.max(), lgrCellDimensions, mainGridNodes);
|
||||
|
||||
size_t subGridCellCount = (mainGridNodes.size() / 8) - totalCellCount;
|
||||
appendCells(totalCellCount*8, subGridCellCount, localGrid, reservoir->mainGrid()->cells());
|
||||
appendCells(totalCellCount*8, subGridCellCount, localGrid, eclipseCase->mainGrid()->cells());
|
||||
totalCellCount += subGridCellCount;
|
||||
}
|
||||
|
||||
reservoir->mainGrid()->setGridPointDimensions(m_gridPointDimensions);
|
||||
eclipseCase->mainGrid()->setGridPointDimensions(m_gridPointDimensions);
|
||||
|
||||
addWellData(reservoir, reservoir->mainGrid());
|
||||
addWellData(eclipseCase, eclipseCase->mainGrid());
|
||||
}
|
||||
|
||||
|
||||
@@ -268,7 +268,7 @@ void RigReservoirBuilderMock::setWorldCoordinates(cvf::Vec3d minWorldCoordinate,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigReservoirBuilderMock::inputProperty(RigReservoir* reservoir, const QString& propertyName, std::vector<double>* values)
|
||||
bool RigReservoirBuilderMock::inputProperty(RigEclipseCase* eclipseCase, const QString& propertyName, std::vector<double>* values)
|
||||
{
|
||||
size_t k;
|
||||
|
||||
@@ -278,7 +278,7 @@ bool RigReservoirBuilderMock::inputProperty(RigReservoir* reservoir, const QStri
|
||||
/* generate secret number: */
|
||||
int iSecret = rand() % 20 + 1;
|
||||
|
||||
for (k = 0; k < reservoir->mainGrid()->cells().size(); k++)
|
||||
for (k = 0; k < eclipseCase->mainGrid()->cells().size(); k++)
|
||||
{
|
||||
values->push_back(k * iSecret);
|
||||
}
|
||||
@@ -289,18 +289,18 @@ bool RigReservoirBuilderMock::inputProperty(RigReservoir* reservoir, const QStri
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigReservoirBuilderMock::staticResult(RigReservoir* reservoir, const QString& result, std::vector<double>* values)
|
||||
bool RigReservoirBuilderMock::staticResult(RigEclipseCase* eclipseCase, const QString& result, std::vector<double>* values)
|
||||
{
|
||||
size_t k;
|
||||
|
||||
for (k = 0; k < reservoir->mainGrid()->cells().size(); k++)
|
||||
for (k = 0; k < eclipseCase->mainGrid()->cells().size(); k++)
|
||||
{
|
||||
RigCell& cell = reservoir->mainGrid()->cells()[k];
|
||||
RigCell& cell = eclipseCase->mainGrid()->cells()[k];
|
||||
if (cell.isActiveInMatrixModel())
|
||||
{
|
||||
if (cell.hostGrid() == reservoir->mainGrid())
|
||||
if (cell.hostGrid() == eclipseCase->mainGrid())
|
||||
{
|
||||
values->push_back((k * 2) % reservoir->mainGrid()->cells().size());
|
||||
values->push_back((k * 2) % eclipseCase->mainGrid()->cells().size());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -315,7 +315,7 @@ bool RigReservoirBuilderMock::staticResult(RigReservoir* reservoir, const QStrin
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigReservoirBuilderMock::dynamicResult(RigReservoir* reservoir, const QString& result, size_t stepIndex, std::vector<double>* values)
|
||||
bool RigReservoirBuilderMock::dynamicResult(RigEclipseCase* eclipseCase, const QString& result, size_t stepIndex, std::vector<double>* values)
|
||||
{
|
||||
int resultIndex = 1;
|
||||
|
||||
@@ -330,14 +330,14 @@ bool RigReservoirBuilderMock::dynamicResult(RigReservoir* reservoir, const QStri
|
||||
double offsetValue = 100 * resultIndex;
|
||||
|
||||
size_t k;
|
||||
for (k = 0; k < reservoir->mainGrid()->cells().size(); k++)
|
||||
for (k = 0; k < eclipseCase->mainGrid()->cells().size(); k++)
|
||||
{
|
||||
RigCell& cell = reservoir->mainGrid()->cells()[k];
|
||||
RigCell& cell = eclipseCase->mainGrid()->cells()[k];
|
||||
if (cell.isActiveInMatrixModel())
|
||||
{
|
||||
if (cell.hostGrid() == reservoir->mainGrid())
|
||||
if (cell.hostGrid() == eclipseCase->mainGrid())
|
||||
{
|
||||
double val = offsetValue + scaleValue * ( (stepIndex * 1000 + k) % reservoir->mainGrid()->cells().size() );
|
||||
double val = offsetValue + scaleValue * ( (stepIndex * 1000 + k) % eclipseCase->mainGrid()->cells().size() );
|
||||
values->push_back(val);
|
||||
}
|
||||
else
|
||||
@@ -359,9 +359,9 @@ bool RigReservoirBuilderMock::dynamicResult(RigReservoir* reservoir, const QStri
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigReservoirBuilderMock::addWellData(RigReservoir* reservoir, RigGridBase* grid)
|
||||
void RigReservoirBuilderMock::addWellData(RigEclipseCase* eclipseCase, RigGridBase* grid)
|
||||
{
|
||||
CVF_ASSERT(reservoir);
|
||||
CVF_ASSERT(eclipseCase);
|
||||
CVF_ASSERT(grid);
|
||||
|
||||
cvf::Vec3st dim = grid->gridPointDimensions();
|
||||
@@ -469,6 +469,6 @@ void RigReservoirBuilderMock::addWellData(RigReservoir* reservoir, RigGridBase*
|
||||
wells.push_back(wellCellsTimeHistory.p());
|
||||
}
|
||||
|
||||
reservoir->setWellResults(wells);
|
||||
eclipseCase->setWellResults(wells);
|
||||
}
|
||||
|
||||
|
||||
@@ -55,14 +55,14 @@ public:
|
||||
|
||||
void addLocalGridRefinement(const cvf::Vec3st& minCellPosition, const cvf::Vec3st& maxCellPosition, const cvf::Vec3st& singleCellRefinementFactors);
|
||||
|
||||
void populateReservoir(RigReservoir* reservoir);
|
||||
void populateReservoir(RigEclipseCase* eclipseCase);
|
||||
|
||||
bool inputProperty(RigReservoir* reservoir, const QString& propertyName, std::vector<double>* values );
|
||||
bool staticResult(RigReservoir* reservoir, const QString& result, std::vector<double>* values );
|
||||
bool dynamicResult(RigReservoir* reservoir, const QString& result, size_t stepIndex, std::vector<double>* values );
|
||||
bool inputProperty(RigEclipseCase* eclipseCase, const QString& propertyName, std::vector<double>* values );
|
||||
bool staticResult(RigEclipseCase* eclipseCase, const QString& result, std::vector<double>* values );
|
||||
bool dynamicResult(RigEclipseCase* eclipseCase, const QString& result, size_t stepIndex, std::vector<double>* values );
|
||||
|
||||
private:
|
||||
void addWellData(RigReservoir* reservoir, RigGridBase* grid);
|
||||
void addWellData(RigEclipseCase* eclipseCase, RigGridBase* grid);
|
||||
static void appendCells(size_t nodeStartIndex, size_t cellCount, RigGridBase* hostGrid, std::vector<RigCell>& cells);
|
||||
|
||||
static void appendNodes(const cvf::Vec3d& min, const cvf::Vec3d& max, const cvf::Vec3st& cubeDimension, std::vector<cvf::Vec3d>& nodes);
|
||||
|
||||
Reference in New Issue
Block a user