mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5063 Improve auto name for well log plots and use it for well allocation plots
This commit is contained in:
parent
cf7608e6bf
commit
dbee9759a0
@ -40,6 +40,7 @@
|
||||
#include "RimTotalWellAllocationPlot.h"
|
||||
#include "RimWellAllocationPlotLegend.h"
|
||||
#include "RimWellFlowRateCurve.h"
|
||||
#include "RimWellLogCurveCommonDataSource.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellLogTrack.h"
|
||||
|
||||
@ -219,7 +220,11 @@ void RimWellAllocationPlot::updateFromWell()
|
||||
if ( m_flowType() == ACCUMULATED ) description = "Accumulated Flow";
|
||||
if ( m_flowType() == INFLOW ) description = "Inflow Rates";
|
||||
|
||||
accumulatedWellFlowPlot()->setMultiPlotTitle( description + " (" + m_wellName + ")" );
|
||||
RimWellLogPlotNameConfig* nameConfig = accumulatedWellFlowPlot()->nameConfig();
|
||||
nameConfig->setCustomName( description );
|
||||
nameConfig->setAutoNameTags( false, true, false, false, false );
|
||||
nameConfig->setFieldVisibility( true, true, true, false, false );
|
||||
accumulatedWellFlowPlot()->updateAutoName();
|
||||
|
||||
if ( !m_case ) return;
|
||||
|
||||
@ -365,7 +370,6 @@ void RimWellAllocationPlot::updateFromWell()
|
||||
m_totalWellAllocationPlot->updateConnectedEditors();
|
||||
|
||||
accumulatedWellFlowPlot()->updateConnectedEditors();
|
||||
|
||||
m_tofAccumulatedPhaseFractionsPlot->reloadFromWell();
|
||||
m_tofAccumulatedPhaseFractionsPlot->updateConnectedEditors();
|
||||
|
||||
|
@ -56,6 +56,33 @@ RimWellFlowRateCurve::RimWellFlowRateCurve()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellFlowRateCurve::~RimWellFlowRateCurve() {}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseResultCase* RimWellFlowRateCurve::rimCase()
|
||||
{
|
||||
RimWellAllocationPlot* wap = wellAllocationPlot();
|
||||
if ( wap )
|
||||
{
|
||||
return wap->rimCase();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RimWellFlowRateCurve::timeStep()
|
||||
{
|
||||
RimWellAllocationPlot* wap = wellAllocationPlot();
|
||||
|
||||
if ( wap )
|
||||
{
|
||||
return wap->timeStep();
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -44,8 +44,10 @@ public:
|
||||
const std::vector<double>& flowRates );
|
||||
void updateStackedPlotData();
|
||||
|
||||
QString wellName() const override;
|
||||
QString wellLogChannelName() const override;
|
||||
RimEclipseResultCase* rimCase();
|
||||
int timeStep();
|
||||
QString wellName() const override;
|
||||
QString wellLogChannelName() const override;
|
||||
|
||||
void setGroupId( int groupId );
|
||||
int groupId() const;
|
||||
|
@ -21,10 +21,12 @@
|
||||
#include "RimCase.h"
|
||||
#include "RimDataSourceSteppingTools.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseResultCase.h"
|
||||
#include "RimGeoMechCase.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimTools.h"
|
||||
#include "RimWellFlowRateCurve.h"
|
||||
#include "RimWellLogExtractionCurve.h"
|
||||
#include "RimWellLogFileCurve.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
@ -285,6 +287,7 @@ void RimWellLogCurveCommonDataSource::updateDefaultOptions( const std::vector<Ri
|
||||
}
|
||||
RimWellLogExtractionCurve* extractionCurve = dynamic_cast<RimWellLogExtractionCurve*>( curve );
|
||||
RimWellLogFileCurve* fileCurve = dynamic_cast<RimWellLogFileCurve*>( curve );
|
||||
RimWellFlowRateCurve* flowRateCurve = dynamic_cast<RimWellFlowRateCurve*>( curve );
|
||||
if ( extractionCurve )
|
||||
{
|
||||
RimWellLogWbsCurve* wbsCurve = dynamic_cast<RimWellLogWbsCurve*>( extractionCurve );
|
||||
@ -322,6 +325,13 @@ void RimWellLogCurveCommonDataSource::updateDefaultOptions( const std::vector<Ri
|
||||
m_uniqueWellPaths.insert( fileCurve->wellPath() );
|
||||
m_uniqueWellNames.insert( fileCurve->wellName() );
|
||||
}
|
||||
else if ( flowRateCurve )
|
||||
{
|
||||
m_uniqueTrajectoryTypes.insert( RimWellLogExtractionCurve::SIMULATION_WELL );
|
||||
m_uniqueWellNames.insert( flowRateCurve->wellName() );
|
||||
m_uniqueCases.insert( flowRateCurve->rimCase() );
|
||||
m_uniqueTimeSteps.insert( flowRateCurve->timeStep() );
|
||||
}
|
||||
}
|
||||
for ( RimWellLogTrack* track : tracks )
|
||||
{
|
||||
|
@ -393,6 +393,14 @@ QString RimWellLogPlot::createAutoName() const
|
||||
return generatedCurveName.join( ": " );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellLogPlotNameConfig* RimWellLogPlot::nameConfig() const
|
||||
{
|
||||
return m_nameConfig;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -91,7 +91,8 @@ public:
|
||||
void uiOrderingForDepthAxis( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
|
||||
void uiOrderingForAutoName( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
|
||||
|
||||
QString createAutoName() const override;
|
||||
QString createAutoName() const override;
|
||||
RimWellLogPlotNameConfig* nameConfig() const;
|
||||
|
||||
RimWellLogCurveCommonDataSource* commonDataSource() const;
|
||||
void updateCommonDataSource();
|
||||
|
@ -96,6 +96,22 @@ void RimWellLogPlotNameConfig::setAutoNameTags( bool addCaseName,
|
||||
m_addWaterDepth = addWaterDepth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogPlotNameConfig::setFieldVisibility( bool caseNameVisible,
|
||||
bool wellNameVisible,
|
||||
bool timeStepVisible,
|
||||
bool airGapVisible,
|
||||
bool waterDepthVisible )
|
||||
{
|
||||
m_addCaseName.uiCapability()->setUiHidden( !caseNameVisible );
|
||||
m_addWellName.uiCapability()->setUiHidden( !wellNameVisible );
|
||||
m_addTimestep.uiCapability()->setUiHidden( !timeStepVisible );
|
||||
m_addAirGap.uiCapability()->setUiHidden( !airGapVisible );
|
||||
m_addWaterDepth.uiCapability()->setUiHidden( !waterDepthVisible );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -38,6 +38,11 @@ public:
|
||||
bool addWaterDepth() const;
|
||||
|
||||
void setAutoNameTags( bool addCaseName, bool addWellName, bool addTimeStep, bool addAirGap, bool addWaterDepth );
|
||||
void setFieldVisibility( bool caseNameVisible,
|
||||
bool wellNameVisible,
|
||||
bool timeStepVisible,
|
||||
bool airGapVisible,
|
||||
bool waterDepthVisible );
|
||||
|
||||
protected:
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
|
Loading…
Reference in New Issue
Block a user