mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2544 Use helper class to get extractors
This commit is contained in:
parent
0aba950c12
commit
ca0c13be41
@ -18,10 +18,12 @@
|
||||
|
||||
#include "Rim3dWellLogCurve.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaExtractionTools.h"
|
||||
|
||||
#include "RigEclipseWellLogExtractor.h"
|
||||
#include "RigGeoMechWellLogExtractor.h"
|
||||
#include "RigResultAccessorFactory.h"
|
||||
|
||||
#include "Rim3dView.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
@ -181,14 +183,6 @@ void Rim3dWellLogCurve::resultValuesAndMds(std::vector<double>* resultValues, st
|
||||
CAF_ASSERT(resultValues != nullptr);
|
||||
CAF_ASSERT(measuredDepthValues != nullptr);
|
||||
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
|
||||
RimMainPlotCollection* mainPlotCollection = proj->mainPlotCollection;
|
||||
if (!mainPlotCollection) return;
|
||||
|
||||
RimWellLogPlotCollection* wellLogCollection = mainPlotCollection->wellLogPlotCollection();
|
||||
if (!wellLogCollection) return;
|
||||
|
||||
cvf::ref<RigEclipseWellLogExtractor> eclExtractor;
|
||||
cvf::ref<RigGeoMechWellLogExtractor> geomExtractor;
|
||||
|
||||
@ -199,14 +193,14 @@ void Rim3dWellLogCurve::resultValuesAndMds(std::vector<double>* resultValues, st
|
||||
|
||||
if (eclipseCase)
|
||||
{
|
||||
eclExtractor = wellLogCollection->findOrCreateExtractor(wellPath, eclipseCase);
|
||||
eclExtractor = RiaExtractionTools::wellLogExtractorEclipseCase(wellPath, eclipseCase);
|
||||
}
|
||||
else
|
||||
{
|
||||
RimGeoMechCase* geomCase = dynamic_cast<RimGeoMechCase*>(m_case());
|
||||
if (geomCase)
|
||||
{
|
||||
geomExtractor = wellLogCollection->findOrCreateExtractor(wellPath, geomCase);
|
||||
geomExtractor = RiaExtractionTools::wellLogExtractorGeoMechCase(wellPath, geomCase);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,6 +59,7 @@
|
||||
|
||||
#include "qwt_scale_engine.h"
|
||||
#include "RiaSimWellBranchTools.h"
|
||||
#include "RiaExtractionTools.h"
|
||||
|
||||
#define RI_LOGPLOTTRACK_MINX_DEFAULT -10.0
|
||||
#define RI_LOGPLOTTRACK_MAXX_DEFAULT 100.0
|
||||
@ -1040,26 +1041,6 @@ RigEclipseWellLogExtractor* RimWellLogTrack::createSimWellExtractor(RimWellLogPl
|
||||
eclipseCase->eclipseCaseData()));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigEclipseWellLogExtractor* RimWellLogTrack::createWellPathExtractor(RimWellLogPlotCollection* wellLogCollection, RimCase* rimCase, RimWellPath* wellPath)
|
||||
{
|
||||
if (!wellLogCollection) return nullptr;
|
||||
|
||||
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>(rimCase);
|
||||
return (wellLogCollection->findOrCreateExtractor(wellPath, eclipseCase));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigGeoMechWellLogExtractor* RimWellLogTrack::createGeoMechExtractor(RimWellLogPlotCollection* wellLogCollection, RimCase* rimCase, RimWellPath* wellPath)
|
||||
{
|
||||
RimGeoMechCase* geomCase = dynamic_cast<RimGeoMechCase*>(rimCase);
|
||||
return (wellLogCollection->findOrCreateExtractor(wellPath, geomCase));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -1252,9 +1233,8 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
||||
}
|
||||
else
|
||||
{
|
||||
eclWellLogExtractor = RimWellLogTrack::createWellPathExtractor(wellLogCollection,
|
||||
m_formationCase,
|
||||
m_formationWellPathForSourceCase);
|
||||
eclWellLogExtractor = RiaExtractionTools::wellLogExtractorEclipseCase(m_formationWellPathForSourceCase,
|
||||
dynamic_cast<RimEclipseCase*>(m_formationCase()));
|
||||
}
|
||||
|
||||
if (eclWellLogExtractor)
|
||||
@ -1271,7 +1251,8 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
||||
}
|
||||
else
|
||||
{
|
||||
geoMechWellLogExtractor = RimWellLogTrack::createGeoMechExtractor(wellLogCollection, m_formationCase, m_formationWellPathForSourceCase);
|
||||
geoMechWellLogExtractor = RiaExtractionTools::wellLogExtractorGeoMechCase(m_formationWellPathForSourceCase,
|
||||
dynamic_cast<RimGeoMechCase*>(m_formationCase()));
|
||||
if (!geoMechWellLogExtractor) return;
|
||||
|
||||
std::string activeFormationNamesResultName = RiaDefines::activeFormationNamesResultName().toStdString();
|
||||
|
@ -134,8 +134,6 @@ private:
|
||||
static void simWellOptionItems(QList<caf::PdmOptionItemInfo>* options, RimCase* eclCase);
|
||||
|
||||
static RigEclipseWellLogExtractor* createSimWellExtractor(RimWellLogPlotCollection* wellLogCollection, RimCase* rimCase, const QString& simWellName, int branchIndex, bool useBranchDetection);
|
||||
static RigEclipseWellLogExtractor* createWellPathExtractor(RimWellLogPlotCollection* wellLogCollection, RimCase* rimCase, RimWellPath* wellPath);
|
||||
static RigGeoMechWellLogExtractor* createGeoMechExtractor(RimWellLogPlotCollection* wellLogCollection, RimCase* rimCase, RimWellPath* wellPath);
|
||||
|
||||
static CurveSamplingPointData curveSamplingPointData(RigEclipseWellLogExtractor* extractor, RigResultAccessor* resultAccessor);
|
||||
static CurveSamplingPointData curveSamplingPointData(RigGeoMechWellLogExtractor* extractor, const RigFemResultAddress& resultAddress);
|
||||
|
Loading…
Reference in New Issue
Block a user