mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Minor refactoring fixes
This commit is contained in:
parent
f7600199c7
commit
907337015f
@ -196,7 +196,7 @@ void RimWellPltPlot::setPlotXAxisTitles(RimWellLogTrack* plotTrack)
|
|||||||
QMessageBox::warning(nullptr, "ResInsight PLT Plot", "Inconsistent units in PLT plot");
|
QMessageBox::warning(nullptr, "ResInsight PLT Plot", "Inconsistent units in PLT plot");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (presentUnitSystems.size() <= 0) return;
|
if (presentUnitSystems.empty()) return;
|
||||||
|
|
||||||
RiaEclipseUnitTools::UnitSystem unitSet = *presentUnitSystems.begin();
|
RiaEclipseUnitTools::UnitSystem unitSet = *presentUnitSystems.begin();
|
||||||
|
|
||||||
@ -566,7 +566,7 @@ void RimWellPltPlot::syncCurvesFromUiSelection()
|
|||||||
|
|
||||||
if (resultPointCalc != nullptr)
|
if (resultPointCalc != nullptr)
|
||||||
{
|
{
|
||||||
if (resultPointCalc->pipeBranchCLCoords().size())
|
if (!resultPointCalc->pipeBranchCLCoords().empty())
|
||||||
{
|
{
|
||||||
if (selectedPhases.count(FLOW_PHASE_TOTAL) && m_useReservoirConditionCurves() &&
|
if (selectedPhases.count(FLOW_PHASE_TOTAL) && m_useReservoirConditionCurves() &&
|
||||||
sourceDef.sourceType() == RifDataSourceForRftPlt::GRID)
|
sourceDef.sourceType() == RifDataSourceForRftPlt::GRID)
|
||||||
@ -623,7 +623,7 @@ void RimWellPltPlot::syncCurvesFromUiSelection()
|
|||||||
QString curveUnitText =
|
QString curveUnitText =
|
||||||
RimWellPlotTools::curveUnitText(RimWellLogFile::WELL_FLOW_COND_STANDARD, unitSet, flowPhase);
|
RimWellPlotTools::curveUnitText(RimWellLogFile::WELL_FLOW_COND_STANDARD, unitSet, flowPhase);
|
||||||
|
|
||||||
const std::vector<double> accFlow =
|
const std::vector<double>& accFlow =
|
||||||
wfPhaseAccumulator.accumulatedTracerFlowPrPseudoLength(tracerName, 0);
|
wfPhaseAccumulator.accumulatedTracerFlowPrPseudoLength(tracerName, 0);
|
||||||
addStackedCurve(curveName + ", " + tracerName + " " + curveUnitText,
|
addStackedCurve(curveName + ", " + tracerName + " " + curveUnitText,
|
||||||
depthValues,
|
depthValues,
|
||||||
@ -660,7 +660,7 @@ void RimWellPltPlot::syncCurvesFromUiSelection()
|
|||||||
{
|
{
|
||||||
QString channelName = channelNames[chIdx];
|
QString channelName = channelNames[chIdx];
|
||||||
channelData[chIdx] = wellLogFileData->values(channelName);
|
channelData[chIdx] = wellLogFileData->values(channelName);
|
||||||
if (channelData[chIdx].size())
|
if (!channelData[chIdx].empty())
|
||||||
{
|
{
|
||||||
sortedChannels.insert(ChannelValNameIdxTuple(-fabs(channelData[chIdx].front()), channelName, chIdx));
|
sortedChannels.insert(ChannelValNameIdxTuple(-fabs(channelData[chIdx].front()), channelName, chIdx));
|
||||||
}
|
}
|
||||||
@ -838,13 +838,13 @@ QList<caf::PdmOptionItemInfo> RimWellPltPlot::calculateValueOptions(const caf::P
|
|||||||
std::set<RifEclipseRftAddress::RftWellLogChannelType> channelTypesToUse = RifEclipseRftAddress::pltPlotChannelTypes();
|
std::set<RifEclipseRftAddress::RftWellLogChannelType> channelTypesToUse = RifEclipseRftAddress::pltPlotChannelTypes();
|
||||||
|
|
||||||
std::set<QDateTime> rftTimes = rftCase->rftReader()->availableTimeSteps(simWellName, channelTypesToUse);
|
std::set<QDateTime> rftTimes = rftCase->rftReader()->availableTimeSteps(simWellName, channelTypesToUse);
|
||||||
if (rftTimes.size())
|
if (!rftTimes.empty())
|
||||||
{
|
{
|
||||||
availableRftSources.insert(RifDataSourceForRftPlt(RifDataSourceForRftPlt::RFT, rftCase));
|
availableRftSources.insert(RifDataSourceForRftPlt(RifDataSourceForRftPlt::RFT, rftCase));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (availableRftSources.size())
|
if (!availableRftSources.empty())
|
||||||
{
|
{
|
||||||
options.push_back(caf::PdmOptionItemInfo::createHeader(
|
options.push_back(caf::PdmOptionItemInfo::createHeader(
|
||||||
RifDataSourceForRftPlt::sourceTypeUiText(RifDataSourceForRftPlt::RFT), true));
|
RifDataSourceForRftPlt::sourceTypeUiText(RifDataSourceForRftPlt::RFT), true));
|
||||||
@ -858,7 +858,7 @@ QList<caf::PdmOptionItemInfo> RimWellPltPlot::calculateValueOptions(const caf::P
|
|||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<RimEclipseResultCase*> gridCases = RimWellPlotTools::gridCasesForWell(simWellName);
|
const std::vector<RimEclipseResultCase*> gridCases = RimWellPlotTools::gridCasesForWell(simWellName);
|
||||||
if (gridCases.size() > 0)
|
if (!gridCases.empty())
|
||||||
{
|
{
|
||||||
options.push_back(caf::PdmOptionItemInfo::createHeader(
|
options.push_back(caf::PdmOptionItemInfo::createHeader(
|
||||||
RifDataSourceForRftPlt::sourceTypeUiText(RifDataSourceForRftPlt::GRID), true));
|
RifDataSourceForRftPlt::sourceTypeUiText(RifDataSourceForRftPlt::GRID), true));
|
||||||
@ -872,7 +872,7 @@ QList<caf::PdmOptionItemInfo> RimWellPltPlot::calculateValueOptions(const caf::P
|
|||||||
options.push_back(item);
|
options.push_back(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (RimWellPlotTools::wellLogFilesContainingFlow(m_wellPathName).size() > 0)
|
if (!RimWellPlotTools::wellLogFilesContainingFlow(m_wellPathName).empty())
|
||||||
{
|
{
|
||||||
options.push_back(caf::PdmOptionItemInfo::createHeader(
|
options.push_back(caf::PdmOptionItemInfo::createHeader(
|
||||||
RifDataSourceForRftPlt::sourceTypeUiText(RifDataSourceForRftPlt::OBSERVED), true));
|
RifDataSourceForRftPlt::sourceTypeUiText(RifDataSourceForRftPlt::OBSERVED), true));
|
||||||
@ -929,7 +929,7 @@ void RimWellPltPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
|
|||||||
RimWellPath* wellPath = project->wellPathByName(m_wellPathName());
|
RimWellPath* wellPath = project->wellPathByName(m_wellPathName());
|
||||||
if (wellPath && !wellPath->wellPathGeometry())
|
if (wellPath && !wellPath->wellPathGeometry())
|
||||||
{
|
{
|
||||||
for (RifDataSourceForRftPlt address : m_selectedSources())
|
for (const RifDataSourceForRftPlt& address : m_selectedSources())
|
||||||
{
|
{
|
||||||
if (address.sourceType() == RifDataSourceForRftPlt::RFT || address.sourceType() == RifDataSourceForRftPlt::GRID)
|
if (address.sourceType() == RifDataSourceForRftPlt::RFT || address.sourceType() == RifDataSourceForRftPlt::GRID)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user