#1118 When no tracer data is available, show the total well flow instead.

This commit is contained in:
Jacob Støren 2017-02-02 16:08:37 +01:00
parent 6aea418084
commit c613c389f3
2 changed files with 14 additions and 10 deletions

View File

@ -194,14 +194,17 @@ void RimWellAllocationPlot::updateFromWell()
} }
} }
RigEclCellIndexCalculator cellIdxCalc(m_case->reservoirData()->mainGrid(), m_case->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)); if ( tracerCellFractionValues.size() )
wfCalculator.reset(new RigAccWellFlowCalculator(pipeBranchesCLCoords, {
pipeBranchesCellIds, RigEclCellIndexCalculator cellIdxCalc(m_case->reservoirData()->mainGrid(), m_case->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS));
tracerCellFractionValues, wfCalculator.reset(new RigAccWellFlowCalculator(pipeBranchesCLCoords,
cellIdxCalc)); pipeBranchesCellIds,
tracerCellFractionValues,
cellIdxCalc));
}
} }
else
if (!wfCalculator)
{ {
if (pipeBranchesCLCoords.size() > 0) if (pipeBranchesCLCoords.size() > 0)
{ {
@ -249,6 +252,8 @@ void RimWellAllocationPlot::updateFromWell()
} }
setDescription(m_wellName + " - Allocation");
/// Pie chart /// Pie chart
m_totalWellAllocationPlot->clearSlices(); m_totalWellAllocationPlot->clearSlices();
@ -284,10 +289,9 @@ void RimWellAllocationPlot::updateFromWell()
} }
} }
} }
m_totalWellAllocationPlot->updateConnectedEditors(); m_totalWellAllocationPlot->updateConnectedEditors();
setDescription("Well Allocation (" + m_wellName + ")");
accumulatedWellFlowPlot()->updateConnectedEditors(); accumulatedWellFlowPlot()->updateConnectedEditors();
} }

View File

@ -74,7 +74,7 @@ public:
RimWellLogTrack* trackByIndex(size_t index); RimWellLogTrack* trackByIndex(size_t index);
void loadDataAndUpdate(); virtual void loadDataAndUpdate() override;
void updateTracks(); void updateTracks();
void updateTrackNames(); void updateTrackNames();