mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Added customized mock model to user interface
This commit is contained in:
@@ -48,6 +48,7 @@ public:
|
||||
static QString mockModelBasic() { return "Result Mock Debug Model Simple"; }
|
||||
static QString mockModelBasicWithResults() { return "Result Mock Debug Model With Results"; }
|
||||
static QString mockModelLargeWithResults() { return "Result Mock Debug Model Large With Results"; }
|
||||
static QString mockModelCustomized() { return "Result Mock Debug Model Customized"; }
|
||||
static QString mockModelBasicInputCase() { return "Input Mock Debug Model Simple"; }
|
||||
|
||||
};
|
||||
|
||||
@@ -77,7 +77,7 @@ RimInputCase::~RimInputCase()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimInputCase::openDataFileSet(const QStringList& fileNames)
|
||||
{
|
||||
if (fileNames.contains("Input Mock Debug Model Simple"))
|
||||
if (fileNames.contains(RimDefines::mockModelBasicInputCase()))
|
||||
{
|
||||
cvf::ref<RifReaderInterface> readerInterface = this->createMockModel(fileNames[0]);
|
||||
results(RifReaderInterface::MATRIX_RESULTS)->setReaderInterface(readerInterface.p());
|
||||
@@ -184,7 +184,7 @@ bool RimInputCase::openEclipseGridFile()
|
||||
{
|
||||
cvf::ref<RifReaderInterface> readerInterface;
|
||||
|
||||
if (m_gridFileName().contains("Input Mock Debug Model Simple"))
|
||||
if (m_gridFileName().contains(RimDefines::mockModelBasicInputCase()))
|
||||
{
|
||||
readerInterface = this->createMockModel(this->m_gridFileName());
|
||||
}
|
||||
@@ -377,7 +377,7 @@ cvf::ref<RifReaderInterface> RimInputCase::createMockModel(QString modelName)
|
||||
cvf::ref<RigCaseData> reservoir = new RigCaseData;
|
||||
cvf::ref<RifReaderMockModel> mockFileInterface = new RifReaderMockModel;
|
||||
|
||||
if (modelName == "Input Mock Debug Model Simple")
|
||||
if (modelName == RimDefines::mockModelBasicInputCase())
|
||||
{
|
||||
m_gridFileName = modelName;
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "RimOilField.h"
|
||||
#include "RimAnalysisModels.h"
|
||||
#include "RiaPreferences.h"
|
||||
#include "RimMockModelSettings.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimResultCase, "EclipseCase");
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -262,6 +263,32 @@ cvf::ref<RifReaderInterface> RimResultCase::createMockModel(QString modelName)
|
||||
mockFileInterface->open("", reservoir.p());
|
||||
|
||||
}
|
||||
else if (modelName == RimDefines::mockModelCustomized())
|
||||
{
|
||||
RimMockModelSettings rimMockModelSettings;
|
||||
|
||||
//caf::Settings::readFieldsFromApplicationStore(&rimMockModelSettings);
|
||||
|
||||
double startX = 0;
|
||||
double startY = 0;
|
||||
double startZ = 0;
|
||||
|
||||
double widthX = 6000;
|
||||
double widthY = 12000;
|
||||
double widthZ = 500;
|
||||
|
||||
// Test code to simulate UTM coordinates
|
||||
double offsetX = 400000;
|
||||
double offsetY = 6000000;
|
||||
double offsetZ = 0;
|
||||
|
||||
mockFileInterface->setWorldCoordinates(cvf::Vec3d(startX + offsetX, startY + offsetY, startZ + offsetZ), cvf::Vec3d(startX + widthX + offsetX, startY + widthY + offsetY, startZ + widthZ + offsetZ));
|
||||
mockFileInterface->setGridPointDimensions(cvf::Vec3st(rimMockModelSettings.cellCountX, rimMockModelSettings.cellCountX, rimMockModelSettings.cellCountX));
|
||||
mockFileInterface->setResultInfo(rimMockModelSettings.resultCount, rimMockModelSettings.timeStepCount);
|
||||
mockFileInterface->enableWellData(false);
|
||||
|
||||
mockFileInterface->open("", reservoir.p());
|
||||
}
|
||||
|
||||
this->setReservoirData( reservoir.p() );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user