//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- bool RimCase::openReserviorCase() { // If read already, return if (this->reservoirData() != NULL) return true; if (!openEclipseGridFile()) { return false; } { RimReservoirCellResultsStorage* results = this->results(RifReaderInterface::MATRIX_RESULTS); if (results->cellResults()) { results->cellResults()->createPlaceholderResultEntries(); // After the placeholder result for combined transmissibility is created, // make sure the nnc transmissibilities can be addressed by this scalarResultIndex as well size_t combinedTransResIdx = results->cellResults()->findScalarResultIndex(RimDefines::STATIC_NATIVE, RimDefines::combinedTransmissibilityResultName()); if (combinedTransResIdx != cvf::UNDEFINED_SIZE_T) { reservoirData()->mainGrid()->nncData()->setCombTransmisibilityScalarResultIndex(combinedTransResIdx); } } } { RimReservoirCellResultsStorage* results = this->results(RifReaderInterface::FRACTURE_RESULTS); if (results->cellResults()) results->cellResults()->createPlaceholderResultEntries(); } return true; }
//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RimEclipsePropertyFilter::computeResultValueRange() { CVF_ASSERT(parentContainer()); double min = 0.0; double max = 0.0; clearCategories(); size_t scalarIndex = resultDefinition->scalarResultIndex(); if (scalarIndex != cvf::UNDEFINED_SIZE_T) { RimReservoirCellResultsStorage* results = resultDefinition->currentGridCellResults(); if (results) { results->cellResults()->minMaxCellScalarValues(scalarIndex, min, max); if (resultDefinition->hasCategoryResult()) { if (resultDefinition->resultType() != RimDefines::FORMATION_NAMES) { setCategoryValues(results->cellResults()->uniqueCellScalarValues(scalarIndex)); } else { CVF_ASSERT(parentContainer()->reservoirView()->eclipseCase()->reservoirData()); CVF_ASSERT(parentContainer()->reservoirView()->eclipseCase()->reservoirData()->activeFormationNames()); const std::vector<QString>& fnVector = parentContainer()->reservoirView()->eclipseCase()->reservoirData()->activeFormationNames()->formationNames(); setCategoryNames(fnVector); } } } } m_maximumResultValue = max; m_minimumResultValue = min; m_lowerBound.uiCapability()->setUiName(QString("Min (%1)").arg(min)); m_upperBound.uiCapability()->setUiName(QString("Max (%1)").arg(max)); }
//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RimCellPropertyFilter::computeResultValueRange() { CVF_ASSERT(m_parentContainer); double min = 0.0; double max = 0.0; size_t scalarIndex = resultDefinition->scalarResultIndex(); if (scalarIndex != cvf::UNDEFINED_SIZE_T) { RimReservoirCellResultsStorage* results = resultDefinition->currentGridCellResults(); if (results) { results->cellResults()->minMaxCellScalarValues(scalarIndex, min, max); } } m_maximumResultValue = max; m_minimumResultValue = min; lowerBound.setUiName(QString("Min (%1)").arg(min)); upperBound.setUiName(QString("Max (%1)").arg(max)); }