#2294 Use simplified result access in TOF acc. saturation plot, and fix gas oil colors in plot

This commit is contained in:
Jacob Støren 2018-01-02 14:45:14 +01:00
parent 3f22c096d8
commit 25e1db9e8f
2 changed files with 7 additions and 24 deletions

View File

@ -44,29 +44,12 @@ RigTofAccumulatedPhaseFractionsCalculator::RigTofAccumulatedPhaseFractionsCalcul
size_t timestep) size_t timestep)
{ {
RigEclipseCaseData* eclipseCaseData = caseToApply->eclipseCaseData(); RigEclipseCaseData* eclipseCaseData = caseToApply->eclipseCaseData();
RiaDefines::PorosityModelType porosityModel = RiaDefines::MATRIX_MODEL;
RigCaseCellResultsData* gridCellResults = caseToApply->results(porosityModel);
size_t scalarResultIndexSwat = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SWAT"); const std::vector<double>* swatResults = eclipseCaseData->resultValues(RiaDefines::MATRIX_MODEL, RiaDefines::DYNAMIC_NATIVE, "SWAT", timestep);
size_t scalarResultIndexSoil = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SOIL"); const std::vector<double>* soilResults = eclipseCaseData->resultValues(RiaDefines::MATRIX_MODEL, RiaDefines::DYNAMIC_NATIVE, "SOIL", timestep);
size_t scalarResultIndexSgas = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SGAS"); const std::vector<double>* sgasResults = eclipseCaseData->resultValues(RiaDefines::MATRIX_MODEL, RiaDefines::DYNAMIC_NATIVE, "SGAS", timestep);
size_t scalarResultIndexPorv = gridCellResults->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PORV"); const std::vector<double>* porvResults = eclipseCaseData->resultValues(RiaDefines::MATRIX_MODEL, RiaDefines::STATIC_NATIVE, "PORV", 0);
const std::vector<double>* swatResults = nullptr;
const std::vector<double>* soilResults = nullptr;
const std::vector<double>* sgasResults = nullptr;
if (scalarResultIndexSwat != cvf::UNDEFINED_SIZE_T)
{
swatResults = &(eclipseCaseData->results(RiaDefines::MATRIX_MODEL)->cellScalarResults(scalarResultIndexSwat, timestep));
}
if (scalarResultIndexSoil != cvf::UNDEFINED_SIZE_T)
{
soilResults = &(eclipseCaseData->results(RiaDefines::MATRIX_MODEL)->cellScalarResults(scalarResultIndexSoil, timestep));
}
if (scalarResultIndexSgas != cvf::UNDEFINED_SIZE_T)
{
sgasResults = &(eclipseCaseData->results(RiaDefines::MATRIX_MODEL)->cellScalarResults(scalarResultIndexSgas, timestep));
}
const std::vector<double>* porvResults = &(eclipseCaseData->results(RiaDefines::MATRIX_MODEL)->cellScalarResults(scalarResultIndexPorv, 0));
RimFlowDiagSolution* flowDiagSolution = caseToApply->defaultFlowDiagSolution(); RimFlowDiagSolution* flowDiagSolution = caseToApply->defaultFlowDiagSolution();

View File

@ -68,13 +68,13 @@ RiuTofAccumulatedPhaseFractionsPlot::RiuTofAccumulatedPhaseFractionsPlot(RimTofA
m_watCurve->setRenderHint(QwtPlotItem::RenderAntialiased, true); m_watCurve->setRenderHint(QwtPlotItem::RenderAntialiased, true);
m_oilCurve = new QwtPlotCurve; m_oilCurve = new QwtPlotCurve;
setCurveColor(m_oilCurve, QColor(169, 18, 16)); // Red setCurveColor(m_oilCurve, QColor(123, 167, 0)); // Green
m_oilCurve->setZ(0.8); m_oilCurve->setZ(0.8);
m_oilCurve->setTitle("Oil"); m_oilCurve->setTitle("Oil");
m_oilCurve->setRenderHint(QwtPlotItem::RenderAntialiased, true); m_oilCurve->setRenderHint(QwtPlotItem::RenderAntialiased, true);
m_gasCurve = new QwtPlotCurve; m_gasCurve = new QwtPlotCurve;
setCurveColor(m_gasCurve, QColor(123, 167, 0)); // Green setCurveColor(m_gasCurve, QColor(169, 18, 16)); // Red
m_gasCurve->setZ(0.7); m_gasCurve->setZ(0.7);
m_gasCurve->setTitle("Gas"); m_gasCurve->setTitle("Gas");
m_gasCurve->setRenderHint(QwtPlotItem::RenderAntialiased, true); m_gasCurve->setRenderHint(QwtPlotItem::RenderAntialiased, true);