mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3173 Summary plot export. Include error data in plot export
This commit is contained in:
@@ -1734,16 +1734,32 @@ void populateSummaryCurvesData(std::vector<RimSummaryCurve*> curves, SummaryCurv
|
||||
}
|
||||
|
||||
CurveData curveData = { curve->curveExportDescription(), curve->summaryAddressY(), curve->valuesY() };
|
||||
CurveData errorCurveData;
|
||||
|
||||
// Error data
|
||||
auto errorValues = curve->errorValuesY();
|
||||
bool hasErrorData = !errorValues.empty();
|
||||
|
||||
if (hasErrorData)
|
||||
{
|
||||
errorCurveData.name = curve->curveExportDescription(curve->errorSummaryAddressY());
|
||||
errorCurveData.address = curve->errorSummaryAddressY();
|
||||
errorCurveData.values = errorValues;
|
||||
}
|
||||
|
||||
if (casePosInList == cvf::UNDEFINED_SIZE_T)
|
||||
{
|
||||
auto curveDataList = std::vector<CurveData>({ curveData });
|
||||
if (hasErrorData) curveDataList.push_back(errorCurveData);
|
||||
|
||||
curvesData->caseNames.push_back(curveCaseName);
|
||||
curvesData->timeSteps.push_back(curve->timeStepsY());
|
||||
curvesData->allCurveData.push_back(std::vector<CurveData>({ curveData }));
|
||||
curvesData->allCurveData.push_back(curveDataList);
|
||||
}
|
||||
else
|
||||
{
|
||||
curvesData->allCurveData[casePosInList].push_back(curveData);
|
||||
if(hasErrorData) curvesData->allCurveData[casePosInList].push_back(errorCurveData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user