mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Clang-format changed files
This commit is contained in:
parent
bf9f43c3b4
commit
de8a5a59f3
@ -19,27 +19,27 @@
|
|||||||
|
|
||||||
#include "RicNewPltPlotFeature.h"
|
#include "RicNewPltPlotFeature.h"
|
||||||
|
|
||||||
#include "RicWellLogPlotCurveFeatureImpl.h"
|
|
||||||
#include "RicNewWellLogPlotFeatureImpl.h"
|
#include "RicNewWellLogPlotFeatureImpl.h"
|
||||||
|
#include "RicWellLogPlotCurveFeatureImpl.h"
|
||||||
|
|
||||||
#include "RiaApplication.h"
|
#include "RiaApplication.h"
|
||||||
|
|
||||||
#include "RigWellLogCurveData.h"
|
#include "RigWellLogCurveData.h"
|
||||||
|
|
||||||
|
#include "Rim3dView.h"
|
||||||
|
#include "RimEclipseResultCase.h"
|
||||||
|
#include "RimMainPlotCollection.h"
|
||||||
|
#include "RimPltPlotCollection.h"
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
#include "RimSimWellInView.h"
|
#include "RimSimWellInView.h"
|
||||||
#include "Rim3dView.h"
|
|
||||||
#include "RimWellLogExtractionCurve.h"
|
#include "RimWellLogExtractionCurve.h"
|
||||||
#include "RimWellPltPlot.h"
|
|
||||||
#include "RimWellLogPlot.h"
|
#include "RimWellLogPlot.h"
|
||||||
#include "RimWellLogTrack.h"
|
#include "RimWellLogTrack.h"
|
||||||
#include "RimWellPath.h"
|
#include "RimWellPath.h"
|
||||||
#include "RimPltPlotCollection.h"
|
#include "RimWellPltPlot.h"
|
||||||
#include "RimMainPlotCollection.h"
|
|
||||||
#include "RimEclipseResultCase.h"
|
|
||||||
|
|
||||||
#include "RiuPlotMainWindowTools.h"
|
|
||||||
#include "Riu3dSelectionManager.h"
|
#include "Riu3dSelectionManager.h"
|
||||||
|
#include "RiuPlotMainWindowTools.h"
|
||||||
|
|
||||||
#include "cafSelectionManagerTools.h"
|
#include "cafSelectionManagerTools.h"
|
||||||
|
|
||||||
@ -47,7 +47,6 @@
|
|||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
CAF_CMD_SOURCE_INIT( RicNewPltPlotFeature, "RicNewPltPlotFeature" );
|
CAF_CMD_SOURCE_INIT( RicNewPltPlotFeature, "RicNewPltPlotFeature" );
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -178,4 +177,3 @@ bool RicNewPltPlotFeature::caseAvailable() const
|
|||||||
|
|
||||||
return cases.size() > 0;
|
return cases.size() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
CAF_CMD_SOURCE_INIT( RicNewRftPlotFeature, "RicNewRftPlotFeature" );
|
CAF_CMD_SOURCE_INIT( RicNewRftPlotFeature, "RicNewRftPlotFeature" );
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -24,30 +24,30 @@
|
|||||||
#include "RigEclipseCaseData.h"
|
#include "RigEclipseCaseData.h"
|
||||||
#include "RigFlowDiagResultAddress.h"
|
#include "RigFlowDiagResultAddress.h"
|
||||||
#include "RigFlowDiagResults.h"
|
#include "RigFlowDiagResults.h"
|
||||||
|
#include "RigSimWellData.h"
|
||||||
#include "RigSimulationWellCenterLineCalculator.h"
|
#include "RigSimulationWellCenterLineCalculator.h"
|
||||||
#include "RigSimulationWellCoordsAndMD.h"
|
#include "RigSimulationWellCoordsAndMD.h"
|
||||||
#include "RigSimWellData.h"
|
|
||||||
|
|
||||||
#include "RimEclipseCase.h"
|
#include "RimEclipseCase.h"
|
||||||
#include "RimEclipseCellColors.h"
|
#include "RimEclipseCellColors.h"
|
||||||
#include "RimEclipseResultCase.h"
|
#include "RimEclipseResultCase.h"
|
||||||
#include "RimEclipseView.h"
|
#include "RimEclipseView.h"
|
||||||
#include "RimSimWellInViewCollection.h"
|
|
||||||
#include "RimFlowDiagSolution.h"
|
#include "RimFlowDiagSolution.h"
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
#include "RimSimWellInView.h"
|
#include "RimSimWellInView.h"
|
||||||
|
#include "RimSimWellInViewCollection.h"
|
||||||
#include "RimTofAccumulatedPhaseFractionsPlot.h"
|
#include "RimTofAccumulatedPhaseFractionsPlot.h"
|
||||||
#include "RimTotalWellAllocationPlot.h"
|
#include "RimTotalWellAllocationPlot.h"
|
||||||
#include "RimWellAllocationPlotLegend.h"
|
#include "RimWellAllocationPlotLegend.h"
|
||||||
#include "RimWellFlowRateCurve.h"
|
#include "RimWellFlowRateCurve.h"
|
||||||
#include "RimWellLogFile.h"
|
#include "RimWellLogFile.h"
|
||||||
#include "RimWellLogPlot.h"
|
#include "RimWellLogPlot.h"
|
||||||
#include "RimWellPlotTools.h"
|
|
||||||
#include "RimWellLogTrack.h"
|
#include "RimWellLogTrack.h"
|
||||||
|
#include "RimWellPlotTools.h"
|
||||||
|
|
||||||
#include "RiuWellLogPlot.h"
|
|
||||||
#include "RiuPlotMainWindow.h"
|
#include "RiuPlotMainWindow.h"
|
||||||
#include "RiuWellAllocationPlot.h"
|
#include "RiuWellAllocationPlot.h"
|
||||||
|
#include "RiuWellLogPlot.h"
|
||||||
#include "RiuWellLogTrack.h"
|
#include "RiuWellLogTrack.h"
|
||||||
|
|
||||||
CAF_PDM_SOURCE_INIT( RimWellAllocationPlot, "WellAllocationPlot" );
|
CAF_PDM_SOURCE_INIT( RimWellAllocationPlot, "WellAllocationPlot" );
|
||||||
@ -58,16 +58,14 @@ CAF_PDM_SOURCE_INIT(RimWellAllocationPlot, "WellAllocationPlot");
|
|||||||
|
|
||||||
namespace caf
|
namespace caf
|
||||||
{
|
{
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
void AppEnum<RimWellAllocationPlot::FlowType>::setUp()
|
void AppEnum<RimWellAllocationPlot::FlowType>::setUp()
|
||||||
{
|
{
|
||||||
addItem( RimWellAllocationPlot::ACCUMULATED, "ACCUMULATED", "Accumulated" );
|
addItem( RimWellAllocationPlot::ACCUMULATED, "ACCUMULATED", "Accumulated" );
|
||||||
addItem( RimWellAllocationPlot::INFLOW, "INFLOW", "Inflow Rates" );
|
addItem( RimWellAllocationPlot::INFLOW, "INFLOW", "Inflow Rates" );
|
||||||
setDefault( RimWellAllocationPlot::ACCUMULATED );
|
setDefault( RimWellAllocationPlot::ACCUMULATED );
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
} // namespace caf
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
@ -80,8 +78,13 @@ RimWellAllocationPlot::RimWellAllocationPlot()
|
|||||||
CAF_PDM_InitField( &m_showPlotTitle_OBSOLETE, "ShowPlotTitle", true, "Show Plot Title", "", "", "" );
|
CAF_PDM_InitField( &m_showPlotTitle_OBSOLETE, "ShowPlotTitle", true, "Show Plot Title", "", "", "" );
|
||||||
m_showPlotTitle_OBSOLETE.xmlCapability()->setIOWritable( false );
|
m_showPlotTitle_OBSOLETE.xmlCapability()->setIOWritable( false );
|
||||||
|
|
||||||
CAF_PDM_InitField(&m_branchDetection, "BranchDetection", true, "Branch Detection", "",
|
CAF_PDM_InitField( &m_branchDetection,
|
||||||
"Compute branches based on how simulation well cells are organized", "");
|
"BranchDetection",
|
||||||
|
true,
|
||||||
|
"Branch Detection",
|
||||||
|
"",
|
||||||
|
"Compute branches based on how simulation well cells are organized",
|
||||||
|
"" );
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault( &m_case, "CurveCase", "Case", "", "", "" );
|
CAF_PDM_InitFieldNoDefault( &m_case, "CurveCase", "Case", "", "", "" );
|
||||||
m_case.uiCapability()->setUiTreeChildrenHidden( true );
|
m_case.uiCapability()->setUiTreeChildrenHidden( true );
|
||||||
@ -92,7 +95,12 @@ RimWellAllocationPlot::RimWellAllocationPlot()
|
|||||||
CAF_PDM_InitFieldNoDefault( &m_flowType, "FlowType", "Flow Type", "", "", "" );
|
CAF_PDM_InitFieldNoDefault( &m_flowType, "FlowType", "Flow Type", "", "", "" );
|
||||||
CAF_PDM_InitField( &m_groupSmallContributions, "GroupSmallContributions", true, "Group Small Contributions", "", "", "" );
|
CAF_PDM_InitField( &m_groupSmallContributions, "GroupSmallContributions", true, "Group Small Contributions", "", "", "" );
|
||||||
CAF_PDM_InitField( &m_smallContributionsThreshold, "SmallContributionsThreshold", 0.005, "Threshold", "", "", "" );
|
CAF_PDM_InitField( &m_smallContributionsThreshold, "SmallContributionsThreshold", 0.005, "Threshold", "", "", "" );
|
||||||
CAF_PDM_InitFieldNoDefault(&m_accumulatedWellFlowPlot_OBSOLETE, "AccumulatedWellFlowPlot", "Accumulated Well Flow", "", "", "");
|
CAF_PDM_InitFieldNoDefault( &m_accumulatedWellFlowPlot_OBSOLETE,
|
||||||
|
"AccumulatedWellFlowPlot",
|
||||||
|
"Accumulated Well Flow",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"" );
|
||||||
m_accumulatedWellFlowPlot_OBSOLETE.uiCapability()->setUiHidden( true );
|
m_accumulatedWellFlowPlot_OBSOLETE.uiCapability()->setUiHidden( true );
|
||||||
m_accumulatedWellFlowPlot_OBSOLETE = new RimWellLogPlot;
|
m_accumulatedWellFlowPlot_OBSOLETE = new RimWellLogPlot;
|
||||||
m_accumulatedWellFlowPlot_OBSOLETE->setDepthUnit( RiaDefines::UNIT_NONE );
|
m_accumulatedWellFlowPlot_OBSOLETE->setDepthUnit( RiaDefines::UNIT_NONE );
|
||||||
@ -109,7 +117,12 @@ RimWellAllocationPlot::RimWellAllocationPlot()
|
|||||||
m_wellAllocationPlotLegend.uiCapability()->setUiHidden( true );
|
m_wellAllocationPlotLegend.uiCapability()->setUiHidden( true );
|
||||||
m_wellAllocationPlotLegend = new RimWellAllocationPlotLegend;
|
m_wellAllocationPlotLegend = new RimWellAllocationPlotLegend;
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault(&m_tofAccumulatedPhaseFractionsPlot, "TofAccumulatedPhaseFractionsPlot", "TOF Accumulated Phase Fractions", "", "", "");
|
CAF_PDM_InitFieldNoDefault( &m_tofAccumulatedPhaseFractionsPlot,
|
||||||
|
"TofAccumulatedPhaseFractionsPlot",
|
||||||
|
"TOF Accumulated Phase Fractions",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"" );
|
||||||
m_tofAccumulatedPhaseFractionsPlot.uiCapability()->setUiHidden( true );
|
m_tofAccumulatedPhaseFractionsPlot.uiCapability()->setUiHidden( true );
|
||||||
m_tofAccumulatedPhaseFractionsPlot = new RimTofAccumulatedPhaseFractionsPlot;
|
m_tofAccumulatedPhaseFractionsPlot = new RimTofAccumulatedPhaseFractionsPlot;
|
||||||
|
|
||||||
@ -199,7 +212,8 @@ void RimWellAllocationPlot::updateFromWell()
|
|||||||
pipeBranchesCLCoords,
|
pipeBranchesCLCoords,
|
||||||
pipeBranchesCellIds );
|
pipeBranchesCellIds );
|
||||||
|
|
||||||
std::map<QString, const std::vector<double>* > tracerFractionCellValues = findRelevantTracerCellFractions(simWellData);
|
std::map<QString, const std::vector<double>*> tracerFractionCellValues = findRelevantTracerCellFractions(
|
||||||
|
simWellData );
|
||||||
|
|
||||||
std::unique_ptr<RigAccWellFlowCalculator> wfCalculator;
|
std::unique_ptr<RigAccWellFlowCalculator> wfCalculator;
|
||||||
|
|
||||||
@ -208,9 +222,11 @@ void RimWellAllocationPlot::updateFromWell()
|
|||||||
|
|
||||||
if ( tracerFractionCellValues.size() )
|
if ( tracerFractionCellValues.size() )
|
||||||
{
|
{
|
||||||
bool isProducer = ( simWellData->wellProductionType(m_timeStep) == RigWellResultFrame::PRODUCER
|
bool isProducer = ( simWellData->wellProductionType( m_timeStep ) == RigWellResultFrame::PRODUCER ||
|
||||||
|| simWellData->wellProductionType(m_timeStep) == RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE );
|
simWellData->wellProductionType( m_timeStep ) ==
|
||||||
RigEclCellIndexCalculator cellIdxCalc(m_case->eclipseCaseData()->mainGrid(), m_case->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL));
|
RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE );
|
||||||
|
RigEclCellIndexCalculator cellIdxCalc( m_case->eclipseCaseData()->mainGrid(),
|
||||||
|
m_case->eclipseCaseData()->activeCellInfo( RiaDefines::MATRIX_MODEL ) );
|
||||||
wfCalculator.reset( new RigAccWellFlowCalculator( pipeBranchesCLCoords,
|
wfCalculator.reset( new RigAccWellFlowCalculator( pipeBranchesCLCoords,
|
||||||
pipeBranchesCellIds,
|
pipeBranchesCellIds,
|
||||||
tracerFractionCellValues,
|
tracerFractionCellValues,
|
||||||
@ -222,9 +238,8 @@ void RimWellAllocationPlot::updateFromWell()
|
|||||||
{
|
{
|
||||||
if ( pipeBranchesCLCoords.size() > 0 )
|
if ( pipeBranchesCLCoords.size() > 0 )
|
||||||
{
|
{
|
||||||
wfCalculator.reset(new RigAccWellFlowCalculator(pipeBranchesCLCoords,
|
wfCalculator.reset(
|
||||||
pipeBranchesCellIds,
|
new RigAccWellFlowCalculator( pipeBranchesCLCoords, pipeBranchesCellIds, smallContributionThreshold ) );
|
||||||
smallContributionThreshold));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,10 +263,13 @@ void RimWellAllocationPlot::updateFromWell()
|
|||||||
|
|
||||||
addTrack( plotTrack );
|
addTrack( plotTrack );
|
||||||
|
|
||||||
const std::vector<double>& depthValues = depthType == RimWellLogPlot::CONNECTION_NUMBER ? wfCalculator->connectionNumbersFromTop(brIdx) :
|
const std::vector<double>& depthValues = depthType == RimWellLogPlot::CONNECTION_NUMBER
|
||||||
depthType == RimWellLogPlot::PSEUDO_LENGTH ? wfCalculator->pseudoLengthFromTop(brIdx) :
|
? wfCalculator->connectionNumbersFromTop( brIdx )
|
||||||
depthType == RimWellLogPlot::TRUE_VERTICAL_DEPTH ? wfCalculator->trueVerticalDepth(brIdx) :
|
: depthType == RimWellLogPlot::PSEUDO_LENGTH
|
||||||
std::vector<double>();
|
? wfCalculator->pseudoLengthFromTop( brIdx )
|
||||||
|
: depthType == RimWellLogPlot::TRUE_VERTICAL_DEPTH
|
||||||
|
? wfCalculator->trueVerticalDepth( brIdx )
|
||||||
|
: std::vector<double>();
|
||||||
|
|
||||||
{
|
{
|
||||||
std::vector<QString> tracerNames = wfCalculator->tracerNames();
|
std::vector<QString> tracerNames = wfCalculator->tracerNames();
|
||||||
@ -260,15 +278,15 @@ void RimWellAllocationPlot::updateFromWell()
|
|||||||
const std::vector<double>* accFlow = nullptr;
|
const std::vector<double>* accFlow = nullptr;
|
||||||
if ( depthType == RimWellLogPlot::CONNECTION_NUMBER )
|
if ( depthType == RimWellLogPlot::CONNECTION_NUMBER )
|
||||||
{
|
{
|
||||||
accFlow = &(m_flowType == ACCUMULATED ?
|
accFlow = &( m_flowType == ACCUMULATED
|
||||||
wfCalculator->accumulatedTracerFlowPrConnection(tracerName, brIdx):
|
? wfCalculator->accumulatedTracerFlowPrConnection( tracerName, brIdx )
|
||||||
wfCalculator->tracerFlowPrConnection(tracerName, brIdx));
|
: wfCalculator->tracerFlowPrConnection( tracerName, brIdx ) );
|
||||||
}
|
}
|
||||||
else if ( depthType == RimWellLogPlot::PSEUDO_LENGTH || depthType == RimWellLogPlot::TRUE_VERTICAL_DEPTH )
|
else if ( depthType == RimWellLogPlot::PSEUDO_LENGTH || depthType == RimWellLogPlot::TRUE_VERTICAL_DEPTH )
|
||||||
{
|
{
|
||||||
accFlow = &(m_flowType == ACCUMULATED ?
|
accFlow = &( m_flowType == ACCUMULATED
|
||||||
wfCalculator->accumulatedTracerFlowPrPseudoLength(tracerName, brIdx):
|
? wfCalculator->accumulatedTracerFlowPrPseudoLength( tracerName, brIdx )
|
||||||
wfCalculator->tracerFlowPrPseudoLength(tracerName, brIdx));
|
: wfCalculator->tracerFlowPrPseudoLength( tracerName, brIdx ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( accFlow )
|
if ( accFlow )
|
||||||
@ -279,15 +297,15 @@ void RimWellAllocationPlot::updateFromWell()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
updateWellFlowPlotXAxisTitle( plotTrack );
|
updateWellFlowPlotXAxisTitle( plotTrack );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString wellStatusText = QString("(%1)").arg(RimWellAllocationPlot::wellStatusTextForTimeStep(m_wellName, m_case, m_timeStep));
|
QString wellStatusText = QString( "(%1)" ).arg(
|
||||||
|
RimWellAllocationPlot::wellStatusTextForTimeStep( m_wellName, m_case, m_timeStep ) );
|
||||||
|
|
||||||
QString flowTypeText = m_flowDiagSolution() ? "Well Allocation" : "Well Flow";
|
QString flowTypeText = m_flowDiagSolution() ? "Well Allocation" : "Well Flow";
|
||||||
setDescription(flowTypeText + ": " + m_wellName + " " + wellStatusText + ", " + m_case->timeStepStrings()[m_timeStep] + " (" + m_case->caseUserDescription() + ")");
|
setDescription( flowTypeText + ": " + m_wellName + " " + wellStatusText + ", " +
|
||||||
|
m_case->timeStepStrings()[m_timeStep] + " (" + m_case->caseUserDescription() + ")" );
|
||||||
|
|
||||||
/// Pie chart
|
/// Pie chart
|
||||||
|
|
||||||
@ -312,7 +330,8 @@ void RimWellAllocationPlot::updateFromWell()
|
|||||||
double tracerPercent = 100 * tracerVal.second;
|
double tracerPercent = 100 * tracerVal.second;
|
||||||
|
|
||||||
m_totalWellAllocationPlot->addSlice( tracerVal.first, color, tracerPercent );
|
m_totalWellAllocationPlot->addSlice( tracerVal.first, color, tracerPercent );
|
||||||
if (allocationPlotWidget()) allocationPlotWidget()->addLegendItem(tracerVal.first, color, tracerPercent);
|
if ( allocationPlotWidget() )
|
||||||
|
allocationPlotWidget()->addLegendItem( tracerVal.first, color, tracerPercent );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -329,7 +348,8 @@ void RimWellAllocationPlot::updateFromWell()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::map<QString, const std::vector<double> *> RimWellAllocationPlot::findRelevantTracerCellFractions(const RigSimWellData* simWellData)
|
std::map<QString, const std::vector<double>*>
|
||||||
|
RimWellAllocationPlot::findRelevantTracerCellFractions( const RigSimWellData* simWellData )
|
||||||
{
|
{
|
||||||
std::map<QString, const std::vector<double>*> tracerCellFractionValues;
|
std::map<QString, const std::vector<double>*> tracerCellFractionValues;
|
||||||
|
|
||||||
@ -338,8 +358,7 @@ std::map<QString, const std::vector<double> *> RimWellAllocationPlot::findReleva
|
|||||||
RimFlowDiagSolution::TracerStatusType requestedTracerType = RimFlowDiagSolution::UNDEFINED;
|
RimFlowDiagSolution::TracerStatusType requestedTracerType = RimFlowDiagSolution::UNDEFINED;
|
||||||
|
|
||||||
const RigWellResultFrame::WellProductionType prodType = simWellData->wellProductionType( m_timeStep );
|
const RigWellResultFrame::WellProductionType prodType = simWellData->wellProductionType( m_timeStep );
|
||||||
if ( prodType == RigWellResultFrame::PRODUCER
|
if ( prodType == RigWellResultFrame::PRODUCER || prodType == RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE )
|
||||||
|| prodType == RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE )
|
|
||||||
{
|
{
|
||||||
requestedTracerType = RimFlowDiagSolution::INJECTOR;
|
requestedTracerType = RimFlowDiagSolution::INJECTOR;
|
||||||
}
|
}
|
||||||
@ -353,8 +372,11 @@ std::map<QString, const std::vector<double> *> RimWellAllocationPlot::findReleva
|
|||||||
{
|
{
|
||||||
if ( m_flowDiagSolution->tracerStatusInTimeStep( tracerName, m_timeStep ) == requestedTracerType )
|
if ( m_flowDiagSolution->tracerStatusInTimeStep( tracerName, m_timeStep ) == requestedTracerType )
|
||||||
{
|
{
|
||||||
RigFlowDiagResultAddress resAddr(RIG_FLD_CELL_FRACTION_RESNAME, RigFlowDiagResultAddress::PHASE_ALL, tracerName.toStdString());
|
RigFlowDiagResultAddress resAddr( RIG_FLD_CELL_FRACTION_RESNAME,
|
||||||
const std::vector<double>* tracerCellFractions = m_flowDiagSolution->flowDiagResults()->resultValues(resAddr, m_timeStep);
|
RigFlowDiagResultAddress::PHASE_ALL,
|
||||||
|
tracerName.toStdString() );
|
||||||
|
const std::vector<double>* tracerCellFractions = m_flowDiagSolution->flowDiagResults()
|
||||||
|
->resultValues( resAddr, m_timeStep );
|
||||||
if ( tracerCellFractions ) tracerCellFractionValues[tracerName] = tracerCellFractions;
|
if ( tracerCellFractions ) tracerCellFractionValues[tracerName] = tracerCellFractions;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -369,8 +391,8 @@ std::map<QString, const std::vector<double> *> RimWellAllocationPlot::findReleva
|
|||||||
void RimWellAllocationPlot::updateWellFlowPlotXAxisTitle( RimWellLogTrack* plotTrack )
|
void RimWellAllocationPlot::updateWellFlowPlotXAxisTitle( RimWellLogTrack* plotTrack )
|
||||||
{
|
{
|
||||||
RiaEclipseUnitTools::UnitSystem unitSet = m_case->eclipseCaseData()->unitsType();
|
RiaEclipseUnitTools::UnitSystem unitSet = m_case->eclipseCaseData()->unitsType();
|
||||||
RimWellLogFile::WellFlowCondition condition = m_flowDiagSolution ? RimWellLogFile::WELL_FLOW_COND_RESERVOIR :
|
RimWellLogFile::WellFlowCondition condition = m_flowDiagSolution ? RimWellLogFile::WELL_FLOW_COND_RESERVOIR
|
||||||
RimWellLogFile::WELL_FLOW_COND_STANDARD;
|
: RimWellLogFile::WELL_FLOW_COND_STANDARD;
|
||||||
|
|
||||||
QString axisTitle = RimWellPlotTools::flowPlotAxisTitle( condition, unitSet );
|
QString axisTitle = RimWellPlotTools::flowPlotAxisTitle( condition, unitSet );
|
||||||
plotTrack->setXAxisTitle( axisTitle );
|
plotTrack->setXAxisTitle( axisTitle );
|
||||||
@ -417,8 +439,6 @@ void RimWellAllocationPlot::updateWellFlowPlotXAxisTitle(RimWellLogTrack* plotTr
|
|||||||
plotTrack->setXAxisTitle("Surface Flow Rate " + unitText);
|
plotTrack->setXAxisTitle("Surface Flow Rate " + unitText);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -449,7 +469,9 @@ void RimWellAllocationPlot::addStackedCurve(const QString& tracerName,
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QString RimWellAllocationPlot::wellStatusTextForTimeStep(const QString& wellName, const RimEclipseResultCase* eclipseResultCase, size_t timeStep)
|
QString RimWellAllocationPlot::wellStatusTextForTimeStep( const QString& wellName,
|
||||||
|
const RimEclipseResultCase* eclipseResultCase,
|
||||||
|
size_t timeStep )
|
||||||
{
|
{
|
||||||
QString statusText = "Undefined";
|
QString statusText = "Undefined";
|
||||||
|
|
||||||
@ -534,7 +556,8 @@ int RimWellAllocationPlot::timeStep()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QList<caf::PdmOptionItemInfo> RimWellAllocationPlot::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly)
|
QList<caf::PdmOptionItemInfo>
|
||||||
|
RimWellAllocationPlot::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly )
|
||||||
{
|
{
|
||||||
QList<caf::PdmOptionItemInfo> options = RimWellLogPlot::calculateValueOptions( fieldNeedingOptions, useOptionsOnly );
|
QList<caf::PdmOptionItemInfo> options = RimWellLogPlot::calculateValueOptions( fieldNeedingOptions, useOptionsOnly );
|
||||||
|
|
||||||
@ -633,7 +656,9 @@ void RimWellAllocationPlot::showPlotLegend(bool doShow)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellAllocationPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
void RimWellAllocationPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||||
|
const QVariant& oldValue,
|
||||||
|
const QVariant& newValue )
|
||||||
{
|
{
|
||||||
RimViewWindow::fieldChangedByUi( changedField, oldValue, newValue );
|
RimViewWindow::fieldChangedByUi( changedField, oldValue, newValue );
|
||||||
|
|
||||||
@ -648,25 +673,26 @@ void RimWellAllocationPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedF
|
|||||||
m_flowDiagSolution = nullptr;
|
m_flowDiagSolution = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_case) m_timeStep = 0;
|
if ( !m_case )
|
||||||
|
m_timeStep = 0;
|
||||||
else if ( m_timeStep >= static_cast<int>( m_case->timeStepDates().size() ) )
|
else if ( m_timeStep >= static_cast<int>( m_case->timeStepDates().size() ) )
|
||||||
{
|
{
|
||||||
m_timeStep = std::max( 0, ( (int)m_case->timeStepDates().size() ) - 1 );
|
m_timeStep = std::max( 0, ( (int)m_case->timeStepDates().size() ) - 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
std::set<QString> sortedWellNames = findSortedWellNames();
|
std::set<QString> sortedWellNames = findSortedWellNames();
|
||||||
if (!sortedWellNames.size()) m_wellName = "";
|
if ( !sortedWellNames.size() )
|
||||||
else if ( sortedWellNames.count(m_wellName()) == 0 ){ m_wellName = *sortedWellNames.begin();}
|
m_wellName = "";
|
||||||
|
else if ( sortedWellNames.count( m_wellName() ) == 0 )
|
||||||
|
{
|
||||||
|
m_wellName = *sortedWellNames.begin();
|
||||||
|
}
|
||||||
|
|
||||||
onLoadDataAndUpdate();
|
onLoadDataAndUpdate();
|
||||||
}
|
}
|
||||||
else if ( changedField == &m_wellName
|
else if ( changedField == &m_wellName || changedField == &m_timeStep || changedField == &m_flowDiagSolution ||
|
||||||
|| changedField == &m_timeStep
|
changedField == &m_groupSmallContributions || changedField == &m_smallContributionsThreshold ||
|
||||||
|| changedField == &m_flowDiagSolution
|
changedField == &m_flowType || changedField == &m_branchDetection )
|
||||||
|| changedField == &m_groupSmallContributions
|
|
||||||
|| changedField == &m_smallContributionsThreshold
|
|
||||||
|| changedField == &m_flowType
|
|
||||||
|| changedField == &m_branchDetection)
|
|
||||||
{
|
{
|
||||||
onLoadDataAndUpdate();
|
onLoadDataAndUpdate();
|
||||||
}
|
}
|
||||||
@ -755,7 +781,6 @@ QWidget* RimWellAllocationPlot::createViewWidget(QWidget* mainWindowParent)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
cvf::Color3f RimWellAllocationPlot::getTracerColor( const QString& tracerName )
|
cvf::Color3f RimWellAllocationPlot::getTracerColor( const QString& tracerName )
|
||||||
{
|
{
|
||||||
|
|
||||||
if ( tracerName == RIG_FLOW_OIL_NAME ) return cvf::Color3f::DARK_GREEN;
|
if ( tracerName == RIG_FLOW_OIL_NAME ) return cvf::Color3f::DARK_GREEN;
|
||||||
if ( tracerName == RIG_FLOW_GAS_NAME ) return cvf::Color3f::DARK_RED;
|
if ( tracerName == RIG_FLOW_GAS_NAME ) return cvf::Color3f::DARK_RED;
|
||||||
if ( tracerName == RIG_FLOW_WATER_NAME ) return cvf::Color3f::BLUE;
|
if ( tracerName == RIG_FLOW_WATER_NAME ) return cvf::Color3f::BLUE;
|
||||||
|
@ -38,15 +38,16 @@ class RimWellAllocationPlotLegend;
|
|||||||
class RimWellLogTrack;
|
class RimWellLogTrack;
|
||||||
class RiuWellAllocationPlot;
|
class RiuWellAllocationPlot;
|
||||||
|
|
||||||
namespace cvf {
|
namespace cvf
|
||||||
|
{
|
||||||
class Color3f;
|
class Color3f;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace caf {
|
namespace caf
|
||||||
|
{
|
||||||
class PdmOptionItemInfo;
|
class PdmOptionItemInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
@ -54,8 +55,13 @@ namespace caf {
|
|||||||
class RimWellAllocationPlot : public RimWellLogPlot
|
class RimWellAllocationPlot : public RimWellLogPlot
|
||||||
{
|
{
|
||||||
CAF_PDM_HEADER_INIT;
|
CAF_PDM_HEADER_INIT;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum FlowType { ACCUMULATED, INFLOW};
|
enum FlowType
|
||||||
|
{
|
||||||
|
ACCUMULATED,
|
||||||
|
INFLOW
|
||||||
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RimWellAllocationPlot();
|
RimWellAllocationPlot();
|
||||||
@ -74,13 +80,17 @@ public:
|
|||||||
void removeFromMdiAreaAndDeleteViewWidget();
|
void removeFromMdiAreaAndDeleteViewWidget();
|
||||||
|
|
||||||
void showPlotLegend( bool doShow );
|
void showPlotLegend( bool doShow );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Overridden PDM methods
|
// Overridden PDM methods
|
||||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||||
|
const QVariant& oldValue,
|
||||||
|
const QVariant& newValue ) override;
|
||||||
|
|
||||||
std::set<QString> findSortedWellNames();
|
std::set<QString> findSortedWellNames();
|
||||||
|
|
||||||
QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||||
|
bool* useOptionsOnly ) override;
|
||||||
|
|
||||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||||
void onLoadDataAndUpdate() override;
|
void onLoadDataAndUpdate() override;
|
||||||
@ -98,7 +108,9 @@ private:
|
|||||||
const std::vector<double>& accFlow,
|
const std::vector<double>& accFlow,
|
||||||
RimWellLogTrack* plotTrack );
|
RimWellLogTrack* plotTrack );
|
||||||
|
|
||||||
static QString wellStatusTextForTimeStep(const QString& wellName, const RimEclipseResultCase* eclipseResultCase, size_t timeStep);
|
static QString wellStatusTextForTimeStep( const QString& wellName,
|
||||||
|
const RimEclipseResultCase* eclipseResultCase,
|
||||||
|
size_t timeStep );
|
||||||
|
|
||||||
QWidget* createViewWidget( QWidget* mainWindowParent ) override;
|
QWidget* createViewWidget( QWidget* mainWindowParent ) override;
|
||||||
|
|
||||||
@ -110,6 +122,7 @@ private:
|
|||||||
void onDepthTypeChanged() override;
|
void onDepthTypeChanged() override;
|
||||||
|
|
||||||
RiuWellAllocationPlot* allocationPlotWidget() const;
|
RiuWellAllocationPlot* allocationPlotWidget() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmField<bool> m_branchDetection;
|
caf::PdmField<bool> m_branchDetection;
|
||||||
|
|
||||||
|
@ -316,9 +316,15 @@ class RigRftResultPointCalculator : public RigResultPointCalculator
|
|||||||
public:
|
public:
|
||||||
RigRftResultPointCalculator( const QString& wellPathName, RimEclipseResultCase* eclCase, QDateTime m_timeStep )
|
RigRftResultPointCalculator( const QString& wellPathName, RimEclipseResultCase* eclCase, QDateTime m_timeStep )
|
||||||
{
|
{
|
||||||
RifEclipseRftAddress gasRateAddress(RimWellPlotTools::simWellName(wellPathName), m_timeStep, RifEclipseRftAddress::GRAT);
|
RifEclipseRftAddress gasRateAddress( RimWellPlotTools::simWellName( wellPathName ),
|
||||||
RifEclipseRftAddress oilRateAddress(RimWellPlotTools::simWellName(wellPathName), m_timeStep, RifEclipseRftAddress::ORAT);
|
m_timeStep,
|
||||||
RifEclipseRftAddress watRateAddress(RimWellPlotTools::simWellName(wellPathName), m_timeStep, RifEclipseRftAddress::WRAT);
|
RifEclipseRftAddress::GRAT );
|
||||||
|
RifEclipseRftAddress oilRateAddress( RimWellPlotTools::simWellName( wellPathName ),
|
||||||
|
m_timeStep,
|
||||||
|
RifEclipseRftAddress::ORAT );
|
||||||
|
RifEclipseRftAddress watRateAddress( RimWellPlotTools::simWellName( wellPathName ),
|
||||||
|
m_timeStep,
|
||||||
|
RifEclipseRftAddress::WRAT );
|
||||||
|
|
||||||
std::vector<caf::VecIjk> rftIndices;
|
std::vector<caf::VecIjk> rftIndices;
|
||||||
eclCase->rftReader()->cellIndices( gasRateAddress, &rftIndices );
|
eclCase->rftReader()->cellIndices( gasRateAddress, &rftIndices );
|
||||||
@ -373,8 +379,9 @@ public:
|
|||||||
resPoint.m_gridIndex = 0; // Always main grid
|
resPoint.m_gridIndex = 0; // Always main grid
|
||||||
resPoint.m_gridCellIndex = globCellIdx; // Shortcut, since we only have main grid results from RFT
|
resPoint.m_gridCellIndex = globCellIdx; // Shortcut, since we only have main grid results from RFT
|
||||||
|
|
||||||
resPoint.m_gasRate = RiaEclipseUnitTools::convertSurfaceGasFlowRateToOilEquivalents(
|
resPoint.m_gasRate =
|
||||||
eclCase->eclipseCaseData()->unitsType(), gasRates[it->second]);
|
RiaEclipseUnitTools::convertSurfaceGasFlowRateToOilEquivalents( eclCase->eclipseCaseData()->unitsType(),
|
||||||
|
gasRates[it->second] );
|
||||||
resPoint.m_oilRate = oilRates[it->second];
|
resPoint.m_oilRate = oilRates[it->second];
|
||||||
resPoint.m_waterRate = watRates[it->second];
|
resPoint.m_waterRate = watRates[it->second];
|
||||||
|
|
||||||
@ -399,7 +406,8 @@ public:
|
|||||||
{
|
{
|
||||||
// Find timestep index from qdatetime
|
// Find timestep index from qdatetime
|
||||||
|
|
||||||
const std::vector<QDateTime> timeSteps = eclCase->eclipseCaseData()->results(RiaDefines::MATRIX_MODEL)->timeStepDates();
|
const std::vector<QDateTime> timeSteps =
|
||||||
|
eclCase->eclipseCaseData()->results( RiaDefines::MATRIX_MODEL )->timeStepDates();
|
||||||
size_t tsIdx = timeSteps.size();
|
size_t tsIdx = timeSteps.size();
|
||||||
for ( tsIdx = 0; tsIdx < timeSteps.size(); ++tsIdx )
|
for ( tsIdx = 0; tsIdx < timeSteps.size(); ++tsIdx )
|
||||||
{
|
{
|
||||||
@ -413,8 +421,9 @@ public:
|
|||||||
std::map<size_t, std::pair<size_t, size_t>> globCellIdxToIdxInSimWellBranch;
|
std::map<size_t, std::pair<size_t, size_t>> globCellIdxToIdxInSimWellBranch;
|
||||||
|
|
||||||
const RimWellPath* wellPath = RimWellPlotTools::wellPathByWellPathNameOrSimWellName( wellPathName );
|
const RimWellPath* wellPath = RimWellPlotTools::wellPathByWellPathNameOrSimWellName( wellPathName );
|
||||||
const RigSimWellData* simWell =
|
const RigSimWellData* simWell = wellPath != nullptr ? eclCase->eclipseCaseData()->findSimWellData(
|
||||||
wellPath != nullptr ? eclCase->eclipseCaseData()->findSimWellData(wellPath->associatedSimulationWellName()) : nullptr;
|
wellPath->associatedSimulationWellName() )
|
||||||
|
: nullptr;
|
||||||
|
|
||||||
if ( !simWell ) return;
|
if ( !simWell ) return;
|
||||||
|
|
||||||
@ -462,8 +471,8 @@ public:
|
|||||||
m_pipeBranchCLCoords.push_back( intersections[wpExIdx].endPoint );
|
m_pipeBranchCLCoords.push_back( intersections[wpExIdx].endPoint );
|
||||||
m_pipeBranchMeasuredDepths.push_back( intersections[wpExIdx].endMD );
|
m_pipeBranchMeasuredDepths.push_back( intersections[wpExIdx].endMD );
|
||||||
|
|
||||||
const RigWellResultPoint& resPoint =
|
const RigWellResultPoint& resPoint = resFrame.m_wellResultBranches[it->second.first]
|
||||||
resFrame.m_wellResultBranches[it->second.first].m_branchResultPoints[it->second.second];
|
.m_branchResultPoints[it->second.second];
|
||||||
|
|
||||||
m_pipeBranchWellResultPoints.push_back( resPoint );
|
m_pipeBranchWellResultPoints.push_back( resPoint );
|
||||||
if ( wpExIdx < intersections.size() - 1 )
|
if ( wpExIdx < intersections.size() - 1 )
|
||||||
@ -552,10 +561,11 @@ void RimWellPltPlot::syncCurvesFromUiSelection()
|
|||||||
|
|
||||||
const std::vector<double>& depthValues = wfTotalAccumulator.pseudoLengthFromTop( 0 );
|
const std::vector<double>& depthValues = wfTotalAccumulator.pseudoLengthFromTop( 0 );
|
||||||
|
|
||||||
QString curveUnitText = RimWellPlotTools::flowUnitText(RimWellLogFile::WELL_FLOW_COND_RESERVOIR, unitSet);
|
QString curveUnitText = RimWellPlotTools::flowUnitText( RimWellLogFile::WELL_FLOW_COND_RESERVOIR,
|
||||||
|
unitSet );
|
||||||
|
|
||||||
const std::vector<double> accFlow =
|
const std::vector<double> accFlow = wfTotalAccumulator
|
||||||
wfTotalAccumulator.accumulatedTracerFlowPrPseudoLength(RIG_FLOW_TOTAL_NAME, 0);
|
.accumulatedTracerFlowPrPseudoLength( RIG_FLOW_TOTAL_NAME, 0 );
|
||||||
addStackedCurve( curveName + ", " + RIG_FLOW_TOTAL_NAME + " " + curveUnitText,
|
addStackedCurve( curveName + ", " + RIG_FLOW_TOTAL_NAME + " " + curveUnitText,
|
||||||
depthValues,
|
depthValues,
|
||||||
accFlow,
|
accFlow,
|
||||||
@ -581,7 +591,8 @@ void RimWellPltPlot::syncCurvesFromUiSelection()
|
|||||||
? cvf::Color3f::DARK_GREEN
|
? cvf::Color3f::DARK_GREEN
|
||||||
: tracerName == RIG_FLOW_GAS_NAME
|
: tracerName == RIG_FLOW_GAS_NAME
|
||||||
? cvf::Color3f::DARK_RED
|
? cvf::Color3f::DARK_RED
|
||||||
: tracerName == RIG_FLOW_WATER_NAME ? cvf::Color3f::BLUE : cvf::Color3f::DARK_GRAY;
|
: tracerName == RIG_FLOW_WATER_NAME ? cvf::Color3f::BLUE
|
||||||
|
: cvf::Color3f::DARK_GRAY;
|
||||||
|
|
||||||
if ( tracerName == RIG_FLOW_OIL_NAME && selectedPhases.count( FLOW_PHASE_OIL ) ||
|
if ( tracerName == RIG_FLOW_OIL_NAME && selectedPhases.count( FLOW_PHASE_OIL ) ||
|
||||||
tracerName == RIG_FLOW_GAS_NAME && selectedPhases.count( FLOW_PHASE_GAS ) ||
|
tracerName == RIG_FLOW_GAS_NAME && selectedPhases.count( FLOW_PHASE_GAS ) ||
|
||||||
@ -594,11 +605,12 @@ void RimWellPltPlot::syncCurvesFromUiSelection()
|
|||||||
flowPhase = FLOW_PHASE_GAS;
|
flowPhase = FLOW_PHASE_GAS;
|
||||||
else if ( tracerName == RIG_FLOW_WATER_NAME )
|
else if ( tracerName == RIG_FLOW_WATER_NAME )
|
||||||
flowPhase = FLOW_PHASE_WATER;
|
flowPhase = FLOW_PHASE_WATER;
|
||||||
QString curveUnitText =
|
QString curveUnitText = RimWellPlotTools::curveUnitText( RimWellLogFile::WELL_FLOW_COND_STANDARD,
|
||||||
RimWellPlotTools::curveUnitText(RimWellLogFile::WELL_FLOW_COND_STANDARD, unitSet, flowPhase);
|
unitSet,
|
||||||
|
flowPhase );
|
||||||
|
|
||||||
const std::vector<double>& accFlow =
|
const std::vector<double>& accFlow = wfPhaseAccumulator
|
||||||
wfPhaseAccumulator.accumulatedTracerFlowPrPseudoLength(tracerName, 0);
|
.accumulatedTracerFlowPrPseudoLength( tracerName, 0 );
|
||||||
addStackedCurve( curveName + ", " + tracerName + " " + curveUnitText,
|
addStackedCurve( curveName + ", " + tracerName + " " + curveUnitText,
|
||||||
depthValues,
|
depthValues,
|
||||||
accFlow,
|
accFlow,
|
||||||
@ -636,7 +648,8 @@ void RimWellPltPlot::syncCurvesFromUiSelection()
|
|||||||
channelData[chIdx] = wellLogFileData->values( channelName );
|
channelData[chIdx] = wellLogFileData->values( channelName );
|
||||||
if ( !channelData[chIdx].empty() )
|
if ( !channelData[chIdx].empty() )
|
||||||
{
|
{
|
||||||
sortedChannels.insert(ChannelValNameIdxTuple(-fabs(channelData[chIdx].front()), channelName, chIdx));
|
sortedChannels.insert(
|
||||||
|
ChannelValNameIdxTuple( -fabs( channelData[chIdx].front() ), channelName, chIdx ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -658,7 +671,8 @@ void RimWellPltPlot::syncCurvesFromUiSelection()
|
|||||||
? cvf::Color3f::DARK_GREEN
|
? cvf::Color3f::DARK_GREEN
|
||||||
: RimWellPlotTools::isGasFlowChannel( channelName )
|
: RimWellPlotTools::isGasFlowChannel( channelName )
|
||||||
? cvf::Color3f::DARK_RED
|
? cvf::Color3f::DARK_RED
|
||||||
: RimWellPlotTools::isWaterFlowChannel(channelName) ? cvf::Color3f::BLUE
|
: RimWellPlotTools::isWaterFlowChannel( channelName )
|
||||||
|
? cvf::Color3f::BLUE
|
||||||
: cvf::Color3f::DARK_GRAY;
|
: cvf::Color3f::DARK_GRAY;
|
||||||
|
|
||||||
FlowPhase flowPhase = FLOW_PHASE_NONE;
|
FlowPhase flowPhase = FLOW_PHASE_NONE;
|
||||||
@ -785,7 +799,8 @@ QList<caf::PdmOptionItemInfo> RimWellPltPlot::calculateValueOptions(const caf::P
|
|||||||
|
|
||||||
for ( const auto& rftCase : rftCases )
|
for ( const auto& rftCase : rftCases )
|
||||||
{
|
{
|
||||||
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.empty() )
|
if ( !rftTimes.empty() )
|
||||||
@ -796,8 +811,9 @@ QList<caf::PdmOptionItemInfo> RimWellPltPlot::calculateValueOptions(const caf::P
|
|||||||
|
|
||||||
if ( !availableRftSources.empty() )
|
if ( !availableRftSources.empty() )
|
||||||
{
|
{
|
||||||
options.push_back(caf::PdmOptionItemInfo::createHeader(
|
options.push_back( caf::PdmOptionItemInfo::createHeader( RifDataSourceForRftPlt::sourceTypeUiText(
|
||||||
RifDataSourceForRftPlt::sourceTypeUiText(RifDataSourceForRftPlt::RFT), true));
|
RifDataSourceForRftPlt::RFT ),
|
||||||
|
true ) );
|
||||||
|
|
||||||
for ( const auto& addr : availableRftSources )
|
for ( const auto& addr : availableRftSources )
|
||||||
{
|
{
|
||||||
@ -810,8 +826,9 @@ 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.empty() )
|
if ( !gridCases.empty() )
|
||||||
{
|
{
|
||||||
options.push_back(caf::PdmOptionItemInfo::createHeader(
|
options.push_back( caf::PdmOptionItemInfo::createHeader( RifDataSourceForRftPlt::sourceTypeUiText(
|
||||||
RifDataSourceForRftPlt::sourceTypeUiText(RifDataSourceForRftPlt::GRID), true));
|
RifDataSourceForRftPlt::GRID ),
|
||||||
|
true ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( const auto& gridCase : gridCases )
|
for ( const auto& gridCase : gridCases )
|
||||||
@ -824,8 +841,9 @@ QList<caf::PdmOptionItemInfo> RimWellPltPlot::calculateValueOptions(const caf::P
|
|||||||
|
|
||||||
if ( !RimWellPlotTools::wellLogFilesContainingFlow( m_wellPathName ).empty() )
|
if ( !RimWellPlotTools::wellLogFilesContainingFlow( m_wellPathName ).empty() )
|
||||||
{
|
{
|
||||||
options.push_back(caf::PdmOptionItemInfo::createHeader(
|
options.push_back( caf::PdmOptionItemInfo::createHeader( RifDataSourceForRftPlt::sourceTypeUiText(
|
||||||
RifDataSourceForRftPlt::sourceTypeUiText(RifDataSourceForRftPlt::OBSERVED), true));
|
RifDataSourceForRftPlt::OBSERVED ),
|
||||||
|
true ) );
|
||||||
|
|
||||||
auto addr = RifDataSourceForRftPlt( RifDataSourceForRftPlt::OBSERVED );
|
auto addr = RifDataSourceForRftPlt( RifDataSourceForRftPlt::OBSERVED );
|
||||||
auto item = caf::PdmOptionItemInfo( "Observed Data", QVariant::fromValue( addr ) );
|
auto item = caf::PdmOptionItemInfo( "Observed Data", QVariant::fromValue( addr ) );
|
||||||
@ -838,8 +856,10 @@ QList<caf::PdmOptionItemInfo> RimWellPltPlot::calculateValueOptions(const caf::P
|
|||||||
{
|
{
|
||||||
std::set<RifEclipseRftAddress::RftWellLogChannelType> channelTypesToUse = RifEclipseRftAddress::pltPlotChannelTypes();
|
std::set<RifEclipseRftAddress::RftWellLogChannelType> channelTypesToUse = RifEclipseRftAddress::pltPlotChannelTypes();
|
||||||
|
|
||||||
RimWellPlotTools::calculateValueOptionsForTimeSteps(
|
RimWellPlotTools::calculateValueOptionsForTimeSteps( RimWellPlotTools::simWellName( m_wellPathName ),
|
||||||
RimWellPlotTools::simWellName(m_wellPathName), selectedSourcesExpanded(), channelTypesToUse, options);
|
selectedSourcesExpanded(),
|
||||||
|
channelTypesToUse,
|
||||||
|
options );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( fieldNeedingOptions == &m_phases )
|
if ( fieldNeedingOptions == &m_phases )
|
||||||
@ -856,7 +876,9 @@ QList<caf::PdmOptionItemInfo> RimWellPltPlot::calculateValueOptions(const caf::P
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellPltPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
void RimWellPltPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||||
|
const QVariant& oldValue,
|
||||||
|
const QVariant& newValue )
|
||||||
{
|
{
|
||||||
RimWellLogPlot::fieldChangedByUi( changedField, oldValue, newValue );
|
RimWellLogPlot::fieldChangedByUi( changedField, oldValue, newValue );
|
||||||
|
|
||||||
@ -881,11 +903,13 @@ void RimWellPltPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
|
|||||||
{
|
{
|
||||||
for ( const 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 )
|
||||||
{
|
{
|
||||||
if ( !wellPath->wellPathGeometry() )
|
if ( !wellPath->wellPathGeometry() )
|
||||||
{
|
{
|
||||||
QString tmp = QString("Display of Measured Depth (MD) for Grid or RFT curves is not possible without a "
|
QString tmp = QString(
|
||||||
|
"Display of Measured Depth (MD) for Grid or RFT curves is not possible without a "
|
||||||
"well log path, and the curve will be hidden in this mode.\n\n" );
|
"well log path, and the curve will be hidden in this mode.\n\n" );
|
||||||
|
|
||||||
QMessageBox::warning( nullptr, "Grid/RFT curve without MD", tmp );
|
QMessageBox::warning( nullptr, "Grid/RFT curve without MD", tmp );
|
||||||
@ -977,7 +1001,8 @@ void RimWellPltPlot::defineEditorAttribute(const caf::PdmFieldHandle* field,
|
|||||||
{
|
{
|
||||||
if ( field == &m_phases )
|
if ( field == &m_phases )
|
||||||
{
|
{
|
||||||
caf::PdmUiTreeSelectionEditorAttribute* attrib = dynamic_cast<caf::PdmUiTreeSelectionEditorAttribute*>(attribute);
|
caf::PdmUiTreeSelectionEditorAttribute* attrib = dynamic_cast<caf::PdmUiTreeSelectionEditorAttribute*>(
|
||||||
|
attribute );
|
||||||
attrib->showTextFilter = false;
|
attrib->showTextFilter = false;
|
||||||
attrib->showToggleAllCheckbox = false;
|
attrib->showToggleAllCheckbox = false;
|
||||||
}
|
}
|
||||||
|
@ -22,18 +22,18 @@
|
|||||||
#include "RimWellLogPlot.h"
|
#include "RimWellLogPlot.h"
|
||||||
#include "RimWellPlotTools.h"
|
#include "RimWellPlotTools.h"
|
||||||
|
|
||||||
|
#include "cafPdmChildArrayField.h"
|
||||||
#include "cafPdmField.h"
|
#include "cafPdmField.h"
|
||||||
#include "cafPdmObject.h"
|
#include "cafPdmObject.h"
|
||||||
#include "cafPdmPtrField.h"
|
#include "cafPdmPtrField.h"
|
||||||
#include "cafPdmChildArrayField.h"
|
|
||||||
#include "cvfCollection.h"
|
#include "cvfCollection.h"
|
||||||
|
|
||||||
#include <QPointer>
|
|
||||||
#include <QDate>
|
#include <QDate>
|
||||||
#include <QMetaType>
|
#include <QMetaType>
|
||||||
|
#include <QPointer>
|
||||||
|
|
||||||
#include <set>
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <set>
|
||||||
|
|
||||||
class RimEclipseCase;
|
class RimEclipseCase;
|
||||||
class RimEclipseResultCase;
|
class RimEclipseResultCase;
|
||||||
@ -45,12 +45,13 @@ class RimWellLogTrack;
|
|||||||
class RiaRftPltCurveDefinition;
|
class RiaRftPltCurveDefinition;
|
||||||
class RimDataSourceForRftPlt;
|
class RimDataSourceForRftPlt;
|
||||||
|
|
||||||
|
namespace cvf
|
||||||
namespace cvf {
|
{
|
||||||
class Color3f;
|
class Color3f;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace caf {
|
namespace caf
|
||||||
|
{
|
||||||
class PdmOptionItemInfo;
|
class PdmOptionItemInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,17 +73,21 @@ public:
|
|||||||
|
|
||||||
static const char* plotNameFormatString();
|
static const char* plotNameFormatString();
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Overridden PDM methods
|
// Overridden PDM methods
|
||||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||||
|
const QVariant& oldValue,
|
||||||
|
const QVariant& newValue ) override;
|
||||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName ) override;
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName ) override;
|
||||||
|
|
||||||
QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||||
|
bool* useOptionsOnly ) override;
|
||||||
void calculateValueOptionsForWells( QList<caf::PdmOptionItemInfo>& options );
|
void calculateValueOptionsForWells( QList<caf::PdmOptionItemInfo>& options );
|
||||||
|
|
||||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||||
void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
|
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||||
|
QString uiConfigName,
|
||||||
|
caf::PdmUiEditorAttribute* attribute ) override;
|
||||||
void onLoadDataAndUpdate() override;
|
void onLoadDataAndUpdate() override;
|
||||||
|
|
||||||
void initAfterRead() override;
|
void initAfterRead() override;
|
||||||
@ -110,6 +115,7 @@ private:
|
|||||||
|
|
||||||
void updateFormationsOnPlot() const;
|
void updateFormationsOnPlot() const;
|
||||||
std::set<RimWellLogPlot::DepthTypeEnum> availableDepthTypes() const override;
|
std::set<RimWellLogPlot::DepthTypeEnum> availableDepthTypes() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmField<bool> m_showPlotTitle_OBSOLETE;
|
caf::PdmField<bool> m_showPlotTitle_OBSOLETE;
|
||||||
|
|
||||||
|
@ -143,8 +143,8 @@ void RimWellRftPlot::applyCurveAppearance(RimWellLogCurve* newCurve)
|
|||||||
currentColor = m_dataSourceColors[sourceAddress];
|
currentColor = m_dataSourceColors[sourceAddress];
|
||||||
if ( m_showStatisticsCurves )
|
if ( m_showStatisticsCurves )
|
||||||
{
|
{
|
||||||
cvf::Color3f backgroundColor =
|
cvf::Color3f backgroundColor = RiaColorTools::fromQColorTo3f(
|
||||||
RiaColorTools::fromQColorTo3f(trackByIndex(0)->viewer()->canvasBackground().color());
|
trackByIndex( 0 )->viewer()->canvasBackground().color() );
|
||||||
currentColor = RiaColorTools::blendCvfColors( backgroundColor, currentColor, 2, 1 );
|
currentColor = RiaColorTools::blendCvfColors( backgroundColor, currentColor, 2, 1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -200,8 +200,10 @@ void RimWellRftPlot::updateFormationsOnPlot() const
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
trackByIndex(0)->setAndUpdateSimWellFormationNamesAndBranchData(
|
trackByIndex( 0 )->setAndUpdateSimWellFormationNamesAndBranchData( formationNamesCase,
|
||||||
formationNamesCase, associatedSimWellName(), m_branchIndex, m_branchDetection);
|
associatedSimWellName(),
|
||||||
|
m_branchIndex,
|
||||||
|
m_branchDetection );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -237,7 +239,8 @@ void RimWellRftPlot::applyInitialSelections()
|
|||||||
sourcesToSelect.push_back( RifDataSourceForRftPlt( RifDataSourceForRftPlt::ENSEMBLE_RFT, ensemble ) );
|
sourcesToSelect.push_back( RifDataSourceForRftPlt( RifDataSourceForRftPlt::ENSEMBLE_RFT, ensemble ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<RimWellLogFile*> wellLogFiles = RimWellPlotTools::wellLogFilesContainingPressure(m_wellPathNameOrSimWellName);
|
std::vector<RimWellLogFile*> wellLogFiles = RimWellPlotTools::wellLogFilesContainingPressure(
|
||||||
|
m_wellPathNameOrSimWellName );
|
||||||
if ( !wellLogFiles.empty() )
|
if ( !wellLogFiles.empty() )
|
||||||
{
|
{
|
||||||
for ( RimWellLogFile* const wellLogFile : wellLogFiles )
|
for ( RimWellLogFile* const wellLogFile : wellLogFiles )
|
||||||
@ -248,7 +251,8 @@ void RimWellRftPlot::applyInitialSelections()
|
|||||||
|
|
||||||
for ( RimObservedFmuRftData* const observedFmuRftData : RimWellPlotTools::observedFmuRftData() )
|
for ( RimObservedFmuRftData* const observedFmuRftData : RimWellPlotTools::observedFmuRftData() )
|
||||||
{
|
{
|
||||||
sourcesToSelect.push_back(RifDataSourceForRftPlt(RifDataSourceForRftPlt::OBSERVED_FMU_RFT, observedFmuRftData));
|
sourcesToSelect.push_back(
|
||||||
|
RifDataSourceForRftPlt( RifDataSourceForRftPlt::OBSERVED_FMU_RFT, observedFmuRftData ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_selectedSources = sourcesToSelect;
|
m_selectedSources = sourcesToSelect;
|
||||||
@ -256,8 +260,9 @@ void RimWellRftPlot::applyInitialSelections()
|
|||||||
{
|
{
|
||||||
std::set<RifEclipseRftAddress::RftWellLogChannelType> channelTypesToUse = RifEclipseRftAddress::rftPlotChannelTypes();
|
std::set<RifEclipseRftAddress::RftWellLogChannelType> channelTypesToUse = RifEclipseRftAddress::rftPlotChannelTypes();
|
||||||
|
|
||||||
auto relevantTimeSteps =
|
auto relevantTimeSteps = RimWellPlotTools::calculateRelevantTimeStepsFromCases( m_wellPathNameOrSimWellName,
|
||||||
RimWellPlotTools::calculateRelevantTimeStepsFromCases(m_wellPathNameOrSimWellName, m_selectedSources, channelTypesToUse);
|
m_selectedSources,
|
||||||
|
channelTypesToUse );
|
||||||
|
|
||||||
std::vector<QDateTime> timeStepVector;
|
std::vector<QDateTime> timeStepVector;
|
||||||
for ( const auto& item : relevantTimeSteps )
|
for ( const auto& item : relevantTimeSteps )
|
||||||
@ -348,8 +353,11 @@ std::set<RiaRftPltCurveDefinition> RimWellRftPlot::selectedCurveDefs() const
|
|||||||
{
|
{
|
||||||
std::set<RifEclipseRftAddress::RftWellLogChannelType> channelTypesToUse = RifEclipseRftAddress::rftPlotChannelTypes();
|
std::set<RifEclipseRftAddress::RftWellLogChannelType> channelTypesToUse = RifEclipseRftAddress::rftPlotChannelTypes();
|
||||||
|
|
||||||
return RimWellPlotTools::curveDefsFromTimesteps(
|
return RimWellPlotTools::curveDefsFromTimesteps( m_wellPathNameOrSimWellName,
|
||||||
m_wellPathNameOrSimWellName, m_selectedTimeSteps.v(), true, selectedSourcesExpanded(), channelTypesToUse);
|
m_selectedTimeSteps.v(),
|
||||||
|
true,
|
||||||
|
selectedSourcesExpanded(),
|
||||||
|
channelTypesToUse );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -409,7 +417,9 @@ void RimWellRftPlot::updateCurvesInPlot(const std::set<RiaRftPltCurveDefinition>
|
|||||||
|
|
||||||
auto observedFmuRftData = curveDefToAdd.address().observedFmuRftData();
|
auto observedFmuRftData = curveDefToAdd.address().observedFmuRftData();
|
||||||
curve->setObservedFmuRftData( observedFmuRftData );
|
curve->setObservedFmuRftData( observedFmuRftData );
|
||||||
RifEclipseRftAddress address(m_wellPathNameOrSimWellName, curveDefToAdd.timeStep(), RifEclipseRftAddress::PRESSURE);
|
RifEclipseRftAddress address( m_wellPathNameOrSimWellName,
|
||||||
|
curveDefToAdd.timeStep(),
|
||||||
|
RifEclipseRftAddress::PRESSURE );
|
||||||
curve->setRftAddress( address );
|
curve->setRftAddress( address );
|
||||||
curve->setZOrder( RiuQwtPlotCurve::Z_SINGLE_CURVE_OBSERVED );
|
curve->setZOrder( RiuQwtPlotCurve::Z_SINGLE_CURVE_OBSERVED );
|
||||||
applyCurveAppearance( curve );
|
applyCurveAppearance( curve );
|
||||||
@ -421,21 +431,26 @@ void RimWellRftPlot::updateCurvesInPlot(const std::set<RiaRftPltCurveDefinition>
|
|||||||
auto rftCase = curveDefToAdd.address().summaryCase();
|
auto rftCase = curveDefToAdd.address().summaryCase();
|
||||||
curve->setSummaryCase( rftCase );
|
curve->setSummaryCase( rftCase );
|
||||||
curve->setEnsemble( curveDefToAdd.address().ensemble() );
|
curve->setEnsemble( curveDefToAdd.address().ensemble() );
|
||||||
curve->setObservedFmuRftData(this->findObservedFmuData(m_wellPathNameOrSimWellName, curveDefToAdd.timeStep()));
|
curve->setObservedFmuRftData(
|
||||||
RifEclipseRftAddress address(m_wellPathNameOrSimWellName, curveDefToAdd.timeStep(), RifEclipseRftAddress::PRESSURE);
|
this->findObservedFmuData( m_wellPathNameOrSimWellName, curveDefToAdd.timeStep() ) );
|
||||||
|
RifEclipseRftAddress address( m_wellPathNameOrSimWellName,
|
||||||
|
curveDefToAdd.timeStep(),
|
||||||
|
RifEclipseRftAddress::PRESSURE );
|
||||||
curve->setRftAddress( address );
|
curve->setRftAddress( address );
|
||||||
curve->setZOrder( 1 );
|
curve->setZOrder( 1 );
|
||||||
applyCurveAppearance( curve );
|
applyCurveAppearance( curve );
|
||||||
|
|
||||||
bool isFirstSummaryCurveInEnsemble = ensemblesWithSummaryCurves.count(curveDefToAdd.address().ensemble()) == 0u;
|
bool isFirstSummaryCurveInEnsemble = ensemblesWithSummaryCurves.count( curveDefToAdd.address().ensemble() ) ==
|
||||||
|
0u;
|
||||||
curve->showLegend( isFirstSummaryCurveInEnsemble );
|
curve->showLegend( isFirstSummaryCurveInEnsemble );
|
||||||
ensemblesWithSummaryCurves.insert( curveDefToAdd.address().ensemble() );
|
ensemblesWithSummaryCurves.insert( curveDefToAdd.address().ensemble() );
|
||||||
}
|
}
|
||||||
else if ( m_showStatisticsCurves && curveDefToAdd.address().sourceType() == RifDataSourceForRftPlt::ENSEMBLE_RFT )
|
else if ( m_showStatisticsCurves && curveDefToAdd.address().sourceType() == RifDataSourceForRftPlt::ENSEMBLE_RFT )
|
||||||
{
|
{
|
||||||
RimSummaryCaseCollection* ensemble = curveDefToAdd.address().ensemble();
|
RimSummaryCaseCollection* ensemble = curveDefToAdd.address().ensemble();
|
||||||
std::set<RifEclipseRftAddress> rftAddresses =
|
std::set<RifEclipseRftAddress> rftAddresses = ensemble->rftStatisticsReader()
|
||||||
ensemble->rftStatisticsReader()->eclipseRftAddresses(m_wellPathNameOrSimWellName, curveDefToAdd.timeStep());
|
->eclipseRftAddresses( m_wellPathNameOrSimWellName,
|
||||||
|
curveDefToAdd.timeStep() );
|
||||||
for ( auto rftAddress : rftAddresses )
|
for ( auto rftAddress : rftAddresses )
|
||||||
{
|
{
|
||||||
if ( rftAddress.wellLogChannel() != RifEclipseRftAddress::TVD )
|
if ( rftAddress.wellLogChannel() != RifEclipseRftAddress::TVD )
|
||||||
@ -444,7 +459,8 @@ void RimWellRftPlot::updateCurvesInPlot(const std::set<RiaRftPltCurveDefinition>
|
|||||||
plotTrack->addCurve( curve );
|
plotTrack->addCurve( curve );
|
||||||
curve->setEnsemble( ensemble );
|
curve->setEnsemble( ensemble );
|
||||||
curve->setRftAddress( rftAddress );
|
curve->setRftAddress( rftAddress );
|
||||||
curve->setObservedFmuRftData(this->findObservedFmuData(m_wellPathNameOrSimWellName, curveDefToAdd.timeStep()));
|
curve->setObservedFmuRftData(
|
||||||
|
this->findObservedFmuData( m_wellPathNameOrSimWellName, curveDefToAdd.timeStep() ) );
|
||||||
curve->setZOrder( RiuQwtPlotCurve::Z_ENSEMBLE_STAT_CURVE );
|
curve->setZOrder( RiuQwtPlotCurve::Z_ENSEMBLE_STAT_CURVE );
|
||||||
applyCurveAppearance( curve );
|
applyCurveAppearance( curve );
|
||||||
auto symbol = statisticsCurveSymbolFromAddress( rftAddress );
|
auto symbol = statisticsCurveSymbolFromAddress( rftAddress );
|
||||||
@ -454,8 +470,8 @@ void RimWellRftPlot::updateCurvesInPlot(const std::set<RiaRftPltCurveDefinition>
|
|||||||
curve->setSymbolSize( curve->symbolSize() + 3 );
|
curve->setSymbolSize( curve->symbolSize() + 3 );
|
||||||
curve->setSymbolSkipDistance( 150 );
|
curve->setSymbolSkipDistance( 150 );
|
||||||
curve->setLineStyle( RiuQwtPlotCurve::STYLE_SOLID );
|
curve->setLineStyle( RiuQwtPlotCurve::STYLE_SOLID );
|
||||||
QString uiText =
|
QString uiText = caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::uiText(
|
||||||
caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::uiText(rftAddress.wellLogChannel());
|
rftAddress.wellLogChannel() );
|
||||||
QString label = uiText.replace( "Pressure", "" );
|
QString label = uiText.replace( "Pressure", "" );
|
||||||
curve->setSymbolLabel( label );
|
curve->setSymbolLabel( label );
|
||||||
}
|
}
|
||||||
@ -628,8 +644,9 @@ QList<caf::PdmOptionItemInfo> RimWellRftPlot::calculateValueOptions(const caf::P
|
|||||||
const std::vector<RimEclipseResultCase*> rftCases = RimWellPlotTools::rftCasesForWell( simWellName );
|
const std::vector<RimEclipseResultCase*> rftCases = RimWellPlotTools::rftCasesForWell( simWellName );
|
||||||
if ( !rftCases.empty() )
|
if ( !rftCases.empty() )
|
||||||
{
|
{
|
||||||
options.push_back(caf::PdmOptionItemInfo::createHeader(
|
options.push_back( caf::PdmOptionItemInfo::createHeader( RifDataSourceForRftPlt::sourceTypeUiText(
|
||||||
RifDataSourceForRftPlt::sourceTypeUiText(RifDataSourceForRftPlt::RFT), true));
|
RifDataSourceForRftPlt::RFT ),
|
||||||
|
true ) );
|
||||||
|
|
||||||
for ( const auto& rftCase : rftCases )
|
for ( const auto& rftCase : rftCases )
|
||||||
{
|
{
|
||||||
@ -640,11 +657,13 @@ QList<caf::PdmOptionItemInfo> RimWellRftPlot::calculateValueOptions(const caf::P
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<RimSummaryCaseCollection*> rftEnsembles = RimWellPlotTools::rftEnsemblesForWell(m_wellPathNameOrSimWellName);
|
const std::vector<RimSummaryCaseCollection*> rftEnsembles = RimWellPlotTools::rftEnsemblesForWell(
|
||||||
|
m_wellPathNameOrSimWellName );
|
||||||
if ( !rftEnsembles.empty() )
|
if ( !rftEnsembles.empty() )
|
||||||
{
|
{
|
||||||
options.push_back(caf::PdmOptionItemInfo::createHeader(
|
options.push_back( caf::PdmOptionItemInfo::createHeader( RifDataSourceForRftPlt::sourceTypeUiText(
|
||||||
RifDataSourceForRftPlt::sourceTypeUiText(RifDataSourceForRftPlt::ENSEMBLE_RFT), true));
|
RifDataSourceForRftPlt::ENSEMBLE_RFT ),
|
||||||
|
true ) );
|
||||||
|
|
||||||
for ( RimSummaryCaseCollection* rftEnsemble : rftEnsembles )
|
for ( RimSummaryCaseCollection* rftEnsemble : rftEnsembles )
|
||||||
{
|
{
|
||||||
@ -658,8 +677,9 @@ QList<caf::PdmOptionItemInfo> RimWellRftPlot::calculateValueOptions(const caf::P
|
|||||||
const std::vector<RimEclipseResultCase*> gridCases = RimWellPlotTools::gridCasesForWell( simWellName );
|
const std::vector<RimEclipseResultCase*> gridCases = RimWellPlotTools::gridCasesForWell( simWellName );
|
||||||
if ( !gridCases.empty() )
|
if ( !gridCases.empty() )
|
||||||
{
|
{
|
||||||
options.push_back(caf::PdmOptionItemInfo::createHeader(
|
options.push_back( caf::PdmOptionItemInfo::createHeader( RifDataSourceForRftPlt::sourceTypeUiText(
|
||||||
RifDataSourceForRftPlt::sourceTypeUiText(RifDataSourceForRftPlt::GRID), true));
|
RifDataSourceForRftPlt::GRID ),
|
||||||
|
true ) );
|
||||||
|
|
||||||
for ( const auto& gridCase : gridCases )
|
for ( const auto& gridCase : gridCases )
|
||||||
{
|
{
|
||||||
@ -672,19 +692,22 @@ QList<caf::PdmOptionItemInfo> RimWellRftPlot::calculateValueOptions(const caf::P
|
|||||||
|
|
||||||
if ( !RimWellPlotTools::wellLogFilesContainingPressure( m_wellPathNameOrSimWellName ).empty() )
|
if ( !RimWellPlotTools::wellLogFilesContainingPressure( m_wellPathNameOrSimWellName ).empty() )
|
||||||
{
|
{
|
||||||
options.push_back(caf::PdmOptionItemInfo::createHeader(
|
options.push_back( caf::PdmOptionItemInfo::createHeader( RifDataSourceForRftPlt::sourceTypeUiText(
|
||||||
RifDataSourceForRftPlt::sourceTypeUiText(RifDataSourceForRftPlt::OBSERVED), true));
|
RifDataSourceForRftPlt::OBSERVED ),
|
||||||
|
true ) );
|
||||||
|
|
||||||
auto addr = RifDataSourceForRftPlt( RifDataSourceForRftPlt::OBSERVED );
|
auto addr = RifDataSourceForRftPlt( RifDataSourceForRftPlt::OBSERVED );
|
||||||
auto item = caf::PdmOptionItemInfo( "Observed Data", QVariant::fromValue( addr ) );
|
auto item = caf::PdmOptionItemInfo( "Observed Data", QVariant::fromValue( addr ) );
|
||||||
item.setLevel( 1 );
|
item.setLevel( 1 );
|
||||||
options.push_back( item );
|
options.push_back( item );
|
||||||
}
|
}
|
||||||
const std::vector<RimObservedFmuRftData*> observedFmuRftCases = RimWellPlotTools::observedFmuRftDataForWell(m_wellPathNameOrSimWellName);
|
const std::vector<RimObservedFmuRftData*> observedFmuRftCases = RimWellPlotTools::observedFmuRftDataForWell(
|
||||||
|
m_wellPathNameOrSimWellName );
|
||||||
if ( !observedFmuRftCases.empty() )
|
if ( !observedFmuRftCases.empty() )
|
||||||
{
|
{
|
||||||
options.push_back(caf::PdmOptionItemInfo::createHeader(
|
options.push_back( caf::PdmOptionItemInfo::createHeader( RifDataSourceForRftPlt::sourceTypeUiText(
|
||||||
RifDataSourceForRftPlt::sourceTypeUiText(RifDataSourceForRftPlt::OBSERVED_FMU_RFT), true));
|
RifDataSourceForRftPlt::OBSERVED_FMU_RFT ),
|
||||||
|
true ) );
|
||||||
|
|
||||||
for ( const auto& observedFmuRftCase : observedFmuRftCases )
|
for ( const auto& observedFmuRftCase : observedFmuRftCases )
|
||||||
{
|
{
|
||||||
@ -694,14 +717,15 @@ QList<caf::PdmOptionItemInfo> RimWellRftPlot::calculateValueOptions(const caf::P
|
|||||||
options.push_back( item );
|
options.push_back( item );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if ( fieldNeedingOptions == &m_selectedTimeSteps )
|
else if ( fieldNeedingOptions == &m_selectedTimeSteps )
|
||||||
{
|
{
|
||||||
std::set<RifEclipseRftAddress::RftWellLogChannelType> channelTypesToUse = RifEclipseRftAddress::rftPlotChannelTypes();
|
std::set<RifEclipseRftAddress::RftWellLogChannelType> channelTypesToUse = RifEclipseRftAddress::rftPlotChannelTypes();
|
||||||
|
|
||||||
RimWellPlotTools::calculateValueOptionsForTimeSteps(
|
RimWellPlotTools::calculateValueOptionsForTimeSteps( m_wellPathNameOrSimWellName,
|
||||||
m_wellPathNameOrSimWellName, selectedSourcesExpanded(), channelTypesToUse, options);
|
selectedSourcesExpanded(),
|
||||||
|
channelTypesToUse,
|
||||||
|
options );
|
||||||
}
|
}
|
||||||
else if ( fieldNeedingOptions == &m_branchIndex )
|
else if ( fieldNeedingOptions == &m_branchIndex )
|
||||||
{
|
{
|
||||||
@ -716,7 +740,9 @@ QList<caf::PdmOptionItemInfo> RimWellRftPlot::calculateValueOptions(const caf::P
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellRftPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
void RimWellRftPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||||
|
const QVariant& oldValue,
|
||||||
|
const QVariant& newValue )
|
||||||
{
|
{
|
||||||
RimWellLogPlot::fieldChangedByUi( changedField, oldValue, newValue );
|
RimWellLogPlot::fieldChangedByUi( changedField, oldValue, newValue );
|
||||||
|
|
||||||
@ -790,8 +816,10 @@ void RimWellRftPlot::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
|||||||
m_showStatisticsCurves.uiCapability()->setUiReadOnly( !showingEnsembleData );
|
m_showStatisticsCurves.uiCapability()->setUiReadOnly( !showingEnsembleData );
|
||||||
m_showEnsembleCurves.uiCapability()->setUiReadOnly( !showingEnsembleData );
|
m_showEnsembleCurves.uiCapability()->setUiReadOnly( !showingEnsembleData );
|
||||||
|
|
||||||
RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromWellName(
|
RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromWellName( &uiOrdering,
|
||||||
&uiOrdering, m_wellPathNameOrSimWellName, m_branchDetection, m_branchIndex);
|
m_wellPathNameOrSimWellName,
|
||||||
|
m_branchDetection,
|
||||||
|
m_branchIndex );
|
||||||
|
|
||||||
caf::PdmUiGroup* sourcesGroup = uiOrdering.addNewGroupWithKeyword( "Sources", "Sources" );
|
caf::PdmUiGroup* sourcesGroup = uiOrdering.addNewGroupWithKeyword( "Sources", "Sources" );
|
||||||
sourcesGroup->add( &m_selectedSources );
|
sourcesGroup->add( &m_selectedSources );
|
||||||
|
@ -85,7 +85,9 @@ public:
|
|||||||
void deleteCurvesAssosicatedWithObservedData( const RimObservedFmuRftData* observedFmuRftData );
|
void deleteCurvesAssosicatedWithObservedData( const RimObservedFmuRftData* observedFmuRftData );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||||
|
const QVariant& oldValue,
|
||||||
|
const QVariant& newValue ) override;
|
||||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName ) override;
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName ) override;
|
||||||
|
|
||||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||||
@ -125,6 +127,7 @@ private:
|
|||||||
void defineCurveColorsAndSymbols( const std::set<RiaRftPltCurveDefinition>& allCurveDefs );
|
void defineCurveColorsAndSymbols( const std::set<RiaRftPltCurveDefinition>& allCurveDefs );
|
||||||
|
|
||||||
void onDepthTypeChanged() override;
|
void onDepthTypeChanged() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmField<QString> m_wellPathNameOrSimWellName;
|
caf::PdmField<QString> m_wellPathNameOrSimWellName;
|
||||||
caf::PdmField<int> m_branchIndex;
|
caf::PdmField<int> m_branchIndex;
|
||||||
|
@ -55,7 +55,8 @@ RimGridCrossPlot::RimGridCrossPlot()
|
|||||||
CAF_PDM_InitField( &m_showInfoBox, "ShowInfoBox", true, "Show Info Box", "", "", "" );
|
CAF_PDM_InitField( &m_showInfoBox, "ShowInfoBox", true, "Show Info Box", "", "", "" );
|
||||||
CAF_PDM_InitField( &m_showLegend, "ShowLegend", true, "Show Legend", "", "", "" );
|
CAF_PDM_InitField( &m_showLegend, "ShowLegend", true, "Show Legend", "", "", "" );
|
||||||
CAF_PDM_InitField( &m_legendFontSize, "LegendFontSize", 10, "Legend and Info Font Size", "", "", "" );
|
CAF_PDM_InitField( &m_legendFontSize, "LegendFontSize", 10, "Legend and Info Font Size", "", "", "" );
|
||||||
m_legendFontSize = RiaFontCache::pointSizeFromFontSizeEnum(RiaApplication::instance()->preferences()->defaultPlotFontSize());
|
m_legendFontSize = RiaFontCache::pointSizeFromFontSizeEnum(
|
||||||
|
RiaApplication::instance()->preferences()->defaultPlotFontSize() );
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault( &m_nameConfig, "NameConfig", "Name Config", "", "", "" );
|
CAF_PDM_InitFieldNoDefault( &m_nameConfig, "NameConfig", "Name Config", "", "", "" );
|
||||||
m_nameConfig.uiCapability()->setUiTreeHidden( true );
|
m_nameConfig.uiCapability()->setUiTreeHidden( true );
|
||||||
@ -76,8 +77,6 @@ RimGridCrossPlot::RimGridCrossPlot()
|
|||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault( &m_crossPlotDataSets, "CrossPlotCurve", "Cross Plot Data Set", "", "", "" );
|
CAF_PDM_InitFieldNoDefault( &m_crossPlotDataSets, "CrossPlotCurve", "Cross Plot Data Set", "", "", "" );
|
||||||
m_crossPlotDataSets.uiCapability()->setUiHidden( true );
|
m_crossPlotDataSets.uiCapability()->setUiHidden( true );
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -684,7 +683,10 @@ bool RimGridCrossPlot::hasCustomFontSizes(RiaDefines::FontSettingType fontSettin
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RimGridCrossPlot::applyFontSize(RiaDefines::FontSettingType fontSettingType, int oldFontSize, int fontSize, bool forceChange /*= false*/)
|
bool RimGridCrossPlot::applyFontSize( RiaDefines::FontSettingType fontSettingType,
|
||||||
|
int oldFontSize,
|
||||||
|
int fontSize,
|
||||||
|
bool forceChange /*= false*/ )
|
||||||
{
|
{
|
||||||
if ( fontSettingType != RiaDefines::PLOT_FONT ) return false;
|
if ( fontSettingType != RiaDefines::PLOT_FONT ) return false;
|
||||||
|
|
||||||
@ -808,8 +810,8 @@ void RimGridCrossPlot::updateAxisInQwt(RiaDefines::PlotAxis axisType)
|
|||||||
|
|
||||||
if ( axisProperties->isLogarithmicScaleEnabled )
|
if ( axisProperties->isLogarithmicScaleEnabled )
|
||||||
{
|
{
|
||||||
QwtLogScaleEngine* currentScaleEngine =
|
QwtLogScaleEngine* currentScaleEngine = dynamic_cast<QwtLogScaleEngine*>(
|
||||||
dynamic_cast<QwtLogScaleEngine*>(m_qwtPlot->axisScaleEngine(axisProperties->qwtPlotAxisType()));
|
m_qwtPlot->axisScaleEngine( axisProperties->qwtPlotAxisType() ) );
|
||||||
if ( !currentScaleEngine )
|
if ( !currentScaleEngine )
|
||||||
{
|
{
|
||||||
m_qwtPlot->setAxisScaleEngine( axisProperties->qwtPlotAxisType(), new QwtLogScaleEngine );
|
m_qwtPlot->setAxisScaleEngine( axisProperties->qwtPlotAxisType(), new QwtLogScaleEngine );
|
||||||
@ -837,8 +839,8 @@ void RimGridCrossPlot::updateAxisInQwt(RiaDefines::PlotAxis axisType)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QwtLinearScaleEngine* currentScaleEngine =
|
QwtLinearScaleEngine* currentScaleEngine = dynamic_cast<QwtLinearScaleEngine*>(
|
||||||
dynamic_cast<QwtLinearScaleEngine*>(m_qwtPlot->axisScaleEngine(axisProperties->qwtPlotAxisType()));
|
m_qwtPlot->axisScaleEngine( axisProperties->qwtPlotAxisType() ) );
|
||||||
if ( !currentScaleEngine )
|
if ( !currentScaleEngine )
|
||||||
{
|
{
|
||||||
m_qwtPlot->setAxisScaleEngine( axisProperties->qwtPlotAxisType(), new QwtLinearScaleEngine );
|
m_qwtPlot->setAxisScaleEngine( axisProperties->qwtPlotAxisType(), new QwtLinearScaleEngine );
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
#include "cafPdmObject.h"
|
#include "cafPdmObject.h"
|
||||||
|
|
||||||
#include "RiaDefines.h"
|
#include "RiaDefines.h"
|
||||||
#include "RimRiuQwtPlotOwnerInterface.h"
|
|
||||||
#include "RimNameConfig.h"
|
#include "RimNameConfig.h"
|
||||||
|
#include "RimRiuQwtPlotOwnerInterface.h"
|
||||||
#include "RimViewWindow.h"
|
#include "RimViewWindow.h"
|
||||||
|
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
@ -38,14 +38,15 @@ class RiuGridCrossQwtPlot;
|
|||||||
class RimGridCrossPlotNameConfig : public RimNameConfig
|
class RimGridCrossPlotNameConfig : public RimNameConfig
|
||||||
{
|
{
|
||||||
CAF_PDM_HEADER_INIT;
|
CAF_PDM_HEADER_INIT;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RimGridCrossPlotNameConfig();
|
RimGridCrossPlotNameConfig();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
caf::PdmField<bool> addDataSetNames;
|
caf::PdmField<bool> addDataSetNames;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class RimGridCrossPlot : public RimViewWindow, public RimRiuQwtPlotOwnerInterface, public RimNameConfigHolderInterface
|
class RimGridCrossPlot : public RimViewWindow, public RimRiuQwtPlotOwnerInterface, public RimNameConfigHolderInterface
|
||||||
@ -84,7 +85,10 @@ public:
|
|||||||
int legendFontSize() const;
|
int legendFontSize() const;
|
||||||
|
|
||||||
bool hasCustomFontSizes( RiaDefines::FontSettingType fontSettingType, int defaultFontSize ) const override;
|
bool hasCustomFontSizes( RiaDefines::FontSettingType fontSettingType, int defaultFontSize ) const override;
|
||||||
bool applyFontSize(RiaDefines::FontSettingType fontSettingType, int oldFontSize, int fontSize, bool forceChange = false) override;
|
bool applyFontSize( RiaDefines::FontSettingType fontSettingType,
|
||||||
|
int oldFontSize,
|
||||||
|
int fontSize,
|
||||||
|
bool forceChange = false ) override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Rim2dPlotInterface overrides
|
// Rim2dPlotInterface overrides
|
||||||
@ -102,7 +106,9 @@ protected:
|
|||||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||||
|
|
||||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||||
|
const QVariant& oldValue,
|
||||||
|
const QVariant& newValue ) override;
|
||||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||||
bool* useOptionsOnly ) override;
|
bool* useOptionsOnly ) override;
|
||||||
|
|
||||||
@ -122,6 +128,7 @@ protected:
|
|||||||
void setShowInfoBox( bool enable );
|
void setShowInfoBox( bool enable );
|
||||||
|
|
||||||
std::set<RimPlotAxisPropertiesInterface*> allPlotAxes() const;
|
std::set<RimPlotAxisPropertiesInterface*> allPlotAxes() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmField<bool> m_showInfoBox;
|
caf::PdmField<bool> m_showInfoBox;
|
||||||
caf::PdmField<bool> m_showLegend;
|
caf::PdmField<bool> m_showLegend;
|
||||||
@ -134,8 +141,4 @@ private:
|
|||||||
caf::PdmChildArrayField<RimGridCrossPlotDataSet*> m_crossPlotDataSets;
|
caf::PdmChildArrayField<RimGridCrossPlotDataSet*> m_crossPlotDataSets;
|
||||||
|
|
||||||
QPointer<RiuGridCrossQwtPlot> m_qwtPlot;
|
QPointer<RiuGridCrossQwtPlot> m_qwtPlot;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,10 +41,10 @@
|
|||||||
#include "RimEclipseResultCase.h"
|
#include "RimEclipseResultCase.h"
|
||||||
#include "RimEclipseResultDefinition.h"
|
#include "RimEclipseResultDefinition.h"
|
||||||
#include "RimEclipseView.h"
|
#include "RimEclipseView.h"
|
||||||
|
#include "RimFormationNames.h"
|
||||||
#include "RimGridCrossPlot.h"
|
#include "RimGridCrossPlot.h"
|
||||||
#include "RimGridCrossPlotCurve.h"
|
#include "RimGridCrossPlotCurve.h"
|
||||||
#include "RimGridView.h"
|
#include "RimGridView.h"
|
||||||
#include "RimFormationNames.h"
|
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
#include "RimRegularLegendConfig.h"
|
#include "RimRegularLegendConfig.h"
|
||||||
#include "RimTools.h"
|
#include "RimTools.h"
|
||||||
@ -457,8 +457,13 @@ void RimGridCrossPlotDataSet::onLoadDataAndUpdate(bool updateParentPlot)
|
|||||||
|
|
||||||
updateLegendRange();
|
updateLegendRange();
|
||||||
|
|
||||||
RigEclipseCrossPlotResult result = RigEclipseCrossPlotDataExtractor::extract(
|
RigEclipseCrossPlotResult result = RigEclipseCrossPlotDataExtractor::extract( eclipseCase->eclipseCaseData(),
|
||||||
eclipseCase->eclipseCaseData(), m_timeStep(), xAddress, yAddress, m_grouping(), groupAddress, timeStepCellVisibilityMap);
|
m_timeStep(),
|
||||||
|
xAddress,
|
||||||
|
yAddress,
|
||||||
|
m_grouping(),
|
||||||
|
groupAddress,
|
||||||
|
timeStepCellVisibilityMap );
|
||||||
|
|
||||||
if ( isXAxisLogarithmic() || isYAxisLogarithmic() )
|
if ( isXAxisLogarithmic() || isYAxisLogarithmic() )
|
||||||
{
|
{
|
||||||
@ -496,8 +501,7 @@ void RimGridCrossPlotDataSet::assignCurveDataGroups(const RigEclipseCrossPlotRes
|
|||||||
{
|
{
|
||||||
m_groupedResults.clear();
|
m_groupedResults.clear();
|
||||||
|
|
||||||
if (groupingEnabled() &&
|
if ( groupingEnabled() && ( result.groupValuesContinuous.empty() && result.groupValuesDiscrete.empty() ) )
|
||||||
(result.groupValuesContinuous.empty() && result.groupValuesDiscrete.empty()))
|
|
||||||
{
|
{
|
||||||
// Basis for group determination (i.e. formation list) may have been deleted since the grouping was assigned.
|
// Basis for group determination (i.e. formation list) may have been deleted since the grouping was assigned.
|
||||||
m_grouping = NO_GROUPING;
|
m_grouping = NO_GROUPING;
|
||||||
@ -532,7 +536,9 @@ void RimGridCrossPlotDataSet::assignCurveDataGroups(const RigEclipseCrossPlotRes
|
|||||||
|
|
||||||
for ( size_t i = 0; i < result.xValues.size(); ++i )
|
for ( size_t i = 0; i < result.xValues.size(); ++i )
|
||||||
{
|
{
|
||||||
auto upperBoundIt = std::lower_bound(tickValues.begin(), tickValues.end(), result.groupValuesContinuous[i]);
|
auto upperBoundIt = std::lower_bound( tickValues.begin(),
|
||||||
|
tickValues.end(),
|
||||||
|
result.groupValuesContinuous[i] );
|
||||||
int upperBoundIndex = static_cast<int>( upperBoundIt - tickValues.begin() );
|
int upperBoundIndex = static_cast<int>( upperBoundIt - tickValues.begin() );
|
||||||
int categoryNum = std::min( (int)tickValues.size() - 2, std::max( 0, upperBoundIndex - 1 ) );
|
int categoryNum = std::min( (int)tickValues.size() - 2, std::max( 0, upperBoundIndex - 1 ) );
|
||||||
m_groupedResults[categoryNum].xValues.push_back( result.xValues[i] );
|
m_groupedResults[categoryNum].xValues.push_back( result.xValues[i] );
|
||||||
@ -683,8 +689,8 @@ QString RimGridCrossPlotDataSet::createGroupName(size_t groupIndex) const
|
|||||||
std::vector<double> tickValues;
|
std::vector<double> tickValues;
|
||||||
legendConfig()->scalarMapper()->majorTickValues( &tickValues );
|
legendConfig()->scalarMapper()->majorTickValues( &tickValues );
|
||||||
double lowerLimit = tickValues[groupIndex];
|
double lowerLimit = tickValues[groupIndex];
|
||||||
double upperLimit =
|
double upperLimit = groupIndex + 1u < tickValues.size() ? tickValues[groupIndex + 1u]
|
||||||
groupIndex + 1u < tickValues.size() ? tickValues[groupIndex + 1u] : std::numeric_limits<double>::infinity();
|
: std::numeric_limits<double>::infinity();
|
||||||
return QString( "%1 [%2, %3]" ).arg( groupParameter() ).arg( lowerLimit ).arg( upperLimit );
|
return QString( "%1 [%2, %3]" ).arg( groupParameter() ).arg( lowerLimit ).arg( upperLimit );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -771,9 +777,11 @@ void RimGridCrossPlotDataSet::defineUiOrdering(QString uiConfigName, caf::PdmUiO
|
|||||||
uiOrdering.add( &m_cellFilterView );
|
uiOrdering.add( &m_cellFilterView );
|
||||||
uiOrdering.add( &m_grouping );
|
uiOrdering.add( &m_grouping );
|
||||||
|
|
||||||
CVF_ASSERT(m_xAxisProperty && m_yAxisProperty && m_groupingProperty && "All property objects should always be created");
|
CVF_ASSERT( m_xAxisProperty && m_yAxisProperty && m_groupingProperty &&
|
||||||
|
"All property objects should always be created" );
|
||||||
|
|
||||||
if (m_grouping() == GROUP_BY_TIME && !(m_xAxisProperty->hasDynamicResult() || m_yAxisProperty->hasDynamicResult()))
|
if ( m_grouping() == GROUP_BY_TIME &&
|
||||||
|
!( m_xAxisProperty->hasDynamicResult() || m_yAxisProperty->hasDynamicResult() ) )
|
||||||
{
|
{
|
||||||
m_grouping = NO_GROUPING;
|
m_grouping = NO_GROUPING;
|
||||||
}
|
}
|
||||||
@ -893,8 +901,8 @@ void RimGridCrossPlotDataSet::childFieldChangedByUi(const caf::PdmFieldHandle* c
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QList<caf::PdmOptionItemInfo> RimGridCrossPlotDataSet::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions,
|
QList<caf::PdmOptionItemInfo>
|
||||||
bool* useOptionsOnly)
|
RimGridCrossPlotDataSet::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly )
|
||||||
{
|
{
|
||||||
QList<caf::PdmOptionItemInfo> options;
|
QList<caf::PdmOptionItemInfo> options;
|
||||||
|
|
||||||
@ -935,7 +943,10 @@ QList<caf::PdmOptionItemInfo> RimGridCrossPlotDataSet::calculateValueOptions(con
|
|||||||
}
|
}
|
||||||
else if ( fieldNeedingOptions == &m_grouping )
|
else if ( fieldNeedingOptions == &m_grouping )
|
||||||
{
|
{
|
||||||
std::set<RigGridCrossPlotCurveGrouping> validOptions = {NO_GROUPING, GROUP_BY_TIME, GROUP_BY_FORMATION, GROUP_BY_RESULT};
|
std::set<RigGridCrossPlotCurveGrouping> validOptions = {NO_GROUPING,
|
||||||
|
GROUP_BY_TIME,
|
||||||
|
GROUP_BY_FORMATION,
|
||||||
|
GROUP_BY_RESULT};
|
||||||
if ( !hasMultipleTimeSteps() )
|
if ( !hasMultipleTimeSteps() )
|
||||||
{
|
{
|
||||||
validOptions.erase( GROUP_BY_TIME );
|
validOptions.erase( GROUP_BY_TIME );
|
||||||
@ -1100,7 +1111,8 @@ void RimGridCrossPlotDataSet::exportFormattedData(RifEclipseDataTableFormatter&
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::vector<RifEclipseOutputTableColumn> header = {RifEclipseOutputTableColumn(xTitle), RifEclipseOutputTableColumn(yTitle)};
|
std::vector<RifEclipseOutputTableColumn> header = {RifEclipseOutputTableColumn( xTitle ),
|
||||||
|
RifEclipseOutputTableColumn( yTitle )};
|
||||||
formatter.header( header );
|
formatter.header( header );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1302,7 +1314,8 @@ void RimGridCrossPlotDataSet::defineEditorAttribute(const caf::PdmFieldHandle* f
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimGridCrossPlotDataSet::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/)
|
void RimGridCrossPlotDataSet::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering,
|
||||||
|
QString uiConfigName /*= ""*/ )
|
||||||
{
|
{
|
||||||
if ( groupingEnabled() )
|
if ( groupingEnabled() )
|
||||||
{
|
{
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "RigGridCrossPlotCurveGrouping.h"
|
|
||||||
#include "RigEclipseCrossPlotDataExtractor.h"
|
#include "RigEclipseCrossPlotDataExtractor.h"
|
||||||
|
#include "RigGridCrossPlotCurveGrouping.h"
|
||||||
|
|
||||||
#include "RimCheckableNamedObject.h"
|
#include "RimCheckableNamedObject.h"
|
||||||
#include "RimNameConfig.h"
|
#include "RimNameConfig.h"
|
||||||
@ -147,7 +147,9 @@ protected:
|
|||||||
std::map<int, cvf::UByteArray> calculateCellVisibility( RimEclipseCase* eclipseCase ) const;
|
std::map<int, cvf::UByteArray> calculateCellVisibility( RimEclipseCase* eclipseCase ) const;
|
||||||
|
|
||||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||||
|
const QVariant& oldValue,
|
||||||
|
const QVariant& newValue ) override;
|
||||||
void childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField ) override;
|
void childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField ) override;
|
||||||
|
|
||||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||||
@ -156,7 +158,9 @@ protected:
|
|||||||
void updateDataSetName();
|
void updateDataSetName();
|
||||||
void performAutoNameUpdate() override;
|
void performAutoNameUpdate() override;
|
||||||
void setDefaults();
|
void setDefaults();
|
||||||
void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
|
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||||
|
QString uiConfigName,
|
||||||
|
caf::PdmUiEditorAttribute* attribute ) override;
|
||||||
|
|
||||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||||
|
|
||||||
@ -164,7 +168,6 @@ protected:
|
|||||||
void filterInvalidCurveValues( RigEclipseCrossPlotResult* result );
|
void filterInvalidCurveValues( RigEclipseCrossPlotResult* result );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
caf::PdmPtrField<RimCase*> m_case;
|
caf::PdmPtrField<RimCase*> m_case;
|
||||||
caf::PdmField<int> m_timeStep;
|
caf::PdmField<int> m_timeStep;
|
||||||
caf::PdmPtrField<RimGridView*> m_cellFilterView;
|
caf::PdmPtrField<RimGridView*> m_cellFilterView;
|
||||||
@ -181,6 +184,6 @@ private:
|
|||||||
|
|
||||||
caf::PdmField<bool> m_useCustomColor;
|
caf::PdmField<bool> m_useCustomColor;
|
||||||
caf::PdmField<cvf::Color3f> m_customColor;
|
caf::PdmField<cvf::Color3f> m_customColor;
|
||||||
caf::PdmChildField<RimPlotCellFilterCollection*> m_plotCellFilterCollection;;
|
caf::PdmChildField<RimPlotCellFilterCollection*> m_plotCellFilterCollection;
|
||||||
|
;
|
||||||
};
|
};
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
#include "Rim3dView.h"
|
#include "Rim3dView.h"
|
||||||
|
|
||||||
#include "RiaGuiApplication.h"
|
|
||||||
#include "RiaFieldHandleTools.h"
|
#include "RiaFieldHandleTools.h"
|
||||||
|
#include "RiaGuiApplication.h"
|
||||||
#include "RiaPreferences.h"
|
#include "RiaPreferences.h"
|
||||||
#include "RiaViewRedrawScheduler.h"
|
#include "RiaViewRedrawScheduler.h"
|
||||||
|
|
||||||
@ -31,21 +31,21 @@
|
|||||||
#include "RimCase.h"
|
#include "RimCase.h"
|
||||||
#include "RimGridView.h"
|
#include "RimGridView.h"
|
||||||
#include "RimMainPlotCollection.h"
|
#include "RimMainPlotCollection.h"
|
||||||
|
#include "RimMeasurement.h"
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
#include "RimTools.h"
|
#include "RimTools.h"
|
||||||
#include "RimViewController.h"
|
#include "RimViewController.h"
|
||||||
#include "RimViewLinker.h"
|
#include "RimViewLinker.h"
|
||||||
#include "RimWellPathCollection.h"
|
|
||||||
#include "RimViewNameConfig.h"
|
#include "RimViewNameConfig.h"
|
||||||
#include "RimMeasurement.h"
|
#include "RimWellPathCollection.h"
|
||||||
|
|
||||||
#include "RivAnnotationsPartMgr.h"
|
#include "RivAnnotationsPartMgr.h"
|
||||||
#include "RivWellPathsPartMgr.h"
|
|
||||||
#include "RivMeasurementPartMgr.h"
|
#include "RivMeasurementPartMgr.h"
|
||||||
|
#include "RivWellPathsPartMgr.h"
|
||||||
|
|
||||||
#include "RiuMainWindow.h"
|
#include "RiuMainWindow.h"
|
||||||
#include "RiuViewer.h"
|
|
||||||
#include "RiuTimeStepChangedHandler.h"
|
#include "RiuTimeStepChangedHandler.h"
|
||||||
|
#include "RiuViewer.h"
|
||||||
|
|
||||||
#include "cafDisplayCoordTransform.h"
|
#include "cafDisplayCoordTransform.h"
|
||||||
#include "cafFrameAnimationControl.h"
|
#include "cafFrameAnimationControl.h"
|
||||||
@ -56,12 +56,11 @@
|
|||||||
#include "cvfTransform.h"
|
#include "cvfTransform.h"
|
||||||
#include "cvfViewport.h"
|
#include "cvfViewport.h"
|
||||||
|
|
||||||
#include <climits>
|
|
||||||
#include "cvfScene.h"
|
#include "cvfScene.h"
|
||||||
|
#include <climits>
|
||||||
|
|
||||||
|
namespace caf
|
||||||
namespace caf {
|
{
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
void caf::AppEnum<Rim3dView::SurfaceModeType>::setUp()
|
void caf::AppEnum<Rim3dView::SurfaceModeType>::setUp()
|
||||||
{
|
{
|
||||||
@ -73,7 +72,6 @@ void caf::AppEnum< Rim3dView::SurfaceModeType >::setUp()
|
|||||||
|
|
||||||
} // End namespace caf
|
} // End namespace caf
|
||||||
|
|
||||||
|
|
||||||
CAF_PDM_XML_ABSTRACT_SOURCE_INIT( Rim3dView, "GenericView" ); // Do not use. Abstract class
|
CAF_PDM_XML_ABSTRACT_SOURCE_INIT( Rim3dView, "GenericView" ); // Do not use. Abstract class
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -119,7 +117,13 @@ Rim3dView::Rim3dView(void)
|
|||||||
|
|
||||||
RICF_InitField( &m_showGridBox, "ShowGridBox", true, "Show Grid Box", "", "", "" );
|
RICF_InitField( &m_showGridBox, "ShowGridBox", true, "Show Grid Box", "", "", "" );
|
||||||
|
|
||||||
CAF_PDM_InitField(&m_disableLighting, "DisableLighting", false, "Disable Results Lighting", "", "Disable light model for scalar result colors", "");
|
CAF_PDM_InitField( &m_disableLighting,
|
||||||
|
"DisableLighting",
|
||||||
|
false,
|
||||||
|
"Disable Results Lighting",
|
||||||
|
"",
|
||||||
|
"Disable light model for scalar result colors",
|
||||||
|
"" );
|
||||||
|
|
||||||
CAF_PDM_InitField( &m_showZScaleLabel, "ShowZScale", true, "Show Z Scale Label", "", "", "" );
|
CAF_PDM_InitField( &m_showZScaleLabel, "ShowZScale", true, "Show Z Scale Label", "", "", "" );
|
||||||
|
|
||||||
@ -287,9 +291,9 @@ void Rim3dView::updateMdiWindowTitle()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void Rim3dView::deleteViewWidget()
|
void Rim3dView::deleteViewWidget()
|
||||||
{
|
{
|
||||||
// Earlier implementations has used m_viewer->deleteLater(). This caused issues triggered by 3D editors and interaction with
|
// Earlier implementations has used m_viewer->deleteLater(). This caused issues triggered by 3D editors and
|
||||||
// the event processing. deleteLater() will not be handeled by processEvents() if we are in the state of processing UI events,
|
// interaction with the event processing. deleteLater() will not be handeled by processEvents() if we are in the
|
||||||
// ie in the process of handling a QAction
|
// state of processing UI events, ie in the process of handling a QAction
|
||||||
|
|
||||||
delete m_viewer;
|
delete m_viewer;
|
||||||
m_viewer = nullptr;
|
m_viewer = nullptr;
|
||||||
@ -394,7 +398,6 @@ void Rim3dView::setCurrentTimeStep(int frameIndex)
|
|||||||
}
|
}
|
||||||
|
|
||||||
this->hasUserRequestedAnimation = true;
|
this->hasUserRequestedAnimation = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -514,7 +517,9 @@ void Rim3dView::setupBeforeSave()
|
|||||||
{
|
{
|
||||||
if ( m_viewer )
|
if ( m_viewer )
|
||||||
{
|
{
|
||||||
hasUserRequestedAnimation = m_viewer->isAnimationActive(); // JJS: This is not conceptually correct. The variable is updated as we go, and store the user intentions. But I guess that in practice...
|
hasUserRequestedAnimation =
|
||||||
|
m_viewer->isAnimationActive(); // JJS: This is not conceptually correct. The variable is updated as we go,
|
||||||
|
// and store the user intentions. But I guess that in practice...
|
||||||
m_cameraPosition = m_viewer->mainCamera()->viewMatrix();
|
m_cameraPosition = m_viewer->mainCamera()->viewMatrix();
|
||||||
m_cameraPointOfInterest = m_viewer->pointOfInterest();
|
m_cameraPointOfInterest = m_viewer->pointOfInterest();
|
||||||
}
|
}
|
||||||
@ -593,7 +598,9 @@ caf::PdmFieldHandle* Rim3dView::userDescriptionField()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void Rim3dView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
void Rim3dView::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||||
|
const QVariant& oldValue,
|
||||||
|
const QVariant& newValue )
|
||||||
{
|
{
|
||||||
RimViewWindow::fieldChangedByUi( changedField, oldValue, newValue );
|
RimViewWindow::fieldChangedByUi( changedField, oldValue, newValue );
|
||||||
|
|
||||||
@ -654,8 +661,6 @@ void Rim3dView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const
|
|||||||
if ( m_viewer )
|
if ( m_viewer )
|
||||||
{
|
{
|
||||||
m_viewer->update();
|
m_viewer->update();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( changedField == &m_backgroundColor )
|
else if ( changedField == &m_backgroundColor )
|
||||||
@ -668,7 +673,8 @@ void Rim3dView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const
|
|||||||
// !! Should be able to specify legal range for number properties
|
// !! Should be able to specify legal range for number properties
|
||||||
if ( m_viewer )
|
if ( m_viewer )
|
||||||
{
|
{
|
||||||
m_viewer->animationControl()->setTimeout(maximumFrameRate != 0 ? 1000/maximumFrameRate : std::numeric_limits<int>::max());
|
m_viewer->animationControl()->setTimeout( maximumFrameRate != 0 ? 1000 / maximumFrameRate
|
||||||
|
: std::numeric_limits<int>::max() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( changedField == &m_showZScaleLabel )
|
else if ( changedField == &m_showZScaleLabel )
|
||||||
@ -699,7 +705,8 @@ void Rim3dView::addWellPathsToModel(cvf::ModelBasicList* wellPathModelBasicList,
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void Rim3dView::addDynamicWellPathsToModel(cvf::ModelBasicList* wellPathModelBasicList, const cvf::BoundingBox& wellPathClipBoundingBox)
|
void Rim3dView::addDynamicWellPathsToModel( cvf::ModelBasicList* wellPathModelBasicList,
|
||||||
|
const cvf::BoundingBox& wellPathClipBoundingBox )
|
||||||
{
|
{
|
||||||
if ( !this->ownerCase() ) return;
|
if ( !this->ownerCase() ) return;
|
||||||
|
|
||||||
@ -732,7 +739,9 @@ void Rim3dView::addAnnotationsToModel(cvf::ModelBasicList* wellPathModelBasicLis
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
cvf::ref<caf::DisplayCoordTransform> transForm = displayCoordTransform();
|
cvf::ref<caf::DisplayCoordTransform> transForm = displayCoordTransform();
|
||||||
m_annotationsPartManager->appendGeometryPartsToModel(wellPathModelBasicList, transForm.p(), ownerCase()->allCellsBoundingBox());
|
m_annotationsPartManager->appendGeometryPartsToModel( wellPathModelBasicList,
|
||||||
|
transForm.p(),
|
||||||
|
ownerCase()->allCellsBoundingBox() );
|
||||||
}
|
}
|
||||||
|
|
||||||
wellPathModelBasicList->updateBoundingBoxesRecursive();
|
wellPathModelBasicList->updateBoundingBoxesRecursive();
|
||||||
@ -755,7 +764,9 @@ void Rim3dView::addMeasurementToModel(cvf::ModelBasicList* wellPathModelBasicLis
|
|||||||
{
|
{
|
||||||
cvf::ref<caf::DisplayCoordTransform> transForm = displayCoordTransform();
|
cvf::ref<caf::DisplayCoordTransform> transForm = displayCoordTransform();
|
||||||
m_measurementPartManager->appendGeometryPartsToModel( m_viewer->mainCamera(),
|
m_measurementPartManager->appendGeometryPartsToModel( m_viewer->mainCamera(),
|
||||||
wellPathModelBasicList, transForm.p(), ownerCase()->allCellsBoundingBox());
|
wellPathModelBasicList,
|
||||||
|
transForm.p(),
|
||||||
|
ownerCase()->allCellsBoundingBox() );
|
||||||
}
|
}
|
||||||
|
|
||||||
wellPathModelBasicList->updateBoundingBoxesRecursive();
|
wellPathModelBasicList->updateBoundingBoxesRecursive();
|
||||||
@ -799,8 +810,7 @@ void Rim3dView::updateGridBoxData()
|
|||||||
ownerCase()->displayModelOffset(),
|
ownerCase()->displayModelOffset(),
|
||||||
backgroundColor(),
|
backgroundColor(),
|
||||||
showActiveCellsOnly() ? ownerCase()->activeCellsBoundingBox()
|
showActiveCellsOnly() ? ownerCase()->activeCellsBoundingBox()
|
||||||
: ownerCase()->allCellsBoundingBox()
|
: ownerCase()->allCellsBoundingBox() );
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -962,15 +972,8 @@ void Rim3dView::updateDisplayModelVisibility()
|
|||||||
const cvf::uint uintIntersectionFaultMeshBit = intersectionFaultMeshBit;
|
const cvf::uint uintIntersectionFaultMeshBit = intersectionFaultMeshBit;
|
||||||
|
|
||||||
// Initialize the mask to show everything except the the bits controlled here
|
// Initialize the mask to show everything except the the bits controlled here
|
||||||
unsigned int mask =
|
unsigned int mask = 0xffffffff & ~uintSurfaceBit & ~uintFaultBit & ~uintMeshSurfaceBit & ~uintMeshFaultBit &
|
||||||
0xffffffff
|
~intersectionCellFaceBit & ~intersectionCellMeshBit & ~intersectionFaultMeshBit;
|
||||||
& ~uintSurfaceBit
|
|
||||||
& ~uintFaultBit
|
|
||||||
& ~uintMeshSurfaceBit
|
|
||||||
& ~uintMeshFaultBit
|
|
||||||
& ~intersectionCellFaceBit
|
|
||||||
& ~intersectionCellMeshBit
|
|
||||||
& ~intersectionFaultMeshBit;
|
|
||||||
|
|
||||||
// Then turn the appropriate bits on according to the user settings
|
// Then turn the appropriate bits on according to the user settings
|
||||||
|
|
||||||
@ -1052,7 +1055,10 @@ bool Rim3dView::hasCustomFontSizes(RiaDefines::FontSettingType fontSettingType,
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool Rim3dView::applyFontSize(RiaDefines::FontSettingType fontSettingType, int oldFontSize, int fontSize, bool forceChange /*= false*/)
|
bool Rim3dView::applyFontSize( RiaDefines::FontSettingType fontSettingType,
|
||||||
|
int oldFontSize,
|
||||||
|
int fontSize,
|
||||||
|
bool forceChange /*= false*/ )
|
||||||
{
|
{
|
||||||
if ( fontSettingType == RiaDefines::SCENE_FONT )
|
if ( fontSettingType == RiaDefines::SCENE_FONT )
|
||||||
{
|
{
|
||||||
@ -1091,8 +1097,10 @@ RimViewNameConfig* Rim3dView::nameConfig() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QWidget* Rim3dView::viewWidget()
|
QWidget* Rim3dView::viewWidget()
|
||||||
{
|
{
|
||||||
if ( m_viewer ) return m_viewer->layoutWidget();
|
if ( m_viewer )
|
||||||
else return nullptr;
|
return m_viewer->layoutWidget();
|
||||||
|
else
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -20,20 +20,17 @@
|
|||||||
|
|
||||||
#include "RigWellLogFile.h"
|
#include "RigWellLogFile.h"
|
||||||
|
|
||||||
#include "RiaExtractionTools.h"
|
|
||||||
#include "RiaCurveDataTools.h"
|
#include "RiaCurveDataTools.h"
|
||||||
|
#include "RiaExtractionTools.h"
|
||||||
|
#include "RigCaseCellResultsData.h"
|
||||||
#include "RigEclipseCaseData.h"
|
#include "RigEclipseCaseData.h"
|
||||||
#include "RigGeoMechCaseData.h"
|
|
||||||
#include "RigEclipseWellLogExtractor.h"
|
#include "RigEclipseWellLogExtractor.h"
|
||||||
|
#include "RigFemPartResultsCollection.h"
|
||||||
|
#include "RigGeoMechCaseData.h"
|
||||||
#include "RigGeoMechWellLogExtractor.h"
|
#include "RigGeoMechWellLogExtractor.h"
|
||||||
#include "RigResultAccessorFactory.h"
|
#include "RigResultAccessorFactory.h"
|
||||||
#include "RigCaseCellResultsData.h"
|
|
||||||
#include "RigFemPartResultsCollection.h"
|
|
||||||
#include "RigWellPath.h"
|
#include "RigWellPath.h"
|
||||||
#include "RimEclipseCase.h"
|
|
||||||
#include "RimGeoMechCase.h"
|
|
||||||
#include "Rim3dView.h"
|
#include "Rim3dView.h"
|
||||||
#include "RimWellLogExtractionCurveNameConfig.h"
|
|
||||||
#include "RimCase.h"
|
#include "RimCase.h"
|
||||||
#include "RimEclipseCase.h"
|
#include "RimEclipseCase.h"
|
||||||
#include "RimEclipseCellColors.h"
|
#include "RimEclipseCellColors.h"
|
||||||
@ -43,9 +40,10 @@
|
|||||||
#include "RimGeoMechResultDefinition.h"
|
#include "RimGeoMechResultDefinition.h"
|
||||||
#include "RimGeoMechView.h"
|
#include "RimGeoMechView.h"
|
||||||
#include "RimTools.h"
|
#include "RimTools.h"
|
||||||
|
#include "RimWellLogExtractionCurve.h"
|
||||||
|
#include "RimWellLogExtractionCurveNameConfig.h"
|
||||||
#include "RimWellLogFile.h"
|
#include "RimWellLogFile.h"
|
||||||
#include "RimWellLogFileChannel.h"
|
#include "RimWellLogFileChannel.h"
|
||||||
#include "RimWellLogExtractionCurve.h"
|
|
||||||
#include "RimWellPath.h"
|
#include "RimWellPath.h"
|
||||||
|
|
||||||
#include "cafUtils.h"
|
#include "cafUtils.h"
|
||||||
@ -167,7 +165,8 @@ bool Rim3dWellLogExtractionCurve::followAnimationTimeStep() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void Rim3dWellLogExtractionCurve::curveValuesAndMds(std::vector<double>* values, std::vector<double>* measuredDepthValues) const
|
void Rim3dWellLogExtractionCurve::curveValuesAndMds( std::vector<double>* values,
|
||||||
|
std::vector<double>* measuredDepthValues ) const
|
||||||
{
|
{
|
||||||
CVF_ASSERT( m_timeStep() >= 0 );
|
CVF_ASSERT( m_timeStep() >= 0 );
|
||||||
|
|
||||||
@ -177,7 +176,9 @@ void Rim3dWellLogExtractionCurve::curveValuesAndMds(std::vector<double>* values,
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void Rim3dWellLogExtractionCurve::curveValuesAndMdsAtTimeStep(std::vector<double>* values, std::vector<double>* measuredDepthValues, int timeStep) const
|
void Rim3dWellLogExtractionCurve::curveValuesAndMdsAtTimeStep( std::vector<double>* values,
|
||||||
|
std::vector<double>* measuredDepthValues,
|
||||||
|
int timeStep ) const
|
||||||
{
|
{
|
||||||
CAF_ASSERT( values != nullptr );
|
CAF_ASSERT( values != nullptr );
|
||||||
CAF_ASSERT( measuredDepthValues != nullptr );
|
CAF_ASSERT( measuredDepthValues != nullptr );
|
||||||
@ -209,7 +210,8 @@ void Rim3dWellLogExtractionCurve::curveValuesAndMdsAtTimeStep(std::vector<double
|
|||||||
|
|
||||||
m_eclipseResultDefinition->loadResult();
|
m_eclipseResultDefinition->loadResult();
|
||||||
|
|
||||||
cvf::ref<RigResultAccessor> resAcc = RigResultAccessorFactory::createFromResultDefinition(eclipseCase->eclipseCaseData(),
|
cvf::ref<RigResultAccessor> resAcc =
|
||||||
|
RigResultAccessorFactory::createFromResultDefinition( eclipseCase->eclipseCaseData(),
|
||||||
0,
|
0,
|
||||||
timeStep,
|
timeStep,
|
||||||
m_eclipseResultDefinition );
|
m_eclipseResultDefinition );
|
||||||
@ -374,7 +376,6 @@ double Rim3dWellLogExtractionCurve::rkbDiff() const
|
|||||||
return HUGE_VAL;
|
return HUGE_VAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -421,7 +422,9 @@ caf::PdmFieldHandle* Rim3dWellLogExtractionCurve::userDescriptionField()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void Rim3dWellLogExtractionCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
void Rim3dWellLogExtractionCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||||
|
const QVariant& oldValue,
|
||||||
|
const QVariant& newValue )
|
||||||
{
|
{
|
||||||
if ( changedField == &m_case )
|
if ( changedField == &m_case )
|
||||||
{
|
{
|
||||||
@ -448,7 +451,8 @@ void Rim3dWellLogExtractionCurve::fieldChangedByUi(const caf::PdmFieldHandle* ch
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QList<caf::PdmOptionItemInfo> Rim3dWellLogExtractionCurve::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions,
|
QList<caf::PdmOptionItemInfo>
|
||||||
|
Rim3dWellLogExtractionCurve::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||||
bool* useOptionsOnly )
|
bool* useOptionsOnly )
|
||||||
{
|
{
|
||||||
QList<caf::PdmOptionItemInfo> options;
|
QList<caf::PdmOptionItemInfo> options;
|
||||||
@ -500,8 +504,7 @@ void Rim3dWellLogExtractionCurve::defineUiOrdering(QString uiConfigName, caf::Pd
|
|||||||
m_geomResultDefinition->uiOrdering( uiConfigName, *curveDataGroup );
|
m_geomResultDefinition->uiOrdering( uiConfigName, *curveDataGroup );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((eclipseCase && m_eclipseResultDefinition->hasDynamicResult())
|
if ( ( eclipseCase && m_eclipseResultDefinition->hasDynamicResult() ) || geomCase )
|
||||||
|| geomCase)
|
|
||||||
{
|
{
|
||||||
curveDataGroup->add( &m_timeStep );
|
curveDataGroup->add( &m_timeStep );
|
||||||
}
|
}
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
|
|
||||||
#include "RigWellLogFile.h"
|
#include "RigWellLogFile.h"
|
||||||
|
|
||||||
#include "RimWellLogFileCurveNameConfig.h"
|
|
||||||
#include "RimWellLogFile.h"
|
#include "RimWellLogFile.h"
|
||||||
#include "RimWellLogFileChannel.h"
|
#include "RimWellLogFileChannel.h"
|
||||||
|
#include "RimWellLogFileCurveNameConfig.h"
|
||||||
#include "RimWellPath.h"
|
#include "RimWellPath.h"
|
||||||
|
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
@ -52,9 +52,7 @@ Rim3dWellLogFileCurve::Rim3dWellLogFileCurve()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
Rim3dWellLogFileCurve::~Rim3dWellLogFileCurve()
|
Rim3dWellLogFileCurve::~Rim3dWellLogFileCurve() {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
@ -160,7 +158,6 @@ QString Rim3dWellLogFileCurve::createAutoName() const
|
|||||||
{
|
{
|
||||||
name.push_back( wellLogFile->date() );
|
name.push_back( wellLogFile->date() );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return name.join( ", " );
|
return name.join( ", " );
|
||||||
@ -194,8 +191,8 @@ void Rim3dWellLogFileCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedF
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QList<caf::PdmOptionItemInfo> Rim3dWellLogFileCurve::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions,
|
QList<caf::PdmOptionItemInfo>
|
||||||
bool* useOptionsOnly)
|
Rim3dWellLogFileCurve::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly )
|
||||||
{
|
{
|
||||||
QList<caf::PdmOptionItemInfo> options;
|
QList<caf::PdmOptionItemInfo> options;
|
||||||
|
|
||||||
|
@ -24,11 +24,11 @@
|
|||||||
|
|
||||||
#include "RigWellLogCurveData.h"
|
#include "RigWellLogCurveData.h"
|
||||||
|
|
||||||
#include "RimWellLogRftCurveNameConfig.h"
|
|
||||||
#include "RimEclipseResultCase.h"
|
#include "RimEclipseResultCase.h"
|
||||||
#include "RimTools.h"
|
#include "RimTools.h"
|
||||||
#include "RimWellPath.h"
|
|
||||||
#include "RimWellLogCurve.h"
|
#include "RimWellLogCurve.h"
|
||||||
|
#include "RimWellLogRftCurveNameConfig.h"
|
||||||
|
#include "RimWellPath.h"
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
@ -117,7 +117,8 @@ QString Rim3dWellLogRftCurve::createAutoName() const
|
|||||||
{
|
{
|
||||||
name.push_back( m_eclipseResultCase->caseUserDescription() );
|
name.push_back( m_eclipseResultCase->caseUserDescription() );
|
||||||
}
|
}
|
||||||
if (m_wellLogChannelName().text() != caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::text(RifEclipseRftAddress::NONE))
|
if ( m_wellLogChannelName().text() !=
|
||||||
|
caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::text( RifEclipseRftAddress::NONE ) )
|
||||||
{
|
{
|
||||||
RifEclipseRftAddress::RftWellLogChannelType channelNameEnum = m_wellLogChannelName();
|
RifEclipseRftAddress::RftWellLogChannelType channelNameEnum = m_wellLogChannelName();
|
||||||
name.push_back( caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::uiText( channelNameEnum ) );
|
name.push_back( caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::uiText( channelNameEnum ) );
|
||||||
@ -155,7 +156,8 @@ void Rim3dWellLogRftCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedFi
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QList<caf::PdmOptionItemInfo> Rim3dWellLogRftCurve::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly)
|
QList<caf::PdmOptionItemInfo> Rim3dWellLogRftCurve::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||||
|
bool* useOptionsOnly )
|
||||||
{
|
{
|
||||||
QList<caf::PdmOptionItemInfo> options;
|
QList<caf::PdmOptionItemInfo> options;
|
||||||
|
|
||||||
@ -172,14 +174,21 @@ QList<caf::PdmOptionItemInfo> Rim3dWellLogRftCurve::calculateValueOptions(const
|
|||||||
RifReaderEclipseRft* reader = m_eclipseResultCase()->rftReader();
|
RifReaderEclipseRft* reader = m_eclipseResultCase()->rftReader();
|
||||||
if ( reader )
|
if ( reader )
|
||||||
{
|
{
|
||||||
for (const RifEclipseRftAddress::RftWellLogChannelType& channelName : reader->availableWellLogChannels(wellName()))
|
for ( const RifEclipseRftAddress::RftWellLogChannelType& channelName :
|
||||||
|
reader->availableWellLogChannels( wellName() ) )
|
||||||
{
|
{
|
||||||
options.push_back(caf::PdmOptionItemInfo(caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::uiText(channelName), channelName));
|
options.push_back(
|
||||||
|
caf::PdmOptionItemInfo( caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::uiText(
|
||||||
|
channelName ),
|
||||||
|
channelName ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( options.empty() )
|
if ( options.empty() )
|
||||||
{
|
{
|
||||||
options.push_back(caf::PdmOptionItemInfo(caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::uiText(RifEclipseRftAddress::NONE), RifEclipseRftAddress::NONE));
|
options.push_back(
|
||||||
|
caf::PdmOptionItemInfo( caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::uiText(
|
||||||
|
RifEclipseRftAddress::NONE ),
|
||||||
|
RifEclipseRftAddress::NONE ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,9 +17,9 @@
|
|||||||
//
|
//
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "RimProject.h"
|
|
||||||
#include "RimNameConfig.h"
|
#include "RimNameConfig.h"
|
||||||
#include "Rim3dWellLogCurve.h"
|
#include "Rim3dWellLogCurve.h"
|
||||||
|
#include "RimProject.h"
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
@ -47,9 +47,7 @@ RimNameConfig::RimNameConfig()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RimNameConfig::~RimNameConfig()
|
RimNameConfig::~RimNameConfig() {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
@ -95,7 +93,9 @@ void RimNameConfig::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& u
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimNameConfig::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
void RimNameConfig::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||||
|
const QVariant& oldValue,
|
||||||
|
const QVariant& newValue )
|
||||||
{
|
{
|
||||||
updateAllSettings();
|
updateAllSettings();
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,11 @@ class RimNameConfigHolderInterface
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual QString createAutoName() const = 0;
|
virtual QString createAutoName() const = 0;
|
||||||
void updateHolder() { performAutoNameUpdate(); }
|
void updateHolder()
|
||||||
|
{
|
||||||
|
performAutoNameUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void performAutoNameUpdate() {}
|
virtual void performAutoNameUpdate() {}
|
||||||
};
|
};
|
||||||
@ -57,7 +61,9 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||||
|
const QVariant& oldValue,
|
||||||
|
const QVariant& newValue ) override;
|
||||||
QString autoName() const;
|
QString autoName() const;
|
||||||
virtual void updateAllSettings();
|
virtual void updateAllSettings();
|
||||||
void initAfterRead() override;
|
void initAfterRead() override;
|
||||||
@ -66,7 +72,4 @@ protected:
|
|||||||
caf::PdmField<bool> m_isUsingAutoName_OBSOLETE;
|
caf::PdmField<bool> m_isUsingAutoName_OBSOLETE;
|
||||||
caf::PdmField<QString> m_customName;
|
caf::PdmField<QString> m_customName;
|
||||||
caf::PdmProxyValueField<QString> m_autoName;
|
caf::PdmProxyValueField<QString> m_autoName;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -61,5 +61,3 @@ private:
|
|||||||
bool m_hidePropertyField;
|
bool m_hidePropertyField;
|
||||||
bool m_hideSampleSpacingField;
|
bool m_hideSampleSpacingField;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,5 +49,3 @@ private:
|
|||||||
caf::PdmField<bool> m_addTimestep;
|
caf::PdmField<bool> m_addTimestep;
|
||||||
caf::PdmField<bool> m_addDate;
|
caf::PdmField<bool> m_addDate;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,4 +34,3 @@ RimWellLogFileCurveNameConfig::RimWellLogFileCurveNameConfig()
|
|||||||
CAF_PDM_InitObject( "Well Log File Curve Name Generator", "", "", "" );
|
CAF_PDM_InitObject( "Well Log File Curve Name Generator", "", "", "" );
|
||||||
m_customName = "Las Curve";
|
m_customName = "Las Curve";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,4 +31,3 @@ class RimWellLogFileCurveNameConfig : public RimNameConfig
|
|||||||
public:
|
public:
|
||||||
RimWellLogFileCurveNameConfig();
|
RimWellLogFileCurveNameConfig();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -24,8 +24,8 @@
|
|||||||
#include "RigWellLogCurveData.h"
|
#include "RigWellLogCurveData.h"
|
||||||
#include "RigWellPath.h"
|
#include "RigWellPath.h"
|
||||||
|
|
||||||
#include "RimGeoMechCase.h"
|
|
||||||
#include "RimEclipseCase.h"
|
#include "RimEclipseCase.h"
|
||||||
|
#include "RimGeoMechCase.h"
|
||||||
#include "RimWellLogCurve.h"
|
#include "RimWellLogCurve.h"
|
||||||
#include "RimWellLogCurveCommonDataSource.h"
|
#include "RimWellLogCurveCommonDataSource.h"
|
||||||
#include "RimWellLogTrack.h"
|
#include "RimWellLogTrack.h"
|
||||||
@ -44,8 +44,8 @@
|
|||||||
#define RI_LOGPLOT_MINDEPTH_DEFAULT 0.0
|
#define RI_LOGPLOT_MINDEPTH_DEFAULT 0.0
|
||||||
#define RI_LOGPLOT_MAXDEPTH_DEFAULT 1000.0
|
#define RI_LOGPLOT_MAXDEPTH_DEFAULT 1000.0
|
||||||
|
|
||||||
namespace caf {
|
namespace caf
|
||||||
|
{
|
||||||
template <>
|
template <>
|
||||||
void caf::AppEnum<RimWellLogPlot::DepthTypeEnum>::setUp()
|
void caf::AppEnum<RimWellLogPlot::DepthTypeEnum>::setUp()
|
||||||
{
|
{
|
||||||
@ -67,7 +67,6 @@ namespace caf {
|
|||||||
|
|
||||||
} // End namespace caf
|
} // End namespace caf
|
||||||
|
|
||||||
|
|
||||||
CAF_PDM_SOURCE_INIT( RimWellLogPlot, "WellLogPlot" );
|
CAF_PDM_SOURCE_INIT( RimWellLogPlot, "WellLogPlot" );
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -82,7 +81,12 @@ RimWellLogPlot::RimWellLogPlot()
|
|||||||
CAF_PDM_InitField( &m_userName_OBSOLETE, "PlotDescription", QString( "" ), "Name", "", "", "" );
|
CAF_PDM_InitField( &m_userName_OBSOLETE, "PlotDescription", QString( "" ), "Name", "", "", "" );
|
||||||
m_userName_OBSOLETE.xmlCapability()->setIOWritable( false );
|
m_userName_OBSOLETE.xmlCapability()->setIOWritable( false );
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault(&m_commonDataSource, "CommonDataSource", "Data Source", "", "Change the Data Source of All Curves in the Plot", "");
|
CAF_PDM_InitFieldNoDefault( &m_commonDataSource,
|
||||||
|
"CommonDataSource",
|
||||||
|
"Data Source",
|
||||||
|
"",
|
||||||
|
"Change the Data Source of All Curves in the Plot",
|
||||||
|
"" );
|
||||||
m_commonDataSource.uiCapability()->setUiTreeHidden( true );
|
m_commonDataSource.uiCapability()->setUiTreeHidden( true );
|
||||||
m_commonDataSource.uiCapability()->setUiTreeChildrenHidden( true );
|
m_commonDataSource.uiCapability()->setUiTreeChildrenHidden( true );
|
||||||
m_commonDataSource.xmlCapability()->disableIO();
|
m_commonDataSource.xmlCapability()->disableIO();
|
||||||
@ -188,7 +192,9 @@ QWidget* RimWellLogPlot::viewWidget()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
void RimWellLogPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||||
|
const QVariant& oldValue,
|
||||||
|
const QVariant& newValue )
|
||||||
{
|
{
|
||||||
RimViewWindow::fieldChangedByUi( changedField, oldValue, newValue );
|
RimViewWindow::fieldChangedByUi( changedField, oldValue, newValue );
|
||||||
|
|
||||||
@ -198,10 +204,8 @@ void RimWellLogPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
|
|||||||
|
|
||||||
m_isAutoScaleDepthEnabled = false;
|
m_isAutoScaleDepthEnabled = false;
|
||||||
}
|
}
|
||||||
else if (changedField == &m_showTitleInPlot ||
|
else if ( changedField == &m_showTitleInPlot || changedField == &m_showTrackLegends ||
|
||||||
changedField == &m_showTrackLegends ||
|
changedField == &m_trackLegendsHorizontal || changedField == &m_depthAxisGridVisibility )
|
||||||
changedField == &m_trackLegendsHorizontal ||
|
|
||||||
changedField == &m_depthAxisGridVisibility)
|
|
||||||
{
|
{
|
||||||
updateTracks();
|
updateTracks();
|
||||||
if ( m_viewer ) m_viewer->updateChildrenLayout();
|
if ( m_viewer ) m_viewer->updateChildrenLayout();
|
||||||
@ -228,7 +232,8 @@ void RimWellLogPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QList<caf::PdmOptionItemInfo> RimWellLogPlot::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly)
|
QList<caf::PdmOptionItemInfo> RimWellLogPlot::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||||
|
bool* useOptionsOnly )
|
||||||
{
|
{
|
||||||
QList<caf::PdmOptionItemInfo> options;
|
QList<caf::PdmOptionItemInfo> options;
|
||||||
|
|
||||||
@ -437,7 +442,6 @@ void RimWellLogPlot::availableDepthRange(double* minimumDepth, double* maximumDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -492,7 +496,6 @@ QString RimWellLogPlot::asciiDataForPlotExport() const
|
|||||||
std::vector<double> curveDepths;
|
std::vector<double> curveDepths;
|
||||||
std::vector<std::vector<double>> curvesPlotXValues;
|
std::vector<std::vector<double>> curvesPlotXValues;
|
||||||
|
|
||||||
|
|
||||||
for ( RimWellLogCurve* curve : curves )
|
for ( RimWellLogCurve* curve : curves )
|
||||||
{
|
{
|
||||||
if ( !curve->isCurveVisible() ) continue;
|
if ( !curve->isCurveVisible() ) continue;
|
||||||
@ -527,16 +530,20 @@ QString RimWellLogPlot::asciiDataForPlotExport() const
|
|||||||
curvesPlotXValues.push_back( xPlotValues );
|
curvesPlotXValues.push_back( xPlotValues );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for ( size_t i = 0; i < curveDepths.size(); ++i )
|
for ( size_t i = 0; i < curveDepths.size(); ++i )
|
||||||
{
|
{
|
||||||
if ( i == 0 )
|
if ( i == 0 )
|
||||||
{
|
{
|
||||||
if (depthType() == CONNECTION_NUMBER) out += "Connection";
|
if ( depthType() == CONNECTION_NUMBER )
|
||||||
else if (depthType() == MEASURED_DEPTH) out += "MD ";
|
out += "Connection";
|
||||||
else if (depthType() == PSEUDO_LENGTH) out += "PL ";
|
else if ( depthType() == MEASURED_DEPTH )
|
||||||
else if (depthType() == TRUE_VERTICAL_DEPTH) out += "TVD ";
|
out += "MD ";
|
||||||
for (QString name : curveNames) out += " \t" + name;
|
else if ( depthType() == PSEUDO_LENGTH )
|
||||||
|
out += "PL ";
|
||||||
|
else if ( depthType() == TRUE_VERTICAL_DEPTH )
|
||||||
|
out += "TVD ";
|
||||||
|
for ( QString name : curveNames )
|
||||||
|
out += " \t" + name;
|
||||||
out += "\n";
|
out += "\n";
|
||||||
}
|
}
|
||||||
else if ( curveDepths[i] == curveDepths[i - 1] )
|
else if ( curveDepths[i] == curveDepths[i - 1] )
|
||||||
@ -551,7 +558,6 @@ QString RimWellLogPlot::asciiDataForPlotExport() const
|
|||||||
}
|
}
|
||||||
out += "\n";
|
out += "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
@ -614,7 +620,6 @@ QString RimWellLogPlot::createAutoName() const
|
|||||||
|
|
||||||
if ( m_nameConfig->addWellName() )
|
if ( m_nameConfig->addWellName() )
|
||||||
{
|
{
|
||||||
|
|
||||||
if ( commonWellPath && !commonWellPath->name().isEmpty() )
|
if ( commonWellPath && !commonWellPath->name().isEmpty() )
|
||||||
{
|
{
|
||||||
generatedAutoTags.push_back( commonWellPath->name() );
|
generatedAutoTags.push_back( commonWellPath->name() );
|
||||||
@ -739,7 +744,6 @@ void RimWellLogPlot::depthZoomMinMax(double* minimumDepth, double* maximumDepth)
|
|||||||
*maximumDepth = m_maxVisibleDepth;
|
*maximumDepth = m_maxVisibleDepth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -752,7 +756,6 @@ void RimWellLogPlot::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
|||||||
uiOrdering.skipRemainingFields( true );
|
uiOrdering.skipRemainingFields( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -843,7 +846,8 @@ void RimWellLogPlot::applyZoomAllDepths()
|
|||||||
|
|
||||||
if ( hasAvailableDepthRange() )
|
if ( hasAvailableDepthRange() )
|
||||||
{
|
{
|
||||||
setDepthZoomMinMax(m_minAvailableDepth, m_maxAvailableDepth + 0.01*(m_maxAvailableDepth - m_minAvailableDepth));
|
setDepthZoomMinMax( m_minAvailableDepth,
|
||||||
|
m_maxAvailableDepth + 0.01 * ( m_maxAvailableDepth - m_minAvailableDepth ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1109,7 +1113,4 @@ void RimWellLogPlot::updatePlotTitle()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
/// Default empty implementation
|
/// Default empty implementation
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogPlot::onDepthTypeChanged()
|
void RimWellLogPlot::onDepthTypeChanged() {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -55,7 +55,12 @@ public:
|
|||||||
CONNECTION_NUMBER
|
CONNECTION_NUMBER
|
||||||
};
|
};
|
||||||
|
|
||||||
enum AxisGridVisibility { AXIS_GRID_NONE, AXIS_GRID_MAJOR, AXIS_GRID_MAJOR_AND_MINOR };
|
enum AxisGridVisibility
|
||||||
|
{
|
||||||
|
AXIS_GRID_NONE,
|
||||||
|
AXIS_GRID_MAJOR,
|
||||||
|
AXIS_GRID_MAJOR_AND_MINOR
|
||||||
|
};
|
||||||
|
|
||||||
typedef caf::AppEnum<AxisGridVisibility> AxisGridEnum;
|
typedef caf::AppEnum<AxisGridVisibility> AxisGridEnum;
|
||||||
|
|
||||||
@ -90,7 +95,10 @@ public:
|
|||||||
|
|
||||||
void addTrack( RimWellLogTrack* track );
|
void addTrack( RimWellLogTrack* track );
|
||||||
void insertTrack( RimWellLogTrack* track, size_t index );
|
void insertTrack( RimWellLogTrack* track, size_t index );
|
||||||
size_t trackCount() const { return m_tracks.size();}
|
size_t trackCount() const
|
||||||
|
{
|
||||||
|
return m_tracks.size();
|
||||||
|
}
|
||||||
|
|
||||||
void removeTrack( RimWellLogTrack* track );
|
void removeTrack( RimWellLogTrack* track );
|
||||||
size_t trackIndex( const RimWellLogTrack* track ) const;
|
size_t trackIndex( const RimWellLogTrack* track ) const;
|
||||||
@ -123,14 +131,18 @@ public:
|
|||||||
|
|
||||||
void handleKeyPressEvent( QKeyEvent* keyEvent );
|
void handleKeyPressEvent( QKeyEvent* keyEvent );
|
||||||
RimWellLogCurveCommonDataSource* commonDataSource() const;
|
RimWellLogCurveCommonDataSource* commonDataSource() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void performAutoNameUpdate() override;
|
void performAutoNameUpdate() override;
|
||||||
|
|
||||||
// Overridden PDM methods
|
// Overridden PDM methods
|
||||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||||
|
const QVariant& oldValue,
|
||||||
|
const QVariant& newValue ) override;
|
||||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||||
caf::PdmFieldHandle* userDescriptionField() override;
|
caf::PdmFieldHandle* userDescriptionField() override;
|
||||||
QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||||
|
bool* useOptionsOnly ) override;
|
||||||
void onLoadDataAndUpdate() override;
|
void onLoadDataAndUpdate() override;
|
||||||
|
|
||||||
QImage snapshotWindowContent() override;
|
QImage snapshotWindowContent() override;
|
||||||
|
@ -106,4 +106,3 @@ void RimWellLogPlotNameConfig::defineUiOrdering(QString uiConfigName, caf::PdmUi
|
|||||||
uiOrdering.add( &m_addAirGap );
|
uiOrdering.add( &m_addAirGap );
|
||||||
uiOrdering.add( &m_addWaterDepth );
|
uiOrdering.add( &m_addWaterDepth );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,5 +48,3 @@ private:
|
|||||||
caf::PdmField<bool> m_addAirGap;
|
caf::PdmField<bool> m_addAirGap;
|
||||||
caf::PdmField<bool> m_addWaterDepth;
|
caf::PdmField<bool> m_addWaterDepth;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,4 +34,3 @@ RimWellLogRftCurveNameConfig::RimWellLogRftCurveNameConfig()
|
|||||||
CAF_PDM_InitObject( "Well Log Rft Curve Name Generator", "", "", "" );
|
CAF_PDM_InitObject( "Well Log Rft Curve Name Generator", "", "", "" );
|
||||||
m_customName = "Rft Curve";
|
m_customName = "Rft Curve";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,4 +31,3 @@ class RimWellLogRftCurveNameConfig : public RimNameConfig
|
|||||||
public:
|
public:
|
||||||
RimWellLogRftCurveNameConfig();
|
RimWellLogRftCurveNameConfig();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -21,11 +21,11 @@
|
|||||||
#include "RiaApplication.h"
|
#include "RiaApplication.h"
|
||||||
|
|
||||||
#include "RimContextCommandBuilder.h"
|
#include "RimContextCommandBuilder.h"
|
||||||
|
#include "RimTofAccumulatedPhaseFractionsPlot.h"
|
||||||
#include "RimTotalWellAllocationPlot.h"
|
#include "RimTotalWellAllocationPlot.h"
|
||||||
#include "RimWellAllocationPlot.h"
|
#include "RimWellAllocationPlot.h"
|
||||||
#include "RimWellLogPlot.h"
|
#include "RimWellLogPlot.h"
|
||||||
#include "RimWellLogTrack.h"
|
#include "RimWellLogTrack.h"
|
||||||
#include "RimTofAccumulatedPhaseFractionsPlot.h"
|
|
||||||
|
|
||||||
#include "RiuContextMenuLauncher.h"
|
#include "RiuContextMenuLauncher.h"
|
||||||
#include "RiuNightchartsWidget.h"
|
#include "RiuNightchartsWidget.h"
|
||||||
@ -38,8 +38,6 @@
|
|||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -79,7 +77,8 @@ RiuWellAllocationPlot::RiuWellAllocationPlot(RimWellAllocationPlot* plotDefiniti
|
|||||||
new RiuContextMenuLauncher( totalFlowAllocationWidget, menuBuilder );
|
new RiuContextMenuLauncher( totalFlowAllocationWidget, menuBuilder );
|
||||||
|
|
||||||
rightColumnLayout->addWidget( totalFlowAllocationWidget, Qt::AlignTop );
|
rightColumnLayout->addWidget( totalFlowAllocationWidget, Qt::AlignTop );
|
||||||
rightColumnLayout->addWidget(wellAllocationPlot->tofAccumulatedPhaseFractionsPlot()->createViewWidget(this), Qt::AlignTop);
|
rightColumnLayout->addWidget( wellAllocationPlot->tofAccumulatedPhaseFractionsPlot()->createViewWidget( this ),
|
||||||
|
Qt::AlignTop );
|
||||||
rightColumnLayout->addStretch();
|
rightColumnLayout->addStretch();
|
||||||
|
|
||||||
QWidget* wellFlowWidget = m_plotDefinition->createPlotWidget();
|
QWidget* wellFlowWidget = m_plotDefinition->createPlotWidget();
|
||||||
@ -90,9 +89,7 @@ RiuWellAllocationPlot::RiuWellAllocationPlot(RimWellAllocationPlot* plotDefiniti
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RiuWellAllocationPlot::~RiuWellAllocationPlot()
|
RiuWellAllocationPlot::~RiuWellAllocationPlot() {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
@ -105,7 +102,6 @@ void RiuWellAllocationPlot::showLegend(bool doShow)
|
|||||||
m_legendWidget->hide();
|
m_legendWidget->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -118,7 +114,6 @@ void RiuWellAllocationPlot::addLegendItem(const QString& name, const cvf::Color3
|
|||||||
m_legendWidget->update();
|
m_legendWidget->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -127,7 +122,6 @@ void RiuWellAllocationPlot::clearLegend()
|
|||||||
m_legendWidget->clear();
|
m_legendWidget->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -24,15 +24,16 @@
|
|||||||
|
|
||||||
#include "qwt_plot.h"
|
#include "qwt_plot.h"
|
||||||
|
|
||||||
#include <QPointer>
|
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
|
#include <QPointer>
|
||||||
|
|
||||||
class RimWellAllocationPlot;
|
class RimWellAllocationPlot;
|
||||||
class RiuNightchartsWidget;
|
class RiuNightchartsWidget;
|
||||||
|
|
||||||
class QLabel;
|
class QLabel;
|
||||||
|
|
||||||
namespace cvf {
|
namespace cvf
|
||||||
|
{
|
||||||
class Color3f;
|
class Color3f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,6 +45,7 @@ namespace cvf {
|
|||||||
class RiuWellAllocationPlot : public RiuWellLogPlot
|
class RiuWellAllocationPlot : public RiuWellLogPlot
|
||||||
{
|
{
|
||||||
Q_OBJECT;
|
Q_OBJECT;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RiuWellAllocationPlot( RimWellAllocationPlot* plotDefinition, QWidget* parent = nullptr );
|
RiuWellAllocationPlot( RimWellAllocationPlot* plotDefinition, QWidget* parent = nullptr );
|
||||||
~RiuWellAllocationPlot() override;
|
~RiuWellAllocationPlot() override;
|
||||||
|
@ -30,8 +30,8 @@
|
|||||||
#include "RiuPlotObjectPicker.h"
|
#include "RiuPlotObjectPicker.h"
|
||||||
#include "RiuWellLogTrack.h"
|
#include "RiuWellLogTrack.h"
|
||||||
|
|
||||||
#include "cafSelectionManager.h"
|
|
||||||
#include "cafCmdFeatureMenuBuilder.h"
|
#include "cafCmdFeatureMenuBuilder.h"
|
||||||
|
#include "cafSelectionManager.h"
|
||||||
|
|
||||||
#include "cvfAssert.h"
|
#include "cvfAssert.h"
|
||||||
|
|
||||||
@ -51,7 +51,8 @@
|
|||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RiuWellLogPlot::RiuWellLogPlot( RimWellLogPlot* plotDefinition, QWidget* parent )
|
RiuWellLogPlot::RiuWellLogPlot( RimWellLogPlot* plotDefinition, QWidget* parent )
|
||||||
: QWidget(parent), m_scheduleUpdateChildrenLayoutTimer(nullptr)
|
: QWidget( parent )
|
||||||
|
, m_scheduleUpdateChildrenLayoutTimer( nullptr )
|
||||||
{
|
{
|
||||||
Q_ASSERT( plotDefinition );
|
Q_ASSERT( plotDefinition );
|
||||||
m_plotDefinition = plotDefinition;
|
m_plotDefinition = plotDefinition;
|
||||||
@ -120,11 +121,15 @@ void RiuWellLogPlot::insertTrackPlot(RiuWellLogTrack* trackPlot, size_t index)
|
|||||||
legend->horizontalScrollBar()->setVisible( false );
|
legend->horizontalScrollBar()->setVisible( false );
|
||||||
legend->verticalScrollBar()->setVisible( false );
|
legend->verticalScrollBar()->setVisible( false );
|
||||||
|
|
||||||
legend->connect(trackPlot, SIGNAL(legendDataChanged(const QVariant &, const QList< QwtLegendData > &)), SLOT(updateLegend(const QVariant &, const QList< QwtLegendData > &)));
|
legend->connect( trackPlot,
|
||||||
|
SIGNAL( legendDataChanged( const QVariant&, const QList<QwtLegendData>& ) ),
|
||||||
|
SLOT( updateLegend( const QVariant&, const QList<QwtLegendData>& ) ) );
|
||||||
legend->contentsWidget()->layout()->setAlignment( Qt::AlignBottom | Qt::AlignHCenter );
|
legend->contentsWidget()->layout()->setAlignment( Qt::AlignBottom | Qt::AlignHCenter );
|
||||||
m_legends.insert( static_cast<int>( index ), legend );
|
m_legends.insert( static_cast<int>( index ), legend );
|
||||||
|
|
||||||
this->connect(trackPlot, SIGNAL(legendDataChanged(const QVariant &, const QList< QwtLegendData > &)), SLOT(scheduleUpdateChildrenLayout()));
|
this->connect( trackPlot,
|
||||||
|
SIGNAL( legendDataChanged( const QVariant&, const QList<QwtLegendData>& ) ),
|
||||||
|
SLOT( scheduleUpdateChildrenLayout() ) );
|
||||||
|
|
||||||
if ( !m_plotDefinition->areTrackLegendsVisible() )
|
if ( !m_plotDefinition->areTrackLegendsVisible() )
|
||||||
{
|
{
|
||||||
@ -437,7 +442,6 @@ void RiuWellLogPlot::placeChildWidgets(int frameHeight, int frameWidth)
|
|||||||
|
|
||||||
if ( visibleTrackCount )
|
if ( visibleTrackCount )
|
||||||
{
|
{
|
||||||
|
|
||||||
int maxCanvasOffset = 0;
|
int maxCanvasOffset = 0;
|
||||||
for ( int tIdx = 0; tIdx < m_trackPlots.size(); ++tIdx )
|
for ( int tIdx = 0; tIdx < m_trackPlots.size(); ++tIdx )
|
||||||
{
|
{
|
||||||
@ -449,7 +453,6 @@ void RiuWellLogPlot::placeChildWidgets(int frameHeight, int frameWidth)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for ( int tIdx = 0; tIdx < m_trackPlots.size(); ++tIdx )
|
for ( int tIdx = 0; tIdx < m_trackPlots.size(); ++tIdx )
|
||||||
{
|
{
|
||||||
if ( m_trackPlots[tIdx]->isVisible() )
|
if ( m_trackPlots[tIdx]->isVisible() )
|
||||||
@ -470,8 +473,14 @@ void RiuWellLogPlot::placeChildWidgets(int frameHeight, int frameWidth)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int realTrackWidth = trackWidths[tIdx];
|
int realTrackWidth = trackWidths[tIdx];
|
||||||
m_legends[tIdx]->setGeometry(trackX + trackPadding, titleHeight, realTrackWidth - 2 * trackPadding, maxLegendHeight);
|
m_legends[tIdx]->setGeometry( trackX + trackPadding,
|
||||||
m_trackPlots[tIdx]->setGeometry(trackX + trackPadding, adjustedVerticalPosition, realTrackWidth - 2 * trackPadding, adjustedTrackHeight);
|
titleHeight,
|
||||||
|
realTrackWidth - 2 * trackPadding,
|
||||||
|
maxLegendHeight );
|
||||||
|
m_trackPlots[tIdx]->setGeometry( trackX + trackPadding,
|
||||||
|
adjustedVerticalPosition,
|
||||||
|
realTrackWidth - 2 * trackPadding,
|
||||||
|
adjustedTrackHeight );
|
||||||
|
|
||||||
trackX += realTrackWidth;
|
trackX += realTrackWidth;
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,6 @@ protected:
|
|||||||
void contextMenuEvent( QContextMenuEvent* ) override;
|
void contextMenuEvent( QContextMenuEvent* ) override;
|
||||||
QSize sizeHint() const override;
|
QSize sizeHint() const override;
|
||||||
|
|
||||||
|
|
||||||
void keyPressEvent( QKeyEvent* keyEvent ) override;
|
void keyPressEvent( QKeyEvent* keyEvent ) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -95,4 +94,3 @@ protected:
|
|||||||
caf::PdmPointer<RimWellLogPlot> m_plotDefinition;
|
caf::PdmPointer<RimWellLogPlot> m_plotDefinition;
|
||||||
QTimer* m_scheduleUpdateChildrenLayoutTimer;
|
QTimer* m_scheduleUpdateChildrenLayoutTimer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user