mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2264 PLT plot. Filter wells list based on well geometry and production data
This commit is contained in:
@@ -58,8 +58,18 @@ bool RicNewPltPlotFeature::isCommandEnabled()
|
||||
if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return false;
|
||||
|
||||
RimSimWellInView* simWell = caf::firstAncestorOfTypeFromSelectedObject<RimSimWellInView*>();
|
||||
RimWellPath* selectedWellPath = caf::firstAncestorOfTypeFromSelectedObject<RimWellPath*>();
|
||||
|
||||
bool enable = true;
|
||||
|
||||
if (selectedWellPath)
|
||||
{
|
||||
if (selectedWellPath->wellPathGeometry() == nullptr && !RimWellPlotTools::hasFlowData(selectedWellPath))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (simWell != nullptr)
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
|
||||
@@ -152,7 +152,7 @@ bool RimWellPlotTools::hasFlowData(const RimWellLogFile* wellLogFile)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellPlotTools::hasFlowData(RimWellPath* wellPath)
|
||||
bool RimWellPlotTools::hasFlowData(const RimWellPath* wellPath)
|
||||
{
|
||||
for (RimWellLogFile* const wellLogFile : wellPath->wellLogFiles())
|
||||
{
|
||||
|
||||
@@ -104,6 +104,9 @@ public:
|
||||
static QString curveUnitText(RimWellLogFile::WellFlowCondition condition,
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem,
|
||||
FlowPhase flowPhase);
|
||||
|
||||
static bool hasFlowData(const RimWellPath* wellPath);
|
||||
|
||||
private:
|
||||
friend class StaticFieldsInitializer;
|
||||
static const std::set<QString> PRESSURE_DATA_NAMES;
|
||||
@@ -120,7 +123,6 @@ private:
|
||||
static bool hasPressureData(RimEclipseResultCase* gridCase);
|
||||
static bool hasPressureData(RimWellPath* wellPath);
|
||||
static bool hasFlowData(RimEclipseResultCase* gridCase);
|
||||
static bool hasFlowData(RimWellPath* wellPath);
|
||||
static bool isFlowChannel(RimWellLogFileChannel* channel);
|
||||
static bool tryMatchChannelName(const std::set<QString>& channelNames, const QString& channelNameToMatch);
|
||||
static std::set<QDateTime> findMatchingOrAdjacentTimeSteps(const std::set<QDateTime>& baseTimeLine, const std::set<QDateTime>& availableTimeSteps);
|
||||
|
||||
@@ -1073,17 +1073,13 @@ void RimWellPltPlot::calculateValueOptionsForWells(QList<caf::PdmOptionItemInfo>
|
||||
|
||||
if (proj != nullptr)
|
||||
{
|
||||
std::set<QString> wellNames;
|
||||
|
||||
// Observed wells
|
||||
for (const RimWellPath* const wellPath : proj->allWellPaths())
|
||||
{
|
||||
wellNames.insert(wellPath->name());
|
||||
}
|
||||
const QString wellName = wellPath->name();
|
||||
|
||||
for (const auto& wellName : wellNames)
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(wellName, wellName));
|
||||
if(wellPath->wellPathGeometry() || RimWellPlotTools::hasFlowData(wellPath))
|
||||
options.push_back(caf::PdmOptionItemInfo(wellName, wellName));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user