mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Renamed to eclipseCaseData
This commit is contained in:
parent
78e6c6a8fc
commit
647b4348eb
@ -2412,7 +2412,7 @@ bool RiaApplication::addEclipseCases(const QStringList& fileNames)
|
|||||||
bool identicalGrid = RigGridManager::isGridDimensionsEqual(mainCaseGridDimensions, caseGridDimensions);
|
bool identicalGrid = RigGridManager::isGridDimensionsEqual(mainCaseGridDimensions, caseGridDimensions);
|
||||||
if (identicalGrid)
|
if (identicalGrid)
|
||||||
{
|
{
|
||||||
if (rimResultReservoir->openAndReadActiveCellData(mainResultCase->reservoirData()))
|
if (rimResultReservoir->openAndReadActiveCellData(mainResultCase->eclipseCaseData()))
|
||||||
{
|
{
|
||||||
RimOilField* oilField = m_project->activeOilField();
|
RimOilField* oilField = m_project->activeOilField();
|
||||||
if (oilField && oilField->analysisModels())
|
if (oilField && oilField->analysisModels())
|
||||||
|
@ -99,7 +99,7 @@ void RicSaveEclipseInputPropertyFeature::onActionTriggered(bool isChecked)
|
|||||||
caf::PdmUiPropertyViewDialog propertyDialog(RiuMainWindow::instance(), &exportSettings, "Export Eclipse Property to Text File", "");
|
caf::PdmUiPropertyViewDialog propertyDialog(RiuMainWindow::instance(), &exportSettings, "Export Eclipse Property to Text File", "");
|
||||||
if (propertyDialog.exec() == QDialog::Accepted)
|
if (propertyDialog.exec() == QDialog::Accepted)
|
||||||
{
|
{
|
||||||
bool isOk = RifEclipseInputFileTools::writePropertyToTextFile(exportSettings.fileName, inputReservoir->reservoirData(), 0, inputProperty->resultName, exportSettings.eclipseKeyword);
|
bool isOk = RifEclipseInputFileTools::writePropertyToTextFile(exportSettings.fileName, inputReservoir->eclipseCaseData(), 0, inputProperty->resultName, exportSettings.eclipseKeyword);
|
||||||
if (isOk)
|
if (isOk)
|
||||||
{
|
{
|
||||||
inputProperty->fileName = exportSettings.fileName;
|
inputProperty->fileName = exportSettings.fileName;
|
||||||
|
@ -72,7 +72,7 @@ void RicSaveEclipseResultAsInputPropertyExec::redo()
|
|||||||
|
|
||||||
if (!m_cellColors->reservoirView()) return;
|
if (!m_cellColors->reservoirView()) return;
|
||||||
if (!m_cellColors->reservoirView()->eclipseCase()) return;
|
if (!m_cellColors->reservoirView()->eclipseCase()) return;
|
||||||
if (!m_cellColors->reservoirView()->eclipseCase()->reservoirData()) return;
|
if (!m_cellColors->reservoirView()->eclipseCase()->eclipseCaseData()) return;
|
||||||
|
|
||||||
RimBinaryExportSettings exportSettings;
|
RimBinaryExportSettings exportSettings;
|
||||||
exportSettings.eclipseKeyword = m_cellColors->resultVariable();
|
exportSettings.eclipseKeyword = m_cellColors->resultVariable();
|
||||||
@ -96,7 +96,7 @@ void RicSaveEclipseResultAsInputPropertyExec::redo()
|
|||||||
size_t timeStep = m_cellColors->reservoirView()->currentTimeStep();
|
size_t timeStep = m_cellColors->reservoirView()->currentTimeStep();
|
||||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(m_cellColors->porosityModel());
|
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(m_cellColors->porosityModel());
|
||||||
|
|
||||||
bool isOk = RifEclipseInputFileTools::writeBinaryResultToTextFile(exportSettings.fileName, m_cellColors->reservoirView()->eclipseCase()->reservoirData(), porosityModel, timeStep, m_cellColors->resultVariable(), exportSettings.eclipseKeyword, exportSettings.undefinedValue);
|
bool isOk = RifEclipseInputFileTools::writeBinaryResultToTextFile(exportSettings.fileName, m_cellColors->reservoirView()->eclipseCase()->eclipseCaseData(), porosityModel, timeStep, m_cellColors->resultVariable(), exportSettings.eclipseKeyword, exportSettings.undefinedValue);
|
||||||
if (!isOk)
|
if (!isOk)
|
||||||
{
|
{
|
||||||
QMessageBox::critical(NULL, "File export", "Failed to exported current result to " + exportSettings.fileName);
|
QMessageBox::critical(NULL, "File export", "Failed to exported current result to " + exportSettings.fileName);
|
||||||
|
@ -179,7 +179,7 @@ void RicPasteEclipseCasesFeature::addCasesToGridCaseGroup(PdmObjectGroup& object
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!rimResultReservoir->openAndReadActiveCellData(mainResultCase->reservoirData()))
|
if (!rimResultReservoir->openAndReadActiveCellData(mainResultCase->eclipseCaseData()))
|
||||||
{
|
{
|
||||||
CVF_ASSERT(false);
|
CVF_ASSERT(false);
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ void RicExportFaultsFeature::onActionTriggered(bool isChecked)
|
|||||||
|
|
||||||
QString completeFilename = selectedDir + "/" + baseFilename + ".grdecl";
|
QString completeFilename = selectedDir + "/" + baseFilename + ".grdecl";
|
||||||
|
|
||||||
RicExportFaultsFeature::saveFault(completeFilename, eclCase->reservoirData()->mainGrid(), rimFault->faultGeometry()->faultFaces(), faultName);
|
RicExportFaultsFeature::saveFault(completeFilename, eclCase->eclipseCaseData()->mainGrid(), rimFault->faultGeometry()->faultFaces(), faultName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ void RivIntersectionBoxPartMgr::updateCellResultColor(size_t timeStepIndex)
|
|||||||
CVF_ASSERT(cellResultColors);
|
CVF_ASSERT(cellResultColors);
|
||||||
|
|
||||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel());
|
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel());
|
||||||
RigEclipseCaseData* eclipseCase = eclipseView->eclipseCase()->reservoirData();
|
RigEclipseCaseData* eclipseCase = eclipseView->eclipseCase()->eclipseCaseData();
|
||||||
|
|
||||||
// CrossSections
|
// CrossSections
|
||||||
if (m_intersectionBoxFaces.notNull())
|
if (m_intersectionBoxFaces.notNull())
|
||||||
@ -127,7 +127,7 @@ void RivIntersectionBoxPartMgr::updateCellResultColor(size_t timeStepIndex)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
resultAccessor = RigResultAccessorFactory::createFromResultDefinition(cellResultColors->reservoirView()->eclipseCase()->reservoirData(),
|
resultAccessor = RigResultAccessorFactory::createFromResultDefinition(cellResultColors->reservoirView()->eclipseCase()->eclipseCaseData(),
|
||||||
0,
|
0,
|
||||||
timeStepIndex,
|
timeStepIndex,
|
||||||
cellResultColors);
|
cellResultColors);
|
||||||
|
@ -103,7 +103,7 @@ void RivIntersectionPartMgr::updateCellResultColor(size_t timeStepIndex)
|
|||||||
CVF_ASSERT(cellResultColors);
|
CVF_ASSERT(cellResultColors);
|
||||||
|
|
||||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel());
|
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel());
|
||||||
RigEclipseCaseData* eclipseCase = eclipseView->eclipseCase()->reservoirData();
|
RigEclipseCaseData* eclipseCase = eclipseView->eclipseCase()->eclipseCaseData();
|
||||||
|
|
||||||
// CrossSections
|
// CrossSections
|
||||||
if (m_crossSectionFaces.notNull())
|
if (m_crossSectionFaces.notNull())
|
||||||
@ -135,7 +135,7 @@ void RivIntersectionPartMgr::updateCellResultColor(size_t timeStepIndex)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
resultAccessor = RigResultAccessorFactory::createFromResultDefinition(cellResultColors->reservoirView()->eclipseCase()->reservoirData(),
|
resultAccessor = RigResultAccessorFactory::createFromResultDefinition(cellResultColors->reservoirView()->eclipseCase()->eclipseCaseData(),
|
||||||
0,
|
0,
|
||||||
timeStepIndex,
|
timeStepIndex,
|
||||||
cellResultColors);
|
cellResultColors);
|
||||||
|
@ -55,7 +55,7 @@ void RivCellEdgeGeometryUtils::addCellEdgeResultsToDrawableGeo(
|
|||||||
bool useDefaultValueForHugeVals,
|
bool useDefaultValueForHugeVals,
|
||||||
float opacityLevel)
|
float opacityLevel)
|
||||||
{
|
{
|
||||||
RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
|
RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->eclipseCaseData();
|
||||||
CVF_ASSERT(eclipseCase != NULL);
|
CVF_ASSERT(eclipseCase != NULL);
|
||||||
|
|
||||||
// Create result access objects
|
// Create result access objects
|
||||||
@ -199,7 +199,7 @@ void RivCellEdgeGeometryUtils::addTernaryCellEdgeResultsToDrawableGeo(size_t tim
|
|||||||
const cvf::StructGridQuadToCellFaceMapper* quadToCellFaceMapper,
|
const cvf::StructGridQuadToCellFaceMapper* quadToCellFaceMapper,
|
||||||
cvf::DrawableGeo* geo, size_t gridIndex, float opacityLevel)
|
cvf::DrawableGeo* geo, size_t gridIndex, float opacityLevel)
|
||||||
{
|
{
|
||||||
RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
|
RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->eclipseCaseData();
|
||||||
CVF_ASSERT(eclipseCase != NULL);
|
CVF_ASSERT(eclipseCase != NULL);
|
||||||
|
|
||||||
cvf::ref<RigResultAccessor> cellEdgeResultAccessor = createCellEdgeResultAccessor(cellResultColors, cellEdgeResultColors, timeStepIndex, eclipseCase, eclipseCase->grid(gridIndex));
|
cvf::ref<RigResultAccessor> cellEdgeResultAccessor = createCellEdgeResultAccessor(cellResultColors, cellEdgeResultColors, timeStepIndex, eclipseCase, eclipseCase->grid(gridIndex));
|
||||||
|
@ -107,7 +107,7 @@ void RivFaultPartMgr::updateCellResultColor(size_t timeStepIndex, RimEclipseCell
|
|||||||
|
|
||||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel());
|
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel());
|
||||||
RimEclipseView* eclipseView = cellResultColors->reservoirView();
|
RimEclipseView* eclipseView = cellResultColors->reservoirView();
|
||||||
RigEclipseCaseData* eclipseCase = eclipseView->eclipseCase()->reservoirData();
|
RigEclipseCaseData* eclipseCase = eclipseView->eclipseCase()->eclipseCaseData();
|
||||||
|
|
||||||
// Faults
|
// Faults
|
||||||
if (m_nativeFaultFaces.notNull())
|
if (m_nativeFaultFaces.notNull())
|
||||||
|
@ -153,7 +153,7 @@ void RivReservoirViewPartMgr::clearGeometryCache(RivCellSetEnum geomType)
|
|||||||
RigEclipseCaseData* eclipseCase = NULL;
|
RigEclipseCaseData* eclipseCase = NULL;
|
||||||
if (m_reservoirView != NULL && m_reservoirView->eclipseCase())
|
if (m_reservoirView != NULL && m_reservoirView->eclipseCase())
|
||||||
{
|
{
|
||||||
eclipseCase = m_reservoirView->eclipseCase()->reservoirData();
|
eclipseCase = m_reservoirView->eclipseCase()->eclipseCaseData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (geomType == PROPERTY_FILTERED)
|
if (geomType == PROPERTY_FILTERED)
|
||||||
@ -250,7 +250,7 @@ void RivReservoirViewPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicL
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RivReservoirViewPartMgr::createGeometry(RivCellSetEnum geometryType)
|
void RivReservoirViewPartMgr::createGeometry(RivCellSetEnum geometryType)
|
||||||
{
|
{
|
||||||
RigEclipseCaseData* res = m_reservoirView->eclipseCase()->reservoirData();
|
RigEclipseCaseData* res = m_reservoirView->eclipseCase()->eclipseCaseData();
|
||||||
m_geometries[geometryType].clearAndSetReservoir(res, m_reservoirView);
|
m_geometries[geometryType].clearAndSetReservoir(res, m_reservoirView);
|
||||||
m_geometries[geometryType].setTransform(m_scaleTransform.p());
|
m_geometries[geometryType].setTransform(m_scaleTransform.p());
|
||||||
|
|
||||||
@ -273,7 +273,7 @@ void RivReservoirViewPartMgr::createGeometry(RivCellSetEnum geometryType)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RivReservoirViewPartMgr::computeVisibility(cvf::UByteArray* cellVisibility, RivCellSetEnum geometryType, RigGridBase* grid, size_t gridIdx)
|
void RivReservoirViewPartMgr::computeVisibility(cvf::UByteArray* cellVisibility, RivCellSetEnum geometryType, RigGridBase* grid, size_t gridIdx)
|
||||||
{
|
{
|
||||||
RigEclipseCaseData* eclipseCase = m_reservoirView->eclipseCase()->reservoirData();
|
RigEclipseCaseData* eclipseCase = m_reservoirView->eclipseCase()->eclipseCaseData();
|
||||||
RigActiveCellInfo* activeCellInfo = m_reservoirView->currentActiveCellInfo();
|
RigActiveCellInfo* activeCellInfo = m_reservoirView->currentActiveCellInfo();
|
||||||
|
|
||||||
switch (geometryType)
|
switch (geometryType)
|
||||||
@ -400,7 +400,7 @@ void RivReservoirViewPartMgr::computeVisibility(cvf::UByteArray* cellVisibility,
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RivReservoirViewPartMgr::createPropertyFilteredNoneWellCellGeometry(size_t frameIndex)
|
void RivReservoirViewPartMgr::createPropertyFilteredNoneWellCellGeometry(size_t frameIndex)
|
||||||
{
|
{
|
||||||
RigEclipseCaseData* res = m_reservoirView->eclipseCase()->reservoirData();
|
RigEclipseCaseData* res = m_reservoirView->eclipseCase()->eclipseCaseData();
|
||||||
|
|
||||||
if ( frameIndex >= m_propFilteredGeometryFrames.size())
|
if ( frameIndex >= m_propFilteredGeometryFrames.size())
|
||||||
{
|
{
|
||||||
@ -477,7 +477,7 @@ void RivReservoirViewPartMgr::createPropertyFilteredNoneWellCellGeometry(size_t
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RivReservoirViewPartMgr::createPropertyFilteredWellGeometry(size_t frameIndex)
|
void RivReservoirViewPartMgr::createPropertyFilteredWellGeometry(size_t frameIndex)
|
||||||
{
|
{
|
||||||
RigEclipseCaseData* res = m_reservoirView->eclipseCase()->reservoirData();
|
RigEclipseCaseData* res = m_reservoirView->eclipseCase()->eclipseCaseData();
|
||||||
|
|
||||||
if ( frameIndex >= m_propFilteredWellGeometryFrames.size())
|
if ( frameIndex >= m_propFilteredWellGeometryFrames.size())
|
||||||
{
|
{
|
||||||
@ -790,7 +790,7 @@ void RivReservoirViewPartMgr::computePropertyVisibility(cvf::UByteArray* cellVis
|
|||||||
{
|
{
|
||||||
const RimCellFilter::FilterModeType filterType = propertyFilter->filterMode();
|
const RimCellFilter::FilterModeType filterType = propertyFilter->filterMode();
|
||||||
|
|
||||||
RigEclipseCaseData* eclipseCase = propFilterColl->reservoirView()->eclipseCase()->reservoirData();
|
RigEclipseCaseData* eclipseCase = propFilterColl->reservoirView()->eclipseCase()->eclipseCaseData();
|
||||||
|
|
||||||
cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createFromResultDefinition(eclipseCase, grid->gridIndex(), timeStepIndex, propertyFilter->resultDefinition);
|
cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createFromResultDefinition(eclipseCase, grid->gridIndex(), timeStepIndex, propertyFilter->resultDefinition);
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator(
|
|||||||
CVF_ASSERT(quadMapper);
|
CVF_ASSERT(quadMapper);
|
||||||
m_quadMapper = quadMapper;
|
m_quadMapper = quadMapper;
|
||||||
|
|
||||||
RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
|
RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->eclipseCaseData();
|
||||||
|
|
||||||
size_t resTimeStepIdx = timeStepIndex;
|
size_t resTimeStepIdx = timeStepIndex;
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator(
|
|||||||
size_t timeStepIndex)
|
size_t timeStepIndex)
|
||||||
: m_quadMapper(NULL)
|
: m_quadMapper(NULL)
|
||||||
{
|
{
|
||||||
RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
|
RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->eclipseCaseData();
|
||||||
|
|
||||||
size_t resTimeStepIdx = timeStepIndex;
|
size_t resTimeStepIdx = timeStepIndex;
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RivTextureCoordsCreator::RivTextureCoordsCreator(RimEclipseCellColors* cellResultColors, size_t timeStepIndex, size_t gridIndex, const cvf::StructGridQuadToCellFaceMapper* quadMapper)
|
RivTextureCoordsCreator::RivTextureCoordsCreator(RimEclipseCellColors* cellResultColors, size_t timeStepIndex, size_t gridIndex, const cvf::StructGridQuadToCellFaceMapper* quadMapper)
|
||||||
{
|
{
|
||||||
RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
|
RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->eclipseCaseData();
|
||||||
|
|
||||||
m_quadMapper = quadMapper;
|
m_quadMapper = quadMapper;
|
||||||
CVF_ASSERT(quadMapper && eclipseCase );
|
CVF_ASSERT(quadMapper && eclipseCase );
|
||||||
|
@ -87,7 +87,7 @@ void RivWellConnectionsPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasi
|
|||||||
|
|
||||||
flowResults = eclResCase->defaultFlowDiagSolution()->flowDiagResults();
|
flowResults = eclResCase->defaultFlowDiagSolution()->flowDiagResults();
|
||||||
displayCordXf = m_rimReservoirView->displayCoordTransform();
|
displayCordXf = m_rimReservoirView->displayCoordTransform();
|
||||||
RigEclipseCaseData* rigReservoir = m_rimReservoirView->eclipseCase()->reservoirData();
|
RigEclipseCaseData* rigReservoir = m_rimReservoirView->eclipseCase()->eclipseCaseData();
|
||||||
|
|
||||||
characteristicCellSize = rigReservoir->mainGrid()->characteristicIJCellSize();
|
characteristicCellSize = rigReservoir->mainGrid()->characteristicIJCellSize();
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex)
|
|||||||
|
|
||||||
if (m_rimReservoirView.isNull()) return;
|
if (m_rimReservoirView.isNull()) return;
|
||||||
|
|
||||||
RigEclipseCaseData* rigReservoir = m_rimReservoirView->eclipseCase()->reservoirData();
|
RigEclipseCaseData* rigReservoir = m_rimReservoirView->eclipseCase()->eclipseCaseData();
|
||||||
|
|
||||||
RimEclipseWell* well = m_rimWell;
|
RimEclipseWell* well = m_rimWell;
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ void RivWellSpheresPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicLis
|
|||||||
{
|
{
|
||||||
if (m_rimReservoirView.isNull()) return;
|
if (m_rimReservoirView.isNull()) return;
|
||||||
if (!m_rimReservoirView->eclipseCase()) return;
|
if (!m_rimReservoirView->eclipseCase()) return;
|
||||||
if (!m_rimReservoirView->eclipseCase()->reservoirData()) return;
|
if (!m_rimReservoirView->eclipseCase()->eclipseCaseData()) return;
|
||||||
|
|
||||||
const RigMainGrid* mainGrid = m_rimReservoirView->mainGrid();
|
const RigMainGrid* mainGrid = m_rimReservoirView->mainGrid();
|
||||||
CVF_ASSERT(mainGrid);
|
CVF_ASSERT(mainGrid);
|
||||||
|
@ -103,9 +103,9 @@ RigFlowDiagResults* RimFlowDiagSolution::flowDiagResults()
|
|||||||
RimEclipseResultCase* eclCase;
|
RimEclipseResultCase* eclCase;
|
||||||
this->firstAncestorOrThisOfType(eclCase);
|
this->firstAncestorOrThisOfType(eclCase);
|
||||||
|
|
||||||
CVF_ASSERT(eclCase && eclCase->reservoirData() );
|
CVF_ASSERT(eclCase && eclCase->eclipseCaseData() );
|
||||||
|
|
||||||
timeStepCount = eclCase->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->maxTimeStepCount();
|
timeStepCount = eclCase->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->maxTimeStepCount();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ std::vector<QString> RimFlowDiagSolution::tracerNames() const
|
|||||||
|
|
||||||
if (eclCase)
|
if (eclCase)
|
||||||
{
|
{
|
||||||
const cvf::Collection<RigSingleWellResultsData>& wellResults = eclCase->reservoirData()->wellResults();
|
const cvf::Collection<RigSingleWellResultsData>& wellResults = eclCase->eclipseCaseData()->wellResults();
|
||||||
|
|
||||||
for (size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx)
|
for (size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx)
|
||||||
{
|
{
|
||||||
@ -167,9 +167,9 @@ std::map<std::string, std::vector<int> > RimFlowDiagSolution::allTracerActiveCel
|
|||||||
|
|
||||||
if ( eclCase )
|
if ( eclCase )
|
||||||
{
|
{
|
||||||
const cvf::Collection<RigSingleWellResultsData>& wellResults = eclCase->reservoirData()->wellResults();
|
const cvf::Collection<RigSingleWellResultsData>& wellResults = eclCase->eclipseCaseData()->wellResults();
|
||||||
RigMainGrid* mainGrid = eclCase->reservoirData()->mainGrid();
|
RigMainGrid* mainGrid = eclCase->eclipseCaseData()->mainGrid();
|
||||||
RigActiveCellInfo* activeCellInfo = eclCase->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS); //Todo: Must come from the results definition
|
RigActiveCellInfo* activeCellInfo = eclCase->eclipseCaseData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS); //Todo: Must come from the results definition
|
||||||
|
|
||||||
for ( size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx )
|
for ( size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx )
|
||||||
{
|
{
|
||||||
@ -224,7 +224,7 @@ RimFlowDiagSolution::TracerStatusType RimFlowDiagSolution::tracerStatusOverall(c
|
|||||||
|
|
||||||
TracerStatusType tracerStatus = UNDEFINED;
|
TracerStatusType tracerStatus = UNDEFINED;
|
||||||
|
|
||||||
const cvf::Collection<RigSingleWellResultsData>& wellResults = eclCase->reservoirData()->wellResults();
|
const cvf::Collection<RigSingleWellResultsData>& wellResults = eclCase->eclipseCaseData()->wellResults();
|
||||||
|
|
||||||
for ( size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx )
|
for ( size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx )
|
||||||
{
|
{
|
||||||
@ -270,7 +270,7 @@ RimFlowDiagSolution::TracerStatusType RimFlowDiagSolution::tracerStatusInTimeSte
|
|||||||
RimEclipseResultCase* eclCase;
|
RimEclipseResultCase* eclCase;
|
||||||
this->firstAncestorOrThisOfTypeAsserted(eclCase);
|
this->firstAncestorOrThisOfTypeAsserted(eclCase);
|
||||||
|
|
||||||
const cvf::Collection<RigSingleWellResultsData>& wellResults = eclCase->reservoirData()->wellResults();
|
const cvf::Collection<RigSingleWellResultsData>& wellResults = eclCase->eclipseCaseData()->wellResults();
|
||||||
|
|
||||||
for ( size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx )
|
for ( size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx )
|
||||||
{
|
{
|
||||||
@ -334,7 +334,7 @@ cvf::Color3f RimFlowDiagSolution::tracerColor(const QString& tracerName) const
|
|||||||
// If we do not find a well color, use index in well result data to be able to get variation of tracer colors
|
// If we do not find a well color, use index in well result data to be able to get variation of tracer colors
|
||||||
// This can be the case if we do not have any views at all
|
// This can be the case if we do not have any views at all
|
||||||
|
|
||||||
const cvf::Collection<RigSingleWellResultsData>& wellResults = eclCase->reservoirData()->wellResults();
|
const cvf::Collection<RigSingleWellResultsData>& wellResults = eclCase->eclipseCaseData()->wellResults();
|
||||||
|
|
||||||
for ( size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx )
|
for ( size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx )
|
||||||
{
|
{
|
||||||
|
@ -179,7 +179,7 @@ void RimWellAllocationPlot::updateFromWell()
|
|||||||
|
|
||||||
if (!m_case) return;
|
if (!m_case) return;
|
||||||
|
|
||||||
const RigSingleWellResultsData* wellResults = m_case->reservoirData()->findWellResult(m_wellName);
|
const RigSingleWellResultsData* wellResults = m_case->eclipseCaseData()->findWellResult(m_wellName);
|
||||||
|
|
||||||
if (!wellResults) return;
|
if (!wellResults) return;
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ void RimWellAllocationPlot::updateFromWell()
|
|||||||
std::vector< std::vector <cvf::Vec3d> > pipeBranchesCLCoords;
|
std::vector< std::vector <cvf::Vec3d> > pipeBranchesCLCoords;
|
||||||
std::vector< std::vector <RigWellResultPoint> > pipeBranchesCellIds;
|
std::vector< std::vector <RigWellResultPoint> > pipeBranchesCellIds;
|
||||||
|
|
||||||
RigSimulationWellCenterLineCalculator::calculateWellPipeCenterlineFromWellFrame(m_case->reservoirData(),
|
RigSimulationWellCenterLineCalculator::calculateWellPipeCenterlineFromWellFrame(m_case->eclipseCaseData(),
|
||||||
wellResults,
|
wellResults,
|
||||||
m_timeStep,
|
m_timeStep,
|
||||||
true,
|
true,
|
||||||
@ -207,7 +207,7 @@ void RimWellAllocationPlot::updateFromWell()
|
|||||||
{
|
{
|
||||||
bool isProducer = ( wellResults->wellProductionType(m_timeStep) == RigWellResultFrame::PRODUCER
|
bool isProducer = ( wellResults->wellProductionType(m_timeStep) == RigWellResultFrame::PRODUCER
|
||||||
|| wellResults->wellProductionType(m_timeStep) == RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE );
|
|| wellResults->wellProductionType(m_timeStep) == RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE );
|
||||||
RigEclCellIndexCalculator cellIdxCalc(m_case->reservoirData()->mainGrid(), m_case->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS));
|
RigEclCellIndexCalculator cellIdxCalc(m_case->eclipseCaseData()->mainGrid(), m_case->eclipseCaseData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS));
|
||||||
wfCalculator.reset(new RigAccWellFlowCalculator(pipeBranchesCLCoords,
|
wfCalculator.reset(new RigAccWellFlowCalculator(pipeBranchesCLCoords,
|
||||||
pipeBranchesCellIds,
|
pipeBranchesCellIds,
|
||||||
tracerFractionCellValues,
|
tracerFractionCellValues,
|
||||||
@ -377,7 +377,7 @@ std::map<QString, const std::vector<double> *> RimWellAllocationPlot::findReleva
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellAllocationPlot::updateWellFlowPlotXAxisTitle(RimWellLogTrack* plotTrack)
|
void RimWellAllocationPlot::updateWellFlowPlotXAxisTitle(RimWellLogTrack* plotTrack)
|
||||||
{
|
{
|
||||||
RigEclipseCaseData::UnitsType unitSet = m_case->reservoirData()->unitsType();
|
RigEclipseCaseData::UnitsType unitSet = m_case->eclipseCaseData()->unitsType();
|
||||||
QString unitText;
|
QString unitText;
|
||||||
switch ( unitSet )
|
switch ( unitSet )
|
||||||
{
|
{
|
||||||
@ -448,7 +448,7 @@ QString RimWellAllocationPlot::wellStatusTextForTimeStep(const QString& wellName
|
|||||||
|
|
||||||
if (eclipseResultCase)
|
if (eclipseResultCase)
|
||||||
{
|
{
|
||||||
const RigSingleWellResultsData* wellResults = eclipseResultCase->reservoirData()->findWellResult(wellName);
|
const RigSingleWellResultsData* wellResults = eclipseResultCase->eclipseCaseData()->findWellResult(wellName);
|
||||||
|
|
||||||
if (wellResults)
|
if (wellResults)
|
||||||
{
|
{
|
||||||
@ -541,9 +541,9 @@ QList<caf::PdmOptionItemInfo> RimWellAllocationPlot::calculateValueOptions(const
|
|||||||
if (fieldNeedingOptions == &m_wellName)
|
if (fieldNeedingOptions == &m_wellName)
|
||||||
{
|
{
|
||||||
std::set<QString> sortedWellNames;
|
std::set<QString> sortedWellNames;
|
||||||
if ( m_case && m_case->reservoirData() )
|
if ( m_case && m_case->eclipseCaseData() )
|
||||||
{
|
{
|
||||||
const cvf::Collection<RigSingleWellResultsData>& wellRes = m_case->reservoirData()->wellResults();
|
const cvf::Collection<RigSingleWellResultsData>& wellRes = m_case->eclipseCaseData()->wellResults();
|
||||||
|
|
||||||
for ( size_t wIdx = 0; wIdx < wellRes.size(); ++wIdx )
|
for ( size_t wIdx = 0; wIdx < wellRes.size(); ++wIdx )
|
||||||
{
|
{
|
||||||
@ -566,7 +566,7 @@ QList<caf::PdmOptionItemInfo> RimWellAllocationPlot::calculateValueOptions(const
|
|||||||
{
|
{
|
||||||
QStringList timeStepNames;
|
QStringList timeStepNames;
|
||||||
|
|
||||||
if (m_case && m_case->reservoirData())
|
if (m_case && m_case->eclipseCaseData())
|
||||||
{
|
{
|
||||||
timeStepNames = m_case->timeStepStrings();
|
timeStepNames = m_case->timeStepStrings();
|
||||||
}
|
}
|
||||||
|
@ -346,8 +346,8 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView)
|
|||||||
{
|
{
|
||||||
caseName = eclipseView->eclipseCase()->caseUserDescription();
|
caseName = eclipseView->eclipseCase()->caseUserDescription();
|
||||||
totCellCount = QString::number(eclipseView->mainGrid()->globalCellArray().size());
|
totCellCount = QString::number(eclipseView->mainGrid()->globalCellArray().size());
|
||||||
size_t mxActCellCount = eclipseView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->reservoirActiveCellCount();
|
size_t mxActCellCount = eclipseView->eclipseCase()->eclipseCaseData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->reservoirActiveCellCount();
|
||||||
size_t frActCellCount = eclipseView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->reservoirActiveCellCount();
|
size_t frActCellCount = eclipseView->eclipseCase()->eclipseCaseData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->reservoirActiveCellCount();
|
||||||
if (frActCellCount > 0) activeCellCountText += "Matrix : ";
|
if (frActCellCount > 0) activeCellCountText += "Matrix : ";
|
||||||
activeCellCountText += QString::number(mxActCellCount);
|
activeCellCountText += QString::number(mxActCellCount);
|
||||||
if (frActCellCount > 0) activeCellCountText += " Fracture : " + QString::number(frActCellCount);
|
if (frActCellCount > 0) activeCellCountText += " Fracture : " + QString::number(frActCellCount);
|
||||||
|
@ -105,22 +105,22 @@ RimEclipseCase::~RimEclipseCase()
|
|||||||
RimWellLogPlotCollection* plotCollection = project->mainPlotCollection()->wellLogPlotCollection();
|
RimWellLogPlotCollection* plotCollection = project->mainPlotCollection()->wellLogPlotCollection();
|
||||||
if (plotCollection)
|
if (plotCollection)
|
||||||
{
|
{
|
||||||
plotCollection->removeExtractors(this->reservoirData());
|
plotCollection->removeExtractors(this->eclipseCaseData());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->reservoirData())
|
if (this->eclipseCaseData())
|
||||||
{
|
{
|
||||||
// At this point, we assume that memory should be released
|
// At this point, we assume that memory should be released
|
||||||
CVF_ASSERT(this->reservoirData()->refCount() == 1);
|
CVF_ASSERT(this->eclipseCaseData()->refCount() == 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigEclipseCaseData* RimEclipseCase::reservoirData()
|
RigEclipseCaseData* RimEclipseCase::eclipseCaseData()
|
||||||
{
|
{
|
||||||
return m_rigEclipseCase.p();
|
return m_rigEclipseCase.p();
|
||||||
}
|
}
|
||||||
@ -128,7 +128,7 @@ RigEclipseCaseData* RimEclipseCase::reservoirData()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
const RigEclipseCaseData* RimEclipseCase::reservoirData() const
|
const RigEclipseCaseData* RimEclipseCase::eclipseCaseData() const
|
||||||
{
|
{
|
||||||
return m_rigEclipseCase.p();
|
return m_rigEclipseCase.p();
|
||||||
}
|
}
|
||||||
@ -255,7 +255,7 @@ void RimEclipseCase::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
|
|||||||
{
|
{
|
||||||
if (changedField == &releaseResultMemory)
|
if (changedField == &releaseResultMemory)
|
||||||
{
|
{
|
||||||
if (this->reservoirData())
|
if (this->eclipseCaseData())
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < reservoirViews().size(); i++)
|
for (size_t i = 0; i < reservoirViews().size(); i++)
|
||||||
{
|
{
|
||||||
@ -277,13 +277,13 @@ void RimEclipseCase::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
|
|||||||
reservoirView->createDisplayModelAndRedraw();
|
reservoirView->createDisplayModelAndRedraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
RigCaseCellResultsData* matrixModelResults = reservoirData()->results(RifReaderInterface::MATRIX_RESULTS);
|
RigCaseCellResultsData* matrixModelResults = eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS);
|
||||||
if (matrixModelResults)
|
if (matrixModelResults)
|
||||||
{
|
{
|
||||||
matrixModelResults->clearAllResults();
|
matrixModelResults->clearAllResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
RigCaseCellResultsData* fractureModelResults = reservoirData()->results(RifReaderInterface::FRACTURE_RESULTS);
|
RigCaseCellResultsData* fractureModelResults = eclipseCaseData()->results(RifReaderInterface::FRACTURE_RESULTS);
|
||||||
if (fractureModelResults)
|
if (fractureModelResults)
|
||||||
{
|
{
|
||||||
fractureModelResults->clearAllResults();
|
fractureModelResults->clearAllResults();
|
||||||
@ -294,7 +294,7 @@ void RimEclipseCase::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
|
|||||||
}
|
}
|
||||||
else if (changedField == &flipXAxis || changedField == &flipYAxis)
|
else if (changedField == &flipXAxis || changedField == &flipYAxis)
|
||||||
{
|
{
|
||||||
RigEclipseCaseData* rigEclipseCase = reservoirData();
|
RigEclipseCaseData* rigEclipseCase = eclipseCaseData();
|
||||||
if (rigEclipseCase)
|
if (rigEclipseCase)
|
||||||
{
|
{
|
||||||
rigEclipseCase->mainGrid()->setFlipAxis(flipXAxis, flipYAxis);
|
rigEclipseCase->mainGrid()->setFlipAxis(flipXAxis, flipYAxis);
|
||||||
@ -323,7 +323,7 @@ void RimEclipseCase::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEclipseCase::updateFormationNamesData()
|
void RimEclipseCase::updateFormationNamesData()
|
||||||
{
|
{
|
||||||
RigEclipseCaseData* rigEclipseCase = reservoirData();
|
RigEclipseCaseData* rigEclipseCase = eclipseCaseData();
|
||||||
if(rigEclipseCase)
|
if(rigEclipseCase)
|
||||||
{
|
{
|
||||||
if(activeFormationNames())
|
if(activeFormationNames())
|
||||||
@ -381,7 +381,7 @@ void RimEclipseCase::updateFormationNamesData()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEclipseCase::computeCachedData()
|
void RimEclipseCase::computeCachedData()
|
||||||
{
|
{
|
||||||
RigEclipseCaseData* rigEclipseCase = reservoirData();
|
RigEclipseCaseData* rigEclipseCase = eclipseCaseData();
|
||||||
if (rigEclipseCase)
|
if (rigEclipseCase)
|
||||||
{
|
{
|
||||||
caf::ProgressInfo pInf(30, "");
|
caf::ProgressInfo pInf(30, "");
|
||||||
@ -428,12 +428,12 @@ RimCaseCollection* RimEclipseCase::parentCaseCollection()
|
|||||||
void RimEclipseCase::setReservoirData(RigEclipseCaseData* eclipseCase)
|
void RimEclipseCase::setReservoirData(RigEclipseCaseData* eclipseCase)
|
||||||
{
|
{
|
||||||
m_rigEclipseCase = eclipseCase;
|
m_rigEclipseCase = eclipseCase;
|
||||||
if (this->reservoirData())
|
if (this->eclipseCaseData())
|
||||||
{
|
{
|
||||||
m_fractureModelResults()->setCellResults(reservoirData()->results(RifReaderInterface::FRACTURE_RESULTS));
|
m_fractureModelResults()->setCellResults(eclipseCaseData()->results(RifReaderInterface::FRACTURE_RESULTS));
|
||||||
m_matrixModelResults()->setCellResults(reservoirData()->results(RifReaderInterface::MATRIX_RESULTS));
|
m_matrixModelResults()->setCellResults(eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS));
|
||||||
m_fractureModelResults()->setMainGrid(this->reservoirData()->mainGrid());
|
m_fractureModelResults()->setMainGrid(this->eclipseCaseData()->mainGrid());
|
||||||
m_matrixModelResults()->setMainGrid(this->reservoirData()->mainGrid());
|
m_matrixModelResults()->setMainGrid(this->eclipseCaseData()->mainGrid());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -511,7 +511,7 @@ bool RimEclipseCase::openReserviorCase()
|
|||||||
{
|
{
|
||||||
// If read already, return
|
// If read already, return
|
||||||
|
|
||||||
if (this->reservoirData() != NULL) return true;
|
if (this->eclipseCaseData() != NULL) return true;
|
||||||
|
|
||||||
if (!openEclipseGridFile())
|
if (!openEclipseGridFile())
|
||||||
{
|
{
|
||||||
@ -528,7 +528,7 @@ bool RimEclipseCase::openReserviorCase()
|
|||||||
size_t combinedTransResIdx = results->cellResults()->findScalarResultIndex(RimDefines::STATIC_NATIVE, RimDefines::combinedTransmissibilityResultName());
|
size_t combinedTransResIdx = results->cellResults()->findScalarResultIndex(RimDefines::STATIC_NATIVE, RimDefines::combinedTransmissibilityResultName());
|
||||||
if (combinedTransResIdx != cvf::UNDEFINED_SIZE_T)
|
if (combinedTransResIdx != cvf::UNDEFINED_SIZE_T)
|
||||||
{
|
{
|
||||||
reservoirData()->mainGrid()->nncData()->setCombTransmisibilityScalarResultIndex(combinedTransResIdx);
|
eclipseCaseData()->mainGrid()->nncData()->setCombTransmisibilityScalarResultIndex(combinedTransResIdx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,8 +67,8 @@ public:
|
|||||||
bool openReserviorCase();
|
bool openReserviorCase();
|
||||||
virtual bool openEclipseGridFile() = 0;
|
virtual bool openEclipseGridFile() = 0;
|
||||||
|
|
||||||
RigEclipseCaseData* reservoirData();
|
RigEclipseCaseData* eclipseCaseData();
|
||||||
const RigEclipseCaseData* reservoirData() const;
|
const RigEclipseCaseData* eclipseCaseData() const;
|
||||||
|
|
||||||
RimReservoirCellResultsStorage* results(RifReaderInterface::PorosityModelResultType porosityModel);
|
RimReservoirCellResultsStorage* results(RifReaderInterface::PorosityModelResultType porosityModel);
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ RimIdenticalGridCaseGroup* RimEclipseCaseCollection::createIdenticalCaseGroupFro
|
|||||||
{
|
{
|
||||||
CVF_ASSERT(mainCase);
|
CVF_ASSERT(mainCase);
|
||||||
|
|
||||||
RigEclipseCaseData* rigEclipseCase = mainCase->reservoirData();
|
RigEclipseCaseData* rigEclipseCase = mainCase->eclipseCaseData();
|
||||||
RigMainGrid* equalGrid = registerCaseInGridCollection(rigEclipseCase);
|
RigMainGrid* equalGrid = registerCaseInGridCollection(rigEclipseCase);
|
||||||
CVF_ASSERT(equalGrid);
|
CVF_ASSERT(equalGrid);
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ void RimEclipseCaseCollection::moveEclipseCaseIntoCaseGroup(RimEclipseCase* rimR
|
|||||||
{
|
{
|
||||||
CVF_ASSERT(rimReservoir);
|
CVF_ASSERT(rimReservoir);
|
||||||
|
|
||||||
RigEclipseCaseData* rigEclipseCase = rimReservoir->reservoirData();
|
RigEclipseCaseData* rigEclipseCase = rimReservoir->eclipseCaseData();
|
||||||
RigMainGrid* equalGrid = registerCaseInGridCollection(rigEclipseCase);
|
RigMainGrid* equalGrid = registerCaseInGridCollection(rigEclipseCase);
|
||||||
CVF_ASSERT(equalGrid);
|
CVF_ASSERT(equalGrid);
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ void RimEclipseCaseCollection::moveEclipseCaseIntoCaseGroup(RimEclipseCase* rimR
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEclipseCaseCollection::removeCaseFromAllGroups(RimEclipseCase* reservoir)
|
void RimEclipseCaseCollection::removeCaseFromAllGroups(RimEclipseCase* reservoir)
|
||||||
{
|
{
|
||||||
m_gridCollection->removeCase(reservoir->reservoirData());
|
m_gridCollection->removeCase(reservoir->eclipseCaseData());
|
||||||
|
|
||||||
for (size_t i = 0; i < caseGroups.size(); i++)
|
for (size_t i = 0; i < caseGroups.size(); i++)
|
||||||
{
|
{
|
||||||
@ -188,7 +188,7 @@ void RimEclipseCaseCollection::insertCaseInCaseGroup(RimIdenticalGridCaseGroup*
|
|||||||
{
|
{
|
||||||
CVF_ASSERT(rimReservoir);
|
CVF_ASSERT(rimReservoir);
|
||||||
|
|
||||||
RigEclipseCaseData* rigEclipseCase = rimReservoir->reservoirData();
|
RigEclipseCaseData* rigEclipseCase = rimReservoir->eclipseCaseData();
|
||||||
registerCaseInGridCollection(rigEclipseCase);
|
registerCaseInGridCollection(rigEclipseCase);
|
||||||
|
|
||||||
caseGroup->addCase(rimReservoir);
|
caseGroup->addCase(rimReservoir);
|
||||||
|
@ -317,7 +317,7 @@ void RimEclipseCellColors::updateLegendData(size_t currentTimeStep)
|
|||||||
CVF_ASSERT(rimEclipseCase);
|
CVF_ASSERT(rimEclipseCase);
|
||||||
if (!rimEclipseCase) return;
|
if (!rimEclipseCase) return;
|
||||||
|
|
||||||
RigEclipseCaseData* eclipseCase = rimEclipseCase->reservoirData();
|
RigEclipseCaseData* eclipseCase = rimEclipseCase->eclipseCaseData();
|
||||||
CVF_ASSERT(eclipseCase);
|
CVF_ASSERT(eclipseCase);
|
||||||
if (!eclipseCase) return;
|
if (!eclipseCase) return;
|
||||||
|
|
||||||
|
@ -82,8 +82,8 @@ void RimEclipseInputCase::openDataFileSet(const QStringList& fileNames)
|
|||||||
results(RifReaderInterface::MATRIX_RESULTS)->setReaderInterface(readerInterface.p());
|
results(RifReaderInterface::MATRIX_RESULTS)->setReaderInterface(readerInterface.p());
|
||||||
results(RifReaderInterface::FRACTURE_RESULTS)->setReaderInterface(readerInterface.p());
|
results(RifReaderInterface::FRACTURE_RESULTS)->setReaderInterface(readerInterface.p());
|
||||||
|
|
||||||
reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->computeDerivedData();
|
eclipseCaseData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->computeDerivedData();
|
||||||
reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->computeDerivedData();
|
eclipseCaseData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->computeDerivedData();
|
||||||
|
|
||||||
QFileInfo gridFileName(fileNames[0]);
|
QFileInfo gridFileName(fileNames[0]);
|
||||||
QString caseName = gridFileName.completeBaseName();
|
QString caseName = gridFileName.completeBaseName();
|
||||||
@ -94,19 +94,19 @@ void RimEclipseInputCase::openDataFileSet(const QStringList& fileNames)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->reservoirData() == NULL)
|
if (this->eclipseCaseData() == NULL)
|
||||||
{
|
{
|
||||||
this->setReservoirData(new RigEclipseCaseData);
|
this->setReservoirData(new RigEclipseCaseData);
|
||||||
}
|
}
|
||||||
|
|
||||||
// First find and read the grid data
|
// First find and read the grid data
|
||||||
if (this->reservoirData()->mainGrid()->gridPointDimensions() == cvf::Vec3st(0,0,0))
|
if (this->eclipseCaseData()->mainGrid()->gridPointDimensions() == cvf::Vec3st(0,0,0))
|
||||||
{
|
{
|
||||||
RiaPreferences* prefs = RiaApplication::instance()->preferences();
|
RiaPreferences* prefs = RiaApplication::instance()->preferences();
|
||||||
|
|
||||||
for (int i = 0; i < fileNames.size(); i++)
|
for (int i = 0; i < fileNames.size(); i++)
|
||||||
{
|
{
|
||||||
if (RifEclipseInputFileTools::openGridFile(fileNames[i], this->reservoirData(), prefs->readerSettings->importFaults()))
|
if (RifEclipseInputFileTools::openGridFile(fileNames[i], this->eclipseCaseData(), prefs->readerSettings->importFaults()))
|
||||||
{
|
{
|
||||||
m_gridFileName = fileNames[i];
|
m_gridFileName = fileNames[i];
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ void RimEclipseInputCase::openDataFileSet(const QStringList& fileNames)
|
|||||||
|
|
||||||
this->caseUserDescription = caseName;
|
this->caseUserDescription = caseName;
|
||||||
|
|
||||||
this->reservoirData()->mainGrid()->setFlipAxis(flipXAxis, flipYAxis);
|
this->eclipseCaseData()->mainGrid()->setFlipAxis(flipXAxis, flipYAxis);
|
||||||
|
|
||||||
computeCachedData();
|
computeCachedData();
|
||||||
|
|
||||||
@ -124,7 +124,7 @@ void RimEclipseInputCase::openDataFileSet(const QStringList& fileNames)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->reservoirData()->mainGrid()->gridPointDimensions() == cvf::Vec3st(0,0,0))
|
if (this->eclipseCaseData()->mainGrid()->gridPointDimensions() == cvf::Vec3st(0,0,0))
|
||||||
{
|
{
|
||||||
return ; // No grid present
|
return ; // No grid present
|
||||||
}
|
}
|
||||||
@ -152,7 +152,7 @@ void RimEclipseInputCase::openDataFileSet(const QStringList& fileNames)
|
|||||||
for (int i = 0; i < filesToRead.size(); i++)
|
for (int i = 0; i < filesToRead.size(); i++)
|
||||||
{
|
{
|
||||||
QString propertyFileName = filesToRead[i];
|
QString propertyFileName = filesToRead[i];
|
||||||
std::map<QString, QString> readProperties = RifEclipseInputFileTools::readProperties(propertyFileName, this->reservoirData());
|
std::map<QString, QString> readProperties = RifEclipseInputFileTools::readProperties(propertyFileName, this->eclipseCaseData());
|
||||||
|
|
||||||
std::map<QString, QString>::iterator it;
|
std::map<QString, QString>::iterator it;
|
||||||
for (it = readProperties.begin(); it != readProperties.end(); ++it)
|
for (it = readProperties.begin(); it != readProperties.end(); ++it)
|
||||||
@ -179,7 +179,7 @@ void RimEclipseInputCase::openDataFileSet(const QStringList& fileNames)
|
|||||||
bool RimEclipseInputCase::openEclipseGridFile()
|
bool RimEclipseInputCase::openEclipseGridFile()
|
||||||
{
|
{
|
||||||
// Early exit if reservoir data is created
|
// Early exit if reservoir data is created
|
||||||
if (this->reservoirData() == NULL)
|
if (this->eclipseCaseData() == NULL)
|
||||||
{
|
{
|
||||||
cvf::ref<RifReaderInterface> readerInterface;
|
cvf::ref<RifReaderInterface> readerInterface;
|
||||||
|
|
||||||
@ -202,13 +202,13 @@ bool RimEclipseInputCase::openEclipseGridFile()
|
|||||||
this->setReservoirData( eclipseCase.p() );
|
this->setReservoirData( eclipseCase.p() );
|
||||||
}
|
}
|
||||||
|
|
||||||
CVF_ASSERT(this->reservoirData());
|
CVF_ASSERT(this->eclipseCaseData());
|
||||||
CVF_ASSERT(readerInterface.notNull());
|
CVF_ASSERT(readerInterface.notNull());
|
||||||
|
|
||||||
results(RifReaderInterface::MATRIX_RESULTS)->setReaderInterface(readerInterface.p());
|
results(RifReaderInterface::MATRIX_RESULTS)->setReaderInterface(readerInterface.p());
|
||||||
results(RifReaderInterface::FRACTURE_RESULTS)->setReaderInterface(readerInterface.p());
|
results(RifReaderInterface::FRACTURE_RESULTS)->setReaderInterface(readerInterface.p());
|
||||||
|
|
||||||
this->reservoirData()->mainGrid()->setFlipAxis(flipXAxis, flipYAxis);
|
this->eclipseCaseData()->mainGrid()->setFlipAxis(flipXAxis, flipYAxis);
|
||||||
|
|
||||||
computeCachedData();
|
computeCachedData();
|
||||||
loadAndSyncronizeInputProperties();
|
loadAndSyncronizeInputProperties();
|
||||||
@ -237,8 +237,8 @@ void RimEclipseInputCase::loadAndSyncronizeInputProperties()
|
|||||||
{
|
{
|
||||||
// Make sure we actually have reservoir data
|
// Make sure we actually have reservoir data
|
||||||
|
|
||||||
CVF_ASSERT(this->reservoirData());
|
CVF_ASSERT(this->eclipseCaseData());
|
||||||
CVF_ASSERT(this->reservoirData()->mainGrid()->gridPointDimensions() != cvf::Vec3st(0,0,0));
|
CVF_ASSERT(this->eclipseCaseData()->mainGrid()->gridPointDimensions() != cvf::Vec3st(0,0,0));
|
||||||
|
|
||||||
// Then read the properties from all the files referenced by the InputReservoir
|
// Then read the properties from all the files referenced by the InputReservoir
|
||||||
|
|
||||||
@ -287,7 +287,7 @@ void RimEclipseInputCase::loadAndSyncronizeInputProperties()
|
|||||||
ipsUsingThisFile[ipIdx]->resolvedState = RimEclipseInputProperty::KEYWORD_NOT_IN_FILE;
|
ipsUsingThisFile[ipIdx]->resolvedState = RimEclipseInputProperty::KEYWORD_NOT_IN_FILE;
|
||||||
if (fileKeywordSet.count(kw))
|
if (fileKeywordSet.count(kw))
|
||||||
{
|
{
|
||||||
if (RifEclipseInputFileTools::readProperty(filenames[i], this->reservoirData(), kw, ipsUsingThisFile[ipIdx]->resultName ))
|
if (RifEclipseInputFileTools::readProperty(filenames[i], this->eclipseCaseData(), kw, ipsUsingThisFile[ipIdx]->resultName ))
|
||||||
{
|
{
|
||||||
ipsUsingThisFile[ipIdx]->resolvedState = RimEclipseInputProperty::RESOLVED;
|
ipsUsingThisFile[ipIdx]->resolvedState = RimEclipseInputProperty::RESOLVED;
|
||||||
}
|
}
|
||||||
@ -304,8 +304,8 @@ void RimEclipseInputCase::loadAndSyncronizeInputProperties()
|
|||||||
for (const QString fileKeyword : fileKeywordSet)
|
for (const QString fileKeyword : fileKeywordSet)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
QString resultName = this->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->makeResultNameUnique(fileKeyword);
|
QString resultName = this->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->makeResultNameUnique(fileKeyword);
|
||||||
if (RifEclipseInputFileTools::readProperty(filenames[i], this->reservoirData(), fileKeyword, resultName))
|
if (RifEclipseInputFileTools::readProperty(filenames[i], this->eclipseCaseData(), fileKeyword, resultName))
|
||||||
{
|
{
|
||||||
RimEclipseInputProperty* inputProperty = new RimEclipseInputProperty;
|
RimEclipseInputProperty* inputProperty = new RimEclipseInputProperty;
|
||||||
inputProperty->resultName = resultName;
|
inputProperty->resultName = resultName;
|
||||||
|
@ -99,8 +99,8 @@ void RimEclipseInputCaseOpm::appendPropertiesFromStandaloneFiles(const QStringLi
|
|||||||
if (fileKeywordSet.count(knownKeyword) > 0)
|
if (fileKeywordSet.count(knownKeyword) > 0)
|
||||||
{
|
{
|
||||||
QString qtKnownKeyword = QString::fromStdString(knownKeyword);
|
QString qtKnownKeyword = QString::fromStdString(knownKeyword);
|
||||||
QString resultName = this->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->makeResultNameUnique(qtKnownKeyword);
|
QString resultName = this->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->makeResultNameUnique(qtKnownKeyword);
|
||||||
if (propertyReader.copyPropertyToCaseData(knownKeyword, this->reservoirData(), resultName))
|
if (propertyReader.copyPropertyToCaseData(knownKeyword, this->eclipseCaseData(), resultName))
|
||||||
{
|
{
|
||||||
RimEclipseInputProperty* inputProperty = new RimEclipseInputProperty;
|
RimEclipseInputProperty* inputProperty = new RimEclipseInputProperty;
|
||||||
inputProperty->resultName = resultName;
|
inputProperty->resultName = resultName;
|
||||||
@ -160,18 +160,18 @@ void RimEclipseInputCaseOpm::updateFilePathsFromProjectPath(const QString& newPr
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEclipseInputCaseOpm::importEclipseGridAndProperties(const QString& fileName)
|
void RimEclipseInputCaseOpm::importEclipseGridAndProperties(const QString& fileName)
|
||||||
{
|
{
|
||||||
if (this->reservoirData() == NULL)
|
if (this->eclipseCaseData() == NULL)
|
||||||
{
|
{
|
||||||
this->setReservoirData(new RigEclipseCaseData);
|
this->setReservoirData(new RigEclipseCaseData);
|
||||||
|
|
||||||
RifReaderOpmParserInput::importGridPropertiesFaults(fileName, reservoirData());
|
RifReaderOpmParserInput::importGridPropertiesFaults(fileName, eclipseCaseData());
|
||||||
|
|
||||||
if (this->reservoirData()->mainGrid() == NULL)
|
if (this->eclipseCaseData()->mainGrid() == NULL)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->reservoirData()->mainGrid()->setFlipAxis(flipXAxis, flipYAxis);
|
this->eclipseCaseData()->mainGrid()->setFlipAxis(flipXAxis, flipYAxis);
|
||||||
|
|
||||||
computeCachedData();
|
computeCachedData();
|
||||||
|
|
||||||
@ -194,8 +194,8 @@ void RimEclipseInputCaseOpm::loadAndSyncronizeInputProperties()
|
|||||||
{
|
{
|
||||||
// Make sure we actually have reservoir data
|
// Make sure we actually have reservoir data
|
||||||
|
|
||||||
CVF_ASSERT(this->reservoirData());
|
CVF_ASSERT(this->eclipseCaseData());
|
||||||
CVF_ASSERT(this->reservoirData()->mainGrid()->gridPointDimensions() != cvf::Vec3st(0, 0, 0));
|
CVF_ASSERT(this->eclipseCaseData()->mainGrid()->gridPointDimensions() != cvf::Vec3st(0, 0, 0));
|
||||||
|
|
||||||
// Then read the properties from all the files referenced by the InputReservoir
|
// Then read the properties from all the files referenced by the InputReservoir
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ void RimEclipseInputCaseOpm::loadAndSyncronizeInputProperties()
|
|||||||
inputProperty->resolvedState = RimEclipseInputProperty::KEYWORD_NOT_IN_FILE;
|
inputProperty->resolvedState = RimEclipseInputProperty::KEYWORD_NOT_IN_FILE;
|
||||||
if (fileKeywordSet.count(kw.toStdString()))
|
if (fileKeywordSet.count(kw.toStdString()))
|
||||||
{
|
{
|
||||||
if (propertyReader.copyPropertyToCaseData(kw.toStdString(), this->reservoirData(), inputProperty->resultName))
|
if (propertyReader.copyPropertyToCaseData(kw.toStdString(), this->eclipseCaseData(), inputProperty->resultName))
|
||||||
{
|
{
|
||||||
inputProperty->resolvedState = RimEclipseInputProperty::RESOLVED;
|
inputProperty->resolvedState = RimEclipseInputProperty::RESOLVED;
|
||||||
}
|
}
|
||||||
@ -242,8 +242,8 @@ void RimEclipseInputCaseOpm::loadAndSyncronizeInputProperties()
|
|||||||
if (fileKeywordSet.count(knownKeyword) > 0)
|
if (fileKeywordSet.count(knownKeyword) > 0)
|
||||||
{
|
{
|
||||||
QString qtKnownKeyword = QString::fromStdString(knownKeyword);
|
QString qtKnownKeyword = QString::fromStdString(knownKeyword);
|
||||||
QString resultName = this->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->makeResultNameUnique(qtKnownKeyword);
|
QString resultName = this->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->makeResultNameUnique(qtKnownKeyword);
|
||||||
if (propertyReader.copyPropertyToCaseData(knownKeyword, this->reservoirData(), resultName))
|
if (propertyReader.copyPropertyToCaseData(knownKeyword, this->eclipseCaseData(), resultName))
|
||||||
{
|
{
|
||||||
RimEclipseInputProperty* inputProperty = new RimEclipseInputProperty;
|
RimEclipseInputProperty* inputProperty = new RimEclipseInputProperty;
|
||||||
inputProperty->resultName = resultName;
|
inputProperty->resultName = resultName;
|
||||||
|
@ -91,7 +91,7 @@ void RimEclipseInputProperty::fieldChangedByUi(const caf::PdmFieldHandle* change
|
|||||||
QString oldName = oldValue.toString();
|
QString oldName = oldValue.toString();
|
||||||
QString newName = newValue.toString();
|
QString newName = newValue.toString();
|
||||||
|
|
||||||
RigCaseCellResultsData* matrixResults = rimCase->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS);
|
RigCaseCellResultsData* matrixResults = rimCase->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS);
|
||||||
if (matrixResults)
|
if (matrixResults)
|
||||||
{
|
{
|
||||||
if (matrixResults->updateResultName(RimDefines::INPUT_PROPERTY, oldName, newName))
|
if (matrixResults->updateResultName(RimDefines::INPUT_PROPERTY, oldName, newName))
|
||||||
@ -100,7 +100,7 @@ void RimEclipseInputProperty::fieldChangedByUi(const caf::PdmFieldHandle* change
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RigCaseCellResultsData* fracResults = rimCase->reservoirData()->results(RifReaderInterface::FRACTURE_RESULTS);
|
RigCaseCellResultsData* fracResults = rimCase->eclipseCaseData()->results(RifReaderInterface::FRACTURE_RESULTS);
|
||||||
if (fracResults)
|
if (fracResults)
|
||||||
{
|
{
|
||||||
if (fracResults->updateResultName(RimDefines::INPUT_PROPERTY, oldName, newName))
|
if (fracResults->updateResultName(RimDefines::INPUT_PROPERTY, oldName, newName))
|
||||||
|
@ -359,10 +359,10 @@ void RimEclipsePropertyFilter::computeResultValueRange()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CVF_ASSERT(parentContainer()->reservoirView()->eclipseCase()->reservoirData());
|
CVF_ASSERT(parentContainer()->reservoirView()->eclipseCase()->eclipseCaseData());
|
||||||
CVF_ASSERT(parentContainer()->reservoirView()->eclipseCase()->reservoirData()->activeFormationNames());
|
CVF_ASSERT(parentContainer()->reservoirView()->eclipseCase()->eclipseCaseData()->activeFormationNames());
|
||||||
|
|
||||||
const std::vector<QString>& fnVector = parentContainer()->reservoirView()->eclipseCase()->reservoirData()->activeFormationNames()->formationNames();
|
const std::vector<QString>& fnVector = parentContainer()->reservoirView()->eclipseCase()->eclipseCaseData()->activeFormationNames()->formationNames();
|
||||||
setCategoryNames(fnVector);
|
setCategoryNames(fnVector);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@ bool RimEclipseResultCase::openEclipseGridFile()
|
|||||||
|
|
||||||
progInfo.incrementProgress();
|
progInfo.incrementProgress();
|
||||||
|
|
||||||
CVF_ASSERT(this->reservoirData());
|
CVF_ASSERT(this->eclipseCaseData());
|
||||||
CVF_ASSERT(readerInterface.notNull());
|
CVF_ASSERT(readerInterface.notNull());
|
||||||
|
|
||||||
progInfo.setProgressDescription("Computing Case Cache");
|
progInfo.setProgressDescription("Computing Case Cache");
|
||||||
@ -132,7 +132,7 @@ bool RimEclipseResultCase::openEclipseGridFile()
|
|||||||
m_gridAndWellDataIsReadFromFile = true;
|
m_gridAndWellDataIsReadFromFile = true;
|
||||||
m_activeCellInfoIsReadFromFile = true;
|
m_activeCellInfoIsReadFromFile = true;
|
||||||
|
|
||||||
if (reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->hasFlowDiagUsableFluxes())
|
if (eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->hasFlowDiagUsableFluxes())
|
||||||
{
|
{
|
||||||
m_flowDagSolverInterface = new RigFlowDiagSolverInterface(this);
|
m_flowDagSolverInterface = new RigFlowDiagSolverInterface(this);
|
||||||
|
|
||||||
@ -195,10 +195,10 @@ bool RimEclipseResultCase::openAndReadActiveCellData(RigEclipseCaseData* mainEcl
|
|||||||
results(RifReaderInterface::MATRIX_RESULTS)->setReaderInterface(readerInterface.p());
|
results(RifReaderInterface::MATRIX_RESULTS)->setReaderInterface(readerInterface.p());
|
||||||
results(RifReaderInterface::FRACTURE_RESULTS)->setReaderInterface(readerInterface.p());
|
results(RifReaderInterface::FRACTURE_RESULTS)->setReaderInterface(readerInterface.p());
|
||||||
|
|
||||||
CVF_ASSERT(this->reservoirData());
|
CVF_ASSERT(this->eclipseCaseData());
|
||||||
CVF_ASSERT(readerInterface.notNull());
|
CVF_ASSERT(readerInterface.notNull());
|
||||||
|
|
||||||
reservoirData()->computeActiveCellBoundingBoxes();
|
eclipseCaseData()->computeActiveCellBoundingBoxes();
|
||||||
|
|
||||||
m_activeCellInfoIsReadFromFile = true;
|
m_activeCellInfoIsReadFromFile = true;
|
||||||
|
|
||||||
|
@ -359,9 +359,9 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
|
|||||||
|
|
||||||
bool hasFlowDiagFluxes = false;
|
bool hasFlowDiagFluxes = false;
|
||||||
RimEclipseResultCase* eclResCase = dynamic_cast<RimEclipseResultCase*>(m_eclipseCase.p());
|
RimEclipseResultCase* eclResCase = dynamic_cast<RimEclipseResultCase*>(m_eclipseCase.p());
|
||||||
if ( eclResCase && eclResCase->reservoirData() )
|
if ( eclResCase && eclResCase->eclipseCaseData() )
|
||||||
{
|
{
|
||||||
hasFlowDiagFluxes = eclResCase->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->hasFlowDiagUsableFluxes();
|
hasFlowDiagFluxes = eclResCase->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->hasFlowDiagUsableFluxes();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not include flow diag results if not available
|
// Do not include flow diag results if not available
|
||||||
@ -886,8 +886,8 @@ bool RimEclipseResultDefinition::hasCategoryResult() const
|
|||||||
{
|
{
|
||||||
if (this->m_resultType() == RimDefines::FORMATION_NAMES
|
if (this->m_resultType() == RimDefines::FORMATION_NAMES
|
||||||
&& m_eclipseCase
|
&& m_eclipseCase
|
||||||
&& m_eclipseCase->reservoirData()
|
&& m_eclipseCase->eclipseCaseData()
|
||||||
&& m_eclipseCase->reservoirData()->activeFormationNames() ) return true;
|
&& m_eclipseCase->eclipseCaseData()->activeFormationNames() ) return true;
|
||||||
|
|
||||||
if (this->m_resultType() == RimDefines::FLOW_DIAGNOSTICS
|
if (this->m_resultType() == RimDefines::FLOW_DIAGNOSTICS
|
||||||
&& m_resultVariable() == RIG_FLD_MAX_FRACTION_TRACER_RESNAME) return true;
|
&& m_resultVariable() == RIG_FLD_MAX_FRACTION_TRACER_RESNAME) return true;
|
||||||
@ -904,9 +904,9 @@ bool RimEclipseResultDefinition::hasCategoryResult() const
|
|||||||
bool RimEclipseResultDefinition::hasDualPorFractureResult()
|
bool RimEclipseResultDefinition::hasDualPorFractureResult()
|
||||||
{
|
{
|
||||||
if ( m_eclipseCase
|
if ( m_eclipseCase
|
||||||
&& m_eclipseCase->reservoirData()
|
&& m_eclipseCase->eclipseCaseData()
|
||||||
&& m_eclipseCase->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)
|
&& m_eclipseCase->eclipseCaseData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)
|
||||||
&& m_eclipseCase->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->reservoirActiveCellCount() > 0 )
|
&& m_eclipseCase->eclipseCaseData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->reservoirActiveCellCount() > 0 )
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -131,9 +131,9 @@ RimEclipseStatisticsCase::~RimEclipseStatisticsCase()
|
|||||||
void RimEclipseStatisticsCase::setMainGrid(RigMainGrid* mainGrid)
|
void RimEclipseStatisticsCase::setMainGrid(RigMainGrid* mainGrid)
|
||||||
{
|
{
|
||||||
CVF_ASSERT(mainGrid);
|
CVF_ASSERT(mainGrid);
|
||||||
CVF_ASSERT(this->reservoirData());
|
CVF_ASSERT(this->eclipseCaseData());
|
||||||
|
|
||||||
reservoirData()->setMainGrid(mainGrid);
|
eclipseCaseData()->setMainGrid(mainGrid);
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -141,7 +141,7 @@ void RimEclipseStatisticsCase::setMainGrid(RigMainGrid* mainGrid)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RimEclipseStatisticsCase::openEclipseGridFile()
|
bool RimEclipseStatisticsCase::openEclipseGridFile()
|
||||||
{
|
{
|
||||||
if (this->reservoirData()) return true;
|
if (this->eclipseCaseData()) return true;
|
||||||
|
|
||||||
cvf::ref<RigEclipseCaseData> eclipseCase = new RigEclipseCaseData;
|
cvf::ref<RigEclipseCaseData> eclipseCase = new RigEclipseCaseData;
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ void RimEclipseStatisticsCase::populateResultSelectionAfterLoadingGrid()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEclipseStatisticsCase::computeStatistics()
|
void RimEclipseStatisticsCase::computeStatistics()
|
||||||
{
|
{
|
||||||
if (this->reservoirData() == NULL)
|
if (this->eclipseCaseData() == NULL)
|
||||||
{
|
{
|
||||||
openEclipseGridFile();
|
openEclipseGridFile();
|
||||||
}
|
}
|
||||||
@ -228,7 +228,7 @@ void RimEclipseStatisticsCase::computeStatistics()
|
|||||||
timeStepIndices.push_back(i);
|
timeStepIndices.push_back(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
RigEclipseCaseData* resultCase = reservoirData();
|
RigEclipseCaseData* resultCase = eclipseCaseData();
|
||||||
|
|
||||||
QList<RimEclipseStatisticsCaseEvaluator::ResSpec > resultSpecification;
|
QList<RimEclipseStatisticsCaseEvaluator::ResSpec > resultSpecification;
|
||||||
|
|
||||||
@ -390,12 +390,12 @@ QList<caf::PdmOptionItemInfo> RimEclipseStatisticsCase::calculateValueOptions(co
|
|||||||
if (useOptionsOnly) *useOptionsOnly = true;
|
if (useOptionsOnly) *useOptionsOnly = true;
|
||||||
|
|
||||||
RimIdenticalGridCaseGroup* idgcg = caseGroup();
|
RimIdenticalGridCaseGroup* idgcg = caseGroup();
|
||||||
if (!(caseGroup() && caseGroup()->mainCase() && caseGroup()->mainCase()->reservoirData()))
|
if (!(caseGroup() && caseGroup()->mainCase() && caseGroup()->mainCase()->eclipseCaseData()))
|
||||||
{
|
{
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
RigEclipseCaseData* caseData = idgcg->mainCase()->reservoirData();
|
RigEclipseCaseData* caseData = idgcg->mainCase()->eclipseCaseData();
|
||||||
|
|
||||||
if (&m_selectedDynamicProperties == fieldNeedingOptions)
|
if (&m_selectedDynamicProperties == fieldNeedingOptions)
|
||||||
{
|
{
|
||||||
@ -486,9 +486,9 @@ void RimEclipseStatisticsCase::fieldChangedByUi(const caf::PdmFieldHandle* chang
|
|||||||
sourceResultCase->openEclipseGridFile();
|
sourceResultCase->openEclipseGridFile();
|
||||||
|
|
||||||
// Propagate well info to statistics case
|
// Propagate well info to statistics case
|
||||||
if (sourceResultCase->reservoirData())
|
if (sourceResultCase->eclipseCaseData())
|
||||||
{
|
{
|
||||||
const cvf::Collection<RigSingleWellResultsData>& sourceCaseWellResults = sourceResultCase->reservoirData()->wellResults();
|
const cvf::Collection<RigSingleWellResultsData>& sourceCaseWellResults = sourceResultCase->eclipseCaseData()->wellResults();
|
||||||
setWellResultsAndUpdateViews(sourceCaseWellResults);
|
setWellResultsAndUpdateViews(sourceCaseWellResults);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -505,7 +505,7 @@ void RimEclipseStatisticsCase::fieldChangedByUi(const caf::PdmFieldHandle* chang
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEclipseStatisticsCase::setWellResultsAndUpdateViews(const cvf::Collection<RigSingleWellResultsData>& sourceCaseWellResults)
|
void RimEclipseStatisticsCase::setWellResultsAndUpdateViews(const cvf::Collection<RigSingleWellResultsData>& sourceCaseWellResults)
|
||||||
{
|
{
|
||||||
this->reservoirData()->setWellResults(sourceCaseWellResults);
|
this->eclipseCaseData()->setWellResults(sourceCaseWellResults);
|
||||||
|
|
||||||
caf::ProgressInfo progInfo(reservoirViews().size() + 1, "Updating Well Data for Views");
|
caf::ProgressInfo progInfo(reservoirViews().size() + 1, "Updating Well Data for Views");
|
||||||
|
|
||||||
@ -637,9 +637,9 @@ void RimEclipseStatisticsCase::updatePercentileUiVisibility()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RimEclipseStatisticsCase::hasComputedStatistics() const
|
bool RimEclipseStatisticsCase::hasComputedStatistics() const
|
||||||
{
|
{
|
||||||
if ( reservoirData()
|
if ( eclipseCaseData()
|
||||||
&& ( reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->resultCount()
|
&& ( eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->resultCount()
|
||||||
|| reservoirData()->results(RifReaderInterface::FRACTURE_RESULTS)->resultCount()))
|
|| eclipseCaseData()->results(RifReaderInterface::FRACTURE_RESULTS)->resultCount()))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -677,14 +677,14 @@ void RimEclipseStatisticsCase::updateConnectedEditorsAndReservoirViews()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEclipseStatisticsCase::clearComputedStatistics()
|
void RimEclipseStatisticsCase::clearComputedStatistics()
|
||||||
{
|
{
|
||||||
if (reservoirData() && reservoirData()->results(RifReaderInterface::MATRIX_RESULTS))
|
if (eclipseCaseData() && eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS))
|
||||||
{
|
{
|
||||||
reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->clearAllResults();
|
eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->clearAllResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reservoirData() && reservoirData()->results(RifReaderInterface::FRACTURE_RESULTS))
|
if (eclipseCaseData() && eclipseCaseData()->results(RifReaderInterface::FRACTURE_RESULTS))
|
||||||
{
|
{
|
||||||
reservoirData()->results(RifReaderInterface::FRACTURE_RESULTS)->clearAllResults();
|
eclipseCaseData()->results(RifReaderInterface::FRACTURE_RESULTS)->clearAllResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
updateConnectedEditorsAndReservoirViews();
|
updateConnectedEditorsAndReservoirViews();
|
||||||
@ -711,12 +711,12 @@ void RimEclipseStatisticsCase::computeStatisticsAndUpdateViews()
|
|||||||
void RimEclipseStatisticsCase::populateResultSelection()
|
void RimEclipseStatisticsCase::populateResultSelection()
|
||||||
{
|
{
|
||||||
RimIdenticalGridCaseGroup* idgcg = caseGroup();
|
RimIdenticalGridCaseGroup* idgcg = caseGroup();
|
||||||
if (!(caseGroup() && caseGroup()->mainCase() && caseGroup()->mainCase()->reservoirData()))
|
if (!(caseGroup() && caseGroup()->mainCase() && caseGroup()->mainCase()->eclipseCaseData()))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RigEclipseCaseData* caseData = idgcg->mainCase()->reservoirData();
|
RigEclipseCaseData* caseData = idgcg->mainCase()->eclipseCaseData();
|
||||||
|
|
||||||
if (m_selectedDynamicProperties().size() == 0)
|
if (m_selectedDynamicProperties().size() == 0)
|
||||||
{
|
{
|
||||||
|
@ -163,7 +163,7 @@ void RimEclipseStatisticsCaseEvaluator::evaluateForResults(const QList<ResSpec>&
|
|||||||
// Trigger loading of dataset
|
// Trigger loading of dataset
|
||||||
sourceCase->results(poroModel)->findOrLoadScalarResultForTimeStep(resultType, resultName, dataAccessTimeStepIndex);
|
sourceCase->results(poroModel)->findOrLoadScalarResultForTimeStep(resultType, resultName, dataAccessTimeStepIndex);
|
||||||
|
|
||||||
cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createFromNameAndType(sourceCase->reservoirData(), gridIdx, poroModel, dataAccessTimeStepIndex, resultName, resultType);
|
cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createFromNameAndType(sourceCase->eclipseCaseData(), gridIdx, poroModel, dataAccessTimeStepIndex, resultName, resultType);
|
||||||
if (resultAccessor.notNull())
|
if (resultAccessor.notNull())
|
||||||
{
|
{
|
||||||
sourceDataAccessList.push_back(resultAccessor.p());
|
sourceDataAccessList.push_back(resultAccessor.p());
|
||||||
@ -329,7 +329,7 @@ RimEclipseStatisticsCaseEvaluator::RimEclipseStatisticsCaseEvaluator(const std::
|
|||||||
{
|
{
|
||||||
if (sourceCases.size() > 0)
|
if (sourceCases.size() > 0)
|
||||||
{
|
{
|
||||||
m_reservoirCellCount = sourceCases[0]->reservoirData()->mainGrid()->globalCellArray().size();
|
m_reservoirCellCount = sourceCases[0]->eclipseCaseData()->mainGrid()->globalCellArray().size();
|
||||||
}
|
}
|
||||||
|
|
||||||
CVF_ASSERT(m_destinationCase);
|
CVF_ASSERT(m_destinationCase);
|
||||||
|
@ -248,7 +248,7 @@ void RimEclipseView::createDisplayModel()
|
|||||||
RiuMainWindow::instance()->setResultInfo(QString("RimReservoirView::createDisplayModel() ") + QString::number(callCount++));
|
RiuMainWindow::instance()->setResultInfo(QString("RimReservoirView::createDisplayModel() ") + QString::number(callCount++));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!(m_eclipseCase && m_eclipseCase->reservoirData())) return;
|
if (!(m_eclipseCase && m_eclipseCase->eclipseCaseData())) return;
|
||||||
|
|
||||||
// Define a vector containing time step indices to produce geometry for.
|
// Define a vector containing time step indices to produce geometry for.
|
||||||
// First entry in this vector is used to define the geometry only result mode with no results.
|
// First entry in this vector is used to define the geometry only result mode with no results.
|
||||||
@ -825,12 +825,12 @@ RimReservoirCellResultsStorage* RimEclipseView::currentGridCellResults()
|
|||||||
RigActiveCellInfo* RimEclipseView::currentActiveCellInfo()
|
RigActiveCellInfo* RimEclipseView::currentActiveCellInfo()
|
||||||
{
|
{
|
||||||
if (m_eclipseCase &&
|
if (m_eclipseCase &&
|
||||||
m_eclipseCase->reservoirData()
|
m_eclipseCase->eclipseCaseData()
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResult->porosityModel());
|
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResult->porosityModel());
|
||||||
|
|
||||||
return m_eclipseCase->reservoirData()->activeCellInfo(porosityModel);
|
return m_eclipseCase->eclipseCaseData()->activeCellInfo(porosityModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -882,9 +882,9 @@ void RimEclipseView::indicesToVisibleGrids(std::vector<size_t>* gridIndices)
|
|||||||
|
|
||||||
// Create vector of grid indices to render
|
// Create vector of grid indices to render
|
||||||
std::vector<RigGridBase*> grids;
|
std::vector<RigGridBase*> grids;
|
||||||
if (this->m_eclipseCase && this->m_eclipseCase->reservoirData() )
|
if (this->m_eclipseCase && this->m_eclipseCase->eclipseCaseData() )
|
||||||
{
|
{
|
||||||
this->m_eclipseCase->reservoirData()->allGrids(&grids);
|
this->m_eclipseCase->eclipseCaseData()->allGrids(&grids);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t i;
|
size_t i;
|
||||||
@ -907,12 +907,12 @@ void RimEclipseView::updateLegends()
|
|||||||
m_viewer->removeAllColorLegends();
|
m_viewer->removeAllColorLegends();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_eclipseCase || !m_viewer || !m_eclipseCase->reservoirData() )
|
if (!m_eclipseCase || !m_viewer || !m_eclipseCase->eclipseCaseData() )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RigEclipseCaseData* eclipseCase = m_eclipseCase->reservoirData();
|
RigEclipseCaseData* eclipseCase = m_eclipseCase->eclipseCaseData();
|
||||||
CVF_ASSERT(eclipseCase);
|
CVF_ASSERT(eclipseCase);
|
||||||
|
|
||||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResult()->porosityModel());
|
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResult()->porosityModel());
|
||||||
@ -1074,9 +1074,9 @@ RimEclipseCase* RimEclipseView::eclipseCase() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEclipseView::syncronizeWellsWithResults()
|
void RimEclipseView::syncronizeWellsWithResults()
|
||||||
{
|
{
|
||||||
if (!(m_eclipseCase && m_eclipseCase->reservoirData()) ) return;
|
if (!(m_eclipseCase && m_eclipseCase->eclipseCaseData()) ) return;
|
||||||
|
|
||||||
cvf::Collection<RigSingleWellResultsData> wellResults = m_eclipseCase->reservoirData()->wellResults();
|
cvf::Collection<RigSingleWellResultsData> wellResults = m_eclipseCase->eclipseCaseData()->wellResults();
|
||||||
|
|
||||||
|
|
||||||
std::vector<caf::PdmPointer<RimEclipseWell> > newWells;
|
std::vector<caf::PdmPointer<RimEclipseWell> > newWells;
|
||||||
@ -1448,9 +1448,9 @@ RimCase* RimEclipseView::ownerCase()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigMainGrid* RimEclipseView::mainGrid() const
|
RigMainGrid* RimEclipseView::mainGrid() const
|
||||||
{
|
{
|
||||||
if (eclipseCase() && eclipseCase()->reservoirData())
|
if (eclipseCase() && eclipseCase()->eclipseCaseData())
|
||||||
{
|
{
|
||||||
return eclipseCase()->reservoirData()->mainGrid();
|
return eclipseCase()->eclipseCaseData()->mainGrid();
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@ -1502,7 +1502,7 @@ void RimEclipseView::setOverridePropertyFilterCollection(RimEclipsePropertyFilte
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEclipseView::calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility)
|
void RimEclipseView::calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility)
|
||||||
{
|
{
|
||||||
size_t gridCount = this->eclipseCase()->reservoirData()->gridCount();
|
size_t gridCount = this->eclipseCase()->eclipseCaseData()->gridCount();
|
||||||
size_t cellCount = this->mainGrid()->globalCellArray().size();
|
size_t cellCount = this->mainGrid()->globalCellArray().size();
|
||||||
|
|
||||||
totalVisibility->resize(cellCount);
|
totalVisibility->resize(cellCount);
|
||||||
@ -1510,7 +1510,7 @@ void RimEclipseView::calculateCurrentTotalCellVisibility(cvf::UByteArray* totalV
|
|||||||
|
|
||||||
for (size_t gridIdx = 0; gridIdx < gridCount; ++gridIdx)
|
for (size_t gridIdx = 0; gridIdx < gridCount; ++gridIdx)
|
||||||
{
|
{
|
||||||
RigGridBase * grid = this->eclipseCase()->reservoirData()->grid(gridIdx);
|
RigGridBase * grid = this->eclipseCase()->eclipseCaseData()->grid(gridIdx);
|
||||||
int gridCellCount = static_cast<int>(grid->cellCount());
|
int gridCellCount = static_cast<int>(grid->cellCount());
|
||||||
|
|
||||||
for (size_t gpIdx = 0; gpIdx < m_visibleGridParts.size(); ++gpIdx)
|
for (size_t gpIdx = 0; gpIdx < m_visibleGridParts.size(); ++gpIdx)
|
||||||
@ -1550,9 +1550,9 @@ void RimEclipseView::createPartCollectionFromSelection(cvf::Collection<cvf::Part
|
|||||||
if (eclipseSelItem && eclipseSelItem->m_view == this)
|
if (eclipseSelItem && eclipseSelItem->m_view == this)
|
||||||
{
|
{
|
||||||
CVF_ASSERT(eclipseSelItem->m_view->eclipseCase());
|
CVF_ASSERT(eclipseSelItem->m_view->eclipseCase());
|
||||||
CVF_ASSERT(eclipseSelItem->m_view->eclipseCase()->reservoirData());
|
CVF_ASSERT(eclipseSelItem->m_view->eclipseCase()->eclipseCaseData());
|
||||||
|
|
||||||
RivSingleCellPartGenerator partGen(eclipseSelItem->m_view->eclipseCase()->reservoirData(), eclipseSelItem->m_gridIndex, eclipseSelItem->m_cellIndex);
|
RivSingleCellPartGenerator partGen(eclipseSelItem->m_view->eclipseCase()->eclipseCaseData(), eclipseSelItem->m_gridIndex, eclipseSelItem->m_cellIndex);
|
||||||
|
|
||||||
cvf::ref<cvf::Part> part = partGen.createPart(eclipseSelItem->m_color);
|
cvf::ref<cvf::Part> part = partGen.createPart(eclipseSelItem->m_color);
|
||||||
part->setTransform(this->scaleTransform());
|
part->setTransform(this->scaleTransform());
|
||||||
|
@ -169,7 +169,7 @@ void RimEclipseWell::wellHeadTopBottomPosition(size_t frameIndex, cvf::Vec3d* to
|
|||||||
RimEclipseView* m_rimReservoirView;
|
RimEclipseView* m_rimReservoirView;
|
||||||
firstAncestorOrThisOfTypeAsserted(m_rimReservoirView);
|
firstAncestorOrThisOfTypeAsserted(m_rimReservoirView);
|
||||||
|
|
||||||
RigEclipseCaseData* rigReservoir = m_rimReservoirView->eclipseCase()->reservoirData();
|
RigEclipseCaseData* rigReservoir = m_rimReservoirView->eclipseCase()->eclipseCaseData();
|
||||||
|
|
||||||
if (!this->wellResults()->hasWellResult(frameIndex)) return;
|
if (!this->wellResults()->hasWellResult(frameIndex)) return;
|
||||||
|
|
||||||
@ -227,7 +227,7 @@ double RimEclipseWell::pipeRadius()
|
|||||||
RimEclipseView* reservoirView;
|
RimEclipseView* reservoirView;
|
||||||
firstAncestorOrThisOfTypeAsserted(reservoirView);
|
firstAncestorOrThisOfTypeAsserted(reservoirView);
|
||||||
|
|
||||||
RigEclipseCaseData* rigReservoir = reservoirView->eclipseCase()->reservoirData();
|
RigEclipseCaseData* rigReservoir = reservoirView->eclipseCase()->eclipseCaseData();
|
||||||
|
|
||||||
double characteristicCellSize = rigReservoir->mainGrid()->characteristicIJCellSize();
|
double characteristicCellSize = rigReservoir->mainGrid()->characteristicIJCellSize();
|
||||||
|
|
||||||
|
@ -102,11 +102,11 @@ void RimIdenticalGridCaseGroup::addCase(RimEclipseCase* reservoir)
|
|||||||
|
|
||||||
if (!m_mainGrid)
|
if (!m_mainGrid)
|
||||||
{
|
{
|
||||||
m_mainGrid = reservoir->reservoirData()->mainGrid();
|
m_mainGrid = reservoir->eclipseCaseData()->mainGrid();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
reservoir->reservoirData()->setMainGrid(m_mainGrid);
|
reservoir->eclipseCaseData()->setMainGrid(m_mainGrid);
|
||||||
}
|
}
|
||||||
|
|
||||||
caseCollection()->reservoirs().push_back(reservoir);
|
caseCollection()->reservoirs().push_back(reservoir);
|
||||||
@ -181,7 +181,7 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RigEclipseCaseData* rigCaseData = mainCase->reservoirData();
|
RigEclipseCaseData* rigCaseData = mainCase->eclipseCaseData();
|
||||||
CVF_ASSERT(rigCaseData);
|
CVF_ASSERT(rigCaseData);
|
||||||
|
|
||||||
RifReaderInterface::PorosityModelResultType poroModel = RifReaderInterface::MATRIX_RESULTS;
|
RifReaderInterface::PorosityModelResultType poroModel = RifReaderInterface::MATRIX_RESULTS;
|
||||||
@ -285,7 +285,7 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
|
|||||||
|
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
{
|
{
|
||||||
rimReservoir->reservoirData()->computeActiveCellBoundingBoxes();
|
rimReservoir->eclipseCaseData()->computeActiveCellBoundingBoxes();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -331,7 +331,7 @@ void RimIdenticalGridCaseGroup::computeUnionOfActiveCells()
|
|||||||
|
|
||||||
if (activeM[gridLocalCellIndex] == 0)
|
if (activeM[gridLocalCellIndex] == 0)
|
||||||
{
|
{
|
||||||
if (caseCollection->reservoirs[caseIdx]->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->isActive(reservoirCellIndex))
|
if (caseCollection->reservoirs[caseIdx]->eclipseCaseData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->isActive(reservoirCellIndex))
|
||||||
{
|
{
|
||||||
activeM[gridLocalCellIndex] = 1;
|
activeM[gridLocalCellIndex] = 1;
|
||||||
}
|
}
|
||||||
@ -339,7 +339,7 @@ void RimIdenticalGridCaseGroup::computeUnionOfActiveCells()
|
|||||||
|
|
||||||
if (activeF[gridLocalCellIndex] == 0)
|
if (activeF[gridLocalCellIndex] == 0)
|
||||||
{
|
{
|
||||||
if (caseCollection->reservoirs[caseIdx]->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->isActive(reservoirCellIndex))
|
if (caseCollection->reservoirs[caseIdx]->eclipseCaseData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->isActive(reservoirCellIndex))
|
||||||
{
|
{
|
||||||
activeF[gridLocalCellIndex] = 1;
|
activeF[gridLocalCellIndex] = 1;
|
||||||
}
|
}
|
||||||
@ -400,13 +400,13 @@ void RimIdenticalGridCaseGroup::updateMainGridAndActiveCellsForStatisticsCases()
|
|||||||
{
|
{
|
||||||
RimEclipseCase* rimStaticsCase = statisticsCaseCollection->reservoirs[i];
|
RimEclipseCase* rimStaticsCase = statisticsCaseCollection->reservoirs[i];
|
||||||
|
|
||||||
if (rimStaticsCase->reservoirData())
|
if (rimStaticsCase->eclipseCaseData())
|
||||||
{
|
{
|
||||||
rimStaticsCase->reservoirData()->setMainGrid(this->mainGrid());
|
rimStaticsCase->eclipseCaseData()->setMainGrid(this->mainGrid());
|
||||||
|
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
{
|
{
|
||||||
rimStaticsCase->reservoirData()->computeActiveCellBoundingBoxes();
|
rimStaticsCase->eclipseCaseData()->computeActiveCellBoundingBoxes();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -521,7 +521,7 @@ RimEclipseCase* RimIdenticalGridCaseGroup::mainCase()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RimIdenticalGridCaseGroup::canCaseBeAdded(RimEclipseCase* reservoir) const
|
bool RimIdenticalGridCaseGroup::canCaseBeAdded(RimEclipseCase* reservoir) const
|
||||||
{
|
{
|
||||||
CVF_ASSERT(reservoir && reservoir->reservoirData() && reservoir->reservoirData()->mainGrid());
|
CVF_ASSERT(reservoir && reservoir->eclipseCaseData() && reservoir->eclipseCaseData()->mainGrid());
|
||||||
|
|
||||||
if (!m_mainGrid)
|
if (!m_mainGrid)
|
||||||
{
|
{
|
||||||
@ -529,7 +529,7 @@ bool RimIdenticalGridCaseGroup::canCaseBeAdded(RimEclipseCase* reservoir) const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
RigMainGrid* incomingMainGrid = reservoir->reservoirData()->mainGrid();
|
RigMainGrid* incomingMainGrid = reservoir->eclipseCaseData()->mainGrid();
|
||||||
|
|
||||||
if (RigGridManager::isEqual(m_mainGrid, incomingMainGrid))
|
if (RigGridManager::isEqual(m_mainGrid, incomingMainGrid))
|
||||||
{
|
{
|
||||||
|
@ -640,11 +640,11 @@ void RimProject::computeUtmAreaOfInterest()
|
|||||||
{
|
{
|
||||||
RimEclipseCase* rimCase = dynamic_cast<RimEclipseCase*>(cases[i]);
|
RimEclipseCase* rimCase = dynamic_cast<RimEclipseCase*>(cases[i]);
|
||||||
|
|
||||||
if (rimCase && rimCase->reservoirData())
|
if (rimCase && rimCase->eclipseCaseData())
|
||||||
{
|
{
|
||||||
for (size_t gridIdx = 0; gridIdx < rimCase->reservoirData()->gridCount(); gridIdx++ )
|
for (size_t gridIdx = 0; gridIdx < rimCase->eclipseCaseData()->gridCount(); gridIdx++ )
|
||||||
{
|
{
|
||||||
RigGridBase* rigGrid = rimCase->reservoirData()->grid(gridIdx);
|
RigGridBase* rigGrid = rimCase->eclipseCaseData()->grid(gridIdx);
|
||||||
|
|
||||||
projectBB.add(rigGrid->boundingBox());
|
projectBB.add(rigGrid->boundingBox());
|
||||||
}
|
}
|
||||||
|
@ -1516,9 +1516,9 @@ double RimReservoirCellResultsStorage::darchysValue()
|
|||||||
RimEclipseCase* rimCase = NULL;
|
RimEclipseCase* rimCase = NULL;
|
||||||
this->firstAncestorOrThisOfType(rimCase);
|
this->firstAncestorOrThisOfType(rimCase);
|
||||||
|
|
||||||
if (rimCase && rimCase->reservoirData())
|
if (rimCase && rimCase->eclipseCaseData())
|
||||||
{
|
{
|
||||||
RigEclipseCaseData::UnitsType unitsType = rimCase->reservoirData()->unitsType();
|
RigEclipseCaseData::UnitsType unitsType = rimCase->eclipseCaseData()->unitsType();
|
||||||
|
|
||||||
if (unitsType == RigEclipseCaseData::UNITS_FIELD)
|
if (unitsType == RigEclipseCaseData::UNITS_FIELD)
|
||||||
{
|
{
|
||||||
|
@ -862,7 +862,7 @@ bool RimViewController::isRangeFilterMappingApliccable() const
|
|||||||
|
|
||||||
if (eclipseView && geomView)
|
if (eclipseView && geomView)
|
||||||
{
|
{
|
||||||
if (eclipseView->eclipseCase()->reservoirData() && geomView->geoMechCase() && geomView->geoMechCase()->geoMechData())
|
if (eclipseView->eclipseCase()->eclipseCaseData() && geomView->geoMechCase() && geomView->geoMechCase()->geoMechData())
|
||||||
{
|
{
|
||||||
RigMainGrid* eclGrid = eclipseView->mainGrid();
|
RigMainGrid* eclGrid = eclipseView->mainGrid();
|
||||||
RigFemPart* femPart = geomView->geoMechCase()->geoMechData()->femParts()->part(0);
|
RigFemPart* femPart = geomView->geoMechCase()->geoMechData()->femParts()->part(0);
|
||||||
|
@ -253,7 +253,7 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate()
|
|||||||
|
|
||||||
m_eclipseResultDefinition->loadResult();
|
m_eclipseResultDefinition->loadResult();
|
||||||
|
|
||||||
cvf::ref<RigResultAccessor> resAcc = RigResultAccessorFactory::createFromResultDefinition(eclipseCase->reservoirData(),
|
cvf::ref<RigResultAccessor> resAcc = RigResultAccessorFactory::createFromResultDefinition(eclipseCase->eclipseCaseData(),
|
||||||
0,
|
0,
|
||||||
m_timeStep,
|
m_timeStep,
|
||||||
m_eclipseResultDefinition);
|
m_eclipseResultDefinition);
|
||||||
@ -263,7 +263,7 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate()
|
|||||||
eclExtractor->curveData(resAcc.p(), &values);
|
eclExtractor->curveData(resAcc.p(), &values);
|
||||||
}
|
}
|
||||||
|
|
||||||
RigEclipseCaseData::UnitsType eclipseUnitsType = eclipseCase->reservoirData()->unitsType();
|
RigEclipseCaseData::UnitsType eclipseUnitsType = eclipseCase->eclipseCaseData()->unitsType();
|
||||||
if (eclipseUnitsType == RigEclipseCaseData::UNITS_FIELD)
|
if (eclipseUnitsType == RigEclipseCaseData::UNITS_FIELD)
|
||||||
{
|
{
|
||||||
// See https://github.com/OPM/ResInsight/issues/538
|
// See https://github.com/OPM/ResInsight/issues/538
|
||||||
@ -507,9 +507,9 @@ QString RimWellLogExtractionCurve::createCurveAutoName()
|
|||||||
if (eclipseCase)
|
if (eclipseCase)
|
||||||
{
|
{
|
||||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(m_eclipseResultDefinition->porosityModel());
|
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(m_eclipseResultDefinition->porosityModel());
|
||||||
if (eclipseCase->reservoirData())
|
if (eclipseCase->eclipseCaseData())
|
||||||
{
|
{
|
||||||
maxTimeStep = eclipseCase->reservoirData()->results(porosityModel)->maxTimeStepCount();
|
maxTimeStep = eclipseCase->eclipseCaseData()->results(porosityModel)->maxTimeStepCount();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (geomCase)
|
else if (geomCase)
|
||||||
@ -605,7 +605,7 @@ QString RimWellLogExtractionCurve::wellDate() const
|
|||||||
if (eclipseCase)
|
if (eclipseCase)
|
||||||
{
|
{
|
||||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(m_eclipseResultDefinition->porosityModel());
|
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(m_eclipseResultDefinition->porosityModel());
|
||||||
if (eclipseCase->reservoirData())
|
if (eclipseCase->eclipseCaseData())
|
||||||
{
|
{
|
||||||
timeStepNames = eclipseCase->timeStepStrings();
|
timeStepNames = eclipseCase->timeStepStrings();
|
||||||
}
|
}
|
||||||
|
@ -57,12 +57,12 @@ RimWellLogPlotCollection::~RimWellLogPlotCollection()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigEclipseWellLogExtractor* RimWellLogPlotCollection::findOrCreateExtractor(RimWellPath* wellPath, RimEclipseCase* eclCase)
|
RigEclipseWellLogExtractor* RimWellLogPlotCollection::findOrCreateExtractor(RimWellPath* wellPath, RimEclipseCase* eclCase)
|
||||||
{
|
{
|
||||||
if (!(wellPath && eclCase && wellPath->wellPathGeometry() && eclCase->reservoirData()))
|
if (!(wellPath && eclCase && wellPath->wellPathGeometry() && eclCase->eclipseCaseData()))
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
RigEclipseCaseData* eclCaseData = eclCase->reservoirData();
|
RigEclipseCaseData* eclCaseData = eclCase->eclipseCaseData();
|
||||||
RigWellPath* wellPathGeom = wellPath->wellPathGeometry();
|
RigWellPath* wellPathGeom = wellPath->wellPathGeometry();
|
||||||
for (size_t exIdx = 0; exIdx < m_extractors.size(); ++exIdx)
|
for (size_t exIdx = 0; exIdx < m_extractors.size(); ++exIdx)
|
||||||
{
|
{
|
||||||
|
@ -68,7 +68,7 @@ const RigActiveCellInfo * RigFlowDiagResults::activeCellInfo(const RigFlowDiagRe
|
|||||||
RimEclipseResultCase* eclCase;
|
RimEclipseResultCase* eclCase;
|
||||||
m_flowDiagSolution->firstAncestorOrThisOfType(eclCase);
|
m_flowDiagSolution->firstAncestorOrThisOfType(eclCase);
|
||||||
|
|
||||||
return eclCase->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS); // Todo: base on resVarAddr member
|
return eclCase->eclipseCaseData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS); // Todo: base on resVarAddr member
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -140,7 +140,7 @@ RigFlowDiagTimeStepResult RigFlowDiagSolverInterface::calculate(size_t timeStepI
|
|||||||
{
|
{
|
||||||
using namespace Opm::FlowDiagnostics;
|
using namespace Opm::FlowDiagnostics;
|
||||||
|
|
||||||
RigFlowDiagTimeStepResult result(m_eclipseCase->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->reservoirActiveCellCount());
|
RigFlowDiagTimeStepResult result(m_eclipseCase->eclipseCaseData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->reservoirActiveCellCount());
|
||||||
|
|
||||||
caf::ProgressInfo progressInfo(8, "Calculating Flow Diagnostics");
|
caf::ProgressInfo progressInfo(8, "Calculating Flow Diagnostics");
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ RigFlowDiagTimeStepResult RigFlowDiagSolverInterface::calculate(size_t timeStepI
|
|||||||
m_opmFldData->restartFileNames = RifEclipseOutputFileTools::filterFileNamesOfType(m_filesWithSameBaseName, ECL_RESTART_FILE);
|
m_opmFldData->restartFileNames = RifEclipseOutputFileTools::filterFileNamesOfType(m_filesWithSameBaseName, ECL_RESTART_FILE);
|
||||||
|
|
||||||
size_t restartFileCount = static_cast<size_t>(m_opmFldData->restartFileNames.size());
|
size_t restartFileCount = static_cast<size_t>(m_opmFldData->restartFileNames.size());
|
||||||
size_t maxTimeStepCount = m_eclipseCase->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->maxTimeStepCount();
|
size_t maxTimeStepCount = m_eclipseCase->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->maxTimeStepCount();
|
||||||
|
|
||||||
if (restartFileCount <= timeStepIndex && restartFileCount != maxTimeStepCount )
|
if (restartFileCount <= timeStepIndex && restartFileCount != maxTimeStepCount )
|
||||||
{
|
{
|
||||||
@ -213,9 +213,9 @@ RigFlowDiagTimeStepResult RigFlowDiagSolverInterface::calculate(size_t timeStepI
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t resultIndexWithMaxTimeSteps = cvf::UNDEFINED_SIZE_T;
|
size_t resultIndexWithMaxTimeSteps = cvf::UNDEFINED_SIZE_T;
|
||||||
m_eclipseCase->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->maxTimeStepCount(&resultIndexWithMaxTimeSteps);
|
m_eclipseCase->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->maxTimeStepCount(&resultIndexWithMaxTimeSteps);
|
||||||
|
|
||||||
int reportStepNumber = m_eclipseCase->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->reportStepNumber(resultIndexWithMaxTimeSteps, timeStepIndex);
|
int reportStepNumber = m_eclipseCase->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->reportStepNumber(resultIndexWithMaxTimeSteps, timeStepIndex);
|
||||||
|
|
||||||
if ( ! m_opmFldData->eclGraph.selectReportStep(reportStepNumber) )
|
if ( ! m_opmFldData->eclGraph.selectReportStep(reportStepNumber) )
|
||||||
{
|
{
|
||||||
|
@ -59,7 +59,7 @@ void RigSimulationWellCenterLineCalculator::calculateWellPipeDynamicCenterline(R
|
|||||||
|
|
||||||
CVF_ASSERT(eclipseView);
|
CVF_ASSERT(eclipseView);
|
||||||
|
|
||||||
RigEclipseCaseData* eclipseCaseData = eclipseView->eclipseCase()->reservoirData();
|
RigEclipseCaseData* eclipseCaseData = eclipseView->eclipseCase()->eclipseCaseData();
|
||||||
bool isAutoDetectBranches = eclipseView->wellCollection()->isAutoDetectingBranches();
|
bool isAutoDetectBranches = eclipseView->wellCollection()->isAutoDetectingBranches();
|
||||||
|
|
||||||
bool useAllCellCenters = rimWell->isUsingCellCenterForPipe();
|
bool useAllCellCenters = rimWell->isUsingCellCenterForPipe();
|
||||||
|
@ -65,11 +65,11 @@ public:
|
|||||||
size_t jCount = 0;
|
size_t jCount = 0;
|
||||||
size_t kCount = 0;
|
size_t kCount = 0;
|
||||||
|
|
||||||
if (rimCase && rimCase->reservoirData() && rimCase->reservoirData()->mainGrid())
|
if (rimCase && rimCase->eclipseCaseData() && rimCase->eclipseCaseData()->mainGrid())
|
||||||
{
|
{
|
||||||
iCount = rimCase->reservoirData()->mainGrid()->cellCountI();
|
iCount = rimCase->eclipseCaseData()->mainGrid()->cellCountI();
|
||||||
jCount = rimCase->reservoirData()->mainGrid()->cellCountJ();
|
jCount = rimCase->eclipseCaseData()->mainGrid()->cellCountJ();
|
||||||
kCount = rimCase->reservoirData()->mainGrid()->cellCountK();
|
kCount = rimCase->eclipseCaseData()->mainGrid()->cellCountK();
|
||||||
}
|
}
|
||||||
|
|
||||||
socketStream << (quint64)iCount << (quint64)jCount << (quint64)kCount;
|
socketStream << (quint64)iCount << (quint64)jCount << (quint64)kCount;
|
||||||
@ -109,7 +109,7 @@ public:
|
|||||||
// Write data back to octave: columnCount, bytesPrTimestep, GridNr I J K ParentGridNr PI PJ PK CoarseBoxIdx
|
// Write data back to octave: columnCount, bytesPrTimestep, GridNr I J K ParentGridNr PI PJ PK CoarseBoxIdx
|
||||||
|
|
||||||
caf::FixedArray<std::vector<qint32>, 9> activeCellInfo;
|
caf::FixedArray<std::vector<qint32>, 9> activeCellInfo;
|
||||||
if (!(rimCase && rimCase->reservoirData() && rimCase->reservoirData()->mainGrid()) )
|
if (!(rimCase && rimCase->eclipseCaseData() && rimCase->eclipseCaseData()->mainGrid()) )
|
||||||
{
|
{
|
||||||
// No data available
|
// No data available
|
||||||
socketStream << (quint64)0 << (quint64)0 ;
|
socketStream << (quint64)0 << (quint64)0 ;
|
||||||
@ -156,12 +156,12 @@ public:
|
|||||||
hostCellK.clear();
|
hostCellK.clear();
|
||||||
globalCoarseningBoxIdx.clear();
|
globalCoarseningBoxIdx.clear();
|
||||||
|
|
||||||
if (!reservoirCase || !reservoirCase->reservoirData() || !reservoirCase->reservoirData()->mainGrid())
|
if (!reservoirCase || !reservoirCase->eclipseCaseData() || !reservoirCase->eclipseCaseData()->mainGrid())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RigActiveCellInfo* actCellInfo = reservoirCase->reservoirData()->activeCellInfo(porosityModel);
|
RigActiveCellInfo* actCellInfo = reservoirCase->eclipseCaseData()->activeCellInfo(porosityModel);
|
||||||
size_t numMatrixModelActiveCells = actCellInfo->reservoirActiveCellCount();
|
size_t numMatrixModelActiveCells = actCellInfo->reservoirActiveCellCount();
|
||||||
|
|
||||||
gridNumber.reserve(numMatrixModelActiveCells);
|
gridNumber.reserve(numMatrixModelActiveCells);
|
||||||
@ -174,18 +174,18 @@ public:
|
|||||||
hostCellK.reserve(numMatrixModelActiveCells);
|
hostCellK.reserve(numMatrixModelActiveCells);
|
||||||
globalCoarseningBoxIdx.reserve(numMatrixModelActiveCells);
|
globalCoarseningBoxIdx.reserve(numMatrixModelActiveCells);
|
||||||
|
|
||||||
const std::vector<RigCell>& reservoirCells = reservoirCase->reservoirData()->mainGrid()->globalCellArray();
|
const std::vector<RigCell>& reservoirCells = reservoirCase->eclipseCaseData()->mainGrid()->globalCellArray();
|
||||||
|
|
||||||
|
|
||||||
std::vector<size_t> globalCoarseningBoxIndexStart;
|
std::vector<size_t> globalCoarseningBoxIndexStart;
|
||||||
{
|
{
|
||||||
size_t globalCoarseningBoxCount = 0;
|
size_t globalCoarseningBoxCount = 0;
|
||||||
|
|
||||||
for (size_t gridIdx = 0; gridIdx < reservoirCase->reservoirData()->gridCount(); gridIdx++)
|
for (size_t gridIdx = 0; gridIdx < reservoirCase->eclipseCaseData()->gridCount(); gridIdx++)
|
||||||
{
|
{
|
||||||
globalCoarseningBoxIndexStart.push_back(globalCoarseningBoxCount);
|
globalCoarseningBoxIndexStart.push_back(globalCoarseningBoxCount);
|
||||||
|
|
||||||
RigGridBase* grid = reservoirCase->reservoirData()->grid(gridIdx);
|
RigGridBase* grid = reservoirCase->eclipseCaseData()->grid(gridIdx);
|
||||||
|
|
||||||
size_t localCoarseningBoxCount = grid->coarseningBoxCount();
|
size_t localCoarseningBoxCount = grid->coarseningBoxCount();
|
||||||
globalCoarseningBoxCount += localCoarseningBoxCount;
|
globalCoarseningBoxCount += localCoarseningBoxCount;
|
||||||
@ -270,7 +270,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
RimEclipseCase* rimCase = server->findReservoir(argCaseGroupId);
|
RimEclipseCase* rimCase = server->findReservoir(argCaseGroupId);
|
||||||
if (!rimCase || !rimCase->reservoirData() || !rimCase->reservoirData()->mainGrid())
|
if (!rimCase || !rimCase->eclipseCaseData() || !rimCase->eclipseCaseData()->mainGrid())
|
||||||
{
|
{
|
||||||
quint64 byteCount = 0;
|
quint64 byteCount = 0;
|
||||||
|
|
||||||
@ -281,13 +281,13 @@ public:
|
|||||||
|
|
||||||
// Write data back to octave: I1, I2, J1, J2, K1, K2 for all coarsening boxes
|
// Write data back to octave: I1, I2, J1, J2, K1, K2 for all coarsening boxes
|
||||||
|
|
||||||
if (rimCase && rimCase->reservoirData() && rimCase->reservoirData()->mainGrid())
|
if (rimCase && rimCase->eclipseCaseData() && rimCase->eclipseCaseData()->mainGrid())
|
||||||
{
|
{
|
||||||
size_t globalCoarseningBoxCount = 0;
|
size_t globalCoarseningBoxCount = 0;
|
||||||
|
|
||||||
for (size_t gridIdx = 0; gridIdx < rimCase->reservoirData()->gridCount(); gridIdx++)
|
for (size_t gridIdx = 0; gridIdx < rimCase->eclipseCaseData()->gridCount(); gridIdx++)
|
||||||
{
|
{
|
||||||
RigGridBase* grid = rimCase->reservoirData()->grid(gridIdx);
|
RigGridBase* grid = rimCase->eclipseCaseData()->grid(gridIdx);
|
||||||
|
|
||||||
size_t localCoarseningBoxCount = grid->coarseningBoxCount();
|
size_t localCoarseningBoxCount = grid->coarseningBoxCount();
|
||||||
globalCoarseningBoxCount += localCoarseningBoxCount;
|
globalCoarseningBoxCount += localCoarseningBoxCount;
|
||||||
@ -296,9 +296,9 @@ public:
|
|||||||
quint64 byteCount = globalCoarseningBoxCount * 6 * sizeof(qint32);
|
quint64 byteCount = globalCoarseningBoxCount * 6 * sizeof(qint32);
|
||||||
socketStream << byteCount;
|
socketStream << byteCount;
|
||||||
|
|
||||||
for (size_t gridIdx = 0; gridIdx < rimCase->reservoirData()->gridCount(); gridIdx++)
|
for (size_t gridIdx = 0; gridIdx < rimCase->eclipseCaseData()->gridCount(); gridIdx++)
|
||||||
{
|
{
|
||||||
RigGridBase* grid = rimCase->reservoirData()->grid(gridIdx);
|
RigGridBase* grid = rimCase->eclipseCaseData()->grid(gridIdx);
|
||||||
|
|
||||||
size_t localCoarseningBoxCount = grid->coarseningBoxCount();
|
size_t localCoarseningBoxCount = grid->coarseningBoxCount();
|
||||||
for (size_t boxIdx = 0; boxIdx < localCoarseningBoxCount; boxIdx++)
|
for (size_t boxIdx = 0; boxIdx < localCoarseningBoxCount; boxIdx++)
|
||||||
@ -342,7 +342,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
RimEclipseCase* rimCase = server->findReservoir(argCaseGroupId);
|
RimEclipseCase* rimCase = server->findReservoir(argCaseGroupId);
|
||||||
if (!rimCase || !rimCase->reservoirData() || !rimCase->reservoirData()->mainGrid())
|
if (!rimCase || !rimCase->eclipseCaseData() || !rimCase->eclipseCaseData()->mainGrid())
|
||||||
{
|
{
|
||||||
quint64 byteCount = 0;
|
quint64 byteCount = 0;
|
||||||
|
|
||||||
@ -354,10 +354,10 @@ public:
|
|||||||
// Write data back to octave: I, J, K dimensions
|
// Write data back to octave: I, J, K dimensions
|
||||||
|
|
||||||
|
|
||||||
if (rimCase && rimCase->reservoirData() && rimCase->reservoirData()->mainGrid())
|
if (rimCase && rimCase->eclipseCaseData() && rimCase->eclipseCaseData()->mainGrid())
|
||||||
{
|
{
|
||||||
std::vector<RigGridBase*> grids;
|
std::vector<RigGridBase*> grids;
|
||||||
rimCase->reservoirData()->allGrids(&grids);
|
rimCase->eclipseCaseData()->allGrids(&grids);
|
||||||
|
|
||||||
quint64 byteCount = grids.size() * 3 * sizeof(quint64);
|
quint64 byteCount = grids.size() * 3 * sizeof(quint64);
|
||||||
socketStream << byteCount;
|
socketStream << byteCount;
|
||||||
@ -404,15 +404,15 @@ public:
|
|||||||
|
|
||||||
bool canFetchData = true;
|
bool canFetchData = true;
|
||||||
|
|
||||||
if (!rimCase || !rimCase->reservoirData())
|
if (!rimCase || !rimCase->eclipseCaseData())
|
||||||
{
|
{
|
||||||
canFetchData = false;
|
canFetchData = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t scalarIndexWithMaxTimeStepCount = cvf::UNDEFINED_SIZE_T;
|
size_t scalarIndexWithMaxTimeStepCount = cvf::UNDEFINED_SIZE_T;
|
||||||
if (rimCase && rimCase->reservoirData())
|
if (rimCase && rimCase->eclipseCaseData())
|
||||||
{
|
{
|
||||||
rimCase->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->maxTimeStepCount(&scalarIndexWithMaxTimeStepCount);
|
rimCase->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->maxTimeStepCount(&scalarIndexWithMaxTimeStepCount);
|
||||||
if (scalarIndexWithMaxTimeStepCount == cvf::UNDEFINED_SIZE_T)
|
if (scalarIndexWithMaxTimeStepCount == cvf::UNDEFINED_SIZE_T)
|
||||||
{
|
{
|
||||||
canFetchData = false;
|
canFetchData = false;
|
||||||
@ -431,7 +431,7 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<QDateTime> timeStepDates = rimCase->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->timeStepDates(scalarIndexWithMaxTimeStepCount);
|
std::vector<QDateTime> timeStepDates = rimCase->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->timeStepDates(scalarIndexWithMaxTimeStepCount);
|
||||||
|
|
||||||
quint64 timeStepCount = timeStepDates.size();
|
quint64 timeStepCount = timeStepDates.size();
|
||||||
quint64 byteCount = sizeof(quint64) + 6 * timeStepCount * sizeof(qint32);
|
quint64 byteCount = sizeof(quint64) + 6 * timeStepCount * sizeof(qint32);
|
||||||
@ -491,15 +491,15 @@ public:
|
|||||||
|
|
||||||
bool canFetchData = true;
|
bool canFetchData = true;
|
||||||
|
|
||||||
if (!rimCase || !rimCase->reservoirData())
|
if (!rimCase || !rimCase->eclipseCaseData())
|
||||||
{
|
{
|
||||||
canFetchData = false;
|
canFetchData = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t scalarIndexWithMaxTimeStepCount = cvf::UNDEFINED_SIZE_T;
|
size_t scalarIndexWithMaxTimeStepCount = cvf::UNDEFINED_SIZE_T;
|
||||||
if (rimCase && rimCase->reservoirData())
|
if (rimCase && rimCase->eclipseCaseData())
|
||||||
{
|
{
|
||||||
rimCase->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->maxTimeStepCount(&scalarIndexWithMaxTimeStepCount);
|
rimCase->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->maxTimeStepCount(&scalarIndexWithMaxTimeStepCount);
|
||||||
if (scalarIndexWithMaxTimeStepCount == cvf::UNDEFINED_SIZE_T)
|
if (scalarIndexWithMaxTimeStepCount == cvf::UNDEFINED_SIZE_T)
|
||||||
{
|
{
|
||||||
canFetchData = false;
|
canFetchData = false;
|
||||||
@ -518,7 +518,7 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<QDateTime> timeStepDates = rimCase->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->timeStepDates(scalarIndexWithMaxTimeStepCount);
|
std::vector<QDateTime> timeStepDates = rimCase->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->timeStepDates(scalarIndexWithMaxTimeStepCount);
|
||||||
|
|
||||||
quint64 timeStepCount = timeStepDates.size();
|
quint64 timeStepCount = timeStepDates.size();
|
||||||
quint64 byteCount = sizeof(quint64) + timeStepCount * sizeof(qint32);
|
quint64 byteCount = sizeof(quint64) + timeStepCount * sizeof(qint32);
|
||||||
|
@ -57,14 +57,14 @@ public:
|
|||||||
RimEclipseCase* rimCase = RiaSocketTools::findCaseFromArgs(server, args);
|
RimEclipseCase* rimCase = RiaSocketTools::findCaseFromArgs(server, args);
|
||||||
size_t argGridIndex = args[2].toUInt();
|
size_t argGridIndex = args[2].toUInt();
|
||||||
|
|
||||||
if (!rimCase || !rimCase->reservoirData() || (argGridIndex >= rimCase->reservoirData()->gridCount()) )
|
if (!rimCase || !rimCase->eclipseCaseData() || (argGridIndex >= rimCase->eclipseCaseData()->gridCount()) )
|
||||||
{
|
{
|
||||||
// No data available
|
// No data available
|
||||||
socketStream << (quint64)0 << (quint64)0 << (quint64)0 << (quint64)0 << (quint64)0;
|
socketStream << (quint64)0 << (quint64)0 << (quint64)0 << (quint64)0 << (quint64)0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
RigGridBase* rigGrid = rimCase->reservoirData()->grid(argGridIndex);
|
RigGridBase* rigGrid = rimCase->eclipseCaseData()->grid(argGridIndex);
|
||||||
|
|
||||||
quint64 cellCount = (quint64)rigGrid->cellCount();
|
quint64 cellCount = (quint64)rigGrid->cellCount();
|
||||||
quint64 cellCountI = (quint64)rigGrid->cellCountI();
|
quint64 cellCountI = (quint64)rigGrid->cellCountI();
|
||||||
@ -146,15 +146,15 @@ public:
|
|||||||
porosityModelEnum = RifReaderInterface::FRACTURE_RESULTS;
|
porosityModelEnum = RifReaderInterface::FRACTURE_RESULTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!rimCase || !rimCase->reservoirData())
|
if (!rimCase || !rimCase->eclipseCaseData())
|
||||||
{
|
{
|
||||||
// No data available
|
// No data available
|
||||||
socketStream << (quint64)0 << (quint64)0 ;
|
socketStream << (quint64)0 << (quint64)0 ;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
RigActiveCellInfo* actCellInfo = rimCase->reservoirData()->activeCellInfo(porosityModelEnum);
|
RigActiveCellInfo* actCellInfo = rimCase->eclipseCaseData()->activeCellInfo(porosityModelEnum);
|
||||||
RigMainGrid* mainGrid = rimCase->reservoirData()->mainGrid();
|
RigMainGrid* mainGrid = rimCase->eclipseCaseData()->mainGrid();
|
||||||
|
|
||||||
size_t activeCellCount = actCellInfo->reservoirActiveCellCount();
|
size_t activeCellCount = actCellInfo->reservoirActiveCellCount();
|
||||||
size_t doubleValueCount = activeCellCount * 3;
|
size_t doubleValueCount = activeCellCount * 3;
|
||||||
@ -218,14 +218,14 @@ public:
|
|||||||
RimEclipseCase* rimCase = RiaSocketTools::findCaseFromArgs(server, args);
|
RimEclipseCase* rimCase = RiaSocketTools::findCaseFromArgs(server, args);
|
||||||
size_t argGridIndex = args[2].toUInt();
|
size_t argGridIndex = args[2].toUInt();
|
||||||
|
|
||||||
if (!rimCase || !rimCase->reservoirData() || (argGridIndex >= rimCase->reservoirData()->gridCount()) )
|
if (!rimCase || !rimCase->eclipseCaseData() || (argGridIndex >= rimCase->eclipseCaseData()->gridCount()) )
|
||||||
{
|
{
|
||||||
// No data available
|
// No data available
|
||||||
socketStream << (quint64)0 << (quint64)0 << (quint64)0 << (quint64)0 << (quint64)0;
|
socketStream << (quint64)0 << (quint64)0 << (quint64)0 << (quint64)0 << (quint64)0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
RigGridBase* rigGrid = rimCase->reservoirData()->grid(argGridIndex);
|
RigGridBase* rigGrid = rimCase->eclipseCaseData()->grid(argGridIndex);
|
||||||
|
|
||||||
quint64 cellCount = (quint64)rigGrid->cellCount();
|
quint64 cellCount = (quint64)rigGrid->cellCount();
|
||||||
quint64 cellCountI = (quint64)rigGrid->cellCountI();
|
quint64 cellCountI = (quint64)rigGrid->cellCountI();
|
||||||
@ -315,15 +315,15 @@ public:
|
|||||||
porosityModelEnum = RifReaderInterface::FRACTURE_RESULTS;
|
porosityModelEnum = RifReaderInterface::FRACTURE_RESULTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!rimCase || !rimCase->reservoirData() )
|
if (!rimCase || !rimCase->eclipseCaseData() )
|
||||||
{
|
{
|
||||||
// No data available
|
// No data available
|
||||||
socketStream << (quint64)0 << (quint64)0 ;
|
socketStream << (quint64)0 << (quint64)0 ;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
RigActiveCellInfo* actCellInfo = rimCase->reservoirData()->activeCellInfo(porosityModelEnum);
|
RigActiveCellInfo* actCellInfo = rimCase->eclipseCaseData()->activeCellInfo(porosityModelEnum);
|
||||||
RigMainGrid* mainGrid = rimCase->reservoirData()->mainGrid();
|
RigMainGrid* mainGrid = rimCase->eclipseCaseData()->mainGrid();
|
||||||
|
|
||||||
size_t activeCellCount = actCellInfo->reservoirActiveCellCount();
|
size_t activeCellCount = actCellInfo->reservoirActiveCellCount();
|
||||||
size_t doubleValueCount = activeCellCount * 3 * 8;
|
size_t doubleValueCount = activeCellCount * 3 * 8;
|
||||||
|
@ -139,7 +139,7 @@ public:
|
|||||||
|
|
||||||
// then the byte-size of the result values in one timestep
|
// then the byte-size of the result values in one timestep
|
||||||
|
|
||||||
const RigActiveCellInfo* activeInfo = rimCase->reservoirData()->activeCellInfo(porosityModelEnum);
|
const RigActiveCellInfo* activeInfo = rimCase->eclipseCaseData()->activeCellInfo(porosityModelEnum);
|
||||||
size_t timestepResultCount = activeInfo->reservoirActiveCellCount();
|
size_t timestepResultCount = activeInfo->reservoirActiveCellCount();
|
||||||
|
|
||||||
quint64 timestepByteCount = (quint64)(timestepResultCount*sizeof(double));
|
quint64 timestepByteCount = (quint64)(timestepResultCount*sizeof(double));
|
||||||
@ -241,7 +241,7 @@ public:
|
|||||||
|
|
||||||
size_t scalarResultIndex = cvf::UNDEFINED_SIZE_T;
|
size_t scalarResultIndex = cvf::UNDEFINED_SIZE_T;
|
||||||
|
|
||||||
if (gridIdx < 0 || rimCase->reservoirData()->gridCount() <= (size_t)gridIdx)
|
if (gridIdx < 0 || rimCase->eclipseCaseData()->gridCount() <= (size_t)gridIdx)
|
||||||
{
|
{
|
||||||
server->errorMessageDialog()->showMessage("ResInsight SocketServer: riGetGridProperty : \n"
|
server->errorMessageDialog()->showMessage("ResInsight SocketServer: riGetGridProperty : \n"
|
||||||
"The gridIndex \"" + QString::number(gridIdx) + "\" does not point to an existing grid." );
|
"The gridIndex \"" + QString::number(gridIdx) + "\" does not point to an existing grid." );
|
||||||
@ -304,7 +304,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
RigGridBase* rigGrid = rimCase->reservoirData()->grid(gridIdx);
|
RigGridBase* rigGrid = rimCase->eclipseCaseData()->grid(gridIdx);
|
||||||
|
|
||||||
quint64 cellCountI = (quint64)rigGrid->cellCountI();
|
quint64 cellCountI = (quint64)rigGrid->cellCountI();
|
||||||
quint64 cellCountJ = (quint64)rigGrid->cellCountJ();
|
quint64 cellCountJ = (quint64)rigGrid->cellCountJ();
|
||||||
@ -321,7 +321,7 @@ public:
|
|||||||
|
|
||||||
for (size_t tsIdx = 0; tsIdx < timestepCount; tsIdx++)
|
for (size_t tsIdx = 0; tsIdx < timestepCount; tsIdx++)
|
||||||
{
|
{
|
||||||
cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createFromUiResultName(rimCase->reservoirData(), gridIdx, porosityModelEnum, requestedTimesteps[tsIdx], propertyName);
|
cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createFromUiResultName(rimCase->eclipseCaseData(), gridIdx, porosityModelEnum, requestedTimesteps[tsIdx], propertyName);
|
||||||
|
|
||||||
if (resultAccessor.isNull())
|
if (resultAccessor.isNull())
|
||||||
{
|
{
|
||||||
@ -521,7 +521,7 @@ public:
|
|||||||
|
|
||||||
size_t cellCountFromOctave = m_bytesPerTimeStepToRead / sizeof(double);
|
size_t cellCountFromOctave = m_bytesPerTimeStepToRead / sizeof(double);
|
||||||
|
|
||||||
RigActiveCellInfo* activeCellInfo = m_currentReservoir->reservoirData()->activeCellInfo(m_porosityModelEnum);
|
RigActiveCellInfo* activeCellInfo = m_currentReservoir->eclipseCaseData()->activeCellInfo(m_porosityModelEnum);
|
||||||
|
|
||||||
size_t activeCellCountReservoir = activeCellInfo->reservoirActiveCellCount();
|
size_t activeCellCountReservoir = activeCellInfo->reservoirActiveCellCount();
|
||||||
size_t totalCellCount = activeCellInfo->reservoirCellCount();
|
size_t totalCellCount = activeCellInfo->reservoirCellCount();
|
||||||
@ -644,8 +644,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( m_currentScalarIndex != cvf::UNDEFINED_SIZE_T &&
|
if( m_currentScalarIndex != cvf::UNDEFINED_SIZE_T &&
|
||||||
m_currentReservoir->reservoirData() &&
|
m_currentReservoir->eclipseCaseData() &&
|
||||||
m_currentReservoir->reservoirData()->results(m_porosityModelEnum) )
|
m_currentReservoir->eclipseCaseData()->results(m_porosityModelEnum) )
|
||||||
{
|
{
|
||||||
// Adjust the result data if only one time step is requested so the result behaves like a static result
|
// Adjust the result data if only one time step is requested so the result behaves like a static result
|
||||||
if (m_requestedTimesteps.size() == 1 && m_currentScalarIndex != cvf::UNDEFINED_SIZE_T)
|
if (m_requestedTimesteps.size() == 1 && m_currentScalarIndex != cvf::UNDEFINED_SIZE_T)
|
||||||
@ -667,7 +667,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_currentReservoir->reservoirData()->results(m_porosityModelEnum)->recalculateStatistics(m_currentScalarIndex);
|
m_currentReservoir->eclipseCaseData()->results(m_porosityModelEnum)->recalculateStatistics(m_currentScalarIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < m_currentReservoir->reservoirViews.size(); ++i)
|
for (size_t i = 0; i < m_currentReservoir->reservoirViews.size(); ++i)
|
||||||
@ -749,7 +749,7 @@ public:
|
|||||||
m_porosityModelEnum = RifReaderInterface::FRACTURE_RESULTS;
|
m_porosityModelEnum = RifReaderInterface::FRACTURE_RESULTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
RigGridBase* grid = rimCase->reservoirData()->grid(m_currentGridIndex);
|
RigGridBase* grid = rimCase->eclipseCaseData()->grid(m_currentGridIndex);
|
||||||
if (!grid)
|
if (!grid)
|
||||||
{
|
{
|
||||||
server->errorMessageDialog()->showMessage(RiaSocketServer::tr("ResInsight SocketServer: \n") + RiaSocketServer::tr("Could not find the grid index : %1").arg(m_currentGridIndex));
|
server->errorMessageDialog()->showMessage(RiaSocketServer::tr("ResInsight SocketServer: \n") + RiaSocketServer::tr("Could not find the grid index : %1").arg(m_currentGridIndex));
|
||||||
@ -889,7 +889,7 @@ public:
|
|||||||
|
|
||||||
if (!currentClient->bytesAvailable()) return false;
|
if (!currentClient->bytesAvailable()) return false;
|
||||||
|
|
||||||
RigGridBase* grid = m_currentReservoir->reservoirData()->grid(m_currentGridIndex);
|
RigGridBase* grid = m_currentReservoir->eclipseCaseData()->grid(m_currentGridIndex);
|
||||||
if (!grid)
|
if (!grid)
|
||||||
{
|
{
|
||||||
server->errorMessageDialog()->showMessage(RiaSocketServer::tr("ResInsight SocketServer: \n") +
|
server->errorMessageDialog()->showMessage(RiaSocketServer::tr("ResInsight SocketServer: \n") +
|
||||||
@ -971,7 +971,7 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
cvf::ref<RigResultModifier> resultModifier = RigResultModifierFactory::createResultModifier(m_currentReservoir->reservoirData(), grid->gridIndex(), m_porosityModelEnum, m_requestedTimesteps[m_currentTimeStepNumberToRead], m_currentScalarIndex);
|
cvf::ref<RigResultModifier> resultModifier = RigResultModifierFactory::createResultModifier(m_currentReservoir->eclipseCaseData(), grid->gridIndex(), m_porosityModelEnum, m_requestedTimesteps[m_currentTimeStepNumberToRead], m_currentScalarIndex);
|
||||||
if (!resultModifier.isNull())
|
if (!resultModifier.isNull())
|
||||||
{
|
{
|
||||||
for (size_t cellIdx = 0; static_cast<size_t>(cellIdx) < cellCountFromOctave; cellIdx++)
|
for (size_t cellIdx = 0; static_cast<size_t>(cellIdx) < cellCountFromOctave; cellIdx++)
|
||||||
@ -1007,8 +1007,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( m_currentScalarIndex != cvf::UNDEFINED_SIZE_T &&
|
if( m_currentScalarIndex != cvf::UNDEFINED_SIZE_T &&
|
||||||
m_currentReservoir->reservoirData() &&
|
m_currentReservoir->eclipseCaseData() &&
|
||||||
m_currentReservoir->reservoirData()->results(m_porosityModelEnum) )
|
m_currentReservoir->eclipseCaseData()->results(m_porosityModelEnum) )
|
||||||
{
|
{
|
||||||
// Adjust the result data if only one time step is requested so the result behaves like a static result
|
// Adjust the result data if only one time step is requested so the result behaves like a static result
|
||||||
if (m_requestedTimesteps.size() == 1 && m_currentScalarIndex != cvf::UNDEFINED_SIZE_T)
|
if (m_requestedTimesteps.size() == 1 && m_currentScalarIndex != cvf::UNDEFINED_SIZE_T)
|
||||||
@ -1030,7 +1030,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_currentReservoir->reservoirData()->results(m_porosityModelEnum)->recalculateStatistics(m_currentScalarIndex);
|
m_currentReservoir->eclipseCaseData()->results(m_porosityModelEnum)->recalculateStatistics(m_currentScalarIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < m_currentReservoir->reservoirViews.size(); ++i)
|
for (size_t i = 0; i < m_currentReservoir->reservoirViews.size(); ++i)
|
||||||
@ -1102,7 +1102,7 @@ public:
|
|||||||
std::vector<QString> propNames;
|
std::vector<QString> propNames;
|
||||||
std::vector<QString> propTypes;
|
std::vector<QString> propTypes;
|
||||||
|
|
||||||
RigCaseCellResultsData* results = rimCase->reservoirData()->results(porosityModelEnum);
|
RigCaseCellResultsData* results = rimCase->eclipseCaseData()->results(porosityModelEnum);
|
||||||
|
|
||||||
std::vector<RimDefines::ResultCatType> resTypes;
|
std::vector<RimDefines::ResultCatType> resTypes;
|
||||||
std::vector<QString> resTypeNames;
|
std::vector<QString> resTypeNames;
|
||||||
|
@ -55,7 +55,7 @@ public:
|
|||||||
|
|
||||||
std::vector<QString> wellNames;
|
std::vector<QString> wellNames;
|
||||||
|
|
||||||
const cvf::Collection<RigSingleWellResultsData>& wells = rimCase->reservoirData()->wellResults();
|
const cvf::Collection<RigSingleWellResultsData>& wells = rimCase->eclipseCaseData()->wellResults();
|
||||||
|
|
||||||
for (size_t wIdx = 0; wIdx < wells.size(); ++wIdx)
|
for (size_t wIdx = 0; wIdx < wells.size(); ++wIdx)
|
||||||
{
|
{
|
||||||
@ -112,7 +112,7 @@ public:
|
|||||||
std::vector<size_t> requestedTimesteps;
|
std::vector<size_t> requestedTimesteps;
|
||||||
//First find the well result for the correct well
|
//First find the well result for the correct well
|
||||||
|
|
||||||
const cvf::Collection<RigSingleWellResultsData>& allWellRes = rimCase->reservoirData()->wellResults();
|
const cvf::Collection<RigSingleWellResultsData>& allWellRes = rimCase->eclipseCaseData()->wellResults();
|
||||||
cvf::ref<RigSingleWellResultsData> currentWellResult;
|
cvf::ref<RigSingleWellResultsData> currentWellResult;
|
||||||
for (size_t tsIdx = 0; tsIdx < allWellRes.size(); ++tsIdx)
|
for (size_t tsIdx = 0; tsIdx < allWellRes.size(); ++tsIdx)
|
||||||
{
|
{
|
||||||
@ -247,7 +247,7 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const cvf::Collection<RigSingleWellResultsData>& allWellRes = rimCase->reservoirData()->wellResults();
|
const cvf::Collection<RigSingleWellResultsData>& allWellRes = rimCase->eclipseCaseData()->wellResults();
|
||||||
cvf::ref<RigSingleWellResultsData> currentWellResult;
|
cvf::ref<RigSingleWellResultsData> currentWellResult;
|
||||||
for (size_t cIdx = 0; cIdx < allWellRes.size(); ++cIdx)
|
for (size_t cIdx = 0; cIdx < allWellRes.size(); ++cIdx)
|
||||||
{
|
{
|
||||||
@ -284,7 +284,7 @@ public:
|
|||||||
// Fetch results
|
// Fetch results
|
||||||
const RigWellResultFrame& wellResFrame = currentWellResult->wellResultFrame(timeStepIdx);
|
const RigWellResultFrame& wellResFrame = currentWellResult->wellResultFrame(timeStepIdx);
|
||||||
std::vector<RigGridBase*> grids;
|
std::vector<RigGridBase*> grids;
|
||||||
rimCase->reservoirData()->allGrids(&grids);
|
rimCase->eclipseCaseData()->allGrids(&grids);
|
||||||
|
|
||||||
for (size_t bIdx = 0; bIdx < wellResFrame.m_wellResultBranches.size(); ++bIdx)
|
for (size_t bIdx = 0; bIdx < wellResFrame.m_wellResultBranches.size(); ++bIdx)
|
||||||
{
|
{
|
||||||
|
@ -140,7 +140,7 @@ QString RiuResultTextBuilder::topologyText(QString itemSeparator)
|
|||||||
|
|
||||||
if (m_reservoirView && m_reservoirView->eclipseCase())
|
if (m_reservoirView && m_reservoirView->eclipseCase())
|
||||||
{
|
{
|
||||||
const RigEclipseCaseData* eclipseCase = m_reservoirView->eclipseCase()->reservoirData();
|
const RigEclipseCaseData* eclipseCase = m_reservoirView->eclipseCase()->eclipseCaseData();
|
||||||
if (eclipseCase)
|
if (eclipseCase)
|
||||||
{
|
{
|
||||||
if (m_cellIndex != cvf::UNDEFINED_SIZE_T)
|
if (m_cellIndex != cvf::UNDEFINED_SIZE_T)
|
||||||
@ -186,9 +186,9 @@ QString RiuResultTextBuilder::gridResultDetails()
|
|||||||
{
|
{
|
||||||
QString text;
|
QString text;
|
||||||
|
|
||||||
if (m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase()->reservoirData())
|
if (m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase()->eclipseCaseData())
|
||||||
{
|
{
|
||||||
RigEclipseCaseData* eclipseCaseData = m_reservoirView->eclipseCase()->reservoirData();
|
RigEclipseCaseData* eclipseCaseData = m_reservoirView->eclipseCase()->eclipseCaseData();
|
||||||
RigGridBase* grid = eclipseCaseData->grid(m_gridIndex);
|
RigGridBase* grid = eclipseCaseData->grid(m_gridIndex);
|
||||||
|
|
||||||
this->appendTextFromResultColors(eclipseCaseData, m_gridIndex, m_cellIndex, m_timeStepIndex, m_reservoirView->cellResult(), &text);
|
this->appendTextFromResultColors(eclipseCaseData, m_gridIndex, m_cellIndex, m_timeStepIndex, m_reservoirView->cellResult(), &text);
|
||||||
@ -209,9 +209,9 @@ QString RiuResultTextBuilder::faultResultDetails()
|
|||||||
{
|
{
|
||||||
QString text;
|
QString text;
|
||||||
|
|
||||||
if (m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase()->reservoirData())
|
if (m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase()->eclipseCaseData())
|
||||||
{
|
{
|
||||||
RigEclipseCaseData* eclipseCaseData = m_reservoirView->eclipseCase()->reservoirData();
|
RigEclipseCaseData* eclipseCaseData = m_reservoirView->eclipseCase()->eclipseCaseData();
|
||||||
RigGridBase* grid = eclipseCaseData->grid(m_gridIndex);
|
RigGridBase* grid = eclipseCaseData->grid(m_gridIndex);
|
||||||
RigMainGrid* mainGrid = grid->mainGrid();
|
RigMainGrid* mainGrid = grid->mainGrid();
|
||||||
|
|
||||||
@ -252,7 +252,7 @@ QString RiuResultTextBuilder::formationDetails()
|
|||||||
|
|
||||||
size_t k = cvf::UNDEFINED_SIZE_T;
|
size_t k = cvf::UNDEFINED_SIZE_T;
|
||||||
{
|
{
|
||||||
const RigEclipseCaseData* eclipseData = m_reservoirView->eclipseCase()->reservoirData();
|
const RigEclipseCaseData* eclipseData = m_reservoirView->eclipseCase()->eclipseCaseData();
|
||||||
if(eclipseData)
|
if(eclipseData)
|
||||||
{
|
{
|
||||||
if(m_cellIndex != cvf::UNDEFINED_SIZE_T)
|
if(m_cellIndex != cvf::UNDEFINED_SIZE_T)
|
||||||
@ -300,9 +300,9 @@ QString RiuResultTextBuilder::faultResultText()
|
|||||||
{
|
{
|
||||||
QString text;
|
QString text;
|
||||||
|
|
||||||
if (m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase()->reservoirData())
|
if (m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase()->eclipseCaseData())
|
||||||
{
|
{
|
||||||
RigEclipseCaseData* eclipseCaseData = m_reservoirView->eclipseCase()->reservoirData();
|
RigEclipseCaseData* eclipseCaseData = m_reservoirView->eclipseCase()->eclipseCaseData();
|
||||||
RigGridBase* grid = eclipseCaseData->grid(m_gridIndex);
|
RigGridBase* grid = eclipseCaseData->grid(m_gridIndex);
|
||||||
RigMainGrid* mainGrid = grid->mainGrid();
|
RigMainGrid* mainGrid = grid->mainGrid();
|
||||||
|
|
||||||
@ -332,7 +332,7 @@ QString RiuResultTextBuilder::nncResultText()
|
|||||||
{
|
{
|
||||||
if (m_reservoirView.notNull() && m_reservoirView->eclipseCase())
|
if (m_reservoirView.notNull() && m_reservoirView->eclipseCase())
|
||||||
{
|
{
|
||||||
RigEclipseCaseData* eclipseCase = m_reservoirView->eclipseCase()->reservoirData();
|
RigEclipseCaseData* eclipseCase = m_reservoirView->eclipseCase()->eclipseCaseData();
|
||||||
|
|
||||||
RigMainGrid* grid = eclipseCase->mainGrid();
|
RigMainGrid* grid = eclipseCase->mainGrid();
|
||||||
CVF_ASSERT(grid);
|
CVF_ASSERT(grid);
|
||||||
@ -540,7 +540,7 @@ QString RiuResultTextBuilder::cellEdgeResultDetails()
|
|||||||
}
|
}
|
||||||
|
|
||||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(m_reservoirView->cellResult()->porosityModel());
|
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(m_reservoirView->cellResult()->porosityModel());
|
||||||
cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createFromResultIdx(m_reservoirView->eclipseCase()->reservoirData(), m_gridIndex, porosityModel, adjustedTimeStep, resultIndex);
|
cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createFromResultIdx(m_reservoirView->eclipseCase()->eclipseCaseData(), m_gridIndex, porosityModel, adjustedTimeStep, resultIndex);
|
||||||
if (resultAccessor.notNull())
|
if (resultAccessor.notNull())
|
||||||
{
|
{
|
||||||
double scalarValue = resultAccessor->cellScalar(m_cellIndex);
|
double scalarValue = resultAccessor->cellScalar(m_cellIndex);
|
||||||
@ -566,7 +566,7 @@ QString RiuResultTextBuilder::nncDetails()
|
|||||||
{
|
{
|
||||||
if (m_reservoirView.notNull() && m_reservoirView->eclipseCase())
|
if (m_reservoirView.notNull() && m_reservoirView->eclipseCase())
|
||||||
{
|
{
|
||||||
RigEclipseCaseData* eclipseCase = m_reservoirView->eclipseCase()->reservoirData();
|
RigEclipseCaseData* eclipseCase = m_reservoirView->eclipseCase()->eclipseCaseData();
|
||||||
|
|
||||||
RigMainGrid* grid = eclipseCase->mainGrid();
|
RigMainGrid* grid = eclipseCase->mainGrid();
|
||||||
CVF_ASSERT(grid);
|
CVF_ASSERT(grid);
|
||||||
@ -652,9 +652,9 @@ QString RiuResultTextBuilder::cellResultText(RimEclipseCellColors* resultColors)
|
|||||||
{
|
{
|
||||||
QString text;
|
QString text;
|
||||||
|
|
||||||
if (m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase()->reservoirData())
|
if (m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase()->eclipseCaseData())
|
||||||
{
|
{
|
||||||
RigEclipseCaseData* eclipseCaseData = m_reservoirView->eclipseCase()->reservoirData();
|
RigEclipseCaseData* eclipseCaseData = m_reservoirView->eclipseCase()->eclipseCaseData();
|
||||||
RigGridBase* grid = eclipseCaseData->grid(m_gridIndex);
|
RigGridBase* grid = eclipseCaseData->grid(m_gridIndex);
|
||||||
|
|
||||||
if (resultColors->isTernarySaturationSelected())
|
if (resultColors->isTernarySaturationSelected())
|
||||||
@ -729,9 +729,9 @@ QString RiuResultTextBuilder::wellResultText()
|
|||||||
QString text;
|
QString text;
|
||||||
|
|
||||||
if (m_reservoirView->eclipseCase() &&
|
if (m_reservoirView->eclipseCase() &&
|
||||||
m_reservoirView->eclipseCase()->reservoirData() )
|
m_reservoirView->eclipseCase()->eclipseCaseData() )
|
||||||
{
|
{
|
||||||
cvf::Collection<RigSingleWellResultsData> wellResults = m_reservoirView->eclipseCase()->reservoirData()->wellResults();
|
cvf::Collection<RigSingleWellResultsData> wellResults = m_reservoirView->eclipseCase()->eclipseCaseData()->wellResults();
|
||||||
for (size_t i = 0; i < wellResults.size(); i++)
|
for (size_t i = 0; i < wellResults.size(); i++)
|
||||||
{
|
{
|
||||||
RigSingleWellResultsData* singleWellResultData = wellResults.at(i);
|
RigSingleWellResultsData* singleWellResultData = wellResults.at(i);
|
||||||
|
@ -111,13 +111,13 @@ void RiuSelectionChangedHandler::addCurveFromSelectionItem(const RiuEclipseSelec
|
|||||||
}
|
}
|
||||||
else if (eclipseView->cellResult()->hasDynamicResult() &&
|
else if (eclipseView->cellResult()->hasDynamicResult() &&
|
||||||
eclipseView->eclipseCase() &&
|
eclipseView->eclipseCase() &&
|
||||||
eclipseView->eclipseCase()->reservoirData())
|
eclipseView->eclipseCase()->eclipseCaseData())
|
||||||
{
|
{
|
||||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(eclipseView->cellResult()->porosityModel());
|
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(eclipseView->cellResult()->porosityModel());
|
||||||
|
|
||||||
size_t scalarIndexWithMaxTimeStepCount = cvf::UNDEFINED_SIZE_T;
|
size_t scalarIndexWithMaxTimeStepCount = cvf::UNDEFINED_SIZE_T;
|
||||||
eclipseView->eclipseCase()->reservoirData()->results(porosityModel)->maxTimeStepCount(&scalarIndexWithMaxTimeStepCount);
|
eclipseView->eclipseCase()->eclipseCaseData()->results(porosityModel)->maxTimeStepCount(&scalarIndexWithMaxTimeStepCount);
|
||||||
std::vector<QDateTime> timeStepDates = eclipseView->eclipseCase()->reservoirData()->results(porosityModel)->timeStepDates(scalarIndexWithMaxTimeStepCount);
|
std::vector<QDateTime> timeStepDates = eclipseView->eclipseCase()->eclipseCaseData()->results(porosityModel)->timeStepDates(scalarIndexWithMaxTimeStepCount);
|
||||||
|
|
||||||
QString curveName = eclipseView->eclipseCase()->caseUserDescription();
|
QString curveName = eclipseView->eclipseCase()->caseUserDescription();
|
||||||
curveName += ", ";
|
curveName += ", ";
|
||||||
@ -125,10 +125,10 @@ void RiuSelectionChangedHandler::addCurveFromSelectionItem(const RiuEclipseSelec
|
|||||||
curveName += ", ";
|
curveName += ", ";
|
||||||
curveName += QString("Grid index %1").arg(eclipseSelectionItem->m_gridIndex);
|
curveName += QString("Grid index %1").arg(eclipseSelectionItem->m_gridIndex);
|
||||||
curveName += ", ";
|
curveName += ", ";
|
||||||
curveName += RigTimeHistoryResultAccessor::topologyText(eclipseView->eclipseCase()->reservoirData(), eclipseSelectionItem->m_gridIndex, eclipseSelectionItem->m_cellIndex);
|
curveName += RigTimeHistoryResultAccessor::topologyText(eclipseView->eclipseCase()->eclipseCaseData(), eclipseSelectionItem->m_gridIndex, eclipseSelectionItem->m_cellIndex);
|
||||||
|
|
||||||
|
|
||||||
std::vector<double> timeHistoryValues = RigTimeHistoryResultAccessor::timeHistoryValues(eclipseView->eclipseCase()->reservoirData(), eclipseView->cellResult(), eclipseSelectionItem->m_gridIndex, eclipseSelectionItem->m_cellIndex, timeStepDates.size());
|
std::vector<double> timeHistoryValues = RigTimeHistoryResultAccessor::timeHistoryValues(eclipseView->eclipseCase()->eclipseCaseData(), eclipseView->cellResult(), eclipseSelectionItem->m_gridIndex, eclipseSelectionItem->m_cellIndex, timeStepDates.size());
|
||||||
CVF_ASSERT(timeStepDates.size() == timeHistoryValues.size());
|
CVF_ASSERT(timeStepDates.size() == timeHistoryValues.size());
|
||||||
|
|
||||||
RiuMainWindow::instance()->resultPlot()->addCurve(curveName, eclipseSelectionItem->m_color, timeStepDates, timeHistoryValues);
|
RiuMainWindow::instance()->resultPlot()->addCurve(curveName, eclipseSelectionItem->m_color, timeStepDates, timeHistoryValues);
|
||||||
|
@ -825,7 +825,7 @@ void RiuViewerCommands::ijkFromCellIndex(size_t gridIdx, size_t cellIndex, size
|
|||||||
|
|
||||||
if (eclipseView && eclipseView->eclipseCase())
|
if (eclipseView && eclipseView->eclipseCase())
|
||||||
{
|
{
|
||||||
eclipseView->eclipseCase()->reservoirData()->grid(gridIdx)->ijkFromCellIndex(cellIndex, i, j, k);
|
eclipseView->eclipseCase()->eclipseCaseData()->grid(gridIdx)->ijkFromCellIndex(cellIndex, i, j, k);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (geomView && geomView->geoMechCase())
|
if (geomView && geomView->geoMechCase())
|
||||||
|
Loading…
Reference in New Issue
Block a user