mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge dev into pre-proto
Conflicts: ApplicationCode/ProjectDataModel/RimEclipseView.cpp ApplicationCode/ProjectDataModel/RimEclipseView.h
This commit is contained in:
commit
9cd17ec508
@ -2086,7 +2086,7 @@ void RiaApplication::saveSnapshotForAllViews(const QString& snapshotFolderName)
|
||||
viewer->repaint();
|
||||
|
||||
QString fileName = cas->caseUserDescription() + "-" + riv->name();
|
||||
fileName.replace(" ", "_");
|
||||
fileName = caf::Utils::makeValidFileBasename(fileName);
|
||||
|
||||
QString absoluteFileName = caf::Utils::constructFullFileName(absSnapshotPath, fileName, ".png");
|
||||
|
||||
|
@ -43,7 +43,7 @@ class RiaPreferences;
|
||||
class RiaProjectModifier;
|
||||
class RiaSocketServer;
|
||||
|
||||
class RigCaseData;
|
||||
class RigEclipseCaseData;
|
||||
|
||||
class RimCommandObject;
|
||||
class RimEclipseCase;
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEclipseCase.h"
|
||||
|
||||
#include "RigCaseData.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
|
||||
#include "RifEclipseInputFileTools.h"
|
||||
@ -37,6 +36,7 @@
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <QMessageBox>
|
||||
#include "cafUtils.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@ -84,12 +84,13 @@ void RicSaveEclipseResultAsInputPropertyExec::redo()
|
||||
projectFolder = m_cellColors->reservoirView()->eclipseCase()->locationOnDisc();
|
||||
}
|
||||
|
||||
QString outputFileName = projectFolder + "/" + m_cellColors->resultVariable();
|
||||
QString outputFileName = projectFolder + "/" + caf::Utils::makeValidFileBasename( m_cellColors->resultVariableUiName());
|
||||
|
||||
exportSettings.fileName = outputFileName;
|
||||
}
|
||||
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(RiuMainWindow::instance(), &exportSettings, "Export Binary Eclipse Data to Text File", "");
|
||||
|
||||
if (propertyDialog.exec() == QDialog::Accepted)
|
||||
{
|
||||
size_t timeStep = m_cellColors->reservoirView()->currentTimeStep();
|
||||
|
@ -20,16 +20,21 @@
|
||||
#include "RicExportFaultsFeature.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigFault.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RimDefines.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimFault.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
#include "cafUtils.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RigFault.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "QMessageBox"
|
||||
#include <QMessageBox>
|
||||
|
||||
CAF_CMD_SOURCE_INIT(RicExportFaultsFeature, "RicExportFaultsFeature");
|
||||
|
||||
@ -79,7 +84,7 @@ void RicExportFaultsFeature::onActionTriggered(bool isChecked)
|
||||
if ( faultName == RimDefines::undefinedGridFaultWithInactiveName() ) faultName = "UNDEF_IA";
|
||||
|
||||
QString baseFilename = "Fault_" + faultName + "_" + caseName;
|
||||
baseFilename.replace(" ", "_");
|
||||
baseFilename = caf::Utils::makeValidFileBasename(baseFilename);
|
||||
|
||||
QString completeFilename = selectedDir + "/" + baseFilename + ".grdecl";
|
||||
|
||||
|
@ -214,6 +214,7 @@ void RicExportMultipleSnapshotsFeature::exportViewVariationsToFolder(RimView* ri
|
||||
|
||||
QString resName = resultName(rimView);
|
||||
QString viewCaseResultString = rimCase->caseUserDescription() + "_" + rimView->name() + "_" + resName;
|
||||
viewCaseResultString = caf::Utils::makeValidFileBasename(viewCaseResultString);
|
||||
|
||||
for (int i = msd->timeStepStart(); i <= msd->timeStepEnd(); i++)
|
||||
{
|
||||
@ -235,7 +236,6 @@ void RicExportMultipleSnapshotsFeature::exportViewVariationsToFolder(RimView* ri
|
||||
if (msd->sliceDirection == RimMultiSnapshotDefinition::NO_RANGEFILTER)
|
||||
{
|
||||
QString fileName = viewCaseResultString + "_" + timeStepString;
|
||||
fileName.replace(" ", "-");
|
||||
QString absoluteFileName = caf::Utils::constructFullFileName(folder, fileName, ".png");
|
||||
|
||||
RicSnapshotViewToFileFeature::saveSnapshotAs(absoluteFileName, rimView);
|
||||
@ -252,7 +252,6 @@ void RicExportMultipleSnapshotsFeature::exportViewVariationsToFolder(RimView* ri
|
||||
{
|
||||
QString rangeFilterString = msd->sliceDirection().text() + "-" + QString::number(i);
|
||||
QString fileName = viewCaseResultString + "_" + timeStepString + "_" + rangeFilterString;
|
||||
fileName.replace(" ", "-");
|
||||
|
||||
rangeFilter->setDefaultValues();
|
||||
if (msd->sliceDirection == RimMultiSnapshotDefinition::RANGEFILTER_I)
|
||||
@ -293,8 +292,8 @@ QString RicExportMultipleSnapshotsFeature::resultName(RimView* rimView)
|
||||
if (dynamic_cast<RimEclipseView*>(rimView))
|
||||
{
|
||||
RimEclipseView* eclView = dynamic_cast<RimEclipseView*>(rimView);
|
||||
|
||||
return eclView->cellResult()->resultVariable();
|
||||
|
||||
return caf::Utils::makeValidFileBasename(eclView->cellResult()->resultVariableUiName());
|
||||
}
|
||||
else if (dynamic_cast<RimGeoMechView*>(rimView))
|
||||
{
|
||||
|
@ -208,7 +208,7 @@ void RicSnapshotAllPlotsToFileFeature::createSnapshotOfAllPlotsInFolder(QString
|
||||
if (wellLogPlot && wellLogPlot->viewWidget())
|
||||
{
|
||||
QString fileName = wellLogPlot->description();
|
||||
fileName.replace(" ", "_");
|
||||
fileName = caf::Utils::makeValidFileBasename(fileName);
|
||||
|
||||
QString absoluteFileName = caf::Utils::constructFullFileName(absSnapshotPath, fileName, ".png");
|
||||
|
||||
@ -226,7 +226,7 @@ void RicSnapshotAllPlotsToFileFeature::createSnapshotOfAllPlotsInFolder(QString
|
||||
if (summaryPlot && summaryPlot->viewWidget())
|
||||
{
|
||||
QString fileName = summaryPlot->description();
|
||||
fileName.replace(" ", "_");
|
||||
fileName = caf::Utils::makeValidFileBasename(fileName);
|
||||
|
||||
QString absoluteFileName = caf::Utils::constructFullFileName(absSnapshotPath, fileName, ".png");
|
||||
|
||||
|
@ -75,14 +75,14 @@ RimView* RicLinkVisibleViewsFeatureUi::masterView()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RicLinkVisibleViewsFeatureUi::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly)
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> optionList;
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
if (fieldNeedingOptions == &m_masterView)
|
||||
{
|
||||
for (size_t i = 0; i < m_allViews.size(); i++)
|
||||
for (RimView* v : m_allViews)
|
||||
{
|
||||
RimCase* rimCase = NULL;
|
||||
m_allViews[i]->firstAncestorOrThisOfType(rimCase);
|
||||
RimCase* rimCase = nullptr;
|
||||
v->firstAncestorOrThisOfType(rimCase);
|
||||
|
||||
QIcon icon;
|
||||
if (rimCase)
|
||||
@ -90,13 +90,9 @@ QList<caf::PdmOptionItemInfo> RicLinkVisibleViewsFeatureUi::calculateValueOption
|
||||
icon = rimCase->uiCapability()->uiIcon();
|
||||
}
|
||||
|
||||
|
||||
optionList.push_back(caf::PdmOptionItemInfo(RimViewLinker::displayNameForView(m_allViews[i]),
|
||||
QVariant::fromValue(caf::PdmPointer<PdmObjectHandle>(m_allViews[i])),
|
||||
false,
|
||||
icon));
|
||||
options.push_back(caf::PdmOptionItemInfo(RimViewLinker::displayNameForView(v), v, false, icon));
|
||||
}
|
||||
}
|
||||
|
||||
return optionList;
|
||||
return options;
|
||||
}
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "RimCase.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimTools.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
@ -45,34 +46,18 @@ RicChangeDataSourceFeatureUi::RicChangeDataSourceFeatureUi()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RicChangeDataSourceFeatureUi::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly)
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> optionList;
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
if (fieldNeedingOptions == &caseToApply)
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
|
||||
std::vector<RimCase*> cases;
|
||||
proj->allCases(cases);
|
||||
|
||||
for (RimCase* c : cases)
|
||||
{
|
||||
optionList.push_back(caf::PdmOptionItemInfo(c->caseUserDescription(), c));
|
||||
}
|
||||
RimTools::caseOptionItems(&options);
|
||||
}
|
||||
else if (fieldNeedingOptions == &wellPathToApply)
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
|
||||
if (proj->activeOilField()->wellPathCollection())
|
||||
{
|
||||
for (RimWellPath* wellPath : proj->activeOilField()->wellPathCollection()->wellPaths)
|
||||
{
|
||||
optionList.push_back(caf::PdmOptionItemInfo(wellPath->name(), wellPath));
|
||||
}
|
||||
}
|
||||
RimTools::wellPathOptionItems(&options);
|
||||
}
|
||||
|
||||
return optionList;
|
||||
return options;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RimCase.h"
|
||||
#include "RimView.h"
|
||||
#include "RimWellPath.h"
|
||||
|
||||
@ -57,8 +56,6 @@ bool RicWellPathViewerEventHandler::handleEvent(cvf::Object* eventObject)
|
||||
const RivWellPathSourceInfo* wellPathSourceInfo = dynamic_cast<const RivWellPathSourceInfo*>(uiEvent->firstHitPart->sourceInfo());
|
||||
if (wellPathSourceInfo)
|
||||
{
|
||||
cvf::Vec3d displayModelOffset = cvf::Vec3d::ZERO;
|
||||
|
||||
RimView* rimView = RiaApplication::instance()->activeReservoirView();
|
||||
if (!rimView) return false;
|
||||
|
||||
|
@ -21,8 +21,11 @@
|
||||
#include "RifEclipseInputFileTools.h"
|
||||
|
||||
#include "RifReaderEclipseOutput.h"
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigResultAccessorFactory.h"
|
||||
|
||||
#include "cafProgressInfo.h"
|
||||
@ -70,7 +73,7 @@ RifEclipseInputFileTools::~RifEclipseInputFileTools()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigCaseData* eclipseCase, bool readFaultData)
|
||||
bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigEclipseCaseData* eclipseCase, bool readFaultData)
|
||||
{
|
||||
CVF_ASSERT(eclipseCase);
|
||||
|
||||
@ -199,7 +202,7 @@ bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigCaseData
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Read known properties from the input file
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::map<QString, QString> RifEclipseInputFileTools::readProperties(const QString& fileName, RigCaseData* caseData)
|
||||
std::map<QString, QString> RifEclipseInputFileTools::readProperties(const QString& fileName, RigEclipseCaseData* caseData)
|
||||
{
|
||||
CVF_ASSERT(caseData);
|
||||
|
||||
@ -249,7 +252,7 @@ std::map<QString, QString> RifEclipseInputFileTools::readProperties(const QStrin
|
||||
/// Reads the property data requested into the \a reservoir, overwriting any previous
|
||||
/// properties with the same name.
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifEclipseInputFileTools::readProperty(const QString& fileName, RigCaseData* caseData, const QString& eclipseKeyWord, const QString& resultName)
|
||||
bool RifEclipseInputFileTools::readProperty(const QString& fileName, RigEclipseCaseData* caseData, const QString& eclipseKeyWord, const QString& resultName)
|
||||
{
|
||||
CVF_ASSERT(caseData);
|
||||
|
||||
@ -275,7 +278,7 @@ bool RifEclipseInputFileTools::readProperty(const QString& fileName, RigCaseData
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifEclipseInputFileTools::readDataFromKeyword(ecl_kw_type* eclipseKeywordData, RigCaseData* caseData, const QString& resultName)
|
||||
bool RifEclipseInputFileTools::readDataFromKeyword(ecl_kw_type* eclipseKeywordData, RigEclipseCaseData* caseData, const QString& resultName)
|
||||
{
|
||||
CVF_ASSERT(caseData);
|
||||
CVF_ASSERT(eclipseKeywordData);
|
||||
@ -440,7 +443,7 @@ const std::vector<QString>& RifEclipseInputFileTools::invalidPropertyDataKeyword
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifEclipseInputFileTools::writePropertyToTextFile(const QString& fileName, RigCaseData* eclipseCase, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord)
|
||||
bool RifEclipseInputFileTools::writePropertyToTextFile(const QString& fileName, RigEclipseCaseData* eclipseCase, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord)
|
||||
{
|
||||
CVF_ASSERT(eclipseCase);
|
||||
|
||||
@ -472,7 +475,13 @@ 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, RigCaseData* eclipseCase, RifReaderInterface::PorosityModelResultType porosityModel, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord, const double undefinedValue)
|
||||
bool RifEclipseInputFileTools::writeBinaryResultToTextFile(const QString& fileName,
|
||||
RigEclipseCaseData* eclipseCase,
|
||||
RifReaderInterface::PorosityModelResultType porosityModel,
|
||||
size_t timeStep,
|
||||
const QString& resultName,
|
||||
const QString& eclipseKeyWord,
|
||||
const double undefinedValue)
|
||||
{
|
||||
CVF_ASSERT(eclipseCase);
|
||||
|
||||
@ -714,7 +723,7 @@ qint64 RifEclipseInputFileTools::findKeyword(const QString& keyword, QFile& file
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RifEclipseInputFileTools::findOrCreateResult(const QString& newResultName, RigCaseData* reservoir)
|
||||
size_t RifEclipseInputFileTools::findOrCreateResult(const QString& newResultName, RigEclipseCaseData* reservoir)
|
||||
{
|
||||
size_t resultIndex = reservoir->results(RifReaderInterface::MATRIX_RESULTS)->findScalarResultIndex(newResultName);
|
||||
if (resultIndex == cvf::UNDEFINED_SIZE_T)
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <QString>
|
||||
|
||||
|
||||
class RigCaseData;
|
||||
class RigEclipseCaseData;
|
||||
class QFile;
|
||||
|
||||
|
||||
@ -59,11 +59,11 @@ public:
|
||||
RifEclipseInputFileTools();
|
||||
virtual ~RifEclipseInputFileTools();
|
||||
|
||||
static bool openGridFile(const QString& fileName, RigCaseData* eclipseCase, bool readFaultData);
|
||||
static bool openGridFile(const QString& fileName, RigEclipseCaseData* eclipseCase, bool readFaultData);
|
||||
|
||||
// Returns map of assigned resultName and Eclipse Keyword.
|
||||
static std::map<QString, QString> readProperties(const QString& fileName, RigCaseData* eclipseCase);
|
||||
static bool readProperty (const QString& fileName, RigCaseData* eclipseCase, const QString& eclipseKeyWord, const QString& resultName );
|
||||
static std::map<QString, QString> readProperties(const QString& fileName, RigEclipseCaseData* eclipseCase);
|
||||
static bool readProperty (const QString& fileName, RigEclipseCaseData* eclipseCase, const QString& eclipseKeyWord, const QString& resultName );
|
||||
|
||||
static void readFaultsInGridSection(const QString& fileName, cvf::Collection<RigFault>* faults, std::vector<QString>* filenamesWithFaults);
|
||||
static void readFaults(const QString& fileName, const std::vector< RifKeywordAndFilePos >& fileKeywords, cvf::Collection<RigFault>* faults);
|
||||
@ -75,8 +75,8 @@ public:
|
||||
static void parseAndReadPathAliasKeyword(const QString &fileName, std::vector< std::pair<QString, QString> >* pathAliasDefinitions);
|
||||
|
||||
|
||||
static bool writePropertyToTextFile(const QString& fileName, RigCaseData* eclipseCase, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord);
|
||||
static bool writeBinaryResultToTextFile(const QString& fileName, RigCaseData* eclipseCase, RifReaderInterface::PorosityModelResultType porosityModel, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord, const double undefinedValue);
|
||||
static bool writePropertyToTextFile(const QString& fileName, RigEclipseCaseData* eclipseCase, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord);
|
||||
static bool writeBinaryResultToTextFile(const QString& fileName, RigEclipseCaseData* eclipseCase, RifReaderInterface::PorosityModelResultType porosityModel, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord, const double undefinedValue);
|
||||
|
||||
static bool readFaultsAndParseIncludeStatementsRecursively( QFile& file,
|
||||
qint64 startPos,
|
||||
@ -88,14 +88,14 @@ public:
|
||||
static cvf::StructGridInterface::FaceEnum faceEnumFromText(const QString& faceString);
|
||||
|
||||
private:
|
||||
static bool readDataFromKeyword(ecl_kw_type* eclipseKeywordData, RigCaseData* caseData, const QString& resultName);
|
||||
static bool readDataFromKeyword(ecl_kw_type* eclipseKeywordData, RigEclipseCaseData* caseData, const QString& resultName);
|
||||
static void writeDataToTextFile(QFile* file, const QString& eclipseKeyWord, const std::vector<double>& resultData);
|
||||
static void findGridKeywordPositions(const std::vector< RifKeywordAndFilePos >& keywords, qint64* coordPos, qint64* zcornPos, qint64* specgridPos, qint64* actnumPos, qint64* mapaxesPos);
|
||||
|
||||
static size_t findFaultByName(const cvf::Collection<RigFault>& faults, const QString& name);
|
||||
|
||||
static qint64 findKeyword(const QString& keyword, QFile& file, qint64 startPos);
|
||||
static size_t findOrCreateResult(const QString& newResultName, RigCaseData* reservoir);
|
||||
static size_t findOrCreateResult(const QString& newResultName, RigEclipseCaseData* reservoir);
|
||||
static bool isValidDataKeyword(const QString& keyword);
|
||||
|
||||
private:
|
||||
|
@ -21,7 +21,9 @@
|
||||
#include "RifReaderEclipseInput.h"
|
||||
|
||||
#include "RifEclipseInputFileTools.h"
|
||||
#include "RigCaseData.h"
|
||||
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
//==================================================================================================
|
||||
//
|
||||
@ -46,7 +48,7 @@ RifReaderEclipseInput::~RifReaderEclipseInput()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Open file and read geometry into given reservoir object
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifReaderEclipseInput::open(const QString& fileName, RigCaseData* eclipseCase)
|
||||
bool RifReaderEclipseInput::open(const QString& fileName, RigEclipseCaseData* eclipseCase)
|
||||
{
|
||||
CVF_ASSERT(eclipseCase);
|
||||
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
virtual ~RifReaderEclipseInput();
|
||||
|
||||
// Virtual interface implementation
|
||||
virtual bool open(const QString& fileName, RigCaseData* eclipseCase);
|
||||
virtual bool open(const QString& fileName, RigEclipseCaseData* eclipseCase);
|
||||
|
||||
|
||||
|
||||
|
@ -20,8 +20,9 @@
|
||||
|
||||
#include "RifReaderEclipseOutput.h"
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RifEclipseOutputFileTools.h"
|
||||
@ -230,7 +231,7 @@ void RifReaderEclipseOutput::close()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Read geometry from file given by name into given reservoir object
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifReaderEclipseOutput::transferGeometry(const ecl_grid_type* mainEclGrid, RigCaseData* eclipseCase)
|
||||
bool RifReaderEclipseOutput::transferGeometry(const ecl_grid_type* mainEclGrid, RigEclipseCaseData* eclipseCase)
|
||||
{
|
||||
CVF_ASSERT(eclipseCase);
|
||||
|
||||
@ -348,7 +349,7 @@ bool RifReaderEclipseOutput::transferGeometry(const ecl_grid_type* mainEclGrid,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Open file and read geometry into given reservoir object
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifReaderEclipseOutput::open(const QString& fileName, RigCaseData* eclipseCase)
|
||||
bool RifReaderEclipseOutput::open(const QString& fileName, RigEclipseCaseData* eclipseCase)
|
||||
{
|
||||
CVF_ASSERT(eclipseCase);
|
||||
caf::ProgressInfo progInfo(100, "");
|
||||
@ -522,7 +523,7 @@ void RifReaderEclipseOutput::transferNNCData( const ecl_grid_type * mainEclGrid
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifReaderEclipseOutput::openAndReadActiveCellData(const QString& fileName, const std::vector<QDateTime>& mainCaseTimeSteps, RigCaseData* eclipseCase)
|
||||
bool RifReaderEclipseOutput::openAndReadActiveCellData(const QString& fileName, const std::vector<QDateTime>& mainCaseTimeSteps, RigEclipseCaseData* eclipseCase)
|
||||
{
|
||||
CVF_ASSERT(eclipseCase);
|
||||
|
||||
@ -703,16 +704,16 @@ void RifReaderEclipseOutput::buildMetaData()
|
||||
}
|
||||
|
||||
// Default units type is METRIC
|
||||
RigCaseData::UnitsType unitsType = RigCaseData::UNITS_METRIC;
|
||||
RigEclipseCaseData::UnitsType unitsType = RigEclipseCaseData::UNITS_METRIC;
|
||||
{
|
||||
int unitsTypeValue = m_dynamicResultsAccess->readUnitsType();
|
||||
if (unitsTypeValue == 2)
|
||||
{
|
||||
unitsType = RigCaseData::UNITS_FIELD;
|
||||
unitsType = RigEclipseCaseData::UNITS_FIELD;
|
||||
}
|
||||
else if (unitsTypeValue == 3)
|
||||
{
|
||||
unitsType = RigCaseData::UNITS_LAB;
|
||||
unitsType = RigEclipseCaseData::UNITS_LAB;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -49,15 +49,15 @@ public:
|
||||
RifReaderEclipseOutput();
|
||||
virtual ~RifReaderEclipseOutput();
|
||||
|
||||
bool open(const QString& fileName, RigCaseData* eclipseCase);
|
||||
bool open(const QString& fileName, RigEclipseCaseData* eclipseCase);
|
||||
|
||||
virtual bool openAndReadActiveCellData(const QString& fileName, const std::vector<QDateTime>& mainCaseTimeSteps, RigCaseData* eclipseCase);
|
||||
virtual bool openAndReadActiveCellData(const QString& fileName, const std::vector<QDateTime>& mainCaseTimeSteps, RigEclipseCaseData* 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, RigCaseData* eclipseCase);
|
||||
static bool transferGeometry(const ecl_grid_type* mainEclGrid, RigEclipseCaseData* eclipseCase);
|
||||
static void transferCoarseningInfo(const ecl_grid_type* eclGrid, RigGridBase* grid);
|
||||
|
||||
private:
|
||||
@ -89,7 +89,7 @@ private:
|
||||
QString m_fileName; // Name of file used to start accessing Eclipse output files
|
||||
QStringList m_filesWithSameBaseName; // Set of files in filename's path with same base name as filename
|
||||
|
||||
RigCaseData* m_eclipseCase;
|
||||
RigEclipseCaseData* m_eclipseCase;
|
||||
|
||||
std::vector<QDateTime> m_timeSteps;
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <QDateTime>
|
||||
|
||||
|
||||
class RigCaseData;
|
||||
class RigEclipseCaseData;
|
||||
class RifReaderSettings;
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@ public:
|
||||
bool isImportOfCompleteMswDataEnabled();
|
||||
bool isNNCsEnabled();
|
||||
|
||||
virtual bool open(const QString& fileName, RigCaseData* eclipseCase) = 0;
|
||||
virtual bool open(const QString& fileName, RigEclipseCaseData* eclipseCase) = 0;
|
||||
virtual void close() = 0;
|
||||
|
||||
virtual bool staticResult(const QString& result, PorosityModelResultType matrixOrFracture, std::vector<double>* values) = 0;
|
||||
|
@ -19,13 +19,16 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RifReaderMockModel.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
|
||||
#include "RifReaderInterface.h"
|
||||
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifReaderMockModel::open(const QString& fileName, RigCaseData* eclipseCase)
|
||||
bool RifReaderMockModel::open(const QString& fileName, RigEclipseCaseData* eclipseCase)
|
||||
{
|
||||
m_reservoirBuilder.populateReservoir(eclipseCase);
|
||||
|
||||
@ -170,7 +173,7 @@ void RifReaderMockModel::addLocalGridRefinement(const cvf::Vec3st& minCellPositi
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifReaderMockModel::populateReservoir(RigCaseData* eclipseCase)
|
||||
void RifReaderMockModel::populateReservoir(RigEclipseCaseData* eclipseCase)
|
||||
{
|
||||
m_reservoirBuilder.populateReservoir(eclipseCase);
|
||||
}
|
||||
|
@ -36,17 +36,17 @@ public:
|
||||
|
||||
void addLocalGridRefinement(const cvf::Vec3st& minCellPosition, const cvf::Vec3st& maxCellPosition, const cvf::Vec3st& singleCellRefinementFactors);
|
||||
|
||||
virtual bool open( const QString& fileName, RigCaseData* eclipseCase );
|
||||
virtual bool open( const QString& fileName, RigEclipseCaseData* 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(RigCaseData* eclipseCase);
|
||||
void populateReservoir(RigEclipseCaseData* eclipseCase);
|
||||
bool inputProperty( const QString& propertyName, std::vector<double>* values );
|
||||
|
||||
RigReservoirBuilderMock m_reservoirBuilder;
|
||||
RigCaseData* m_reservoir;
|
||||
RigEclipseCaseData* m_reservoir;
|
||||
};
|
||||
|
||||
|
@ -20,11 +20,15 @@
|
||||
|
||||
#include "RifReaderEclipseOutput.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RimEclipseInputCaseOpm.h"
|
||||
#include "RimEclipseInputProperty.h"
|
||||
#include "RimEclipseInputPropertyCollection.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
#include "RiuProcessMonitor.h"
|
||||
|
||||
#include "cafProgressInfo.h"
|
||||
@ -41,7 +45,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifReaderOpmParserInput::importGridPropertiesFaults(const QString& fileName, RigCaseData* caseData)
|
||||
void RifReaderOpmParserInput::importGridPropertiesFaults(const QString& fileName, RigEclipseCaseData* caseData)
|
||||
{
|
||||
RiuMainWindow::instance()->processMonitor()->addStringToLog(QString("\nStarted reading of grid and properties from file : " + fileName + "\n"));
|
||||
|
||||
@ -428,7 +432,7 @@ void RifReaderOpmParserInput::initUsingWarnings(Opm::ParseContext* parseContext)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RifReaderOpmParserPropertyReader::findOrCreateResult(const QString& newResultName, RigCaseData* reservoir)
|
||||
size_t RifReaderOpmParserPropertyReader::findOrCreateResult(const QString& newResultName, RigEclipseCaseData* reservoir)
|
||||
{
|
||||
size_t resultIndex = reservoir->results(RifReaderInterface::MATRIX_RESULTS)->findScalarResultIndex(newResultName);
|
||||
if (resultIndex == cvf::UNDEFINED_SIZE_T)
|
||||
@ -442,7 +446,7 @@ size_t RifReaderOpmParserPropertyReader::findOrCreateResult(const QString& newRe
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifReaderOpmParserPropertyReader::readAllProperties(std::shared_ptr< Opm::Deck > deck, RigCaseData* caseData, std::map<QString, QString>* newResults)
|
||||
void RifReaderOpmParserPropertyReader::readAllProperties(std::shared_ptr< Opm::Deck > deck, RigEclipseCaseData* caseData, std::map<QString, QString>* newResults)
|
||||
{
|
||||
std::set<std::string> uniqueKeywords;
|
||||
for (auto it = deck->begin(); it != deck->end(); it++)
|
||||
@ -545,7 +549,7 @@ std::set<std::string> RifReaderOpmParserPropertyReader::keywords() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifReaderOpmParserPropertyReader::copyPropertyToCaseData(const std::string& keywordName, RigCaseData* caseData, const QString& resultName)
|
||||
bool RifReaderOpmParserPropertyReader::copyPropertyToCaseData(const std::string& keywordName, RigEclipseCaseData* caseData, const QString& resultName)
|
||||
{
|
||||
{
|
||||
std::string errorMessage;
|
||||
@ -625,7 +629,7 @@ void RifReaderOpmParserPropertyReader::getAllValuesForKeyword(std::shared_ptr< O
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifReaderOpmParserPropertyReader::isDataItemCountIdenticalToMainGridCellCount(std::shared_ptr< Opm::Deck > deck, const std::string& keyword, RigCaseData* caseData)
|
||||
bool RifReaderOpmParserPropertyReader::isDataItemCountIdenticalToMainGridCellCount(std::shared_ptr< Opm::Deck > deck, const std::string& keyword, RigEclipseCaseData* caseData)
|
||||
{
|
||||
bool isEqual = false;
|
||||
{
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
#include <QString>
|
||||
|
||||
class RigCaseData;
|
||||
class RigEclipseCaseData;
|
||||
|
||||
namespace Opm {
|
||||
class Deck;
|
||||
@ -46,7 +46,7 @@ namespace Opm {
|
||||
class RifReaderOpmParserInput
|
||||
{
|
||||
public:
|
||||
static void importGridPropertiesFaults(const QString& fileName, RigCaseData* eclipseCase);
|
||||
static void importGridPropertiesFaults(const QString& fileName, RigEclipseCaseData* eclipseCase);
|
||||
|
||||
static void readFaults(const QString& fileName, cvf::Collection<RigFault>* faults);
|
||||
|
||||
@ -75,14 +75,14 @@ public:
|
||||
|
||||
std::set<std::string> keywords() const;
|
||||
|
||||
bool copyPropertyToCaseData(const std::string& keywordName, RigCaseData* eclipseCase, const QString& resultName);
|
||||
bool copyPropertyToCaseData(const std::string& keywordName, RigEclipseCaseData* eclipseCase, const QString& resultName);
|
||||
|
||||
static size_t findOrCreateResult(const QString& newResultName, RigCaseData* reservoir);
|
||||
static size_t findOrCreateResult(const QString& newResultName, RigEclipseCaseData* reservoir);
|
||||
|
||||
private:
|
||||
static void readAllProperties(std::shared_ptr< Opm::Deck > deck, RigCaseData* caseData, std::map<QString, QString>* newResults);
|
||||
static void readAllProperties(std::shared_ptr< Opm::Deck > deck, RigEclipseCaseData* caseData, std::map<QString, QString>* newResults);
|
||||
static void getAllValuesForKeyword(std::shared_ptr< Opm::Deck > deck, const std::string& keyword, std::vector<double>& allValues);
|
||||
static bool isDataItemCountIdenticalToMainGridCellCount(std::shared_ptr< Opm::Deck > deck, const std::string& keyword, RigCaseData* caseData);
|
||||
static bool isDataItemCountIdenticalToMainGridCellCount(std::shared_ptr< Opm::Deck > deck, const std::string& keyword, RigEclipseCaseData* caseData);
|
||||
bool open(const QString& fileName);
|
||||
|
||||
private:
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "RivIntersectionBoxPartMgr.h"
|
||||
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigFemPartCollection.h"
|
||||
#include "RigFemPartResultsCollection.h"
|
||||
#include "RigGeoMechCaseData.h"
|
||||
@ -37,6 +36,7 @@
|
||||
#include "RimTernaryLegendConfig.h"
|
||||
|
||||
#include "RivIntersectionBoxSourceInfo.h"
|
||||
#include "RivIntersectionPartMgr.h"
|
||||
#include "RivResultToTextureMapper.h"
|
||||
#include "RivScalarMapperUtils.h"
|
||||
#include "RivTernaryScalarMapper.h"
|
||||
@ -49,7 +49,7 @@
|
||||
#include "cvfRenderState_FF.h"
|
||||
#include "cvfRenderStateDepth.h"
|
||||
#include "cvfRenderStatePoint.h"
|
||||
#include "RivIntersectionPartMgr.h"
|
||||
#include "cvfStructGridGeometryGenerator.h"
|
||||
|
||||
|
||||
|
||||
@ -94,7 +94,7 @@ void RivIntersectionBoxPartMgr::updateCellResultColor(size_t timeStepIndex)
|
||||
CVF_ASSERT(cellResultColors);
|
||||
|
||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel());
|
||||
RigCaseData* eclipseCase = eclipseView->eclipseCase()->reservoirData();
|
||||
RigEclipseCaseData* eclipseCase = eclipseView->eclipseCase()->reservoirData();
|
||||
|
||||
// CrossSections
|
||||
if (m_intersectionBoxFaces.notNull())
|
||||
@ -353,7 +353,7 @@ cvf::ref<RivIntersectionHexGridInterface> RivIntersectionBoxPartMgr::createHexGr
|
||||
if (eclipseView)
|
||||
{
|
||||
RigMainGrid* grid = NULL;
|
||||
grid = eclipseView->eclipseCase()->reservoirData()->mainGrid();
|
||||
grid = eclipseView->mainGrid();
|
||||
|
||||
return new RivEclipseIntersectionGrid(grid, eclipseView->currentActiveCellInfo(), m_rimIntersectionBox->showInactiveCells());
|
||||
}
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "RivIntersectionPartMgr.h"
|
||||
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigFemPartCollection.h"
|
||||
#include "RigFemPartResultsCollection.h"
|
||||
#include "RigGeoMechCaseData.h"
|
||||
@ -43,16 +42,18 @@
|
||||
#include "RivTernaryScalarMapper.h"
|
||||
#include "RivTernaryTextureCoordsCreator.h"
|
||||
|
||||
#include "RiuGeoMechXfTensorResultAccessor.h"
|
||||
|
||||
#include "cafTensor3.h"
|
||||
#include "cvfDrawableGeo.h"
|
||||
#include "cvfGeometryTools.h"
|
||||
#include "cvfModelBasicList.h"
|
||||
#include "cvfPart.h"
|
||||
#include "cvfPrimitiveSetDirect.h"
|
||||
#include "cvfRenderState_FF.h"
|
||||
#include "cvfRenderStateDepth.h"
|
||||
#include "cvfRenderStatePoint.h"
|
||||
#include "cafTensor3.h"
|
||||
#include "cvfGeometryTools.h"
|
||||
#include "RiuGeoMechXfTensorResultAccessor.h"
|
||||
#include "cvfStructGridGeometryGenerator.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -98,7 +99,7 @@ void RivIntersectionPartMgr::updateCellResultColor(size_t timeStepIndex)
|
||||
CVF_ASSERT(cellResultColors);
|
||||
|
||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel());
|
||||
RigCaseData* eclipseCase = eclipseView->eclipseCase()->reservoirData();
|
||||
RigEclipseCaseData* eclipseCase = eclipseView->eclipseCase()->reservoirData();
|
||||
|
||||
// CrossSections
|
||||
if (m_crossSectionFaces.notNull())
|
||||
@ -737,7 +738,7 @@ cvf::ref<RivIntersectionHexGridInterface> RivIntersectionPartMgr::createHexGridI
|
||||
if (eclipseView)
|
||||
{
|
||||
RigMainGrid* grid = NULL;
|
||||
grid = eclipseView->eclipseCase()->reservoirData()->mainGrid();
|
||||
grid = eclipseView->mainGrid();
|
||||
return new RivEclipseIntersectionGrid(grid, eclipseView->currentActiveCellInfo(), m_rimCrossSection->showInactiveCells());
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "RivCellEdgeGeometryUtils.h"
|
||||
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigCellEdgeResultAccessor.h"
|
||||
#include "RigGridBase.h"
|
||||
#include "RigResultAccessor.h"
|
||||
@ -55,7 +55,7 @@ void RivCellEdgeGeometryUtils::addCellEdgeResultsToDrawableGeo(
|
||||
bool useDefaultValueForHugeVals,
|
||||
float opacityLevel)
|
||||
{
|
||||
RigCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
|
||||
RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
|
||||
CVF_ASSERT(eclipseCase != NULL);
|
||||
|
||||
// Create result access objects
|
||||
@ -199,7 +199,7 @@ void RivCellEdgeGeometryUtils::addTernaryCellEdgeResultsToDrawableGeo(size_t tim
|
||||
const cvf::StructGridQuadToCellFaceMapper* quadToCellFaceMapper,
|
||||
cvf::DrawableGeo* geo, size_t gridIndex, float opacityLevel)
|
||||
{
|
||||
RigCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
|
||||
RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
|
||||
CVF_ASSERT(eclipseCase != NULL);
|
||||
|
||||
cvf::ref<RigResultAccessor> cellEdgeResultAccessor = createCellEdgeResultAccessor(cellResultColors, cellEdgeResultColors, timeStepIndex, eclipseCase, eclipseCase->grid(gridIndex));
|
||||
@ -294,7 +294,7 @@ cvf::ref<RigResultAccessor> RivCellEdgeGeometryUtils::createCellEdgeResultAccess
|
||||
RimEclipseCellColors* cellResultColors,
|
||||
RimCellEdgeColors* cellEdgeResultColors,
|
||||
size_t timeStepIndex,
|
||||
RigCaseData* eclipseCase,
|
||||
RigEclipseCaseData* eclipseCase,
|
||||
const RigGridBase* grid)
|
||||
{
|
||||
cvf::ref<RigCellEdgeResultAccessor> cellEdgeResultAccessor = new RigCellEdgeResultAccessor();
|
||||
@ -326,7 +326,7 @@ cvf::ref<RigResultAccessor> RivCellEdgeGeometryUtils::createCellEdgeResultAccess
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<RigResultAccessor> RivCellEdgeGeometryUtils::createCellCenterResultAccessor(RimEclipseCellColors* cellResultColors, size_t timeStepIndex, RigCaseData* eclipseCase, const RigGridBase* grid)
|
||||
cvf::ref<RigResultAccessor> RivCellEdgeGeometryUtils::createCellCenterResultAccessor(RimEclipseCellColors* cellResultColors, size_t timeStepIndex, RigEclipseCaseData* eclipseCase, const RigGridBase* grid)
|
||||
{
|
||||
cvf::ref<RigResultAccessor> resultAccessor = NULL;
|
||||
|
||||
|
@ -32,7 +32,7 @@ class RimCellEdgeColors;
|
||||
class RimEclipseCellColors;
|
||||
class RigGridBase;
|
||||
class RigResultAccessor;
|
||||
class RigCaseData;
|
||||
class RigEclipseCaseData;
|
||||
|
||||
|
||||
class RivCellEdgeGeometryUtils
|
||||
@ -60,14 +60,14 @@ private:
|
||||
static cvf::ref<RigResultAccessor> createCellCenterResultAccessor(
|
||||
RimEclipseCellColors* cellResultColors,
|
||||
size_t timeStepIndex,
|
||||
RigCaseData* eclipseCase,
|
||||
RigEclipseCaseData* eclipseCase,
|
||||
const RigGridBase* grid);
|
||||
|
||||
static cvf::ref<RigResultAccessor> createCellEdgeResultAccessor(
|
||||
RimEclipseCellColors* cellResultColors,
|
||||
RimCellEdgeColors* cellEdgeResultColors,
|
||||
size_t timeStepIndex,
|
||||
RigCaseData* eclipseCase,
|
||||
RigEclipseCaseData* eclipseCase,
|
||||
const RigGridBase* grid);
|
||||
|
||||
static bool hideScalarValue(double scalarValue, double scalarValueToHide, double tolerance);
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigResultAccessor.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
@ -103,7 +103,7 @@ void RivFaultPartMgr::updateCellResultColor(size_t timeStepIndex, RimEclipseCell
|
||||
|
||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel());
|
||||
RimEclipseView* eclipseView = cellResultColors->reservoirView();
|
||||
RigCaseData* eclipseCase = eclipseView->eclipseCase()->reservoirData();
|
||||
RigEclipseCaseData* eclipseCase = eclipseView->eclipseCase()->reservoirData();
|
||||
|
||||
// Faults
|
||||
if (m_nativeFaultFaces.notNull())
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigResultAccessorFactory.h"
|
||||
|
||||
#include "RimCellEdgeColors.h"
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
#include "RivReservoirFaultsPartMgr.h"
|
||||
|
||||
#include "RigCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
@ -169,7 +168,7 @@ void RivReservoirFaultsPartMgr::appendPartsToModel(cvf::ModelBasicList* model)
|
||||
scalarResultIndex = cellResultColors->scalarResultIndex();
|
||||
}
|
||||
|
||||
RigMainGrid* mainGrid = m_reservoirView->eclipseCase()->reservoirData()->mainGrid();
|
||||
RigMainGrid* mainGrid = m_reservoirView->mainGrid();
|
||||
if (!(mainGrid && mainGrid->nncData()->hasScalarValues(scalarResultIndex)))
|
||||
{
|
||||
showNncs = false;
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include "RivReservoirPartMgr.h"
|
||||
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
|
||||
#include "RivGridPartMgr.h"
|
||||
#include "RivReservoirFaultsPartMgr.h"
|
||||
@ -30,7 +30,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirPartMgr::clearAndSetReservoir(const RigCaseData* eclipseCase, RimEclipseView* reservoirView)
|
||||
void RivReservoirPartMgr::clearAndSetReservoir(const RigEclipseCaseData* eclipseCase, RimEclipseView* reservoirView)
|
||||
{
|
||||
m_allGrids.clear();
|
||||
|
||||
|
@ -32,7 +32,7 @@ namespace cvf
|
||||
|
||||
class RimEclipseCellColors;
|
||||
class RimCellEdgeColors;
|
||||
class RigCaseData;
|
||||
class RigEclipseCaseData;
|
||||
class RimEclipseView;
|
||||
class RivReservoirFaultsPartMgr;
|
||||
class RivGridPartMgr;
|
||||
@ -47,7 +47,7 @@ class RivGridPartMgr;
|
||||
class RivReservoirPartMgr: public cvf::Object
|
||||
{
|
||||
public:
|
||||
void clearAndSetReservoir(const RigCaseData* eclipseCase, RimEclipseView* reservoirView);
|
||||
void clearAndSetReservoir(const RigEclipseCaseData* eclipseCase, RimEclipseView* reservoirView);
|
||||
void setTransform(cvf::Transform* scaleTransform);
|
||||
void setCellVisibility(size_t gridIndex, cvf::UByteArray* cellVisibilities );
|
||||
|
||||
|
@ -20,9 +20,11 @@
|
||||
|
||||
#include "RivReservoirViewPartMgr.h"
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigCaseToCaseCellMapper.h"
|
||||
#include "RigCell.h"
|
||||
#include "RigGridBase.h"
|
||||
#include "RigResultAccessorFactory.h"
|
||||
|
||||
@ -147,7 +149,7 @@ void RivReservoirViewPartMgr::scheduleGeometryRegen(RivCellSetEnum geometryType)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirViewPartMgr::clearGeometryCache(RivCellSetEnum geomType)
|
||||
{
|
||||
RigCaseData* eclipseCase = NULL;
|
||||
RigEclipseCaseData* eclipseCase = NULL;
|
||||
if (m_reservoirView != NULL && m_reservoirView->eclipseCase())
|
||||
{
|
||||
eclipseCase = m_reservoirView->eclipseCase()->reservoirData();
|
||||
@ -247,7 +249,7 @@ void RivReservoirViewPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicL
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirViewPartMgr::createGeometry(RivCellSetEnum geometryType)
|
||||
{
|
||||
RigCaseData* res = m_reservoirView->eclipseCase()->reservoirData();
|
||||
RigEclipseCaseData* res = m_reservoirView->eclipseCase()->reservoirData();
|
||||
m_geometries[geometryType].clearAndSetReservoir(res, m_reservoirView);
|
||||
m_geometries[geometryType].setTransform(m_scaleTransform.p());
|
||||
|
||||
@ -270,7 +272,7 @@ void RivReservoirViewPartMgr::createGeometry(RivCellSetEnum geometryType)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirViewPartMgr::computeVisibility(cvf::UByteArray* cellVisibility, RivCellSetEnum geometryType, RigGridBase* grid, size_t gridIdx)
|
||||
{
|
||||
RigCaseData* eclipseCase = m_reservoirView->eclipseCase()->reservoirData();
|
||||
RigEclipseCaseData* eclipseCase = m_reservoirView->eclipseCase()->reservoirData();
|
||||
RigActiveCellInfo* activeCellInfo = m_reservoirView->currentActiveCellInfo();
|
||||
|
||||
switch (geometryType)
|
||||
@ -397,7 +399,7 @@ void RivReservoirViewPartMgr::computeVisibility(cvf::UByteArray* cellVisibility,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirViewPartMgr::createPropertyFilteredNoneWellCellGeometry(size_t frameIndex)
|
||||
{
|
||||
RigCaseData* res = m_reservoirView->eclipseCase()->reservoirData();
|
||||
RigEclipseCaseData* res = m_reservoirView->eclipseCase()->reservoirData();
|
||||
|
||||
if ( frameIndex >= m_propFilteredGeometryFrames.size())
|
||||
{
|
||||
@ -474,7 +476,7 @@ void RivReservoirViewPartMgr::createPropertyFilteredNoneWellCellGeometry(size_t
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirViewPartMgr::createPropertyFilteredWellGeometry(size_t frameIndex)
|
||||
{
|
||||
RigCaseData* res = m_reservoirView->eclipseCase()->reservoirData();
|
||||
RigEclipseCaseData* res = m_reservoirView->eclipseCase()->reservoirData();
|
||||
|
||||
if ( frameIndex >= m_propFilteredWellGeometryFrames.size())
|
||||
{
|
||||
@ -787,7 +789,7 @@ void RivReservoirViewPartMgr::computePropertyVisibility(cvf::UByteArray* cellVis
|
||||
{
|
||||
const RimCellFilter::FilterModeType filterType = propertyFilter->filterMode();
|
||||
|
||||
RigCaseData* eclipseCase = propFilterColl->reservoirView()->eclipseCase()->reservoirData();
|
||||
RigEclipseCaseData* eclipseCase = propFilterColl->reservoirView()->eclipseCase()->reservoirData();
|
||||
|
||||
cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createFromResultDefinition(eclipseCase, grid->gridIndex(), timeStepIndex, propertyFilter->resultDefinition);
|
||||
|
||||
|
@ -20,8 +20,10 @@
|
||||
|
||||
#include "RivSimWellPipesPartMgr.h"
|
||||
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigCell.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigSimulationWellCenterLineCalculator.h"
|
||||
|
||||
#include "Rim3dOverlayInfoConfig.h"
|
||||
#include "RimCellEdgeColors.h"
|
||||
@ -49,7 +51,6 @@
|
||||
#include "cvfRay.h"
|
||||
#include "cvfScalarMapperDiscreteLinear.h"
|
||||
#include "cvfTransform.h"
|
||||
#include "RigSimulationWellCenterLineCalculator.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -104,7 +105,7 @@ void RivSimWellPipesPartMgr::buildWellPipeParts()
|
||||
|
||||
RigSimulationWellCenterLineCalculator::calculateWellPipeCenterline(m_rimWell.p(), m_pipeBranchesCLCoords, pipeBranchesCellIds);
|
||||
|
||||
double characteristicCellSize = m_rimReservoirView->eclipseCase()->reservoirData()->mainGrid()->characteristicIJCellSize();
|
||||
double characteristicCellSize = m_rimReservoirView->mainGrid()->characteristicIJCellSize();
|
||||
double pipeRadius = m_rimReservoirView->wellCollection()->pipeRadiusScaleFactor() *m_rimWell->pipeRadiusScaleFactor() * characteristicCellSize;
|
||||
|
||||
|
||||
@ -127,7 +128,7 @@ void RivSimWellPipesPartMgr::buildWellPipeParts()
|
||||
cvfCoords->assign(m_pipeBranchesCLCoords[brIdx]);
|
||||
|
||||
// Scale the centerline coordinates using the Z-scale transform of the grid and correct for the display offset.
|
||||
const RigMainGrid* mainGrid = m_rimReservoirView->eclipseCase()->reservoirData()->mainGrid();
|
||||
const RigMainGrid* mainGrid = m_rimReservoirView->mainGrid();
|
||||
|
||||
for (size_t cIdx = 0; cIdx < cvfCoords->size(); ++cIdx)
|
||||
{
|
||||
|
@ -19,9 +19,10 @@
|
||||
|
||||
#include "RivSingleCellPartGenerator.h"
|
||||
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigFemPartCollection.h"
|
||||
#include "RigGeoMechCaseData.h"
|
||||
#include "RigGridBase.h"
|
||||
|
||||
#include "RimGeoMechCase.h"
|
||||
|
||||
@ -36,7 +37,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivSingleCellPartGenerator::RivSingleCellPartGenerator(RigCaseData* rigCaseData, size_t gridIndex, size_t cellIndex)
|
||||
RivSingleCellPartGenerator::RivSingleCellPartGenerator(RigEclipseCaseData* rigCaseData, size_t gridIndex, size_t cellIndex)
|
||||
: m_rigCaseData(rigCaseData),
|
||||
m_gridIndex(gridIndex),
|
||||
m_cellIndex(cellIndex),
|
||||
|
@ -27,7 +27,7 @@ namespace cvf
|
||||
class Part;
|
||||
}
|
||||
|
||||
class RigCaseData;
|
||||
class RigEclipseCaseData;
|
||||
class RimGeoMechCase;
|
||||
|
||||
//==================================================================================================
|
||||
@ -37,7 +37,7 @@ class RimGeoMechCase;
|
||||
class RivSingleCellPartGenerator
|
||||
{
|
||||
public:
|
||||
RivSingleCellPartGenerator(RigCaseData* rigCaseData, size_t gridIndex, size_t cellIndex);
|
||||
RivSingleCellPartGenerator(RigEclipseCaseData* rigCaseData, size_t gridIndex, size_t cellIndex);
|
||||
RivSingleCellPartGenerator(RimGeoMechCase* rimGeoMechCase, size_t gridIndex, size_t cellIndex);
|
||||
|
||||
cvf::ref<cvf::Part> createPart(const cvf::Color3f color);
|
||||
@ -46,7 +46,7 @@ private:
|
||||
cvf::ref<cvf::DrawableGeo> createMeshDrawable();
|
||||
|
||||
private:
|
||||
RigCaseData* m_rigCaseData;
|
||||
RigEclipseCaseData* m_rigCaseData;
|
||||
RimGeoMechCase* m_geoMechCase;
|
||||
size_t m_gridIndex;
|
||||
size_t m_cellIndex;
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "RivTernaryTextureCoordsCreator.h"
|
||||
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigPipeInCellEvaluator.h"
|
||||
#include "RigResultAccessorFactory.h"
|
||||
#include "RigTernaryResultAccessor2d.h"
|
||||
@ -34,6 +34,8 @@
|
||||
#include "RivTernaryResultToTextureMapper.h"
|
||||
#include "RivTernaryScalarMapper.h"
|
||||
|
||||
#include "cvfStructGridGeometryGenerator.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -47,7 +49,7 @@ RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator(
|
||||
CVF_ASSERT(quadMapper);
|
||||
m_quadMapper = quadMapper;
|
||||
|
||||
RigCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
|
||||
RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
|
||||
|
||||
size_t resTimeStepIdx = timeStepIndex;
|
||||
|
||||
@ -81,7 +83,7 @@ RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator(
|
||||
size_t timeStepIndex)
|
||||
: m_quadMapper(NULL)
|
||||
{
|
||||
RigCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
|
||||
RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
|
||||
|
||||
size_t resTimeStepIdx = timeStepIndex;
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "RivTextureCoordsCreator.h"
|
||||
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigPipeInCellEvaluator.h"
|
||||
#include "RigResultAccessorFactory.h"
|
||||
|
||||
@ -32,13 +32,15 @@
|
||||
|
||||
#include "RivResultToTextureMapper.h"
|
||||
|
||||
#include "cvfStructGridGeometryGenerator.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivTextureCoordsCreator::RivTextureCoordsCreator(RimEclipseCellColors* cellResultColors, size_t timeStepIndex, size_t gridIndex, const cvf::StructGridQuadToCellFaceMapper* quadMapper)
|
||||
{
|
||||
RigCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
|
||||
RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
|
||||
|
||||
m_quadMapper = quadMapper;
|
||||
CVF_ASSERT(quadMapper && eclipseCase );
|
||||
|
@ -24,8 +24,10 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RigCaseData.h"
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigCell.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "Rim3dOverlayInfoConfig.h"
|
||||
#include "RimCellEdgeColors.h"
|
||||
@ -85,7 +87,7 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex)
|
||||
|
||||
if (m_rimReservoirView.isNull()) return;
|
||||
|
||||
RigCaseData* rigReservoir = m_rimReservoirView->eclipseCase()->reservoirData();
|
||||
RigEclipseCaseData* rigReservoir = m_rimReservoirView->eclipseCase()->reservoirData();
|
||||
|
||||
RimEclipseWell* well = m_rimWell;
|
||||
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RigCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
@ -73,7 +72,7 @@ void RivWellSpheresPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicLis
|
||||
if (!m_rimReservoirView->eclipseCase()) return;
|
||||
if (!m_rimReservoirView->eclipseCase()->reservoirData()) return;
|
||||
|
||||
const RigMainGrid* mainGrid = m_rimReservoirView->eclipseCase()->reservoirData()->mainGrid();
|
||||
const RigMainGrid* mainGrid = m_rimReservoirView->mainGrid();
|
||||
CVF_ASSERT(mainGrid);
|
||||
|
||||
RigSingleWellResultsData* rigWellResult = m_rimWell->wellResults();
|
||||
@ -152,7 +151,7 @@ cvf::ref<cvf::Part> RivWellSpheresPartMgr::createPart(std::vector<std::pair<cvf:
|
||||
vectorDrawable->setColors(colors.p());
|
||||
|
||||
cvf::GeometryBuilderTriangles builder;
|
||||
double characteristicCellSize = m_rimReservoirView->eclipseCase()->reservoirData()->mainGrid()->characteristicIJCellSize();
|
||||
double characteristicCellSize = m_rimReservoirView->mainGrid()->characteristicIJCellSize();
|
||||
double cellRadius = m_rimReservoirView->wellCollection()->cellCenterSpheresScaleFactor() * characteristicCellSize;
|
||||
cvf::GeometryUtils::createSphere(cellRadius, 15, 15, &builder);
|
||||
|
||||
|
@ -21,13 +21,14 @@
|
||||
#include "Rim3dOverlayInfoConfig.h"
|
||||
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigEclipseNativeVisibleCellsStatCalc.h"
|
||||
#include "RigFemNativeVisibleCellsStatCalc.h"
|
||||
#include "RigFemPartCollection.h"
|
||||
#include "RigFemPartResultsCollection.h"
|
||||
#include "RigFemResultAddress.h"
|
||||
#include "RigGeoMechCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigStatisticsDataCache.h"
|
||||
|
||||
#include "RimCellEdgeColors.h"
|
||||
@ -45,6 +46,8 @@
|
||||
#include "RimView.h"
|
||||
|
||||
#include "RiuViewer.h"
|
||||
#include "RigFlowDiagResults.h"
|
||||
#include "RigFlowDiagVisibleCellsStatCalc.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT(Rim3dOverlayInfoConfig, "View3dOverlayInfoConfig");
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -182,6 +185,31 @@ caf::PdmFieldHandle* Rim3dOverlayInfoConfig::objectToggleField()
|
||||
return &active;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dOverlayInfoConfig::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
caf::PdmUiGroup* visGroup = uiOrdering.addNewGroup("Visibility");
|
||||
|
||||
visGroup->add(&showAnimProgress);
|
||||
visGroup->add(&showCaseInfo);
|
||||
visGroup->add(&showResultInfo);
|
||||
visGroup->add(&showHistogram);
|
||||
|
||||
caf::PdmUiGroup* statGroup = uiOrdering.addNewGroup("Statistics Options");
|
||||
RimEclipseView * eclipseView = dynamic_cast<RimEclipseView*>(m_viewDef.p());
|
||||
|
||||
if ( !eclipseView || eclipseView->cellResult()->resultType() != RimDefines::FLOW_DIAGNOSTICS ) //
|
||||
{
|
||||
statGroup->add(&m_statisticsTimeRange);
|
||||
}
|
||||
statGroup->add(&m_statisticsCellRange);
|
||||
|
||||
uiOrdering.setForgetRemainingFields(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -260,6 +288,36 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (eclipseView->cellResult()->resultType() == RimDefines::FLOW_DIAGNOSTICS)
|
||||
{
|
||||
if ( m_statisticsTimeRange == CURRENT_TIMESTEP || m_statisticsTimeRange == ALL_TIMESTEPS) // All timesteps is ignored
|
||||
{
|
||||
int currentTimeStep = eclipseView->currentTimeStep();
|
||||
|
||||
if ( m_statisticsCellRange == ALL_CELLS )
|
||||
{
|
||||
RigFlowDiagResults* fldResults = eclipseView->cellResult()->flowDiagSolution()->flowDiagResults();
|
||||
RigFlowDiagResultAddress resAddr = eclipseView->cellResult()->flowDiagResAddress();
|
||||
|
||||
fldResults->minMaxScalarValues(resAddr, currentTimeStep, &min, &max);
|
||||
fldResults->p10p90ScalarValues(resAddr, currentTimeStep, &p10, &p90);
|
||||
fldResults->meanScalarValue(resAddr, currentTimeStep, &mean);
|
||||
fldResults->sumScalarValue(resAddr, currentTimeStep, &sum);
|
||||
histogram = &(fldResults->scalarValuesHistogram(resAddr, currentTimeStep));
|
||||
}
|
||||
else if (m_statisticsCellRange == VISIBLE_CELLS )
|
||||
{
|
||||
updateVisCellStatsIfNeeded();
|
||||
|
||||
m_visibleCellStatistics->meanCellScalarValues(currentTimeStep, mean);
|
||||
m_visibleCellStatistics->minMaxCellScalarValues(currentTimeStep, min, max);
|
||||
m_visibleCellStatistics->p10p90CellScalarValues(currentTimeStep, p10, p90);
|
||||
m_visibleCellStatistics->sumCellScalarValues(currentTimeStep, sum);
|
||||
|
||||
histogram = &(m_visibleCellStatistics->cellScalarValuesHistogram(currentTimeStep));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -274,19 +332,19 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView)
|
||||
QString iSize, jSize, kSize;
|
||||
QString zScale;
|
||||
|
||||
if (eclipseView->eclipseCase() && eclipseView->eclipseCase()->reservoirData() && eclipseView->eclipseCase()->reservoirData()->mainGrid())
|
||||
if (eclipseView->mainGrid())
|
||||
{
|
||||
caseName = eclipseView->eclipseCase()->caseUserDescription();
|
||||
totCellCount = QString::number(eclipseView->eclipseCase()->reservoirData()->mainGrid()->globalCellArray().size());
|
||||
totCellCount = QString::number(eclipseView->mainGrid()->globalCellArray().size());
|
||||
size_t mxActCellCount = eclipseView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->reservoirActiveCellCount();
|
||||
size_t frActCellCount = eclipseView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->reservoirActiveCellCount();
|
||||
if (frActCellCount > 0) activeCellCountText += "Matrix : ";
|
||||
activeCellCountText += QString::number(mxActCellCount);
|
||||
if (frActCellCount > 0) activeCellCountText += " Fracture : " + QString::number(frActCellCount);
|
||||
|
||||
iSize = QString::number(eclipseView->eclipseCase()->reservoirData()->mainGrid()->cellCountI());
|
||||
jSize = QString::number(eclipseView->eclipseCase()->reservoirData()->mainGrid()->cellCountJ());
|
||||
kSize = QString::number(eclipseView->eclipseCase()->reservoirData()->mainGrid()->cellCountK());
|
||||
iSize = QString::number(eclipseView->mainGrid()->cellCountI());
|
||||
jSize = QString::number(eclipseView->mainGrid()->cellCountJ());
|
||||
kSize = QString::number(eclipseView->mainGrid()->cellCountK());
|
||||
|
||||
zScale = QString::number(eclipseView->scaleZ());
|
||||
|
||||
@ -303,15 +361,22 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView)
|
||||
|
||||
if (eclipseView->cellResult()->isTernarySaturationSelected())
|
||||
{
|
||||
QString propName = eclipseView->cellResult()->resultVariable();
|
||||
QString propName = eclipseView->cellResult()->resultVariableUiName();
|
||||
infoText += QString("<b>Cell Property:</b> %1 ").arg(propName);
|
||||
}
|
||||
|
||||
if (isResultsInfoRelevant)
|
||||
{
|
||||
QString propName = eclipseView->cellResult()->resultVariable();
|
||||
QString propName = eclipseView->cellResult()->resultVariableUiName();
|
||||
QString timeRangeText = m_statisticsTimeRange().uiText();
|
||||
if ( eclipseView->cellResult()->resultType() == RimDefines::FLOW_DIAGNOSTICS )
|
||||
{
|
||||
timeRangeText = caf::AppEnum<StatisticsTimeRangeType>::uiText(CURRENT_TIMESTEP);
|
||||
propName = QString::fromStdString( eclipseView->cellResult()->flowDiagResAddress().uiText());
|
||||
}
|
||||
|
||||
infoText += QString("<b>Cell Property:</b> %1 ").arg(propName);
|
||||
infoText += QString("<br><b>Statistics:</b> ") + m_statisticsTimeRange().uiText() + " and " + m_statisticsCellRange().uiText();
|
||||
infoText += QString("<br><b>Statistics:</b> ") + timeRangeText + " and " + m_statisticsCellRange().uiText();
|
||||
infoText += QString("<table border=0 cellspacing=5 >"
|
||||
"<tr> <td>Min</td> <td>P10</td> <td>Mean</td> <td>P90</td> <td>Max</td> <td>Sum</td> </tr>"
|
||||
"<tr> <td>%1</td> <td> %2</td> <td> %3</td> <td> %4</td> <td> %5</td> <td> %6</td> </tr>"
|
||||
@ -342,7 +407,7 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView)
|
||||
}
|
||||
|
||||
infoText += QString("<b>Fault results: </b> %1<br>").arg(faultMapping);
|
||||
infoText += QString("<b>Fault Property:</b> %1 <br>").arg(eclipseView->faultResultSettings()->customFaultResult()->resultVariable());
|
||||
infoText += QString("<b>Fault Property:</b> %1 <br>").arg(eclipseView->faultResultSettings()->customFaultResult()->resultVariableUiName());
|
||||
}
|
||||
}
|
||||
|
||||
@ -550,10 +615,22 @@ void Rim3dOverlayInfoConfig::updateVisCellStatsIfNeeded()
|
||||
}
|
||||
else if (eclipseView)
|
||||
{
|
||||
size_t scalarIndex = eclipseView->cellResult()->scalarResultIndex();
|
||||
calc = new RigEclipseNativeVisibleCellsStatCalc(eclipseView->currentGridCellResults()->cellResults(),
|
||||
scalarIndex,
|
||||
if ( eclipseView->cellResult()->resultType() == RimDefines::FLOW_DIAGNOSTICS )
|
||||
{
|
||||
RigFlowDiagResultAddress resAddr = eclipseView->cellResult()->flowDiagResAddress();
|
||||
RigFlowDiagResults* fldResults = eclipseView->cellResult()->flowDiagSolution()->flowDiagResults();
|
||||
calc = new RigFlowDiagVisibleCellsStatCalc(fldResults,
|
||||
resAddr,
|
||||
eclipseView->currentTotalCellVisibility().p());
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t scalarIndex = eclipseView->cellResult()->scalarResultIndex();
|
||||
calc = new RigEclipseNativeVisibleCellsStatCalc(eclipseView->currentGridCellResults()->cellResults(),
|
||||
scalarIndex,
|
||||
eclipseView->currentTotalCellVisibility().p());
|
||||
}
|
||||
}
|
||||
|
||||
m_visibleCellStatistics = new RigStatisticsDataCache(calc.p());
|
||||
|
@ -65,6 +65,9 @@ public:
|
||||
protected:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
virtual caf::PdmFieldHandle* objectToggleField();
|
||||
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
|
||||
private:
|
||||
|
||||
void updateEclipse3DInfo(RimEclipseView * reservoirView);
|
||||
|
@ -69,7 +69,7 @@ cvf::Vec3d RimCase::displayModelOffset() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RimCase::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly)
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> optionList;
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
if(fieldNeedingOptions == &activeFormationNames)
|
||||
{
|
||||
@ -78,15 +78,12 @@ QList<caf::PdmOptionItemInfo> RimCase::calculateValueOptions(const caf::PdmField
|
||||
{
|
||||
for(RimFormationNames* fnames : proj->activeOilField()->formationNamesCollection()->formationNamesList())
|
||||
{
|
||||
optionList.push_back(caf::PdmOptionItemInfo(fnames->fileNameWoPath(),
|
||||
QVariant::fromValue(caf::PdmPointer<caf::PdmObjectHandle>(fnames)),
|
||||
false,
|
||||
fnames->uiCapability()->uiIcon()));
|
||||
options.push_back(caf::PdmOptionItemInfo(fnames->fileNameWoPath(), fnames, false, fnames->uiCapability()->uiIcon()));
|
||||
}
|
||||
}
|
||||
|
||||
optionList.push_front(caf::PdmOptionItemInfo("None", QVariant::fromValue(caf::PdmPointer<caf::PdmObjectHandle>(NULL))));
|
||||
options.push_front(caf::PdmOptionItemInfo("None", nullptr));
|
||||
}
|
||||
|
||||
return optionList;
|
||||
return options;
|
||||
}
|
||||
|
@ -190,7 +190,7 @@ QList<caf::PdmOptionItemInfo> RimCellEdgeColors::calculateValueOptions(const caf
|
||||
//TODO: Must also handle input properties
|
||||
//varList += m_reservoirView->gridCellResults()->resultNames(RimDefines::INPUT_PROPERTY);
|
||||
|
||||
QList<caf::PdmOptionItemInfo> optionList;
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
std::map<QString, caf::FixedArray<QString, 6> > varBaseNameToVarsMap;
|
||||
|
||||
@ -237,15 +237,15 @@ QList<caf::PdmOptionItemInfo> RimCellEdgeColors::calculateValueOptions(const caf
|
||||
}
|
||||
optionUiName += ")";
|
||||
|
||||
optionList.push_back(caf::PdmOptionItemInfo( optionUiName, QVariant(it->first)));
|
||||
options.push_back(caf::PdmOptionItemInfo( optionUiName, QVariant(it->first)));
|
||||
|
||||
}
|
||||
|
||||
optionList.push_front(caf::PdmOptionItemInfo(RimDefines::undefinedResultName(), ""));
|
||||
options.push_front(caf::PdmOptionItemInfo(RimDefines::undefinedResultName(), ""));
|
||||
|
||||
if (useOptionsOnly) *useOptionsOnly = true;
|
||||
|
||||
return optionList;
|
||||
return options;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,7 @@ caf::PdmFieldHandle* RimCellFilter::objectToggleField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RimCellFilter::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly)
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> optionList;
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
if (&m_selectedCategoryValues == fieldNeedingOptions)
|
||||
{
|
||||
@ -141,7 +141,7 @@ QList<caf::PdmOptionItemInfo> RimCellFilter::calculateValueOptions(const caf::Pd
|
||||
int categoryValue = m_categoryValues[i];
|
||||
QString categoryName = m_categoryNames[i];
|
||||
|
||||
optionList.push_back(caf::PdmOptionItemInfo(categoryName, categoryValue));
|
||||
options.push_back(caf::PdmOptionItemInfo(categoryName, categoryValue));
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -149,12 +149,12 @@ QList<caf::PdmOptionItemInfo> RimCellFilter::calculateValueOptions(const caf::Pd
|
||||
for (auto it : m_categoryValues)
|
||||
{
|
||||
QString str = QString::number(it);
|
||||
optionList.push_back(caf::PdmOptionItemInfo(str, it));
|
||||
options.push_back(caf::PdmOptionItemInfo(str, it));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return optionList;
|
||||
return options;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include "RimCellRangeFilter.h"
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigGridBase.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
|
@ -20,12 +20,11 @@
|
||||
|
||||
#include "RimCellRangeFilterCollection.h"
|
||||
|
||||
#include "RigCaseData.h"
|
||||
#include "RigFemPart.h"
|
||||
#include "RigFemPartCollection.h"
|
||||
#include "RigFemPartGrid.h"
|
||||
#include "RigGeoMechCaseData.h"
|
||||
#include "RigGridBase.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
@ -107,16 +106,13 @@ void RimCellRangeFilterCollection::compoundCellRangeFilter(cvf::CellRangeFilter*
|
||||
RigMainGrid* RimCellRangeFilterCollection::mainGrid() const
|
||||
{
|
||||
RimEclipseView* eclipseView = this->eclipseView();
|
||||
if (eclipseView &&
|
||||
eclipseView->eclipseCase() &&
|
||||
eclipseView->eclipseCase()->reservoirData() &&
|
||||
eclipseView->eclipseCase()->reservoirData()->mainGrid())
|
||||
if (eclipseView && eclipseView->mainGrid())
|
||||
{
|
||||
|
||||
return eclipseView->eclipseCase()->reservoirData()->mainGrid();
|
||||
return eclipseView->mainGrid();
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -23,8 +23,10 @@
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RimCaseCollection.h"
|
||||
#include "RimCellEdgeColors.h"
|
||||
@ -118,7 +120,7 @@ RimEclipseCase::~RimEclipseCase()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigCaseData* RimEclipseCase::reservoirData()
|
||||
RigEclipseCaseData* RimEclipseCase::reservoirData()
|
||||
{
|
||||
return m_rigEclipseCase.p();
|
||||
}
|
||||
@ -126,7 +128,7 @@ RigCaseData* RimEclipseCase::reservoirData()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigCaseData* RimEclipseCase::reservoirData() const
|
||||
const RigEclipseCaseData* RimEclipseCase::reservoirData() const
|
||||
{
|
||||
return m_rigEclipseCase.p();
|
||||
}
|
||||
@ -292,7 +294,7 @@ void RimEclipseCase::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
|
||||
}
|
||||
else if (changedField == &flipXAxis || changedField == &flipYAxis)
|
||||
{
|
||||
RigCaseData* rigEclipseCase = reservoirData();
|
||||
RigEclipseCaseData* rigEclipseCase = reservoirData();
|
||||
if (rigEclipseCase)
|
||||
{
|
||||
rigEclipseCase->mainGrid()->setFlipAxis(flipXAxis, flipYAxis);
|
||||
@ -321,7 +323,7 @@ void RimEclipseCase::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseCase::updateFormationNamesData()
|
||||
{
|
||||
RigCaseData* rigEclipseCase = reservoirData();
|
||||
RigEclipseCaseData* rigEclipseCase = reservoirData();
|
||||
if(rigEclipseCase)
|
||||
{
|
||||
if(activeFormationNames())
|
||||
@ -379,7 +381,7 @@ void RimEclipseCase::updateFormationNamesData()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseCase::computeCachedData()
|
||||
{
|
||||
RigCaseData* rigEclipseCase = reservoirData();
|
||||
RigEclipseCaseData* rigEclipseCase = reservoirData();
|
||||
if (rigEclipseCase)
|
||||
{
|
||||
caf::ProgressInfo pInf(30, "");
|
||||
@ -423,7 +425,7 @@ RimCaseCollection* RimEclipseCase::parentCaseCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseCase::setReservoirData(RigCaseData* eclipseCase)
|
||||
void RimEclipseCase::setReservoirData(RigEclipseCaseData* eclipseCase)
|
||||
{
|
||||
m_rigEclipseCase = eclipseCase;
|
||||
if (this->reservoirData())
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
class QString;
|
||||
|
||||
class RigCaseData;
|
||||
class RigEclipseCaseData;
|
||||
class RigGridBase;
|
||||
class RimCaseCollection;
|
||||
class RimIdenticalGridCaseGroup;
|
||||
@ -68,8 +68,8 @@ public:
|
||||
bool openReserviorCase();
|
||||
virtual bool openEclipseGridFile() = 0;
|
||||
|
||||
RigCaseData* reservoirData();
|
||||
const RigCaseData* reservoirData() const;
|
||||
RigEclipseCaseData* reservoirData();
|
||||
const RigEclipseCaseData* reservoirData() const;
|
||||
|
||||
RimReservoirCellResultsStorage* results(RifReaderInterface::PorosityModelResultType porosityModel);
|
||||
|
||||
@ -104,10 +104,10 @@ protected:
|
||||
// Internal methods
|
||||
protected:
|
||||
void computeCachedData();
|
||||
void setReservoirData(RigCaseData* eclipseCase);
|
||||
void setReservoirData(RigEclipseCaseData* eclipseCase);
|
||||
|
||||
private:
|
||||
cvf::ref<RigCaseData> m_rigEclipseCase;
|
||||
cvf::ref<RigEclipseCaseData> m_rigEclipseCase;
|
||||
|
||||
private:
|
||||
caf::PdmChildField<RimReservoirCellResultsStorage*> m_matrixModelResults;
|
||||
|
@ -21,13 +21,16 @@
|
||||
#include "RimEclipseCaseCollection.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RigCaseData.h"
|
||||
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigGridManager.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RimCaseCollection.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseStatisticsCase.h"
|
||||
#include "RimIdenticalGridCaseGroup.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimEclipseStatisticsCase.h"
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimEclipseCaseCollection, "ResInsightAnalysisModels");
|
||||
@ -73,7 +76,7 @@ RimIdenticalGridCaseGroup* RimEclipseCaseCollection::createIdenticalCaseGroupFro
|
||||
{
|
||||
CVF_ASSERT(mainCase);
|
||||
|
||||
RigCaseData* rigEclipseCase = mainCase->reservoirData();
|
||||
RigEclipseCaseData* rigEclipseCase = mainCase->reservoirData();
|
||||
RigMainGrid* equalGrid = registerCaseInGridCollection(rigEclipseCase);
|
||||
CVF_ASSERT(equalGrid);
|
||||
|
||||
@ -98,7 +101,7 @@ void RimEclipseCaseCollection::moveEclipseCaseIntoCaseGroup(RimEclipseCase* rimR
|
||||
{
|
||||
CVF_ASSERT(rimReservoir);
|
||||
|
||||
RigCaseData* rigEclipseCase = rimReservoir->reservoirData();
|
||||
RigEclipseCaseData* rigEclipseCase = rimReservoir->reservoirData();
|
||||
RigMainGrid* equalGrid = registerCaseInGridCollection(rigEclipseCase);
|
||||
CVF_ASSERT(equalGrid);
|
||||
|
||||
@ -152,7 +155,7 @@ void RimEclipseCaseCollection::removeCaseFromAllGroups(RimEclipseCase* reservoir
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigMainGrid* RimEclipseCaseCollection::registerCaseInGridCollection(RigCaseData* rigEclipseCase)
|
||||
RigMainGrid* RimEclipseCaseCollection::registerCaseInGridCollection(RigEclipseCaseData* rigEclipseCase)
|
||||
{
|
||||
CVF_ASSERT(rigEclipseCase);
|
||||
|
||||
@ -185,7 +188,7 @@ void RimEclipseCaseCollection::insertCaseInCaseGroup(RimIdenticalGridCaseGroup*
|
||||
{
|
||||
CVF_ASSERT(rimReservoir);
|
||||
|
||||
RigCaseData* rigEclipseCase = rimReservoir->reservoirData();
|
||||
RigEclipseCaseData* rigEclipseCase = rimReservoir->reservoirData();
|
||||
registerCaseInGridCollection(rigEclipseCase);
|
||||
|
||||
caseGroup->addCase(rimReservoir);
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
#include "cvfObject.h"
|
||||
|
||||
class RigCaseData;
|
||||
class RigEclipseCaseData;
|
||||
class RigGridManager;
|
||||
class RigMainGrid;
|
||||
class RimEclipseCase;
|
||||
@ -59,6 +59,6 @@ public:
|
||||
void recomputeStatisticsForAllCaseGroups();
|
||||
|
||||
private:
|
||||
RigMainGrid* registerCaseInGridCollection(RigCaseData* rigEclipseCase);
|
||||
RigMainGrid* registerCaseInGridCollection(RigEclipseCaseData* rigEclipseCase);
|
||||
cvf::ref<RigGridManager> m_gridCollection;
|
||||
};
|
||||
|
@ -19,9 +19,6 @@
|
||||
|
||||
#include "RimEclipseFaultColors.h"
|
||||
|
||||
#include "RigCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
#include "RimEclipseView.h"
|
||||
|
@ -28,10 +28,12 @@
|
||||
#include "RifReaderMockModel.h"
|
||||
#include "RifReaderSettings.h"
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RimDefines.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RimDefines.h"
|
||||
#include "RimEclipseInputProperty.h"
|
||||
#include "RimEclipseInputPropertyCollection.h"
|
||||
#include "RimReservoirCellResultsStorage.h"
|
||||
@ -94,7 +96,7 @@ void RimEclipseInputCase::openDataFileSet(const QStringList& fileNames)
|
||||
|
||||
if (this->reservoirData() == NULL)
|
||||
{
|
||||
this->setReservoirData(new RigCaseData);
|
||||
this->setReservoirData(new RigEclipseCaseData);
|
||||
}
|
||||
|
||||
// First find and read the grid data
|
||||
@ -191,7 +193,7 @@ bool RimEclipseInputCase::openEclipseGridFile()
|
||||
readerInterface = new RifReaderEclipseInput;
|
||||
readerInterface->setReaderSetting(prefs->readerSettings());
|
||||
|
||||
cvf::ref<RigCaseData> eclipseCase = new RigCaseData;
|
||||
cvf::ref<RigEclipseCaseData> eclipseCase = new RigEclipseCaseData;
|
||||
if (!readerInterface->open(m_gridFileName, eclipseCase.p()))
|
||||
{
|
||||
return false;
|
||||
@ -333,7 +335,7 @@ void RimEclipseInputCase::loadAndSyncronizeInputProperties()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<RifReaderInterface> RimEclipseInputCase::createMockModel(QString modelName)
|
||||
{
|
||||
cvf::ref<RigCaseData> reservoir = new RigCaseData;
|
||||
cvf::ref<RigEclipseCaseData> reservoir = new RigEclipseCaseData;
|
||||
cvf::ref<RifReaderMockModel> mockFileInterface = new RifReaderMockModel;
|
||||
|
||||
if (modelName == RimDefines::mockModelBasicInputCase())
|
||||
|
@ -25,7 +25,8 @@
|
||||
#include "RifReaderSettings.h"
|
||||
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseInputProperty.h"
|
||||
@ -161,7 +162,7 @@ void RimEclipseInputCaseOpm::importEclipseGridAndProperties(const QString& fileN
|
||||
{
|
||||
if (this->reservoirData() == NULL)
|
||||
{
|
||||
this->setReservoirData(new RigCaseData);
|
||||
this->setReservoirData(new RigEclipseCaseData);
|
||||
|
||||
RifReaderOpmParserInput::importGridPropertiesFaults(fileName, reservoirData());
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "RimEclipseInputProperty.h"
|
||||
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
|
||||
#include "RimEclipseInputCase.h"
|
||||
#include "RimEclipseResultDefinition.h"
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "RimEclipsePropertyFilter.h"
|
||||
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigFormationNames.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
@ -353,7 +353,7 @@ void RimEclipsePropertyFilter::computeResultValueRange()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipsePropertyFilter::updateFilterName()
|
||||
{
|
||||
QString newFiltername = resultDefinition->resultVariable();
|
||||
QString newFiltername = resultDefinition->resultVariableUiName();
|
||||
|
||||
if (isCategorySelectionActive())
|
||||
{
|
||||
|
@ -28,7 +28,8 @@
|
||||
#include "RifReaderSettings.h"
|
||||
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RimMockModelSettings.h"
|
||||
#include "RimProject.h"
|
||||
@ -109,7 +110,7 @@ bool RimEclipseResultCase::openEclipseGridFile()
|
||||
readerInterface->setReaderSetting(prefs->readerSettings());
|
||||
readerInterface->setFilenamesWithFaults(this->filesContainingFaults());
|
||||
|
||||
cvf::ref<RigCaseData> eclipseCase = new RigCaseData;
|
||||
cvf::ref<RigEclipseCaseData> eclipseCase = new RigEclipseCaseData;
|
||||
if (!readerInterface->open(caseFileName(), eclipseCase.p()))
|
||||
{
|
||||
return false;
|
||||
@ -140,7 +141,7 @@ bool RimEclipseResultCase::openEclipseGridFile()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimEclipseResultCase::openAndReadActiveCellData(RigCaseData* mainEclipseCase)
|
||||
bool RimEclipseResultCase::openAndReadActiveCellData(RigEclipseCaseData* mainEclipseCase)
|
||||
{
|
||||
// Early exit if data is already read
|
||||
if (m_activeCellInfoIsReadFromFile) return true;
|
||||
@ -157,7 +158,7 @@ bool RimEclipseResultCase::openAndReadActiveCellData(RigCaseData* mainEclipseCas
|
||||
return false;
|
||||
}
|
||||
|
||||
cvf::ref<RigCaseData> eclipseCase = new RigCaseData;
|
||||
cvf::ref<RigEclipseCaseData> eclipseCase = new RigEclipseCaseData;
|
||||
|
||||
CVF_ASSERT(mainEclipseCase && mainEclipseCase->mainGrid());
|
||||
eclipseCase->setMainGrid(mainEclipseCase->mainGrid());
|
||||
@ -203,7 +204,7 @@ bool RimEclipseResultCase::openAndReadActiveCellData(RigCaseData* mainEclipseCas
|
||||
cvf::ref<RifReaderInterface> RimEclipseResultCase::createMockModel(QString modelName)
|
||||
{
|
||||
cvf::ref<RifReaderMockModel> mockFileInterface = new RifReaderMockModel;
|
||||
cvf::ref<RigCaseData> reservoir = new RigCaseData;
|
||||
cvf::ref<RigEclipseCaseData> reservoir = new RigEclipseCaseData;
|
||||
|
||||
if (modelName == RimDefines::mockModelBasic())
|
||||
{
|
||||
|
@ -44,7 +44,7 @@ public:
|
||||
void setCaseInfo(const QString& userDescription, const QString& caseFileName);
|
||||
|
||||
virtual bool openEclipseGridFile();
|
||||
bool openAndReadActiveCellData(RigCaseData* mainEclipseCase);
|
||||
bool openAndReadActiveCellData(RigEclipseCaseData* mainEclipseCase);
|
||||
void readGridDimensions(std::vector< std::vector<int> >& gridDimensions);
|
||||
|
||||
// Overrides from RimCase
|
||||
|
@ -20,8 +20,9 @@
|
||||
|
||||
#include "RimEclipseResultDefinition.h"
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
|
||||
#include "RimCellEdgeColors.h"
|
||||
#include "RimEclipseCase.h"
|
||||
@ -298,23 +299,23 @@ void RimEclipseResultDefinition::updateResultNameHasChanged()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly)
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> optionItems;
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
if ( m_resultTypeUiField() != RimDefines::FLOW_DIAGNOSTICS )
|
||||
{
|
||||
if ( fieldNeedingOptions == &m_resultVariableUiField )
|
||||
{
|
||||
optionItems = calcOptionsForVariableUiFieldStandard();
|
||||
options = calcOptionsForVariableUiFieldStandard();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( fieldNeedingOptions == &m_resultVariableUiField )
|
||||
{
|
||||
optionItems.push_back(caf::PdmOptionItemInfo("Time Of Flight (Average)", RIG_FLD_TOF_RESNAME));
|
||||
optionItems.push_back(caf::PdmOptionItemInfo("Tracer Cell Fraction (Sum)", RIG_FLD_CELL_FRACTION_RESNAME));
|
||||
optionItems.push_back(caf::PdmOptionItemInfo("Max Fraction Tracer", RIG_FLD_MAX_FRACTION_TRACER_RESNAME));
|
||||
optionItems.push_back(caf::PdmOptionItemInfo("Injector Producer Communication", RIG_FLD_COMMUNICATION_RESNAME));
|
||||
options.push_back(caf::PdmOptionItemInfo("Time Of Flight (Average)", RIG_FLD_TOF_RESNAME));
|
||||
options.push_back(caf::PdmOptionItemInfo("Tracer Cell Fraction (Sum)", RIG_FLD_CELL_FRACTION_RESNAME));
|
||||
options.push_back(caf::PdmOptionItemInfo("Max Fraction Tracer", RIG_FLD_MAX_FRACTION_TRACER_RESNAME));
|
||||
options.push_back(caf::PdmOptionItemInfo("Injector Producer Communication", RIG_FLD_COMMUNICATION_RESNAME));
|
||||
}
|
||||
else if (fieldNeedingOptions == &m_flowSolutionUiField)
|
||||
{
|
||||
@ -325,7 +326,7 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
|
||||
std::vector<RimFlowDiagSolution*> flowSols = eclCase->flowDiagSolutions();
|
||||
for (RimFlowDiagSolution* flowSol : flowSols)
|
||||
{
|
||||
optionItems.push_back(caf::PdmOptionItemInfo(flowSol->userDescription(), flowSol));
|
||||
options.push_back(caf::PdmOptionItemInfo(flowSol->userDescription(), flowSol));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -351,7 +352,7 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
|
||||
|
||||
for (auto nameIt: prefixedTracerNamesMap)
|
||||
{
|
||||
optionItems.push_back(caf::PdmOptionItemInfo(nameIt.first, QVariant(nameIt.second)));
|
||||
options.push_back(caf::PdmOptionItemInfo(nameIt.first, QVariant(nameIt.second)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -359,7 +360,7 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
|
||||
|
||||
(*useOptionsOnly) = true;
|
||||
|
||||
return optionItems;
|
||||
return options;
|
||||
}
|
||||
|
||||
|
||||
@ -515,6 +516,19 @@ RigFlowDiagResultAddress RimEclipseResultDefinition::flowDiagResAddress() const
|
||||
return RigFlowDiagResultAddress(m_resultVariable().toStdString(), selTracerNames);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimEclipseResultDefinition::resultVariableUiName()
|
||||
{
|
||||
if (resultType() == RimDefines::FLOW_DIAGNOSTICS)
|
||||
{
|
||||
return QString::fromStdString(flowDiagResAddress().uiText());
|
||||
}
|
||||
|
||||
return m_resultVariable();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -59,6 +59,8 @@ public:
|
||||
RimFlowDiagSolution* flowDiagSolution();
|
||||
RigFlowDiagResultAddress flowDiagResAddress() const;
|
||||
|
||||
QString resultVariableUiName();
|
||||
|
||||
void loadResult();
|
||||
size_t scalarResultIndex() const;
|
||||
bool hasStaticResult() const;
|
||||
|
@ -23,7 +23,8 @@
|
||||
#include "RicNewViewFeature.h"
|
||||
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigSingleWellResultsData.h"
|
||||
|
||||
#include "RimCaseCollection.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
@ -142,7 +143,7 @@ bool RimEclipseStatisticsCase::openEclipseGridFile()
|
||||
{
|
||||
if (this->reservoirData()) return true;
|
||||
|
||||
cvf::ref<RigCaseData> eclipseCase = new RigCaseData;
|
||||
cvf::ref<RigEclipseCaseData> eclipseCase = new RigEclipseCaseData;
|
||||
|
||||
CVF_ASSERT(parentStatisticsCaseCollection());
|
||||
|
||||
@ -227,7 +228,7 @@ void RimEclipseStatisticsCase::computeStatistics()
|
||||
timeStepIndices.push_back(i);
|
||||
}
|
||||
|
||||
RigCaseData* resultCase = reservoirData();
|
||||
RigEclipseCaseData* resultCase = reservoirData();
|
||||
|
||||
QList<RimEclipseStatisticsCaseEvaluator::ResSpec > resultSpecification;
|
||||
|
||||
@ -394,7 +395,7 @@ QList<caf::PdmOptionItemInfo> RimEclipseStatisticsCase::calculateValueOptions(co
|
||||
return options;
|
||||
}
|
||||
|
||||
RigCaseData* caseData = idgcg->mainCase()->reservoirData();
|
||||
RigEclipseCaseData* caseData = idgcg->mainCase()->reservoirData();
|
||||
|
||||
if (&m_selectedDynamicProperties == fieldNeedingOptions)
|
||||
{
|
||||
@ -715,7 +716,7 @@ void RimEclipseStatisticsCase::populateResultSelection()
|
||||
return;
|
||||
}
|
||||
|
||||
RigCaseData* caseData = idgcg->mainCase()->reservoirData();
|
||||
RigEclipseCaseData* caseData = idgcg->mainCase()->reservoirData();
|
||||
|
||||
if (m_selectedDynamicProperties().size() == 0)
|
||||
{
|
||||
|
@ -21,7 +21,8 @@
|
||||
#include "RimEclipseStatisticsCaseEvaluator.h"
|
||||
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigResultAccessorFactory.h"
|
||||
#include "RigResultModifier.h"
|
||||
#include "RigResultModifierFactory.h"
|
||||
@ -316,7 +317,7 @@ void RimEclipseStatisticsCaseEvaluator::evaluateForResults(const QList<ResSpec>&
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseStatisticsCaseEvaluator::RimEclipseStatisticsCaseEvaluator(const std::vector<RimEclipseCase*>& sourceCases, const std::vector<size_t>& timeStepIndices, const RimStatisticsConfig& statisticsConfig, RigCaseData* destinationCase, RimIdenticalGridCaseGroup* identicalGridCaseGroup)
|
||||
RimEclipseStatisticsCaseEvaluator::RimEclipseStatisticsCaseEvaluator(const std::vector<RimEclipseCase*>& sourceCases, const std::vector<size_t>& timeStepIndices, const RimStatisticsConfig& statisticsConfig, RigEclipseCaseData* destinationCase, RimIdenticalGridCaseGroup* identicalGridCaseGroup)
|
||||
: m_sourceCases(sourceCases),
|
||||
m_statisticsConfig(statisticsConfig),
|
||||
m_destinationCase(destinationCase),
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
|
||||
class RimEclipseCase;
|
||||
class RigCaseData;
|
||||
class RigEclipseCaseData;
|
||||
class RigCaseCellResultsData;
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@ public:
|
||||
RimEclipseStatisticsCaseEvaluator(const std::vector<RimEclipseCase*>& sourceCases,
|
||||
const std::vector<size_t>& timeStepIndices,
|
||||
const RimStatisticsConfig& statisticsConfig,
|
||||
RigCaseData* destinationCase,
|
||||
RigEclipseCaseData* destinationCase,
|
||||
RimIdenticalGridCaseGroup* identicalGridCaseGroup);
|
||||
|
||||
struct ResSpec
|
||||
@ -90,7 +90,7 @@ private:
|
||||
|
||||
size_t m_reservoirCellCount;
|
||||
RimStatisticsConfig m_statisticsConfig;
|
||||
RigCaseData* m_destinationCase;
|
||||
RigEclipseCaseData* m_destinationCase;
|
||||
RimIdenticalGridCaseGroup* m_identicalGridCaseGroup;
|
||||
bool m_useZeroAsInactiveCellValue;
|
||||
};
|
||||
|
@ -23,25 +23,30 @@
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigFlowDiagResults.h"
|
||||
#include "RigFormationNames.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigResultAccessor.h"
|
||||
#include "RigResultAccessorFactory.h"
|
||||
|
||||
#include "Rim3dOverlayInfoConfig.h"
|
||||
#include "RimCellEdgeColors.h"
|
||||
#include "RimCellRangeFilterCollection.h"
|
||||
#include "RimIntersection.h"
|
||||
#include "RimIntersectionCollection.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
#include "RimEclipseFaultColors.h"
|
||||
#include "RimEclipsePropertyFilterCollection.h"
|
||||
#include "RimEclipseResultDefinition.h"
|
||||
#include "RimEclipseWell.h"
|
||||
#include "RimEclipseWellCollection.h"
|
||||
#include "RimFaultCollection.h"
|
||||
#include "RimFlowDiagSolution.h"
|
||||
#include "RimGridCollection.h"
|
||||
#include "RimIntersection.h"
|
||||
#include "RimIntersectionCollection.h"
|
||||
#include "RimLegendConfig.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
@ -77,9 +82,6 @@
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <limits.h>
|
||||
#include "RimEclipseResultDefinition.h"
|
||||
#include "RimFlowDiagSolution.h"
|
||||
#include "RigFlowDiagResults.h"
|
||||
|
||||
|
||||
|
||||
@ -467,7 +469,7 @@ void RimEclipseView::createDisplayModel()
|
||||
*/
|
||||
// Well path model
|
||||
|
||||
RigMainGrid* mainGrid = eclipseCase()->reservoirData()->mainGrid();
|
||||
RigMainGrid* mainGrid = this->mainGrid();
|
||||
|
||||
m_wellPathPipeVizModel->removeAllParts();
|
||||
addWellPathsToModel(m_wellPathPipeVizModel.p(),
|
||||
@ -946,7 +948,7 @@ void RimEclipseView::updateLegends()
|
||||
return;
|
||||
}
|
||||
|
||||
RigCaseData* eclipseCase = m_reservoir->reservoirData();
|
||||
RigEclipseCaseData* eclipseCase = m_reservoir->reservoirData();
|
||||
CVF_ASSERT(eclipseCase);
|
||||
|
||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResult()->porosityModel());
|
||||
@ -1004,18 +1006,18 @@ void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel, R
|
||||
{
|
||||
double globalMin, globalMax;
|
||||
double globalPosClosestToZero, globalNegClosestToZero;
|
||||
RigFlowDiagResults* cellResultsData = resultColors->flowDiagSolution()->flowDiagResults();
|
||||
RigFlowDiagResults* flowResultsData = resultColors->flowDiagSolution()->flowDiagResults();
|
||||
RigFlowDiagResultAddress resAddr = resultColors->flowDiagResAddress();
|
||||
|
||||
cellResultsData->minMaxScalarValues(resAddr, m_currentTimeStep, &globalMin, &globalMax);
|
||||
cellResultsData->posNegClosestToZero(resAddr, m_currentTimeStep, &globalPosClosestToZero, &globalNegClosestToZero);
|
||||
flowResultsData->minMaxScalarValues(resAddr, m_currentTimeStep, &globalMin, &globalMax);
|
||||
flowResultsData->posNegClosestToZero(resAddr, m_currentTimeStep, &globalPosClosestToZero, &globalNegClosestToZero);
|
||||
|
||||
double localMin, localMax;
|
||||
double localPosClosestToZero, localNegClosestToZero;
|
||||
if ( resultColors->hasDynamicResult() )
|
||||
{
|
||||
cellResultsData->minMaxScalarValues(resAddr, m_currentTimeStep, &localMin, &localMax);
|
||||
cellResultsData->posNegClosestToZero(resAddr, m_currentTimeStep, &localPosClosestToZero, &localNegClosestToZero);
|
||||
flowResultsData->minMaxScalarValues(resAddr, m_currentTimeStep, &localMin, &localMax);
|
||||
flowResultsData->posNegClosestToZero(resAddr, m_currentTimeStep, &localPosClosestToZero, &localNegClosestToZero);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1028,6 +1030,7 @@ void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel, R
|
||||
|
||||
CVF_ASSERT(resultColors->legendConfig());
|
||||
|
||||
resultColors->legendConfig()->disableAllTimeStepsRange(true);
|
||||
resultColors->legendConfig()->setClosestToZeroValues(globalPosClosestToZero, globalNegClosestToZero, localPosClosestToZero, localNegClosestToZero);
|
||||
resultColors->legendConfig()->setAutomaticRanges(globalMin, globalMax, localMin, localMax);
|
||||
|
||||
@ -1036,10 +1039,7 @@ void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel, R
|
||||
resultColors->legendConfig()->setNamedCategories(resultColors->flowDiagSolution()->tracerNames());
|
||||
}
|
||||
|
||||
m_viewer->addColorLegendToBottomLeftCorner(resultColors->legendConfig()->legend());
|
||||
resultColors->legendConfig()->setTitle(cvfqt::Utils::toString(legendLabel + resultColors->resultVariable()));
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
double globalMin, globalMax;
|
||||
@ -1065,6 +1065,7 @@ void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel, R
|
||||
|
||||
CVF_ASSERT(resultColors->legendConfig());
|
||||
|
||||
resultColors->legendConfig()->disableAllTimeStepsRange(false);
|
||||
resultColors->legendConfig()->setClosestToZeroValues(globalPosClosestToZero, globalNegClosestToZero, localPosClosestToZero, localNegClosestToZero);
|
||||
resultColors->legendConfig()->setAutomaticRanges(globalMin, globalMax, localMin, localMax);
|
||||
|
||||
@ -1080,10 +1081,10 @@ void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel, R
|
||||
resultColors->legendConfig()->setNamedCategoriesInverse(fnVector);
|
||||
}
|
||||
}
|
||||
|
||||
m_viewer->addColorLegendToBottomLeftCorner(resultColors->legendConfig()->legend());
|
||||
resultColors->legendConfig()->setTitle(cvfqt::Utils::toString(legendLabel + resultColors->resultVariable()));
|
||||
}
|
||||
|
||||
m_viewer->addColorLegendToBottomLeftCorner(resultColors->legendConfig()->legend());
|
||||
resultColors->legendConfig()->setTitle(cvfqt::Utils::toString(legendLabel + resultColors->resultVariableUiName()));
|
||||
}
|
||||
|
||||
|
||||
@ -1162,7 +1163,7 @@ void RimEclipseView::setEclipseCase(RimEclipseCase* reservoir)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseCase* RimEclipseView::eclipseCase()
|
||||
RimEclipseCase* RimEclipseView::eclipseCase() const
|
||||
{
|
||||
return m_reservoir;
|
||||
}
|
||||
@ -1535,6 +1536,19 @@ RimCase* RimEclipseView::ownerCase()
|
||||
return eclipseCase();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigMainGrid* RimEclipseView::mainGrid() const
|
||||
{
|
||||
if (eclipseCase() && eclipseCase()->reservoirData())
|
||||
{
|
||||
return eclipseCase()->reservoirData()->mainGrid();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -1596,7 +1610,7 @@ void RimEclipseView::setOverridePropertyFilterCollection(RimEclipsePropertyFilte
|
||||
void RimEclipseView::calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility)
|
||||
{
|
||||
size_t gridCount = this->eclipseCase()->reservoirData()->gridCount();
|
||||
size_t cellCount = this->eclipseCase()->reservoirData()->mainGrid()->globalCellArray().size();
|
||||
size_t cellCount = this->mainGrid()->globalCellArray().size();
|
||||
|
||||
totalVisibility->resize(cellCount);
|
||||
totalVisibility->setAll(false);
|
||||
|
@ -40,6 +40,7 @@ class RigActiveCellInfo;
|
||||
class RigCaseCellResultsData;
|
||||
class RigGridBase;
|
||||
class RigGridCellFaceVisibilityFilter;
|
||||
class RigMainGrid;
|
||||
class Rim3dOverlayInfoConfig;
|
||||
class RimEclipseCase;
|
||||
class RimEclipseWell;
|
||||
@ -114,9 +115,11 @@ public:
|
||||
RimEclipseCellColors* currentFaultResultColors();
|
||||
|
||||
void setEclipseCase(RimEclipseCase* reservoir);
|
||||
RimEclipseCase* eclipseCase();
|
||||
RimEclipseCase* eclipseCase() const;
|
||||
virtual RimCase* ownerCase();
|
||||
|
||||
RigMainGrid* mainGrid() const;
|
||||
|
||||
void findGridIndexAndCellIndex(RimEclipseWell* eclipseWell, size_t branchIndex, size_t triangleIndex, size_t* gridIndex, size_t* cellIndex);
|
||||
|
||||
// Display model generation
|
||||
|
@ -31,7 +31,7 @@ RimExportInputSettings::RimExportInputSettings()
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&fileName, "Filename", "Export filename", "", "", "");
|
||||
fileName.uiCapability()->setUiEditorTypeName(caf::PdmUiFilePathEditor::uiEditorTypeName());
|
||||
CAF_PDM_InitFieldNoDefault(&eclipseKeyword, "Eclipse Keyword", "Keyword", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&eclipseKeyword, "Keyword", "Eclipse Keyword", "", "", "");
|
||||
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RigCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
@ -185,11 +185,11 @@ bool faultComparator(const cvf::ref<RigFault>& a, const cvf::ref<RigFault>& b)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFaultCollection::syncronizeFaults()
|
||||
{
|
||||
if (!(m_reservoirView && m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase()->reservoirData() && m_reservoirView->eclipseCase()->reservoirData()->mainGrid()) ) return;
|
||||
if (!(m_reservoirView && m_reservoirView->mainGrid()) ) return;
|
||||
|
||||
cvf::ref<cvf::Color3fArray> partColors = RivColorTableArray::colorTableArray();
|
||||
|
||||
const cvf::Collection<RigFault> constRigFaults = m_reservoirView->eclipseCase()->reservoirData()->mainGrid()->faults();
|
||||
const cvf::Collection<RigFault> constRigFaults = m_reservoirView->mainGrid()->faults();
|
||||
|
||||
cvf::Collection<RigFault> rigFaults;
|
||||
{
|
||||
@ -270,7 +270,7 @@ void RimFaultCollection::syncronizeFaults()
|
||||
// NNCs
|
||||
this->noCommonAreaNnncCollection()->noCommonAreaNncs().deleteAllChildObjects();
|
||||
|
||||
RigMainGrid* mainGrid = m_reservoirView->eclipseCase()->reservoirData()->mainGrid();
|
||||
RigMainGrid* mainGrid = m_reservoirView->mainGrid();
|
||||
std::vector<RigConnection>& nncConnections = mainGrid->nncData()->connections();
|
||||
for (size_t i = 0; i < nncConnections.size(); i++)
|
||||
{
|
||||
@ -397,7 +397,7 @@ void RimFaultCollection::setShowFaultsOutsideFilters(bool enableState)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFaultCollection::addMockData()
|
||||
{
|
||||
if (!(m_reservoirView && m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase()->reservoirData() && m_reservoirView->eclipseCase()->reservoirData()->mainGrid())) return;
|
||||
if (!(m_reservoirView && m_reservoirView->mainGrid())) return;
|
||||
|
||||
}
|
||||
|
||||
|
@ -17,11 +17,15 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimFlowDiagSolution.h"
|
||||
#include "RimEclipseResultCase.h"
|
||||
#include "RigCaseData.h"
|
||||
|
||||
#include "RigFlowDiagResults.h"
|
||||
#include "RimEclipseResultCase.h"
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigFlowDiagResults.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigSingleWellResultsData.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimFlowDiagSolution, "FlowDiagSolution");
|
||||
|
||||
|
@ -22,22 +22,26 @@
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigGridManager.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RimCaseCollection.h"
|
||||
#include "RimCellEdgeColors.h"
|
||||
#include "RimReservoirCellResultsStorage.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEclipseResultCase.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
#include "RimEclipseResultCase.h"
|
||||
#include "RimEclipseStatisticsCase.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimReservoirCellResultsStorage.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
#include "cafProgressInfo.h"
|
||||
#include "RiuMainWindow.h"
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <QDir>
|
||||
#include <QMessageBox>
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimIdenticalGridCaseGroup, "RimIdenticalGridCaseGroup");
|
||||
|
||||
@ -177,7 +181,7 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
|
||||
return;
|
||||
}
|
||||
|
||||
RigCaseData* rigCaseData = mainCase->reservoirData();
|
||||
RigEclipseCaseData* rigCaseData = mainCase->reservoirData();
|
||||
CVF_ASSERT(rigCaseData);
|
||||
|
||||
RifReaderInterface::PorosityModelResultType poroModel = RifReaderInterface::MATRIX_RESULTS;
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "RimEclipseWellCollection.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimTools.h"
|
||||
#include "RimView.h"
|
||||
#include "RimWellPath.h"
|
||||
|
||||
@ -235,21 +236,11 @@ QList<caf::PdmOptionItemInfo> RimIntersection::calculateValueOptions(const caf::
|
||||
|
||||
if (fieldNeedingOptions == &wellPath)
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
if (proj->activeOilField()->wellPathCollection())
|
||||
{
|
||||
caf::PdmChildArrayField<RimWellPath*>& wellPaths = proj->activeOilField()->wellPathCollection()->wellPaths;
|
||||
|
||||
QIcon wellIcon(":/Well.png");
|
||||
for (size_t i = 0; i < wellPaths.size(); i++)
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(wellPaths[i]->name(), QVariant::fromValue(caf::PdmPointer<caf::PdmObjectHandle>(wellPaths[i])), false, wellIcon));
|
||||
}
|
||||
}
|
||||
RimTools::wellPathOptionItems(&options);
|
||||
|
||||
if (options.size() == 0)
|
||||
if (options.size() > 0)
|
||||
{
|
||||
options.push_front(caf::PdmOptionItemInfo("None", QVariant::fromValue(caf::PdmPointer<caf::PdmObjectHandle>(NULL))));
|
||||
options.push_front(caf::PdmOptionItemInfo("None", nullptr));
|
||||
}
|
||||
}
|
||||
else if (fieldNeedingOptions == &simulationWell)
|
||||
@ -260,15 +251,15 @@ QList<caf::PdmOptionItemInfo> RimIntersection::calculateValueOptions(const caf::
|
||||
caf::PdmChildArrayField<RimEclipseWell*>& eclWells = coll->wells;
|
||||
|
||||
QIcon simWellIcon(":/Well.png");
|
||||
for (size_t i = 0; i < eclWells.size(); i++)
|
||||
for (RimEclipseWell* eclWell : eclWells)
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(eclWells[i]->name(), QVariant::fromValue(caf::PdmPointer<caf::PdmObjectHandle>(eclWells[i])), false, simWellIcon));
|
||||
options.push_back(caf::PdmOptionItemInfo(eclWell->name(), eclWell, false, simWellIcon));
|
||||
}
|
||||
}
|
||||
|
||||
if (options.size() == 0)
|
||||
{
|
||||
options.push_front(caf::PdmOptionItemInfo("None", QVariant::fromValue(caf::PdmPointer<caf::PdmObjectHandle>(NULL))));
|
||||
options.push_front(caf::PdmOptionItemInfo("None", nullptr));
|
||||
}
|
||||
}
|
||||
else if (fieldNeedingOptions == &m_branchIndex)
|
||||
|
@ -113,7 +113,8 @@ RimLegendConfig::RimLegendConfig()
|
||||
m_globalAutoPosClosestToZero(0),
|
||||
m_globalAutoNegClosestToZero(0),
|
||||
m_localAutoPosClosestToZero(0),
|
||||
m_localAutoNegClosestToZero(0)
|
||||
m_localAutoNegClosestToZero(0),
|
||||
m_isAllTimeStepsRangeDisabled(false)
|
||||
{
|
||||
CAF_PDM_InitObject("Legend Definition", ":/Legend.png", "", "");
|
||||
CAF_PDM_InitField(&m_numLevels, "NumberOfLevels", 8, "Number of levels", "", "A hint on how many tick marks you whish.","");
|
||||
@ -488,6 +489,21 @@ void RimLegendConfig::updateLegend()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimLegendConfig::disableAllTimeStepsRange(bool doDisable)
|
||||
{
|
||||
// If we enable AllTimesteps, and we have used current timestep, then "restore" the default
|
||||
if (m_isAllTimeStepsRangeDisabled && !doDisable && m_rangeMode == AUTOMATIC_CURRENT_TIMESTEP) m_rangeMode = AUTOMATIC_ALLTIMESTEPS;
|
||||
|
||||
m_isAllTimeStepsRangeDisabled = doDisable;
|
||||
|
||||
if (doDisable && m_rangeMode == AUTOMATIC_ALLTIMESTEPS) m_rangeMode = AUTOMATIC_CURRENT_TIMESTEP;
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -755,9 +771,9 @@ void RimLegendConfig::setNamedCategories(const std::vector<QString>& categoryNam
|
||||
std::vector<int> nameIndices;
|
||||
std::vector<cvf::String> names;
|
||||
|
||||
for ( int i = 0; i < categoryNames.size(); ++i )
|
||||
for ( size_t i = 0; i < categoryNames.size(); ++i )
|
||||
{
|
||||
nameIndices.push_back(i);
|
||||
nameIndices.push_back(static_cast<int>(i));
|
||||
names.push_back(cvfqt::Utils::toString(categoryNames[i]));
|
||||
}
|
||||
|
||||
@ -845,7 +861,7 @@ QList<caf::PdmOptionItemInfo> RimLegendConfig::calculateValueOptions(const caf::
|
||||
}
|
||||
}
|
||||
|
||||
QList<caf::PdmOptionItemInfo> optionList;
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
if (fieldNeedingOptions == &m_mappingMode)
|
||||
{
|
||||
@ -863,7 +879,7 @@ QList<caf::PdmOptionItemInfo> RimLegendConfig::calculateValueOptions(const caf::
|
||||
|
||||
for(MappingType mapType: mappingTypes)
|
||||
{
|
||||
optionList.push_back(caf::PdmOptionItemInfo(MappingEnum::uiText(mapType), mapType));
|
||||
options.push_back(caf::PdmOptionItemInfo(MappingEnum::uiText(mapType), mapType));
|
||||
}
|
||||
}
|
||||
else if (fieldNeedingOptions == &m_colorRangeMode)
|
||||
@ -887,10 +903,18 @@ QList<caf::PdmOptionItemInfo> RimLegendConfig::calculateValueOptions(const caf::
|
||||
|
||||
for(ColorRangesType colType: rangeTypes)
|
||||
{
|
||||
optionList.push_back(caf::PdmOptionItemInfo(ColorRangeEnum::uiText(colType), colType));
|
||||
options.push_back(caf::PdmOptionItemInfo(ColorRangeEnum::uiText(colType), colType));
|
||||
}
|
||||
}
|
||||
else if (fieldNeedingOptions == &m_rangeMode)
|
||||
{
|
||||
if (!m_isAllTimeStepsRangeDisabled) {
|
||||
options.push_back(caf::PdmOptionItemInfo(RangeModeEnum::uiText(RimLegendConfig::AUTOMATIC_ALLTIMESTEPS), RimLegendConfig::AUTOMATIC_ALLTIMESTEPS));
|
||||
}
|
||||
options.push_back(caf::PdmOptionItemInfo(RangeModeEnum::uiText(RimLegendConfig::AUTOMATIC_CURRENT_TIMESTEP), RimLegendConfig::AUTOMATIC_CURRENT_TIMESTEP));
|
||||
options.push_back(caf::PdmOptionItemInfo(RangeModeEnum::uiText(RimLegendConfig::USER_DEFINED), RimLegendConfig::USER_DEFINED));
|
||||
}
|
||||
|
||||
return optionList;
|
||||
return options;
|
||||
}
|
||||
|
||||
|
@ -101,6 +101,7 @@ public:
|
||||
ColorRangesType colorRangeMode() { return m_colorRangeMode();}
|
||||
void setMappingMode(MappingType mappingType);
|
||||
MappingType mappingMode() { return m_mappingMode();}
|
||||
void disableAllTimeStepsRange(bool doDisable);
|
||||
|
||||
void setAutomaticRanges(double globalMin, double globalMax, double localMin, double localMax);
|
||||
void setClosestToZeroValues(double globalPosClosestToZero, double globalNegClosestToZero, double localPosClosestToZero, double localNegClosestToZero);
|
||||
@ -150,6 +151,8 @@ private:
|
||||
double m_localAutoPosClosestToZero;
|
||||
double m_localAutoNegClosestToZero;
|
||||
|
||||
bool m_isAllTimeStepsRangeDisabled;
|
||||
|
||||
std::vector<int> m_categories;
|
||||
std::vector<cvf::String> m_categoryNames;
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimReservoirCellResultsStorage.h"
|
||||
#include "RimTools.h"
|
||||
#include "RimView.h"
|
||||
|
||||
#include "cafPdmPointer.h"
|
||||
@ -137,15 +138,7 @@ QList<caf::PdmOptionItemInfo> RimMultiSnapshotDefinition::calculateValueOptions(
|
||||
}
|
||||
else if (fieldNeedingOptions == &additionalCases)
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
std::vector<RimCase*> cases;
|
||||
proj->allCases(cases);
|
||||
|
||||
for (RimCase* rimCase : cases)
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(rimCase->caseUserDescription(), rimCase));
|
||||
}
|
||||
|
||||
RimTools::caseOptionItems(&options);
|
||||
}
|
||||
|
||||
if (useOptionsOnly) *useOptionsOnly = true;
|
||||
|
@ -23,7 +23,8 @@
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaVersionInfo.h"
|
||||
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigGridBase.h"
|
||||
|
||||
#include "RimCalcScript.h"
|
||||
#include "RimCase.h"
|
||||
@ -60,6 +61,8 @@
|
||||
#include "cafCmdFeatureManager.h"
|
||||
#include "cafPdmUiTreeOrdering.h"
|
||||
|
||||
#include "cvfBoundingBox.h"
|
||||
|
||||
#include <QDir>
|
||||
#include <QMenu>
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
class RigCaseData;
|
||||
class RigEclipseCaseData;
|
||||
class RigGridManager;
|
||||
class RigMainGrid;
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigCell.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
@ -1518,17 +1518,17 @@ double RimReservoirCellResultsStorage::darchysValue()
|
||||
|
||||
if (rimCase && rimCase->reservoirData())
|
||||
{
|
||||
RigCaseData::UnitsType unitsType = rimCase->reservoirData()->unitsType();
|
||||
RigEclipseCaseData::UnitsType unitsType = rimCase->reservoirData()->unitsType();
|
||||
|
||||
if (unitsType == RigCaseData::UNITS_FIELD)
|
||||
if (unitsType == RigEclipseCaseData::UNITS_FIELD)
|
||||
{
|
||||
darchy = 0.001127;
|
||||
}
|
||||
else if (unitsType == RigCaseData::UNITS_METRIC)
|
||||
else if (unitsType == RigEclipseCaseData::UNITS_METRIC)
|
||||
{
|
||||
darchy = 0.008527;
|
||||
}
|
||||
else if (unitsType == RigCaseData::UNITS_LAB)
|
||||
else if (unitsType == RigEclipseCaseData::UNITS_LAB)
|
||||
{
|
||||
darchy = 3.6;
|
||||
}
|
||||
|
@ -21,7 +21,15 @@
|
||||
#include "RimTools.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RimCase.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimWellLogFile.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "cafPdmUiItem.h"
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <QDir>
|
||||
@ -200,3 +208,45 @@ QString RimTools::relocateFile(const QString& orgFileName, const QString& orgNew
|
||||
|
||||
return fileName;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimTools::wellPathOptionItems(QList<caf::PdmOptionItemInfo>* options)
|
||||
{
|
||||
CVF_ASSERT(options);
|
||||
if (!options) return;
|
||||
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
if (proj && proj->activeOilField() && proj->activeOilField()->wellPathCollection())
|
||||
{
|
||||
caf::PdmChildArrayField<RimWellPath*>& wellPaths = proj->activeOilField()->wellPathCollection()->wellPaths;
|
||||
|
||||
QIcon wellIcon(":/Well.png");
|
||||
for (RimWellPath* wellPath : wellPaths)
|
||||
{
|
||||
options->push_back(caf::PdmOptionItemInfo(wellPath->name(), wellPath, false, wellIcon));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimTools::caseOptionItems(QList<caf::PdmOptionItemInfo>* options)
|
||||
{
|
||||
CVF_ASSERT(options);
|
||||
if (!options) return;
|
||||
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
if (proj)
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
proj->allCases(cases);
|
||||
|
||||
for (RimCase* c : cases)
|
||||
{
|
||||
options->push_back(caf::PdmOptionItemInfo(c->caseUserDescription(), c, false, c->uiIcon()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,14 +20,22 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace caf {
|
||||
class PdmOptionItemInfo;
|
||||
}
|
||||
|
||||
class RimTools
|
||||
{
|
||||
public:
|
||||
static QString getCacheRootDirectoryPathFromProject();
|
||||
|
||||
static QString relocateFile(const QString& fileName, const QString& newProjectPath, const QString& oldProjectPath, bool* foundFile, std::vector<QString>* searchedPaths);
|
||||
|
||||
static void wellPathOptionItems(QList<caf::PdmOptionItemInfo>* options);
|
||||
static void caseOptionItems(QList<caf::PdmOptionItemInfo>* options);
|
||||
};
|
||||
|
@ -3,8 +3,6 @@
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RigCaseData.h"
|
||||
|
||||
#include "Rim3dOverlayInfoConfig.h"
|
||||
#include "RimCellRangeFilterCollection.h"
|
||||
#include "RimEclipseCase.h"
|
||||
|
@ -21,11 +21,11 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RigCaseData.h"
|
||||
#include "RigCaseToCaseCellMapper.h"
|
||||
#include "RigCaseToCaseRangeFilterMapper.h"
|
||||
#include "RigFemPartCollection.h"
|
||||
#include "RigGeoMechCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RimCase.h"
|
||||
#include "RimCellRangeFilterCollection.h"
|
||||
@ -95,7 +95,7 @@ RimViewController::~RimViewController(void)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RimViewController::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly)
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> optionList;
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
if (fieldNeedingOptions == &m_managedView)
|
||||
{
|
||||
@ -109,35 +109,33 @@ QList<caf::PdmOptionItemInfo> RimViewController::calculateValueOptions(const caf
|
||||
views.push_back(this->managedView());
|
||||
}
|
||||
|
||||
RimViewLinker* linkedViews = NULL;
|
||||
this->firstAncestorOrThisOfType(linkedViews);
|
||||
RimViewLinker* viewLinker = nullptr;
|
||||
this->firstAncestorOrThisOfType(viewLinker);
|
||||
CVF_ASSERT(viewLinker);
|
||||
|
||||
for (size_t i = 0; i< views.size(); i++)
|
||||
for (RimView* view : views)
|
||||
{
|
||||
if (views[i] != linkedViews->masterView())
|
||||
if (view != viewLinker->masterView())
|
||||
{
|
||||
RimCase* rimCase = NULL;
|
||||
views[i]->firstAncestorOrThisOfType(rimCase);
|
||||
RimCase* rimCase = nullptr;
|
||||
view->firstAncestorOrThisOfType(rimCase);
|
||||
QIcon icon;
|
||||
if (rimCase)
|
||||
{
|
||||
icon = rimCase->uiCapability()->uiIcon();
|
||||
}
|
||||
|
||||
optionList.push_back(caf::PdmOptionItemInfo(RimViewLinker::displayNameForView(views[i]),
|
||||
QVariant::fromValue(caf::PdmPointer<caf::PdmObjectHandle>(views[i])),
|
||||
false,
|
||||
icon));
|
||||
options.push_back(caf::PdmOptionItemInfo(RimViewLinker::displayNameForView(view), view, false, icon));
|
||||
}
|
||||
}
|
||||
|
||||
if (optionList.size() > 0)
|
||||
if (options.size() > 0)
|
||||
{
|
||||
optionList.push_front(caf::PdmOptionItemInfo("None", QVariant::fromValue(caf::PdmPointer<caf::PdmObjectHandle>(NULL))));
|
||||
options.push_front(caf::PdmOptionItemInfo("None", nullptr));
|
||||
}
|
||||
}
|
||||
|
||||
return optionList;
|
||||
return options;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -572,14 +570,14 @@ const RigCaseToCaseCellMapper* RimViewController::cellMapper()
|
||||
RigFemPart* masterFemPart = NULL;
|
||||
RigFemPart* dependFemPart = NULL;
|
||||
|
||||
if (masterEclipseView && masterEclipseView->eclipseCase()->reservoirData())
|
||||
if (masterEclipseView)
|
||||
{
|
||||
masterEclGrid = masterEclipseView->eclipseCase()->reservoirData()->mainGrid();
|
||||
masterEclGrid = masterEclipseView->mainGrid();
|
||||
}
|
||||
|
||||
if (dependEclipseView && dependEclipseView->eclipseCase()->reservoirData())
|
||||
if (dependEclipseView)
|
||||
{
|
||||
dependEclGrid = dependEclipseView->eclipseCase()->reservoirData()->mainGrid();
|
||||
dependEclGrid = dependEclipseView->mainGrid();
|
||||
}
|
||||
|
||||
if (masterGeomechView && masterGeomechView->geoMechCase()->geoMechData()
|
||||
@ -858,7 +856,7 @@ bool RimViewController::isRangeFilterMappingApliccable() const
|
||||
{
|
||||
if (eclipseView->eclipseCase()->reservoirData() && geomView->geoMechCase() && geomView->geoMechCase()->geoMechData())
|
||||
{
|
||||
RigMainGrid* eclGrid = eclipseView->eclipseCase()->reservoirData()->mainGrid();
|
||||
RigMainGrid* eclGrid = eclipseView->mainGrid();
|
||||
RigFemPart* femPart = geomView->geoMechCase()->geoMechData()->femParts()->part(0);
|
||||
|
||||
if (eclGrid && femPart)
|
||||
@ -973,9 +971,9 @@ void RimViewController::updateRangeFilterOverrides(RimCellRangeFilter* changedRa
|
||||
|
||||
if (eclipseMasterView && depGeomView)
|
||||
{
|
||||
if (eclipseMasterView->eclipseCase()->reservoirData())
|
||||
if (eclipseMasterView->mainGrid())
|
||||
{
|
||||
RigMainGrid* srcEclGrid = eclipseMasterView->eclipseCase()->reservoirData()->mainGrid();
|
||||
RigMainGrid* srcEclGrid = eclipseMasterView->mainGrid();
|
||||
RigFemPart* dstFemPart = depGeomView->geoMechCase()->geoMechData()->femParts()->part(0);
|
||||
for (size_t rfIdx = 0; rfIdx < sourceFilterCollection->rangeFilters().size(); ++rfIdx)
|
||||
{
|
||||
@ -988,10 +986,10 @@ void RimViewController::updateRangeFilterOverrides(RimCellRangeFilter* changedRa
|
||||
}
|
||||
else if (geoMasterView && depEclView)
|
||||
{
|
||||
if (depEclView->eclipseCase()->reservoirData())
|
||||
if (depEclView->mainGrid())
|
||||
{
|
||||
RigFemPart* srcFemPart = geoMasterView->geoMechCase()->geoMechData()->femParts()->part(0);
|
||||
RigMainGrid* dstEclGrid = depEclView->eclipseCase()->reservoirData()->mainGrid();
|
||||
RigMainGrid* dstEclGrid = depEclView->mainGrid();
|
||||
for (size_t rfIdx = 0; rfIdx < sourceFilterCollection->rangeFilters().size(); ++rfIdx)
|
||||
{
|
||||
RimCellRangeFilter* srcRFilter = sourceFilterCollection->rangeFilters[rfIdx];
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RigCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RimCase.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
@ -547,12 +547,9 @@ void RimViewLinker::updateCamera(RimView* sourceView)
|
||||
cvf::BoundingBox sourceSceneBB = sourceView->viewer()->currentScene()->boundingBox();
|
||||
|
||||
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>(sourceView);
|
||||
if (eclipseView
|
||||
&& eclipseView->eclipseCase()
|
||||
&& eclipseView->eclipseCase()->reservoirData()
|
||||
&& eclipseView->eclipseCase()->reservoirData()->mainGrid())
|
||||
if (eclipseView && eclipseView->mainGrid())
|
||||
{
|
||||
cvf::Vec3d offset = eclipseView->eclipseCase()->reservoirData()->mainGrid()->displayModelOffset();
|
||||
cvf::Vec3d offset = eclipseView->mainGrid()->displayModelOffset();
|
||||
offset.z() *= eclipseView->scaleZ();
|
||||
|
||||
sourceCamGlobalEye += offset;
|
||||
@ -578,12 +575,9 @@ void RimViewLinker::updateCamera(RimView* sourceView)
|
||||
cvf::BoundingBox destSceneBB = destinationViewer->currentScene()->boundingBox();
|
||||
|
||||
RimEclipseView* destEclipseView = dynamic_cast<RimEclipseView*>(destinationView);
|
||||
if (destEclipseView
|
||||
&& destEclipseView->eclipseCase()
|
||||
&& destEclipseView->eclipseCase()->reservoirData()
|
||||
&& destEclipseView->eclipseCase()->reservoirData()->mainGrid())
|
||||
if (destEclipseView && destEclipseView->mainGrid())
|
||||
{
|
||||
cvf::Vec3d destOffset = destEclipseView->eclipseCase()->reservoirData()->mainGrid()->displayModelOffset();
|
||||
cvf::Vec3d destOffset = destEclipseView->mainGrid()->displayModelOffset();
|
||||
destOffset.z() *= destEclipseView->scaleZ();
|
||||
|
||||
cvf::Vec3d destinationCamEye = sourceCamGlobalEye - destOffset;
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigEclipseWellLogExtractor.h"
|
||||
#include "RigFemPartResultsCollection.h"
|
||||
#include "RigGeoMechCaseData.h"
|
||||
@ -38,6 +38,7 @@
|
||||
#include "RimGeoMechView.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimTools.h"
|
||||
#include "RimWellLogCurve.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellLogPlotCollection.h"
|
||||
@ -49,6 +50,7 @@
|
||||
#include "RiuWellLogTrack.h"
|
||||
|
||||
#include "cafPdmUiTreeOrdering.h"
|
||||
#include "cafUtils.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
@ -258,8 +260,8 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate()
|
||||
eclExtractor->curveData(resAcc.p(), &values);
|
||||
}
|
||||
|
||||
RigCaseData::UnitsType eclipseUnitsType = eclipseCase->reservoirData()->unitsType();
|
||||
if (eclipseUnitsType == RigCaseData::UNITS_FIELD)
|
||||
RigEclipseCaseData::UnitsType eclipseUnitsType = eclipseCase->reservoirData()->unitsType();
|
||||
if (eclipseUnitsType == RigEclipseCaseData::UNITS_FIELD)
|
||||
{
|
||||
// See https://github.com/OPM/ResInsight/issues/538
|
||||
|
||||
@ -322,44 +324,27 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RimWellLogExtractionCurve::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly)
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> optionList;
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
optionList = RimWellLogCurve::calculateValueOptions(fieldNeedingOptions, useOptionsOnly);
|
||||
if (optionList.size() > 0) return optionList;
|
||||
options = RimWellLogCurve::calculateValueOptions(fieldNeedingOptions, useOptionsOnly);
|
||||
if (options.size() > 0) return options;
|
||||
|
||||
if (fieldNeedingOptions == &m_wellPath)
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
if (proj->activeOilField()->wellPathCollection())
|
||||
RimTools::wellPathOptionItems(&options);
|
||||
|
||||
if (options.size() > 0)
|
||||
{
|
||||
caf::PdmChildArrayField<RimWellPath*>& wellPaths = proj->activeOilField()->wellPathCollection()->wellPaths;
|
||||
|
||||
for (size_t i = 0; i< wellPaths.size(); i++)
|
||||
{
|
||||
optionList.push_back(caf::PdmOptionItemInfo(wellPaths[i]->name(), QVariant::fromValue(caf::PdmPointer<caf::PdmObjectHandle>(wellPaths[i]))));
|
||||
}
|
||||
|
||||
if (optionList.size() > 0)
|
||||
{
|
||||
optionList.push_front(caf::PdmOptionItemInfo("None", QVariant::fromValue(caf::PdmPointer<caf::PdmObjectHandle>(NULL))));
|
||||
}
|
||||
options.push_front(caf::PdmOptionItemInfo("None", nullptr));
|
||||
}
|
||||
}
|
||||
else if (fieldNeedingOptions == &m_case)
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
std::vector<RimCase*> cases;
|
||||
RimTools::caseOptionItems(&options);
|
||||
|
||||
proj->allCases(cases);
|
||||
|
||||
for (size_t i = 0; i< cases.size(); i++)
|
||||
if (options.size() > 0)
|
||||
{
|
||||
optionList.push_back(caf::PdmOptionItemInfo(cases[i]->caseUserDescription(), QVariant::fromValue(caf::PdmPointer<caf::PdmObjectHandle>(cases[i]))));
|
||||
}
|
||||
|
||||
if (optionList.size() > 0)
|
||||
{
|
||||
optionList.push_front(caf::PdmOptionItemInfo("None", QVariant::fromValue(caf::PdmPointer<caf::PdmObjectHandle>(NULL))));
|
||||
options.push_front(caf::PdmOptionItemInfo("None", nullptr));
|
||||
}
|
||||
}
|
||||
else if (fieldNeedingOptions == &m_timeStep)
|
||||
@ -373,11 +358,11 @@ QList<caf::PdmOptionItemInfo> RimWellLogExtractionCurve::calculateValueOptions(c
|
||||
|
||||
for (int i = 0; i < timeStepNames.size(); i++)
|
||||
{
|
||||
optionList.push_back(caf::PdmOptionItemInfo(timeStepNames[i], i));
|
||||
options.push_back(caf::PdmOptionItemInfo(timeStepNames[i], i));
|
||||
}
|
||||
}
|
||||
|
||||
return optionList;
|
||||
return options;
|
||||
}
|
||||
|
||||
|
||||
@ -570,7 +555,7 @@ QString RimWellLogExtractionCurve::wellLogChannelName() const
|
||||
QString name;
|
||||
if (eclipseCase)
|
||||
{
|
||||
name = m_eclipseResultDefinition->resultVariable();
|
||||
name = caf::Utils::makeValidFileBasename( m_eclipseResultDefinition->resultVariableUiName());
|
||||
}
|
||||
else if (geoMechCase)
|
||||
{
|
||||
|
@ -196,10 +196,10 @@ void RimWellLogFileCurve::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrd
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RimWellLogFileCurve::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly)
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> optionList;
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
optionList = RimWellLogCurve::calculateValueOptions(fieldNeedingOptions, useOptionsOnly);
|
||||
if (optionList.size() > 0) return optionList;
|
||||
options = RimWellLogCurve::calculateValueOptions(fieldNeedingOptions, useOptionsOnly);
|
||||
if (options.size() > 0) return options;
|
||||
|
||||
if (fieldNeedingOptions == &m_wellPath)
|
||||
{
|
||||
@ -210,15 +210,16 @@ QList<caf::PdmOptionItemInfo> RimWellLogFileCurve::calculateValueOptions(const c
|
||||
|
||||
for (size_t i = 0; i < wellPaths.size(); i++)
|
||||
{
|
||||
// Only include well paths coming from a well log file
|
||||
if (wellPaths[i]->m_wellLogFile())
|
||||
{
|
||||
optionList.push_back(caf::PdmOptionItemInfo(wellPaths[i]->name(), QVariant::fromValue(caf::PdmPointer<caf::PdmObjectHandle>(wellPaths[i]))));
|
||||
options.push_back(caf::PdmOptionItemInfo(wellPaths[i]->name(), wellPaths[i]));
|
||||
}
|
||||
}
|
||||
|
||||
if (optionList.size() > 0)
|
||||
if (options.size() > 0)
|
||||
{
|
||||
optionList.push_front(caf::PdmOptionItemInfo("None", QVariant::fromValue(caf::PdmPointer<caf::PdmObjectHandle>(NULL))));
|
||||
options.push_front(caf::PdmOptionItemInfo("None", nullptr));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -235,18 +236,18 @@ QList<caf::PdmOptionItemInfo> RimWellLogFileCurve::calculateValueOptions(const c
|
||||
for (size_t i = 0; i < fileLogs->size(); i++)
|
||||
{
|
||||
QString wellLogChannelName = (*fileLogs)[i]->name();
|
||||
optionList.push_back(caf::PdmOptionItemInfo(wellLogChannelName, wellLogChannelName));
|
||||
options.push_back(caf::PdmOptionItemInfo(wellLogChannelName, wellLogChannelName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (optionList.size() == 0)
|
||||
if (options.size() == 0)
|
||||
{
|
||||
optionList.push_back(caf::PdmOptionItemInfo("None", "None"));
|
||||
options.push_back(caf::PdmOptionItemInfo("None", "None"));
|
||||
}
|
||||
}
|
||||
|
||||
return optionList;
|
||||
return options;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
#include "RimWellLogPlotCollection.h"
|
||||
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseWellLogExtractor.h"
|
||||
#include "RigGeoMechCaseData.h"
|
||||
#include "RigGeoMechWellLogExtractor.h"
|
||||
@ -63,7 +62,7 @@ RigEclipseWellLogExtractor* RimWellLogPlotCollection::findOrCreateExtractor(RimW
|
||||
return NULL;
|
||||
}
|
||||
|
||||
RigCaseData* eclCaseData = eclCase->reservoirData();
|
||||
RigEclipseCaseData* eclCaseData = eclCase->reservoirData();
|
||||
RigWellPath* wellPathGeom = wellPath->wellPathGeometry();
|
||||
for (size_t exIdx = 0; exIdx < m_extractors.size(); ++exIdx)
|
||||
{
|
||||
@ -132,7 +131,7 @@ void RimWellLogPlotCollection::removeExtractors(const RigWellPath* wellPath)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogPlotCollection::removeExtractors(const RigCaseData* caseData)
|
||||
void RimWellLogPlotCollection::removeExtractors(const RigEclipseCaseData* caseData)
|
||||
{
|
||||
for (int eIdx = (int) m_extractors.size() - 1; eIdx >= 0; eIdx--)
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ class RimWellLogPlot;
|
||||
class RigEclipseWellLogExtractor;
|
||||
class RigGeoMechWellLogExtractor;
|
||||
class RimGeoMechCase;
|
||||
class RigCaseData;
|
||||
class RigEclipseCaseData;
|
||||
class RigGeoMechCaseData;
|
||||
class RigWellPath;
|
||||
class RimWellPath;
|
||||
@ -50,7 +50,7 @@ public:
|
||||
RigGeoMechWellLogExtractor* findOrCreateExtractor(RimWellPath* wellPath, RimGeoMechCase* eclCase);
|
||||
|
||||
void removeExtractors(const RigWellPath* wellPath);
|
||||
void removeExtractors(const RigCaseData* caseData);
|
||||
void removeExtractors(const RigEclipseCaseData* caseData);
|
||||
void removeExtractors(const RigGeoMechCaseData* caseData);
|
||||
|
||||
caf::PdmChildArrayField<RimWellLogPlot*> wellLogPlots;
|
||||
|
@ -295,8 +295,8 @@ RimDefines::PlotAxis RimSummaryCurve::yAxis() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RimSummaryCurve::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly)
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> optionList = this->RimPlotCurve::calculateValueOptions(fieldNeedingOptions,useOptionsOnly);
|
||||
if (!optionList.isEmpty()) return optionList;
|
||||
QList<caf::PdmOptionItemInfo> options = this->RimPlotCurve::calculateValueOptions(fieldNeedingOptions,useOptionsOnly);
|
||||
if (!options.isEmpty()) return options;
|
||||
|
||||
|
||||
if (fieldNeedingOptions == &m_summaryCase)
|
||||
@ -306,16 +306,14 @@ QList<caf::PdmOptionItemInfo> RimSummaryCurve::calculateValueOptions(const caf::
|
||||
|
||||
proj->allSummaryCases(cases);
|
||||
|
||||
for (size_t i = 0; i < cases.size(); i++)
|
||||
for (RimSummaryCase* rimCase : cases)
|
||||
{
|
||||
RimSummaryCase* rimCase = cases[i];
|
||||
|
||||
optionList.push_back(caf::PdmOptionItemInfo(rimCase->caseName(), QVariant::fromValue(caf::PdmPointer<caf::PdmObjectHandle>(rimCase))));
|
||||
options.push_back(caf::PdmOptionItemInfo(rimCase->caseName(), rimCase));
|
||||
}
|
||||
|
||||
if (optionList.size() > 0)
|
||||
if (options.size() > 0)
|
||||
{
|
||||
optionList.push_front(caf::PdmOptionItemInfo("None", QVariant::fromValue(caf::PdmPointer<caf::PdmObjectHandle>(NULL))));
|
||||
options.push_front(caf::PdmOptionItemInfo("None", nullptr));
|
||||
}
|
||||
}
|
||||
else if(fieldNeedingOptions == &m_uiFilterResultSelection)
|
||||
@ -339,16 +337,16 @@ QList<caf::PdmOptionItemInfo> RimSummaryCurve::calculateValueOptions(const caf::
|
||||
{
|
||||
std::string name = addrIntPair.first.uiText();
|
||||
QString s = QString::fromStdString(name);
|
||||
optionList.push_back(caf::PdmOptionItemInfo(s, addrIntPair.second));
|
||||
options.push_back(caf::PdmOptionItemInfo(s, addrIntPair.second));
|
||||
}
|
||||
}
|
||||
|
||||
optionList.push_front(caf::PdmOptionItemInfo(RimDefines::undefinedResultName(), addressCount));
|
||||
options.push_front(caf::PdmOptionItemInfo(RimDefines::undefinedResultName(), addressCount));
|
||||
|
||||
if(useOptionsOnly) *useOptionsOnly = true;
|
||||
}
|
||||
}
|
||||
return optionList;
|
||||
return options;
|
||||
|
||||
}
|
||||
|
||||
|
@ -155,7 +155,7 @@ void RimSummaryCurveFilter::createCurves(RimSummaryCase* summaryCase, const QStr
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RimSummaryCurveFilter::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly)
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> optionList;
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
if (fieldNeedingOptions == &m_selectedSummaryCases)
|
||||
{
|
||||
@ -164,11 +164,9 @@ QList<caf::PdmOptionItemInfo> RimSummaryCurveFilter::calculateValueOptions(const
|
||||
|
||||
proj->allSummaryCases(cases);
|
||||
|
||||
for (size_t i = 0; i < cases.size(); i++)
|
||||
for (RimSummaryCase* rimCase : cases)
|
||||
{
|
||||
RimSummaryCase* rimCase = cases[i];
|
||||
|
||||
optionList.push_back(caf::PdmOptionItemInfo(rimCase->caseName(), QVariant::fromValue(caf::PdmPointer<caf::PdmObjectHandle>(rimCase))));
|
||||
options.push_back(caf::PdmOptionItemInfo(rimCase->caseName(), rimCase));
|
||||
}
|
||||
}
|
||||
else if(fieldNeedingOptions == &m_uiFilterResultMultiSelection)
|
||||
@ -179,13 +177,13 @@ QList<caf::PdmOptionItemInfo> RimSummaryCurveFilter::calculateValueOptions(const
|
||||
{
|
||||
std::string name = address.uiText();
|
||||
QString s = QString::fromStdString(name);
|
||||
optionList.push_back(caf::PdmOptionItemInfo(s, QVariant::fromValue(address)));
|
||||
options.push_back(caf::PdmOptionItemInfo(s, QVariant::fromValue(address)));
|
||||
}
|
||||
}
|
||||
|
||||
if(useOptionsOnly) *useOptionsOnly = true;
|
||||
|
||||
return optionList;
|
||||
return options;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -7,7 +7,7 @@ endif()
|
||||
set (SOURCE_GROUP_HEADER_FILES
|
||||
${CEE_CURRENT_LIST_DIR}RigActiveCellInfo.h
|
||||
${CEE_CURRENT_LIST_DIR}RigCell.h
|
||||
${CEE_CURRENT_LIST_DIR}RigCaseData.h
|
||||
${CEE_CURRENT_LIST_DIR}RigEclipseCaseData.h
|
||||
${CEE_CURRENT_LIST_DIR}RigGridBase.h
|
||||
${CEE_CURRENT_LIST_DIR}RigGridManager.h
|
||||
${CEE_CURRENT_LIST_DIR}RigResultAccessor.h
|
||||
@ -56,7 +56,7 @@ ${CEE_CURRENT_LIST_DIR}RigTesselatorTools.h
|
||||
set (SOURCE_GROUP_SOURCE_FILES
|
||||
${CEE_CURRENT_LIST_DIR}RigActiveCellInfo.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RigCell.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RigCaseData.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RigEclipseCaseData.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RigGridBase.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RigGridManager.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RigResultAccessor.cpp
|
||||
@ -68,6 +68,7 @@ ${CEE_CURRENT_LIST_DIR}RigCombTransResultAccessor.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RigCombMultResultAccessor.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RigResultModifierFactory.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RigFormationNames.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RigFlowDiagResultAddress.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RigFlowDiagResults.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RigFlowDiagResultFrames.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RigFlowDiagSolverInterface.cpp
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include "RifReaderInterface.h"
|
||||
|
||||
#include "RimDefines.h"
|
||||
#include "RigStatisticsDataCache.h"
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
@ -33,6 +32,7 @@
|
||||
class RifReaderInterface;
|
||||
class RigMainGrid;
|
||||
class RigActiveCellInfo;
|
||||
class RigStatisticsDataCache;
|
||||
|
||||
//==================================================================================================
|
||||
/// Class containing the results for the complete number of active cells. Both main grid and LGR's
|
||||
|
@ -18,19 +18,21 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigFormationNames.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigResultAccessorFactory.h"
|
||||
#include "RigSingleWellResultsData.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigCaseData::RigCaseData()
|
||||
RigEclipseCaseData::RigEclipseCaseData()
|
||||
{
|
||||
m_mainGrid = new RigMainGrid();
|
||||
|
||||
@ -49,7 +51,7 @@ RigCaseData::RigCaseData()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigCaseData::~RigCaseData()
|
||||
RigEclipseCaseData::~RigEclipseCaseData()
|
||||
{
|
||||
|
||||
}
|
||||
@ -57,7 +59,23 @@ RigCaseData::~RigCaseData()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigCaseData::setMainGrid(RigMainGrid* mainGrid)
|
||||
RigMainGrid* RigEclipseCaseData::mainGrid()
|
||||
{
|
||||
return m_mainGrid.p();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigMainGrid* RigEclipseCaseData::mainGrid() const
|
||||
{
|
||||
return m_mainGrid.p();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigEclipseCaseData::setMainGrid(RigMainGrid* mainGrid)
|
||||
{
|
||||
m_mainGrid = mainGrid;
|
||||
|
||||
@ -68,7 +86,7 @@ void RigCaseData::setMainGrid(RigMainGrid* mainGrid)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigCaseData::allGrids(std::vector<RigGridBase*>* grids)
|
||||
void RigEclipseCaseData::allGrids(std::vector<RigGridBase*>* grids)
|
||||
{
|
||||
CVF_ASSERT(grids);
|
||||
|
||||
@ -87,7 +105,7 @@ void RigCaseData::allGrids(std::vector<RigGridBase*>* grids)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigCaseData::allGrids(std::vector<const RigGridBase*>* grids) const
|
||||
void RigEclipseCaseData::allGrids(std::vector<const RigGridBase*>* grids) const
|
||||
{
|
||||
CVF_ASSERT(grids);
|
||||
|
||||
@ -106,7 +124,7 @@ void RigCaseData::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* RigCaseData::grid(size_t index) const
|
||||
const RigGridBase* RigEclipseCaseData::grid(size_t index) const
|
||||
{
|
||||
CVF_ASSERT(m_mainGrid.notNull());
|
||||
return m_mainGrid->gridByIndex(index);
|
||||
@ -116,7 +134,7 @@ const RigGridBase* RigCaseData::grid(size_t index) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Get grid by index. The main grid has index 0, so the first lgr has index 1
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigGridBase* RigCaseData::grid(size_t index)
|
||||
RigGridBase* RigEclipseCaseData::grid(size_t index)
|
||||
{
|
||||
CVF_ASSERT(m_mainGrid.notNull());
|
||||
return m_mainGrid->gridByIndex(index);
|
||||
@ -125,7 +143,7 @@ RigGridBase* RigCaseData::grid(size_t index)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RigCaseData::gridCount() const
|
||||
size_t RigEclipseCaseData::gridCount() const
|
||||
{
|
||||
CVF_ASSERT(m_mainGrid.notNull());
|
||||
return m_mainGrid->gridCount();
|
||||
@ -135,7 +153,7 @@ size_t RigCaseData::gridCount() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigCaseData::computeWellCellsPrGrid()
|
||||
void RigEclipseCaseData::computeWellCellsPrGrid()
|
||||
{
|
||||
// If we have computed this already, return
|
||||
if (m_wellCellsInGrid.size()) return;
|
||||
@ -235,7 +253,7 @@ void RigCaseData::computeWellCellsPrGrid()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigCaseData::setWellResults(const cvf::Collection<RigSingleWellResultsData>& data)
|
||||
void RigEclipseCaseData::setWellResults(const cvf::Collection<RigSingleWellResultsData>& data)
|
||||
{
|
||||
m_wellResults = data;
|
||||
m_wellCellsInGrid.clear();
|
||||
@ -247,7 +265,7 @@ void RigCaseData::setWellResults(const cvf::Collection<RigSingleWellResultsData>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const cvf::UByteArray* RigCaseData::wellCellsInGrid(size_t gridIndex)
|
||||
const cvf::UByteArray* RigEclipseCaseData::wellCellsInGrid(size_t gridIndex)
|
||||
{
|
||||
computeWellCellsPrGrid();
|
||||
CVF_ASSERT(gridIndex < m_wellCellsInGrid.size());
|
||||
@ -259,7 +277,7 @@ const cvf::UByteArray* RigCaseData::wellCellsInGrid(size_t gridIndex)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const cvf::UIntArray* RigCaseData::gridCellToResultWellIndex(size_t gridIndex)
|
||||
const cvf::UIntArray* RigEclipseCaseData::gridCellToResultWellIndex(size_t gridIndex)
|
||||
{
|
||||
computeWellCellsPrGrid();
|
||||
CVF_ASSERT(gridIndex < m_gridCellToResultWellIndex.size());
|
||||
@ -270,7 +288,7 @@ const cvf::UIntArray* RigCaseData::gridCellToResultWellIndex(size_t gridIndex)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigCell& RigCaseData::cellFromWellResultCell(const RigWellResultPoint& wellResultCell)
|
||||
RigCell& RigEclipseCaseData::cellFromWellResultCell(const RigWellResultPoint& wellResultCell)
|
||||
{
|
||||
CVF_ASSERT(wellResultCell.isCell());
|
||||
|
||||
@ -286,7 +304,7 @@ RigCell& RigCaseData::cellFromWellResultCell(const RigWellResultPoint& wellResul
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigCaseData::findSharedSourceFace(cvf::StructGridInterface::FaceType& sharedSourceFace,const RigWellResultPoint& sourceWellCellResult, const RigWellResultPoint& otherWellCellResult) const
|
||||
bool RigEclipseCaseData::findSharedSourceFace(cvf::StructGridInterface::FaceType& sharedSourceFace,const RigWellResultPoint& sourceWellCellResult, const RigWellResultPoint& otherWellCellResult) const
|
||||
{
|
||||
size_t gridIndex = sourceWellCellResult.m_gridIndex;
|
||||
size_t gridCellIndex = sourceWellCellResult.m_gridCellIndex;
|
||||
@ -362,7 +380,7 @@ public:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigCaseData::computeActiveCellIJKBBox()
|
||||
void RigEclipseCaseData::computeActiveCellIJKBBox()
|
||||
{
|
||||
if (m_mainGrid.notNull() && m_activeCellInfo.notNull() && m_fractureActiveCellInfo.notNull())
|
||||
{
|
||||
@ -393,7 +411,7 @@ void RigCaseData::computeActiveCellIJKBBox()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigCaseData::computeActiveCellBoundingBoxes()
|
||||
void RigEclipseCaseData::computeActiveCellBoundingBoxes()
|
||||
{
|
||||
computeActiveCellIJKBBox();
|
||||
computeActiveCellsGeometryBoundingBox();
|
||||
@ -402,7 +420,7 @@ void RigCaseData::computeActiveCellBoundingBoxes()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigActiveCellInfo* RigCaseData::activeCellInfo(RifReaderInterface::PorosityModelResultType porosityModel)
|
||||
RigActiveCellInfo* RigEclipseCaseData::activeCellInfo(RifReaderInterface::PorosityModelResultType porosityModel)
|
||||
{
|
||||
if (porosityModel == RifReaderInterface::MATRIX_RESULTS)
|
||||
{
|
||||
@ -415,7 +433,7 @@ RigActiveCellInfo* RigCaseData::activeCellInfo(RifReaderInterface::PorosityModel
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigActiveCellInfo* RigCaseData::activeCellInfo(RifReaderInterface::PorosityModelResultType porosityModel) const
|
||||
const RigActiveCellInfo* RigEclipseCaseData::activeCellInfo(RifReaderInterface::PorosityModelResultType porosityModel) const
|
||||
{
|
||||
if (porosityModel == RifReaderInterface::MATRIX_RESULTS)
|
||||
{
|
||||
@ -428,7 +446,7 @@ const RigActiveCellInfo* RigCaseData::activeCellInfo(RifReaderInterface::Porosit
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigCaseData::setActiveCellInfo(RifReaderInterface::PorosityModelResultType porosityModel, RigActiveCellInfo* activeCellInfo)
|
||||
void RigEclipseCaseData::setActiveCellInfo(RifReaderInterface::PorosityModelResultType porosityModel, RigActiveCellInfo* activeCellInfo)
|
||||
{
|
||||
if (porosityModel == RifReaderInterface::MATRIX_RESULTS)
|
||||
{
|
||||
@ -446,7 +464,7 @@ void RigCaseData::setActiveCellInfo(RifReaderInterface::PorosityModelResultType
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigCaseData::computeActiveCellsGeometryBoundingBox()
|
||||
void RigEclipseCaseData::computeActiveCellsGeometryBoundingBox()
|
||||
{
|
||||
if (m_activeCellInfo.isNull() || m_fractureActiveCellInfo.isNull())
|
||||
{
|
||||
@ -500,7 +518,7 @@ void RigCaseData::computeActiveCellsGeometryBoundingBox()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigCaseData::setActiveFormationNames(RigFormationNames* activeFormationNames)
|
||||
void RigEclipseCaseData::setActiveFormationNames(RigFormationNames* activeFormationNames)
|
||||
{
|
||||
m_activeFormationNamesData = activeFormationNames;
|
||||
|
||||
@ -564,7 +582,7 @@ void RigCaseData::setActiveFormationNames(RigFormationNames* activeFormationName
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigFormationNames* RigCaseData::activeFormationNames()
|
||||
RigFormationNames* RigEclipseCaseData::activeFormationNames()
|
||||
{
|
||||
return m_activeFormationNamesData.p();
|
||||
}
|
||||
@ -572,7 +590,7 @@ RigFormationNames* RigCaseData::activeFormationNames()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigCaseCellResultsData* RigCaseData::results(RifReaderInterface::PorosityModelResultType porosityModel)
|
||||
RigCaseCellResultsData* RigEclipseCaseData::results(RifReaderInterface::PorosityModelResultType porosityModel)
|
||||
{
|
||||
if (porosityModel == RifReaderInterface::MATRIX_RESULTS)
|
||||
{
|
||||
@ -585,7 +603,7 @@ RigCaseCellResultsData* RigCaseData::results(RifReaderInterface::PorosityModelRe
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigCaseCellResultsData* RigCaseData::results(RifReaderInterface::PorosityModelResultType porosityModel) const
|
||||
const RigCaseCellResultsData* RigEclipseCaseData::results(RifReaderInterface::PorosityModelResultType porosityModel) const
|
||||
{
|
||||
if (porosityModel == RifReaderInterface::MATRIX_RESULTS)
|
||||
{
|
@ -20,19 +20,31 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include "RigCell.h"
|
||||
#include "cvfVector3.h"
|
||||
|
||||
#include "RifReaderInterface.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
#include "cvfObject.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigSingleWellResultsData.h"
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "cvfVector3.h"
|
||||
#include "cvfStructGrid.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
class RigCaseCellResultsData;
|
||||
class RigFormationNames;
|
||||
class RigMainGrid;
|
||||
class RigGridBase;
|
||||
class RigCaseCellResultsData;
|
||||
class RigActiveCellInfo;
|
||||
class RigSingleWellResultsData;
|
||||
class RigCell;
|
||||
|
||||
class RigCaseData : public cvf::Object
|
||||
struct RigWellResultPoint;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class RigEclipseCaseData : public cvf::Object
|
||||
{
|
||||
public:
|
||||
enum UnitsType
|
||||
@ -43,11 +55,11 @@ public:
|
||||
};
|
||||
|
||||
public:
|
||||
RigCaseData();
|
||||
~RigCaseData();
|
||||
RigEclipseCaseData();
|
||||
~RigEclipseCaseData();
|
||||
|
||||
RigMainGrid* mainGrid() { return m_mainGrid.p(); }
|
||||
const RigMainGrid* mainGrid() const { return m_mainGrid.p(); }
|
||||
RigMainGrid* mainGrid();
|
||||
const RigMainGrid* mainGrid() const;
|
||||
void setMainGrid(RigMainGrid* mainGrid);
|
||||
|
||||
void allGrids(std::vector<RigGridBase*>* grids); // To be removed
|
||||
@ -84,6 +96,7 @@ private:
|
||||
void computeActiveCellIJKBBox();
|
||||
void computeWellCellsPrGrid();
|
||||
void computeActiveCellsGeometryBoundingBox();
|
||||
|
||||
private:
|
||||
cvf::ref<RigMainGrid> m_mainGrid;
|
||||
|
||||
@ -100,5 +113,4 @@ private:
|
||||
cvf::Collection<cvf::UIntArray> m_gridCellToResultWellIndex; //< Array pr grid with index to well pr cell telling which well a cell is in
|
||||
|
||||
UnitsType m_unitsType;
|
||||
|
||||
};
|
@ -19,7 +19,7 @@
|
||||
|
||||
#include "RigEclipseWellLogExtractor.h"
|
||||
#include <map>
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigWellPath.h"
|
||||
#include "RigResultAccessor.h"
|
||||
#include "cvfBoundingBox.h"
|
||||
@ -32,7 +32,7 @@
|
||||
///
|
||||
//==================================================================================================
|
||||
|
||||
RigEclipseWellLogExtractor::RigEclipseWellLogExtractor(const RigCaseData* aCase, const RigWellPath* wellpath, const std::string& wellCaseErrorMsgName)
|
||||
RigEclipseWellLogExtractor::RigEclipseWellLogExtractor(const RigEclipseCaseData* aCase, const RigWellPath* wellpath, const std::string& wellCaseErrorMsgName)
|
||||
: m_caseData(aCase), RigWellLogExtractor(wellpath, wellCaseErrorMsgName)
|
||||
{
|
||||
calculateIntersection();
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <vector>
|
||||
#include "cvfStructGrid.h"
|
||||
|
||||
class RigCaseData;
|
||||
class RigEclipseCaseData;
|
||||
class RigWellPath;
|
||||
class RigResultAccessor;
|
||||
|
||||
@ -43,14 +43,14 @@ namespace cvf {
|
||||
class RigEclipseWellLogExtractor : public RigWellLogExtractor
|
||||
{
|
||||
public:
|
||||
RigEclipseWellLogExtractor(const RigCaseData* aCase, const RigWellPath* wellpath, const std::string& wellCaseErrorMsgName);
|
||||
RigEclipseWellLogExtractor(const RigEclipseCaseData* aCase, const RigWellPath* wellpath, const std::string& wellCaseErrorMsgName);
|
||||
|
||||
void curveData(const RigResultAccessor* resultAccessor, std::vector<double>* values );
|
||||
const RigCaseData* caseData() { return m_caseData.p();}
|
||||
const RigEclipseCaseData* caseData() { return m_caseData.p();}
|
||||
|
||||
protected:
|
||||
void calculateIntersection();
|
||||
std::vector<size_t> findCloseCells(const cvf::BoundingBox& bb);
|
||||
|
||||
cvf::cref<RigCaseData> m_caseData;
|
||||
cvf::cref<RigEclipseCaseData> m_caseData;
|
||||
};
|
||||
|
@ -0,0 +1,47 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017- Statoil ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RigFlowDiagResultAddress.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigFlowDiagResultAddress::isNativeResult() const
|
||||
{
|
||||
return (((variableName == RIG_FLD_TOF_RESNAME) || (variableName == RIG_FLD_CELL_FRACTION_RESNAME)) && selectedTracerNames.size() <= 1);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::string RigFlowDiagResultAddress::uiText()
|
||||
{
|
||||
std::string uiVarname = variableName;
|
||||
|
||||
std::string uitext = uiVarname;
|
||||
uitext += " (";
|
||||
for (const std::string& tracerName : selectedTracerNames)
|
||||
{
|
||||
uitext += " " + tracerName;
|
||||
}
|
||||
uitext += " )";
|
||||
return uitext;
|
||||
}
|
||||
|
||||
|
@ -38,8 +38,9 @@ public:
|
||||
selectedTracerNames.insert(tracerName);
|
||||
}
|
||||
|
||||
bool isNativeResult() const { return ( ( (variableName == RIG_FLD_TOF_RESNAME) || (variableName == RIG_FLD_CELL_FRACTION_RESNAME) ) && selectedTracerNames.size() <= 1); }
|
||||
bool isNativeResult() const;
|
||||
|
||||
std::string uiText();
|
||||
std::string variableName;
|
||||
std::set<std::string> selectedTracerNames;
|
||||
|
||||
|
@ -17,13 +17,16 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RigFlowDiagResults.h"
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigFlowDiagSolverInterface.h"
|
||||
#include "RimFlowDiagSolution.h"
|
||||
#include "RimEclipseResultCase.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigFlowDiagStatCalc.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseResultCase.h"
|
||||
#include "RimFlowDiagSolution.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -160,164 +163,209 @@ std::vector<double>* RigFlowDiagResults::calculateDerivedResult(const RigFlowDia
|
||||
{
|
||||
if (resVarAddr.isNativeResult()) return nullptr;
|
||||
|
||||
size_t activeCellCount = this->activeCellInfo(resVarAddr)->reservoirActiveCellCount();
|
||||
|
||||
if (resVarAddr.variableName == RIG_FLD_TOF_RESNAME)
|
||||
{
|
||||
std::vector<const std::vector<double>* > injectorTOFs = findResultsForSelectedTracers(resVarAddr, frameIndex,
|
||||
RIG_FLD_TOF_RESNAME, RimFlowDiagSolution::INJECTOR);
|
||||
std::vector<const std::vector<double>* > injectorFractions = findResultsForSelectedTracers(resVarAddr, frameIndex,
|
||||
RIG_FLD_CELL_FRACTION_RESNAME, RimFlowDiagSolution::INJECTOR);
|
||||
|
||||
std::vector<const std::vector<double>* > producerTOFs = findResultsForSelectedTracers(resVarAddr, frameIndex,
|
||||
RIG_FLD_TOF_RESNAME, RimFlowDiagSolution::PRODUCER);
|
||||
std::vector<const std::vector<double>* > producerFractions = findResultsForSelectedTracers(resVarAddr, frameIndex,
|
||||
RIG_FLD_CELL_FRACTION_RESNAME, RimFlowDiagSolution::PRODUCER);
|
||||
|
||||
std::vector<double> injectorTotalFractions;
|
||||
std::vector<double> injectorFractMultTof;
|
||||
calculateSumOfFractionAndFractionMultTOF(activeCellCount, injectorFractions, injectorTOFs, &injectorTotalFractions, &injectorFractMultTof);
|
||||
|
||||
std::vector<double> producerTotalFractions;
|
||||
std::vector<double> producerFractMultTof;
|
||||
calculateSumOfFractionAndFractionMultTOF(activeCellCount, producerFractions, producerTOFs, &producerTotalFractions, &producerFractMultTof);
|
||||
|
||||
RigFlowDiagResultFrames* averageTofFrames = this->createScalarResult(resVarAddr);
|
||||
std::vector<double>& averageTof = averageTofFrames->frameData(frameIndex);
|
||||
averageTof.resize(activeCellCount, HUGE_VAL);
|
||||
|
||||
for (size_t acIdx = 0 ; acIdx < activeCellCount; ++acIdx)
|
||||
{
|
||||
if ( injectorTotalFractions[acIdx] == 0.0 && producerTotalFractions[acIdx] == 0.0 )
|
||||
{
|
||||
averageTof[acIdx] = HUGE_VAL;
|
||||
}
|
||||
else
|
||||
{
|
||||
double retVal = 0.0;
|
||||
if (injectorTotalFractions[acIdx] != 0.0) retVal += (1.0/injectorTotalFractions[acIdx]) * injectorFractMultTof[acIdx];
|
||||
if (producerTotalFractions[acIdx] != 0.0) retVal += (1.0/producerTotalFractions[acIdx]) * producerFractMultTof[acIdx];
|
||||
averageTof[acIdx] = retVal;
|
||||
}
|
||||
}
|
||||
|
||||
return &averageTof;
|
||||
return calculateAverageTOFResult(resVarAddr, frameIndex);
|
||||
}
|
||||
else if (resVarAddr.variableName == RIG_FLD_CELL_FRACTION_RESNAME)
|
||||
{
|
||||
std::vector<const std::vector<double>* > fractions = findResultsForSelectedTracers(resVarAddr,
|
||||
frameIndex,
|
||||
RIG_FLD_CELL_FRACTION_RESNAME,
|
||||
RimFlowDiagSolution::UNDEFINED);
|
||||
|
||||
RigFlowDiagResultFrames* sumOfFractionsFrames = this->createScalarResult(resVarAddr);
|
||||
std::vector<double>& sumOfFractions = sumOfFractionsFrames->frameData(frameIndex);
|
||||
|
||||
calculateSumOfFractions(fractions, activeCellCount, &sumOfFractions);
|
||||
|
||||
return &sumOfFractions;
|
||||
return calculateSumOfFractionsResult(resVarAddr, frameIndex);
|
||||
}
|
||||
else if ( resVarAddr.variableName == RIG_FLD_COMMUNICATION_RESNAME )
|
||||
{
|
||||
std::vector<const std::vector<double>* > injectorFractions = findResultsForSelectedTracers(resVarAddr,
|
||||
frameIndex,
|
||||
RIG_FLD_CELL_FRACTION_RESNAME,
|
||||
RimFlowDiagSolution::INJECTOR);
|
||||
std::vector<const std::vector<double>* > producerFractions = findResultsForSelectedTracers(resVarAddr,
|
||||
frameIndex,
|
||||
RIG_FLD_CELL_FRACTION_RESNAME,
|
||||
RimFlowDiagSolution::PRODUCER);
|
||||
|
||||
std::vector<double> sumOfInjectorFractions;
|
||||
calculateSumOfFractions(injectorFractions, activeCellCount, &sumOfInjectorFractions);
|
||||
|
||||
std::vector<double> sumOfProducerFractions;
|
||||
calculateSumOfFractions(producerFractions, activeCellCount, &sumOfProducerFractions);
|
||||
|
||||
RigFlowDiagResultFrames* commFrames = this->createScalarResult(resVarAddr);
|
||||
std::vector<double>& commPI = commFrames->frameData(frameIndex);
|
||||
commPI.resize(activeCellCount, HUGE_VAL);
|
||||
|
||||
for ( size_t acIdx = 0 ; acIdx < activeCellCount; ++acIdx )
|
||||
{
|
||||
if ( (sumOfInjectorFractions)[acIdx] == HUGE_VAL ) continue;
|
||||
if ( (sumOfProducerFractions)[acIdx] == HUGE_VAL ) continue;
|
||||
|
||||
(commPI)[acIdx] = (sumOfInjectorFractions)[acIdx] * (sumOfProducerFractions)[acIdx];
|
||||
}
|
||||
|
||||
return &commPI;
|
||||
return calculateCommunicationResult(resVarAddr, frameIndex);
|
||||
}
|
||||
else if ( resVarAddr.variableName == RIG_FLD_MAX_FRACTION_TRACER_RESNAME )
|
||||
{
|
||||
std::vector<int> selectedTracerIdxToGlobalTracerIdx;
|
||||
{
|
||||
selectedTracerIdxToGlobalTracerIdx.resize(resVarAddr.selectedTracerNames.size(), -1);
|
||||
|
||||
std::vector<QString> allTracerNames = m_flowDiagSolution->tracerNames();
|
||||
int selTracerIdx = 0;
|
||||
for ( const std::string& tracerName: resVarAddr.selectedTracerNames )
|
||||
{
|
||||
for ( int globIdx = 0; globIdx < allTracerNames.size(); ++globIdx )
|
||||
{
|
||||
if ( allTracerNames[globIdx].toStdString() == tracerName )
|
||||
{
|
||||
selectedTracerIdxToGlobalTracerIdx[selTracerIdx] = globIdx;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
++selTracerIdx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
RigFlowDiagResultFrames* maxFractionTracerIdxFrames = this->createScalarResult(resVarAddr);
|
||||
std::vector<double>& maxFractionTracerIdx = maxFractionTracerIdxFrames->frameData(frameIndex);
|
||||
{
|
||||
|
||||
std::vector<const std::vector<double>* > fractions = findResultsForSelectedTracers(resVarAddr,
|
||||
frameIndex,
|
||||
RIG_FLD_CELL_FRACTION_RESNAME,
|
||||
RimFlowDiagSolution::UNDEFINED);
|
||||
maxFractionTracerIdx.resize(activeCellCount, HUGE_VAL);
|
||||
|
||||
std::vector<double> maxFraction;
|
||||
maxFraction.resize(activeCellCount, -HUGE_VAL);
|
||||
|
||||
for ( size_t frIdx = 0; frIdx < fractions.size(); ++frIdx )
|
||||
{
|
||||
const std::vector<double> * fr = fractions[frIdx];
|
||||
|
||||
for ( size_t acIdx = 0 ; acIdx < activeCellCount; ++acIdx )
|
||||
{
|
||||
if ( (*fr)[acIdx] == HUGE_VAL) continue;
|
||||
|
||||
if ( maxFraction[acIdx] < (*fr)[acIdx] )
|
||||
{
|
||||
maxFraction[acIdx] = (*fr)[acIdx];
|
||||
maxFractionTracerIdx[acIdx] = frIdx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for ( size_t acIdx = 0 ; acIdx < activeCellCount; ++acIdx )
|
||||
{
|
||||
if (maxFractionTracerIdx[acIdx] == HUGE_VAL) continue;
|
||||
|
||||
double selectedTracerIdx = static_cast<int>( maxFractionTracerIdx[acIdx]);
|
||||
maxFractionTracerIdx[acIdx] = selectedTracerIdxToGlobalTracerIdx[selectedTracerIdx];
|
||||
}
|
||||
|
||||
return &maxFractionTracerIdx;
|
||||
return calculateTracerWithMaxFractionResult(resVarAddr, frameIndex);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
std::vector<const std::vector<double>* > RigFlowDiagResults::findResultsForSelectedTracers(const RigFlowDiagResultAddress& resVarAddr,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<double>* RigFlowDiagResults::calculateAverageTOFResult(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex)
|
||||
{
|
||||
std::vector<const std::vector<double>* > injectorTOFs = findResultsForSelectedTracers(resVarAddr, frameIndex,
|
||||
RIG_FLD_TOF_RESNAME, RimFlowDiagSolution::INJECTOR);
|
||||
std::vector<const std::vector<double>* > injectorFractions = findResultsForSelectedTracers(resVarAddr, frameIndex,
|
||||
RIG_FLD_CELL_FRACTION_RESNAME, RimFlowDiagSolution::INJECTOR);
|
||||
|
||||
std::vector<const std::vector<double>* > producerTOFs = findResultsForSelectedTracers(resVarAddr, frameIndex,
|
||||
RIG_FLD_TOF_RESNAME, RimFlowDiagSolution::PRODUCER);
|
||||
std::vector<const std::vector<double>* > producerFractions = findResultsForSelectedTracers(resVarAddr, frameIndex,
|
||||
RIG_FLD_CELL_FRACTION_RESNAME, RimFlowDiagSolution::PRODUCER);
|
||||
size_t activeCellCount = this->activeCellInfo(resVarAddr)->reservoirActiveCellCount();
|
||||
|
||||
std::vector<double> injectorTotalFractions;
|
||||
std::vector<double> injectorFractMultTof;
|
||||
calculateSumOfFractionAndFractionMultTOF(activeCellCount, injectorFractions, injectorTOFs, &injectorTotalFractions, &injectorFractMultTof);
|
||||
|
||||
std::vector<double> producerTotalFractions;
|
||||
std::vector<double> producerFractMultTof;
|
||||
calculateSumOfFractionAndFractionMultTOF(activeCellCount, producerFractions, producerTOFs, &producerTotalFractions, &producerFractMultTof);
|
||||
|
||||
RigFlowDiagResultFrames* averageTofFrames = this->createScalarResult(resVarAddr);
|
||||
std::vector<double>& averageTof = averageTofFrames->frameData(frameIndex);
|
||||
averageTof.resize(activeCellCount, HUGE_VAL);
|
||||
|
||||
for ( size_t acIdx = 0 ; acIdx < activeCellCount; ++acIdx )
|
||||
{
|
||||
if ( injectorTotalFractions[acIdx] == 0.0 && producerTotalFractions[acIdx] == 0.0 )
|
||||
{
|
||||
averageTof[acIdx] = HUGE_VAL;
|
||||
}
|
||||
else
|
||||
{
|
||||
double retVal = 0.0;
|
||||
if ( injectorTotalFractions[acIdx] != 0.0 ) retVal += (1.0/injectorTotalFractions[acIdx]) * injectorFractMultTof[acIdx];
|
||||
if ( producerTotalFractions[acIdx] != 0.0 ) retVal += (1.0/producerTotalFractions[acIdx]) * producerFractMultTof[acIdx];
|
||||
averageTof[acIdx] = retVal;
|
||||
}
|
||||
}
|
||||
|
||||
/// Test to remove all averaging
|
||||
// if (injectorTOFs.size()) averageTof = (*injectorTOFs[0]);
|
||||
|
||||
return &averageTof;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<double>* RigFlowDiagResults::calculateSumOfFractionsResult(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex)
|
||||
{
|
||||
std::vector<const std::vector<double>* > fractions = findResultsForSelectedTracers(resVarAddr,
|
||||
frameIndex,
|
||||
RIG_FLD_CELL_FRACTION_RESNAME,
|
||||
RimFlowDiagSolution::UNDEFINED);
|
||||
|
||||
RigFlowDiagResultFrames* sumOfFractionsFrames = this->createScalarResult(resVarAddr);
|
||||
std::vector<double>& sumOfFractions = sumOfFractionsFrames->frameData(frameIndex);
|
||||
|
||||
size_t activeCellCount = this->activeCellInfo(resVarAddr)->reservoirActiveCellCount();
|
||||
|
||||
calculateSumOfFractions(fractions, activeCellCount, &sumOfFractions);
|
||||
|
||||
return &sumOfFractions;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<double>* RigFlowDiagResults::calculateTracerWithMaxFractionResult(const RigFlowDiagResultAddress &resVarAddr, size_t frameIndex)
|
||||
{
|
||||
std::vector<int> selectedTracerIdxToGlobalTracerIdx;
|
||||
{
|
||||
selectedTracerIdxToGlobalTracerIdx.resize(resVarAddr.selectedTracerNames.size(), -1);
|
||||
|
||||
std::vector<QString> allTracerNames = m_flowDiagSolution->tracerNames();
|
||||
int selTracerIdx = 0;
|
||||
for ( const std::string& tracerName: resVarAddr.selectedTracerNames )
|
||||
{
|
||||
for ( size_t globIdx = 0; globIdx < allTracerNames.size(); ++globIdx )
|
||||
{
|
||||
if ( allTracerNames[globIdx].toStdString() == tracerName )
|
||||
{
|
||||
selectedTracerIdxToGlobalTracerIdx[selTracerIdx] = static_cast<int>(globIdx);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
++selTracerIdx;
|
||||
}
|
||||
}
|
||||
|
||||
size_t activeCellCount = this->activeCellInfo(resVarAddr)->reservoirActiveCellCount();
|
||||
|
||||
RigFlowDiagResultFrames* maxFractionTracerIdxFrames = this->createScalarResult(resVarAddr);
|
||||
std::vector<double>& maxFractionTracerIdx = maxFractionTracerIdxFrames->frameData(frameIndex);
|
||||
{
|
||||
|
||||
std::vector<const std::vector<double>* > fractions = findResultsForSelectedTracers(resVarAddr,
|
||||
frameIndex,
|
||||
RIG_FLD_CELL_FRACTION_RESNAME,
|
||||
RimFlowDiagSolution::UNDEFINED);
|
||||
maxFractionTracerIdx.resize(activeCellCount, HUGE_VAL);
|
||||
|
||||
std::vector<double> maxFraction;
|
||||
maxFraction.resize(activeCellCount, -HUGE_VAL);
|
||||
|
||||
for ( size_t frIdx = 0; frIdx < fractions.size(); ++frIdx )
|
||||
{
|
||||
const std::vector<double> * fr = fractions[frIdx];
|
||||
|
||||
for ( size_t acIdx = 0 ; acIdx < activeCellCount; ++acIdx )
|
||||
{
|
||||
if ( (*fr)[acIdx] == HUGE_VAL ) continue;
|
||||
|
||||
if ( maxFraction[acIdx] < (*fr)[acIdx] )
|
||||
{
|
||||
maxFraction[acIdx] = (*fr)[acIdx];
|
||||
maxFractionTracerIdx[acIdx] = frIdx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for ( size_t acIdx = 0 ; acIdx < activeCellCount; ++acIdx )
|
||||
{
|
||||
if ( maxFractionTracerIdx[acIdx] == HUGE_VAL ) continue;
|
||||
|
||||
double selectedTracerIdx = static_cast<int>(maxFractionTracerIdx[acIdx]);
|
||||
maxFractionTracerIdx[acIdx] = selectedTracerIdxToGlobalTracerIdx[selectedTracerIdx];
|
||||
}
|
||||
|
||||
return &maxFractionTracerIdx;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<double>* RigFlowDiagResults::calculateCommunicationResult(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex)
|
||||
{
|
||||
std::vector<const std::vector<double>* > injectorFractions = findResultsForSelectedTracers(resVarAddr,
|
||||
frameIndex,
|
||||
RIG_FLD_CELL_FRACTION_RESNAME,
|
||||
RimFlowDiagSolution::INJECTOR);
|
||||
std::vector<const std::vector<double>* > producerFractions = findResultsForSelectedTracers(resVarAddr,
|
||||
frameIndex,
|
||||
RIG_FLD_CELL_FRACTION_RESNAME,
|
||||
RimFlowDiagSolution::PRODUCER);
|
||||
size_t activeCellCount = this->activeCellInfo(resVarAddr)->reservoirActiveCellCount();
|
||||
|
||||
std::vector<double> sumOfInjectorFractions;
|
||||
calculateSumOfFractions(injectorFractions, activeCellCount, &sumOfInjectorFractions);
|
||||
|
||||
std::vector<double> sumOfProducerFractions;
|
||||
calculateSumOfFractions(producerFractions, activeCellCount, &sumOfProducerFractions);
|
||||
|
||||
RigFlowDiagResultFrames* commFrames = this->createScalarResult(resVarAddr);
|
||||
std::vector<double>& commPI = commFrames->frameData(frameIndex);
|
||||
commPI.resize(activeCellCount, HUGE_VAL);
|
||||
|
||||
for ( size_t acIdx = 0 ; acIdx < activeCellCount; ++acIdx )
|
||||
{
|
||||
if ( (sumOfInjectorFractions)[acIdx] == HUGE_VAL ) continue;
|
||||
if ( (sumOfProducerFractions)[acIdx] == HUGE_VAL ) continue;
|
||||
|
||||
(commPI)[acIdx] = (sumOfInjectorFractions)[acIdx] * (sumOfProducerFractions)[acIdx];
|
||||
}
|
||||
|
||||
return &commPI;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<const std::vector<double>* > RigFlowDiagResults::findResultsForSelectedTracers(const RigFlowDiagResultAddress& resVarAddr,
|
||||
size_t frameIndex,
|
||||
const std::string& nativeResultName,
|
||||
RimFlowDiagSolution::TracerStatusType wantedTracerType)
|
||||
|
@ -64,6 +64,14 @@ private:
|
||||
std::vector<double>* calculateDerivedResult(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex);
|
||||
|
||||
|
||||
|
||||
|
||||
std::vector<double>* calculateAverageTOFResult(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex);
|
||||
std::vector<double>* calculateSumOfFractionsResult(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex);
|
||||
std::vector<double>* calculateTracerWithMaxFractionResult(const RigFlowDiagResultAddress &resVarAddr, size_t frameIndex);
|
||||
std::vector<double>* calculateCommunicationResult(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex);
|
||||
|
||||
|
||||
std::vector<const std::vector<double>* > findResultsForSelectedTracers(const RigFlowDiagResultAddress& resVarAddr,
|
||||
size_t frameIndex,
|
||||
const std::string& nativeResultName,
|
||||
|
@ -17,15 +17,19 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RigFlowDiagSolverInterface.h"
|
||||
#include "RimFlowDiagSolution.h"
|
||||
#include "RimEclipseResultCase.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
|
||||
#include "RigFlowDiagInterfaceTools.h"
|
||||
#include "RifEclipseOutputFileTools.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RifReaderInterface.h"
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigFlowDiagInterfaceTools.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseResultCase.h"
|
||||
#include "RimFlowDiagSolution.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -38,45 +42,30 @@ RigFlowDiagTimeStepResult::RigFlowDiagTimeStepResult(size_t activeCellCount)
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigFlowDiagTimeStepResult::setInjectorTracerTOF(const std::string& tracerName, const std::map<int, double>& cellValues)
|
||||
{
|
||||
std::set<std::string> tracers;
|
||||
tracers.insert(tracerName);
|
||||
|
||||
this->addResult(RigFlowDiagResultAddress(RIG_FLD_TOF_RESNAME, tracers), cellValues);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigFlowDiagTimeStepResult::setInjectorTracerFraction(const std::string& tracerName, const std::map<int, double>& cellValues)
|
||||
void RigFlowDiagTimeStepResult::setTracerTOF(const std::string& tracerName, const std::map<int, double>& cellValues)
|
||||
{
|
||||
std::set<std::string> tracers;
|
||||
tracers.insert(tracerName);
|
||||
|
||||
RigFlowDiagResultAddress resAddr(RIG_FLD_TOF_RESNAME, tracers);
|
||||
|
||||
this->addResult(RigFlowDiagResultAddress(RIG_FLD_CELL_FRACTION_RESNAME, tracers), cellValues);
|
||||
this->addResult(resAddr, cellValues);
|
||||
|
||||
std::vector<double>& activeCellValues = m_nativeResults[resAddr];
|
||||
for (double & val: activeCellValues)
|
||||
{
|
||||
val = val * 1.15741e-5; // days pr second. Converting to days
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigFlowDiagTimeStepResult::setProducerTracerTOF(const std::string& tracerName, const std::map<int, double>& cellValues)
|
||||
{
|
||||
std::set<std::string> tracers;
|
||||
tracers.insert(tracerName);
|
||||
|
||||
this->addResult(RigFlowDiagResultAddress(RIG_FLD_TOF_RESNAME, tracers), cellValues);
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigFlowDiagTimeStepResult::setProducerTracerFraction(const std::string& tracerName, const std::map<int, double>& cellValues)
|
||||
void RigFlowDiagTimeStepResult::setTracerFraction(const std::string& tracerName, const std::map<int, double>& cellValues)
|
||||
{
|
||||
std::set<std::string> tracers;
|
||||
tracers.insert(tracerName);
|
||||
@ -98,13 +87,26 @@ void RigFlowDiagTimeStepResult::addResult(const RigFlowDiagResultAddress& resAdd
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class RigOpmFldStaticData : public cvf::Object
|
||||
{
|
||||
public:
|
||||
RigOpmFldStaticData(const std::string& grid, const std::string& init) : eclGraph(Opm::ECLGraph::load(grid, init)), m_hasUnifiedRestartFile(false) {}
|
||||
|
||||
Opm::ECLGraph eclGraph;
|
||||
std::unique_ptr<Opm::FlowDiagnostics::Toolbox> fldToolbox;
|
||||
bool m_hasUnifiedRestartFile;
|
||||
QStringList restartFileNames;
|
||||
};
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigFlowDiagSolverInterface::RigFlowDiagSolverInterface(RimEclipseResultCase * eclipseCase)
|
||||
: m_eclipseCase(eclipseCase)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -115,6 +117,7 @@ RigFlowDiagSolverInterface::~RigFlowDiagSolverInterface()
|
||||
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -126,86 +129,122 @@ RigFlowDiagTimeStepResult RigFlowDiagSolverInterface::calculate(size_t timeStepI
|
||||
|
||||
RigFlowDiagTimeStepResult result(m_eclipseCase->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->reservoirActiveCellCount());
|
||||
|
||||
// Get set of files
|
||||
QString gridFileName = m_eclipseCase->gridFileName();
|
||||
|
||||
QStringList m_filesWithSameBaseName;
|
||||
|
||||
if ( !RifEclipseOutputFileTools::findSiblingFilesWithSameBaseName(gridFileName, &m_filesWithSameBaseName) ) return result;
|
||||
|
||||
QString initFileName = RifEclipseOutputFileTools::firstFileNameOfType(m_filesWithSameBaseName, ECL_INIT_FILE);
|
||||
|
||||
Opm::ECLGraph graph = Opm::ECLGraph::load(gridFileName.toStdString(),
|
||||
initFileName.toStdString());
|
||||
|
||||
// Look for unified restart file
|
||||
QString restartFileName = RifEclipseOutputFileTools::firstFileNameOfType(m_filesWithSameBaseName, ECL_UNIFIED_RESTART_FILE);
|
||||
|
||||
if ( restartFileName.isEmpty() )
|
||||
if ( m_opmFldData.isNull() )
|
||||
{
|
||||
// Look for set of restart files (one file per time step)
|
||||
// Get set of files
|
||||
QString gridFileName = m_eclipseCase->gridFileName();
|
||||
|
||||
QStringList restartFileNames;
|
||||
restartFileNames = RifEclipseOutputFileTools::filterFileNamesOfType(m_filesWithSameBaseName, ECL_RESTART_FILE);
|
||||
QStringList m_filesWithSameBaseName;
|
||||
|
||||
size_t restartFileCount = static_cast<size_t>(restartFileNames.size());
|
||||
size_t maxTimeStepCount = m_eclipseCase->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->maxTimeStepCount();
|
||||
if ( !RifEclipseOutputFileTools::findSiblingFilesWithSameBaseName(gridFileName, &m_filesWithSameBaseName) ) return result;
|
||||
|
||||
if (restartFileCount <= timeStepIndex && restartFileCount != maxTimeStepCount )
|
||||
QString initFileName = RifEclipseOutputFileTools::firstFileNameOfType(m_filesWithSameBaseName, ECL_INIT_FILE);
|
||||
|
||||
m_opmFldData = new RigOpmFldStaticData(gridFileName.toStdString(),
|
||||
initFileName.toStdString());
|
||||
|
||||
const Opm::FlowDiagnostics::ConnectivityGraph connGraph =
|
||||
Opm::FlowDiagnostics::ConnectivityGraph{ static_cast<int>(m_opmFldData->eclGraph.numCells()),
|
||||
m_opmFldData->eclGraph.neighbours() };
|
||||
|
||||
// Create the Toolbox.
|
||||
|
||||
m_opmFldData->fldToolbox.reset(new Opm::FlowDiagnostics::Toolbox{ connGraph });
|
||||
m_opmFldData->fldToolbox->assignPoreVolume( m_opmFldData->eclGraph.poreVolume());
|
||||
|
||||
// Look for unified restart file
|
||||
|
||||
QString restartFileName = RifEclipseOutputFileTools::firstFileNameOfType(m_filesWithSameBaseName, ECL_UNIFIED_RESTART_FILE);
|
||||
if ( !restartFileName.isEmpty() )
|
||||
{
|
||||
QMessageBox::critical(nullptr, "ResInsight", "Flow Diagnostics: Could not find all the restart files. Results will not be loaded.");
|
||||
return result;
|
||||
m_opmFldData->eclGraph.assignFluxDataSource(restartFileName.toStdString());
|
||||
m_opmFldData->m_hasUnifiedRestartFile = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
restartFileNames.sort(); // To make sure they are sorted in increasing *.X000N order. Hack. Should probably be actual time stored on file.
|
||||
restartFileName = restartFileNames[static_cast<int>(timeStepIndex)];
|
||||
m_opmFldData->restartFileNames = RifEclipseOutputFileTools::filterFileNamesOfType(m_filesWithSameBaseName, ECL_RESTART_FILE);
|
||||
|
||||
size_t restartFileCount = static_cast<size_t>(m_opmFldData->restartFileNames.size());
|
||||
size_t maxTimeStepCount = m_eclipseCase->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->maxTimeStepCount();
|
||||
|
||||
if (restartFileCount <= timeStepIndex && restartFileCount != maxTimeStepCount )
|
||||
{
|
||||
QMessageBox::critical(nullptr, "ResInsight", "Flow Diagnostics: Could not find all the restart files. Results will not be loaded.");
|
||||
return result;
|
||||
}
|
||||
|
||||
m_opmFldData->restartFileNames.sort(); // To make sure they are sorted in increasing *.X000N order. Hack. Should probably be actual time stored on file.
|
||||
m_opmFldData->m_hasUnifiedRestartFile = false;
|
||||
}
|
||||
}
|
||||
|
||||
graph.assignFluxDataSource(restartFileName.toStdString());
|
||||
|
||||
if ( ! graph.selectReportStep(static_cast<int>(timeStepIndex)) )
|
||||
if ( ! m_opmFldData->m_hasUnifiedRestartFile )
|
||||
{
|
||||
QString restartFileName = m_opmFldData->restartFileNames[static_cast<int>(timeStepIndex)];
|
||||
m_opmFldData->eclGraph.assignFluxDataSource(restartFileName.toStdString());
|
||||
}
|
||||
|
||||
|
||||
if ( ! m_opmFldData->eclGraph.selectReportStep(static_cast<int>(timeStepIndex)) )
|
||||
{
|
||||
QMessageBox::critical(nullptr, "ResInsight", "Flow Diagnostics: Could not find the requested timestep in the result file. Results will not be loaded.");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
// Set up flow Toolbox with timestep data
|
||||
{
|
||||
Toolbox fdTool = RigFlowDiagInterfaceTools::initialiseFlowDiagnostics(graph);
|
||||
Opm::FlowDiagnostics::ConnectionValues connectionsVals = RigFlowDiagInterfaceTools::Hack::convert_flux_to_SI( RigFlowDiagInterfaceTools::extractFluxField(m_opmFldData->eclGraph));
|
||||
|
||||
m_opmFldData->fldToolbox->assignConnectionFlux(connectionsVals);
|
||||
|
||||
Opm::ECLWellSolution wsol = Opm::ECLWellSolution{};
|
||||
|
||||
const std::vector<Opm::ECLWellSolution::WellData> well_fluxes =
|
||||
wsol.solution(m_opmFldData->eclGraph.rawResultData(), m_opmFldData->eclGraph.numGrids());
|
||||
|
||||
m_opmFldData->fldToolbox->assignInflowFlux(RigFlowDiagInterfaceTools::extractWellFlows(m_opmFldData->eclGraph, well_fluxes));
|
||||
}
|
||||
|
||||
// Injection Solution
|
||||
{
|
||||
std::vector<CellSet> injectorCellSet;
|
||||
for ( const auto& tIt: injectorTracers )
|
||||
{
|
||||
std::vector<CellSet> injectorCellSet;
|
||||
for ( const auto& tIt: injectorTracers )
|
||||
{
|
||||
injectorCellSet.push_back(CellSet(CellSetID(tIt.first), tIt.second));
|
||||
}
|
||||
|
||||
Solution injSol = fdTool.computeInjectionDiagnostics(injectorCellSet).fd;
|
||||
|
||||
for ( const CellSetID& tracerId: injSol.startPoints() )
|
||||
{
|
||||
CellSetValues tofVals = injSol.timeOfFlight(tracerId);
|
||||
result.setInjectorTracerTOF(tracerId.to_string(), tofVals);
|
||||
CellSetValues fracVals = injSol.concentration(tracerId);
|
||||
result.setInjectorTracerFraction(tracerId.to_string(), fracVals);
|
||||
}
|
||||
injectorCellSet.push_back(CellSet(CellSetID(tIt.first), tIt.second));
|
||||
}
|
||||
|
||||
Solution injSol = m_opmFldData->fldToolbox->computeInjectionDiagnostics(injectorCellSet).fd;
|
||||
|
||||
for ( const CellSetID& tracerId: injSol.startPoints() )
|
||||
{
|
||||
std::vector<CellSet> prodjCellSet;
|
||||
for ( const auto& tIt: producerTracers )
|
||||
{
|
||||
prodjCellSet.push_back(CellSet(CellSetID(tIt.first), tIt.second));
|
||||
}
|
||||
Solution prodSol = fdTool.computeProductionDiagnostics(prodjCellSet).fd;
|
||||
for ( const CellSetID& tracerId: prodSol.startPoints() )
|
||||
{
|
||||
CellSetValues tofVals = prodSol.timeOfFlight(tracerId);
|
||||
result.setProducerTracerTOF(tracerId.to_string(), tofVals);
|
||||
CellSetValues fracVals = prodSol.concentration(tracerId);
|
||||
result.setInjectorTracerFraction(tracerId.to_string(), fracVals);
|
||||
}
|
||||
CellSetValues tofVals = injSol.timeOfFlight(tracerId);
|
||||
result.setTracerTOF(tracerId.to_string(), tofVals);
|
||||
CellSetValues fracVals = injSol.concentration(tracerId);
|
||||
result.setTracerFraction(tracerId.to_string(), fracVals);
|
||||
}
|
||||
}
|
||||
|
||||
// Producer Solution
|
||||
{
|
||||
std::vector<CellSet> prodjCellSet;
|
||||
for ( const auto& tIt: producerTracers )
|
||||
{
|
||||
prodjCellSet.push_back(CellSet(CellSetID(tIt.first), tIt.second));
|
||||
}
|
||||
|
||||
Solution prodSol = m_opmFldData->fldToolbox->computeProductionDiagnostics(prodjCellSet).fd;
|
||||
|
||||
for ( const CellSetID& tracerId: prodSol.startPoints() )
|
||||
{
|
||||
CellSetValues tofVals = prodSol.timeOfFlight(tracerId);
|
||||
result.setTracerTOF(tracerId.to_string(), tofVals);
|
||||
CellSetValues fracVals = prodSol.concentration(tracerId);
|
||||
result.setTracerFraction(tracerId.to_string(), fracVals);
|
||||
}
|
||||
}
|
||||
|
||||
return result; // Relying on implicit move constructor
|
||||
}
|
||||
|
@ -35,10 +35,8 @@ class RigFlowDiagTimeStepResult
|
||||
public:
|
||||
RigFlowDiagTimeStepResult(size_t activeCellCount);
|
||||
|
||||
void setInjectorTracerTOF (const std::string& tracerName, const std::map<int, double>& cellValues);
|
||||
void setInjectorTracerFraction(const std::string& tracerName, const std::map<int, double>& cellValues);
|
||||
void setProducerTracerTOF (const std::string& tracerName, const std::map<int, double>& cellValues);
|
||||
void setProducerTracerFraction(const std::string& tracerName, const std::map<int, double>& cellValues);
|
||||
void setTracerTOF (const std::string& tracerName, const std::map<int, double>& cellValues);
|
||||
void setTracerFraction(const std::string& tracerName, const std::map<int, double>& cellValues);
|
||||
|
||||
// Use to "steal" the data from this one using swap
|
||||
std::map<RigFlowDiagResultAddress, std::vector<double> >& nativeResults() { return m_nativeResults; }
|
||||
@ -51,7 +49,8 @@ private:
|
||||
};
|
||||
|
||||
|
||||
class RigCaseData;
|
||||
class RigEclipseCaseData;
|
||||
class RigOpmFldStaticData;
|
||||
|
||||
class RigFlowDiagSolverInterface : public cvf::Object
|
||||
{
|
||||
@ -66,6 +65,8 @@ public:
|
||||
private:
|
||||
RimEclipseResultCase * m_eclipseCase;
|
||||
|
||||
cvf::ref<RigOpmFldStaticData> m_opmFldData;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -17,14 +17,14 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RigGridManager.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigGridManager::addCase(RigCaseData* eclipseCase)
|
||||
void RigGridManager::addCase(RigEclipseCaseData* eclipseCase)
|
||||
{
|
||||
cvf::ref<CaseToGridMap> caseAndGrid = new CaseToGridMap(eclipseCase, eclipseCase->mainGrid());
|
||||
m_caseToGrid.push_back(caseAndGrid.p());
|
||||
@ -33,7 +33,7 @@ void RigGridManager::addCase(RigCaseData* eclipseCase)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigGridManager::removeCase(RigCaseData* eclipseCase)
|
||||
void RigGridManager::removeCase(RigEclipseCaseData* eclipseCase)
|
||||
{
|
||||
for (size_t i = 0; i < m_caseToGrid.size(); i++)
|
||||
{
|
||||
@ -121,7 +121,7 @@ bool RigGridManager::isGridDimensionsEqual(const std::vector< std::vector<int> >
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigGridManager::CaseToGridMap::CaseToGridMap(RigCaseData* eclipseCase, RigMainGrid* mainGrid) :
|
||||
RigGridManager::CaseToGridMap::CaseToGridMap(RigEclipseCaseData* eclipseCase, RigMainGrid* mainGrid) :
|
||||
m_eclipseCase(eclipseCase),
|
||||
m_mainGrid(mainGrid)
|
||||
{
|
||||
|
@ -25,14 +25,14 @@
|
||||
#include <vector>
|
||||
|
||||
class RigMainGrid;
|
||||
class RigCaseData;
|
||||
class RigEclipseCaseData;
|
||||
|
||||
class RigGridManager : public cvf::Object
|
||||
{
|
||||
public:
|
||||
void addCase(RigCaseData* eclipseCase);
|
||||
void addCase(RigEclipseCaseData* eclipseCase);
|
||||
|
||||
void removeCase(RigCaseData* eclipseCase);
|
||||
void removeCase(RigEclipseCaseData* eclipseCase);
|
||||
|
||||
RigMainGrid* findEqualGrid(RigMainGrid* candidateGrid);
|
||||
|
||||
@ -44,9 +44,9 @@ private:
|
||||
class CaseToGridMap : public cvf::Object
|
||||
{
|
||||
public:
|
||||
CaseToGridMap(RigCaseData* eclipseCase, RigMainGrid* mainGrid);
|
||||
CaseToGridMap(RigEclipseCaseData* eclipseCase, RigMainGrid* mainGrid);
|
||||
|
||||
RigCaseData* m_eclipseCase;
|
||||
RigEclipseCaseData* m_eclipseCase;
|
||||
RigMainGrid* m_mainGrid;
|
||||
};
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "RimWellLogCurve.h"
|
||||
#include "RimWellLogExtractionCurve.h"
|
||||
|
||||
#include "cafUtils.h"
|
||||
#include "cvfAssert.h"
|
||||
|
||||
#include "laswell.hpp"
|
||||
@ -146,41 +147,34 @@ public:
|
||||
|
||||
std::string generateFilename() const
|
||||
{
|
||||
QString f;
|
||||
QString fileBasenameCandidate;
|
||||
QString separator("-");
|
||||
|
||||
if (!m_wellName.isEmpty())
|
||||
{
|
||||
f += m_wellName;
|
||||
fileBasenameCandidate += m_wellName;
|
||||
}
|
||||
|
||||
if (!m_caseName.isEmpty())
|
||||
{
|
||||
if (!f.isEmpty()) f += separator;
|
||||
f += m_caseName;
|
||||
if (!fileBasenameCandidate.isEmpty()) fileBasenameCandidate += separator;
|
||||
fileBasenameCandidate += m_caseName;
|
||||
}
|
||||
|
||||
// Add property name if only one curve is exported
|
||||
if (m_logCurveData.size() == 1)
|
||||
{
|
||||
if (!f.isEmpty()) f += separator;
|
||||
f += QString::fromStdString(m_logCurveData[0].channelName());
|
||||
if (!fileBasenameCandidate.isEmpty()) fileBasenameCandidate += separator;
|
||||
fileBasenameCandidate += QString::fromStdString(m_logCurveData[0].channelName());
|
||||
}
|
||||
|
||||
if (!m_date.isEmpty())
|
||||
{
|
||||
if (!f.isEmpty()) f += separator;
|
||||
f += m_date;
|
||||
if (!fileBasenameCandidate.isEmpty()) fileBasenameCandidate += separator;
|
||||
fileBasenameCandidate += m_date;
|
||||
}
|
||||
|
||||
QString cleanFileName = f.trimmed();
|
||||
cleanFileName.replace(".", "_");
|
||||
cleanFileName.replace(",", "_");
|
||||
cleanFileName.replace(":", "_");
|
||||
cleanFileName.replace(";", "_");
|
||||
cleanFileName.replace(" ", "_");
|
||||
cleanFileName.replace("/", "_");
|
||||
cleanFileName.replace(QRegExp("_+"), "_");
|
||||
QString cleanFileName = caf::Utils::makeValidFileBasename( fileBasenameCandidate);
|
||||
|
||||
cleanFileName += ".las";
|
||||
|
||||
|
@ -19,9 +19,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RigReservoirBuilderMock.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigActiveCellInfo.h"
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigCell.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigSingleWellResultsData.h"
|
||||
|
||||
/* rand example: guess the number */
|
||||
#include <stdio.h>
|
||||
@ -165,7 +168,7 @@ void RigReservoirBuilderMock::appendCells(size_t nodeStartIndex, size_t cellCoun
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigReservoirBuilderMock::populateReservoir(RigCaseData* eclipseCase)
|
||||
void RigReservoirBuilderMock::populateReservoir(RigEclipseCaseData* eclipseCase)
|
||||
{
|
||||
std::vector<cvf::Vec3d>& mainGridNodes = eclipseCase->mainGrid()->nodes();
|
||||
appendNodes(m_minWorldCoordinate, m_maxWorldCoordinate, cellDimension(), mainGridNodes);
|
||||
@ -290,7 +293,7 @@ void RigReservoirBuilderMock::setWorldCoordinates(cvf::Vec3d minWorldCoordinate,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigReservoirBuilderMock::inputProperty(RigCaseData* eclipseCase, const QString& propertyName, std::vector<double>* values)
|
||||
bool RigReservoirBuilderMock::inputProperty(RigEclipseCaseData* eclipseCase, const QString& propertyName, std::vector<double>* values)
|
||||
{
|
||||
size_t k;
|
||||
|
||||
@ -311,7 +314,7 @@ bool RigReservoirBuilderMock::inputProperty(RigCaseData* eclipseCase, const QStr
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigReservoirBuilderMock::staticResult(RigCaseData* eclipseCase, const QString& result, std::vector<double>* values)
|
||||
bool RigReservoirBuilderMock::staticResult(RigEclipseCaseData* eclipseCase, const QString& result, std::vector<double>* values)
|
||||
{
|
||||
values->resize(eclipseCase->mainGrid()->globalCellArray().size());
|
||||
|
||||
@ -327,7 +330,7 @@ bool RigReservoirBuilderMock::staticResult(RigCaseData* eclipseCase, const QStri
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigReservoirBuilderMock::dynamicResult(RigCaseData* eclipseCase, const QString& result, size_t stepIndex, std::vector<double>* values)
|
||||
bool RigReservoirBuilderMock::dynamicResult(RigEclipseCaseData* eclipseCase, const QString& result, size_t stepIndex, std::vector<double>* values)
|
||||
{
|
||||
int resultIndex = 1;
|
||||
|
||||
@ -362,7 +365,7 @@ bool RigReservoirBuilderMock::dynamicResult(RigCaseData* eclipseCase, const QStr
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigReservoirBuilderMock::addWellData(RigCaseData* eclipseCase, RigGridBase* grid)
|
||||
void RigReservoirBuilderMock::addWellData(RigEclipseCaseData* eclipseCase, RigGridBase* grid)
|
||||
{
|
||||
CVF_ASSERT(eclipseCase);
|
||||
CVF_ASSERT(grid);
|
||||
@ -478,7 +481,7 @@ void RigReservoirBuilderMock::addWellData(RigCaseData* eclipseCase, RigGridBase*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigReservoirBuilderMock::addFaults(RigCaseData* eclipseCase)
|
||||
void RigReservoirBuilderMock::addFaults(RigEclipseCaseData* eclipseCase)
|
||||
{
|
||||
if (!eclipseCase) return;
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user