#3375 Fix crash in command interface for pressure depletion when time step is not provided.

This commit is contained in:
Gaute Lindkvist 2018-09-19 08:52:40 +02:00
parent a76d45fa70
commit 2701035655
2 changed files with 10 additions and 2 deletions

View File

@ -56,7 +56,7 @@ RicfExportWellPathCompletions::RicfExportWellPathCompletions()
RICF_InitField(&m_excludeMainBoreForFishbones, "excludeMainBoreForFishbones", false, "Exclude Main Bore for Fishbones", "", "", "");
RICF_InitField(&m_transScalingType, "transScalingType", RicExportCompletionDataSettingsUi::TransScalingType(), "Transmissibility Scaling Type", "", "", "");
RICF_InitField(&m_transScalingTimeStep, "transScalingTimeStep", -1, "Transmissibility Scaling Pressure Time Step", "", "", "");
RICF_InitField(&m_transScalingTimeStep, "transScalingTimeStep", 0, "Transmissibility Scaling Pressure Time Step", "", "", "");
RICF_InitField(&m_transScalingSummaryWBHP, "transScalingWBHPFromSummary", true, "Transmissibility Scaling WBHP from summary", "", "", "");
RICF_InitField(&m_transScalingWBHP, "transScalingWBHP", 200.0, "Transmissibility Scaling Constant WBHP Value", "", "", "");
RICF_InitField(&m_transScalingCorrection, "transScalingCorrection", RicExportCompletionDataSettingsUi::TransScalingCorrection(), "Transmissibility Scaling Correction", "", "", "");

View File

@ -406,7 +406,15 @@ void RicExportFractureCompletionsImpl::getWellPressuresFromSummaryData(const Rim
{
std::vector<QDateTime> caseTimeSteps = resultCase->timeStepDates();
QDateTime originalDate = caseTimeSteps.front();
QDateTime currentDate = caseTimeSteps[currentTimeStep];
QDateTime currentDate;
if (currentTimeStep < caseTimeSteps.size())
{
currentDate = caseTimeSteps[currentTimeStep];
}
else
{
currentDate = caseTimeSteps.back();
}
RifEclipseSummaryAddress wbhpPressureAddress = RifEclipseSummaryAddress::wellAddress("WBHP", wellPathName.toStdString());
RimSummaryCaseMainCollection* mainCollection = RiaSummaryTools::summaryCaseMainCollection();