mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Refactor RimWellPath and RigWellPath
This commit is contained in:
parent
c29cf315d2
commit
aceac43652
@ -1638,9 +1638,9 @@ void RiaApplication::loadAndUpdatePlotData()
|
||||
caf::ProgressInfo plotProgress( plotCount, "Loading Plot Data" );
|
||||
if ( wlpColl )
|
||||
{
|
||||
for ( size_t wlpIdx = 0; wlpIdx < wlpColl->wellLogPlots().size(); ++wlpIdx )
|
||||
for ( auto wellLogPlot : wlpColl->wellLogPlots() )
|
||||
{
|
||||
wlpColl->wellLogPlots[wlpIdx]->loadDataAndUpdate();
|
||||
wellLogPlot->loadDataAndUpdate();
|
||||
plotProgress.incrementProgress();
|
||||
}
|
||||
}
|
||||
|
@ -28,8 +28,8 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigEclipseWellLogExtractor* RiaExtractionTools::wellLogExtractorEclipseCase( RimWellPath* wellPath,
|
||||
RimEclipseCase* eclipseCase )
|
||||
RigEclipseWellLogExtractor* RiaExtractionTools::findOrCreateWellLogExtractor( gsl::not_null<RimWellPath*> wellPath,
|
||||
gsl::not_null<RimEclipseCase*> eclipseCase )
|
||||
{
|
||||
auto wlPlotCollection = wellLogPlotCollection();
|
||||
if ( !wlPlotCollection ) return nullptr;
|
||||
@ -40,7 +40,8 @@ RigEclipseWellLogExtractor* RiaExtractionTools::wellLogExtractorEclipseCase( Rim
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigGeoMechWellLogExtractor* RiaExtractionTools::wellLogExtractorGeoMechCase( RimWellPath* wellPath, RimGeoMechCase* geomCase )
|
||||
RigGeoMechWellLogExtractor* RiaExtractionTools::findOrCreateWellLogExtractor( gsl::not_null<RimWellPath*> wellPath,
|
||||
gsl::not_null<RimGeoMechCase*> geomCase )
|
||||
{
|
||||
auto wlPlotCollection = wellLogPlotCollection();
|
||||
if ( !wlPlotCollection ) return nullptr;
|
||||
@ -51,17 +52,13 @@ RigGeoMechWellLogExtractor* RiaExtractionTools::wellLogExtractorGeoMechCase( Rim
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigEclipseWellLogExtractor* RiaExtractionTools::findOrCreateSimWellExtractor( const RimSimWellInView* simWell,
|
||||
const RigWellPath* wellPathGeom )
|
||||
RigEclipseWellLogExtractor*
|
||||
RiaExtractionTools::findOrCreateSimWellExtractor( gsl::not_null<const RimSimWellInView*> simWell,
|
||||
gsl::not_null<const RigWellPath*> wellPathGeom )
|
||||
{
|
||||
auto wlPlotCollection = wellLogPlotCollection();
|
||||
if ( !wlPlotCollection ) return nullptr;
|
||||
|
||||
if ( !( simWell && wellPathGeom ) )
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RimEclipseCase* eclipseCase = nullptr;
|
||||
simWell->firstAncestorOrThisOfType( eclipseCase );
|
||||
if ( !( eclipseCase && eclipseCase->eclipseCaseData() ) )
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <gsl/gsl>
|
||||
|
||||
class RigEclipseWellLogExtractor;
|
||||
class RigGeoMechWellLogExtractor;
|
||||
class RigWellPath;
|
||||
@ -34,10 +36,13 @@ class QString;
|
||||
//==================================================================================================
|
||||
namespace RiaExtractionTools
|
||||
{
|
||||
RigEclipseWellLogExtractor* wellLogExtractorEclipseCase( RimWellPath* wellPath, RimEclipseCase* eclipseCase );
|
||||
RigGeoMechWellLogExtractor* wellLogExtractorGeoMechCase( RimWellPath* wellPath, RimGeoMechCase* geomCase );
|
||||
RigEclipseWellLogExtractor* findOrCreateWellLogExtractor( gsl::not_null<RimWellPath*> wellPath,
|
||||
gsl::not_null<RimEclipseCase*> eclipseCase );
|
||||
RigGeoMechWellLogExtractor* findOrCreateWellLogExtractor( gsl::not_null<RimWellPath*> wellPath,
|
||||
gsl::not_null<RimGeoMechCase*> geomCase );
|
||||
|
||||
RigEclipseWellLogExtractor* findOrCreateSimWellExtractor( const RimSimWellInView* simWell, const RigWellPath* wellPathGeom );
|
||||
RigEclipseWellLogExtractor* findOrCreateSimWellExtractor( gsl::not_null<const RimSimWellInView*> simWell,
|
||||
gsl::not_null<const RigWellPath*> wellPathGeom );
|
||||
|
||||
RimWellLogPlotCollection* wellLogPlotCollection();
|
||||
|
||||
|
@ -40,27 +40,25 @@ RiaPolyArcLineSampler::RiaPolyArcLineSampler( const cvf::Vec3d& sta
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
void RiaPolyArcLineSampler::sampledPointsAndMDs( double sampleInterval,
|
||||
bool isResamplingLines,
|
||||
std::vector<cvf::Vec3d>* points,
|
||||
std::vector<double>* mds )
|
||||
std::pair<std::vector<cvf::Vec3d>, std::vector<double>>
|
||||
RiaPolyArcLineSampler::sampledPointsAndMDs( double sampleInterval, bool isResamplingLines )
|
||||
{
|
||||
CVF_ASSERT( sampleInterval > 0.0 );
|
||||
|
||||
std::vector<cvf::Vec3d> points;
|
||||
std::vector<double> mds;
|
||||
|
||||
m_maxSamplingsInterval = sampleInterval;
|
||||
m_isResamplingLines = isResamplingLines;
|
||||
|
||||
double startMD = 0.0;
|
||||
points->clear();
|
||||
mds->clear();
|
||||
|
||||
std::vector<cvf::Vec3d> pointsNoDuplicates = RiaPolyArcLineSampler::pointsWithoutDuplicates( m_lineArcEndPoints );
|
||||
|
||||
if ( pointsNoDuplicates.size() < 2 ) return;
|
||||
if ( pointsNoDuplicates.size() < 2 ) return std::make_pair( points, mds );
|
||||
|
||||
m_points = points;
|
||||
m_meshDs = mds;
|
||||
m_points = &points;
|
||||
m_meshDs = &mds;
|
||||
m_totalMD = startMD;
|
||||
|
||||
cvf::Vec3d p1 = pointsNoDuplicates[0];
|
||||
@ -75,7 +73,7 @@ void RiaPolyArcLineSampler::sampledPointsAndMDs( double sample
|
||||
sampleSegment( t2, pointsNoDuplicates[pIdx], pointsNoDuplicates[pIdx + 1], &t2 );
|
||||
}
|
||||
|
||||
return;
|
||||
return std::make_pair( points, mds );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -27,10 +27,8 @@ class RiaPolyArcLineSampler
|
||||
public:
|
||||
RiaPolyArcLineSampler( const cvf::Vec3d& startTangent, const std::vector<cvf::Vec3d>& lineArcEndPoints );
|
||||
|
||||
void sampledPointsAndMDs( double maxSampleInterval,
|
||||
bool isResamplingLines,
|
||||
std::vector<cvf::Vec3d>* points,
|
||||
std::vector<double>* mds );
|
||||
std::pair<std::vector<cvf::Vec3d>, std::vector<double>> sampledPointsAndMDs( double maxSampleInterval,
|
||||
bool isResamplingLines );
|
||||
|
||||
static std::vector<cvf::Vec3d> pointsWithoutDuplicates( const std::vector<cvf::Vec3d>& points );
|
||||
|
||||
|
@ -58,17 +58,7 @@ add_library( ${PROJECT_NAME} OBJECT
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
$<TARGET_PROPERTY:LibCore,INCLUDE_DIRECTORIES> # Needed for cmake version < 3.12. Remove when we can use target_link_libraries
|
||||
$<TARGET_PROPERTY:cafCommand,INCLUDE_DIRECTORIES> # Needed for cmake version < 3.12. Remove when we can use target_link_libraries
|
||||
$<TARGET_PROPERTY:cafPdmCvf,INCLUDE_DIRECTORIES> # Needed for cmake version < 3.12. Remove when we can use target_link_libraries
|
||||
$<TARGET_PROPERTY:cafPdmScripting,INCLUDE_DIRECTORIES> # Needed for cmake version < 3.12. Remove when we can use target_link_libraries
|
||||
$<TARGET_PROPERTY:cafTensor,INCLUDE_DIRECTORIES> # Needed for cmake version < 3.12. Remove when we can use target_link_libraries
|
||||
$<TARGET_PROPERTY:cafViewer,INCLUDE_DIRECTORIES> # Needed for cmake version < 3.12. Remove when we can use target_link_libraries
|
||||
$<TARGET_PROPERTY:cafVizExtensions,INCLUDE_DIRECTORIES> # Needed for cmake version < 3.12. Remove when we can use target_link_libraries
|
||||
$<TARGET_PROPERTY:ecl,INCLUDE_DIRECTORIES> # Needed for cmake version < 3.12. Remove when we can use target_link_libraries
|
||||
$<TARGET_PROPERTY:nightcharts,INCLUDE_DIRECTORIES> # Needed for cmake version < 3.12. Remove when we can use target_link_libraries
|
||||
$<TARGET_PROPERTY:qwt,INCLUDE_DIRECTORIES> # Needed for cmake version < 3.12. Remove when we can use target_link_libraries
|
||||
${Qt5Network_INCLUDE_DIRS} # Needed for cmake version < 3.12. Remove when we can use target_link_libraries
|
||||
${CMAKE_SOURCE_DIR}/ThirdParty
|
||||
)
|
||||
|
||||
# Before cmake 3.12 OBJECT libraries could not use the target_link_libraries command,
|
||||
@ -76,22 +66,23 @@ target_include_directories(${PROJECT_NAME}
|
||||
set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
# Use this code when 3.12 can be used as minimum version of cmake
|
||||
#set( LINK_LIBRARIES
|
||||
# LibCore
|
||||
# cafCommand
|
||||
# cafPdmCvf
|
||||
# cafTensor
|
||||
# cafViewer
|
||||
# cafVizExtensions
|
||||
# ecl
|
||||
# nightcharts
|
||||
# qwt
|
||||
set( LINK_LIBRARIES
|
||||
LibCore
|
||||
cafCommand
|
||||
cafPdmCvf
|
||||
cafPdmScripting
|
||||
cafTensor
|
||||
cafViewer
|
||||
cafVizExtensions
|
||||
ecl
|
||||
nightcharts
|
||||
qwt
|
||||
|
||||
# ${QT_LIBRARIES}
|
||||
#)
|
||||
${QT_LIBRARIES}
|
||||
)
|
||||
|
||||
#target_link_libraries( ${PROJECT_NAME}
|
||||
# ${LINK_LIBRARIES}
|
||||
#)
|
||||
target_link_libraries( ${PROJECT_NAME}
|
||||
${LINK_LIBRARIES}
|
||||
)
|
||||
|
||||
source_group("" FILES ${PROJECT_FILES})
|
||||
|
@ -90,16 +90,14 @@ void RicExportFishbonesLateralsFeature::onActionTriggered( bool isChecked )
|
||||
lateralMDs.push_back( coordMD.second );
|
||||
}
|
||||
|
||||
RigWellPath geometry;
|
||||
geometry.m_wellPathPoints = lateralCoords;
|
||||
geometry.m_measuredDepths = lateralMDs;
|
||||
RigWellPath geometry( lateralCoords, lateralMDs );
|
||||
|
||||
// Pad with "0" to get a total of two characters defining the sub index text
|
||||
QString subIndexText = QString( "%1" ).arg( sub.subIndex, 2, 10, QChar( '0' ) );
|
||||
QString lateralName =
|
||||
QString( "%1_%2_Sub%3_Lat%4" ).arg( wellPath->name() ).arg( fishboneName ).arg( subIndexText ).arg( lateralIndex );
|
||||
|
||||
EXP::writeWellPathGeometryToStream( *stream, &geometry, lateralName, mdStepSize, false, 0.0, false );
|
||||
EXP::writeWellPathGeometryToStream( *stream, geometry, lateralName, mdStepSize, false, 0.0, false );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,12 +43,7 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicNewFishbonesSubsFeature, "RicNewFishbonesSubsFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double getWellPathTipMd( RimWellPath* wellPath );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewFishbonesSubsFeature::onActionTriggered( bool isChecked )
|
||||
@ -63,7 +58,7 @@ void RicNewFishbonesSubsFeature::onActionTriggered( bool isChecked )
|
||||
RimFishbonesMultipleSubs* obj = new RimFishbonesMultipleSubs;
|
||||
fishbonesCollection->appendFishbonesSubs( obj );
|
||||
|
||||
double wellPathTipMd = getWellPathTipMd( wellPath );
|
||||
double wellPathTipMd = wellPath->endMD();
|
||||
if ( wellPathTipMd != HUGE_VAL )
|
||||
{
|
||||
double startMd = wellPathTipMd - 150 - 100;
|
||||
@ -204,17 +199,3 @@ void RicNewFishbonesSubsFeature::askUserToSetUsefulScaling( RimFishbonesCollecti
|
||||
RiuMainWindow::instance()->updateScaleValue();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double getWellPathTipMd( RimWellPath* wellPath )
|
||||
{
|
||||
RigWellPath* geometry = wellPath ? wellPath->wellPathGeometry() : nullptr;
|
||||
|
||||
if ( geometry && !geometry->m_measuredDepths.empty() )
|
||||
{
|
||||
return geometry->m_measuredDepths.back();
|
||||
}
|
||||
return HUGE_VAL;
|
||||
}
|
||||
|
@ -598,11 +598,12 @@ void RicExportFractureCompletionsImpl::calculateInternalFractureTransmissibiliti
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities( const RimFractureTemplate* fracTemplate,
|
||||
const RigFractureGrid* fractureGrid,
|
||||
const RimFracture* fracture,
|
||||
void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities(
|
||||
gsl::not_null<const RimFractureTemplate*> fracTemplate,
|
||||
gsl::not_null<const RigFractureGrid*> fractureGrid,
|
||||
gsl::not_null<const RimFracture*> fracture,
|
||||
double cDarcyInCorrectUnit,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
gsl::not_null<const RigWellPath*> wellPathGeometry,
|
||||
RigTransmissibilityCondenser& transCondenser )
|
||||
{
|
||||
////
|
||||
|
@ -20,6 +20,8 @@
|
||||
|
||||
#include "RigCompletionData.h"
|
||||
|
||||
#include <gsl/gsl>
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
@ -118,11 +120,11 @@ private:
|
||||
double cDarcyInCorrectUnit,
|
||||
RigTransmissibilityCondenser& transCondenser );
|
||||
|
||||
static void calculateFractureToWellTransmissibilities( const RimFractureTemplate* fracTemplate,
|
||||
const RigFractureGrid* fractureGrid,
|
||||
const RimFracture* fracture,
|
||||
static void calculateFractureToWellTransmissibilities( gsl::not_null<const RimFractureTemplate*> fracTemplate,
|
||||
gsl::not_null<const RigFractureGrid*> fractureGrid,
|
||||
gsl::not_null<const RimFracture*> fracture,
|
||||
double cDarcyInCorrectUnit,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
gsl::not_null<const RigWellPath*> wellPathGeometry,
|
||||
RigTransmissibilityCondenser& transCondenser );
|
||||
|
||||
static std::map<size_t, double> calculateMatrixToWellTransmissibilities( RigTransmissibilityCondenser& transCondenser );
|
||||
|
@ -960,8 +960,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompdatTableUsingFormatte
|
||||
|
||||
if ( gridName.isEmpty() )
|
||||
{
|
||||
header =
|
||||
{ RifTextDataTableColumn( "Well" ),
|
||||
header = {RifTextDataTableColumn( "Well" ),
|
||||
RifTextDataTableColumn( "I" ),
|
||||
RifTextDataTableColumn( "J" ),
|
||||
RifTextDataTableColumn( "K1" ),
|
||||
@ -982,8 +981,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompdatTableUsingFormatte
|
||||
}
|
||||
else
|
||||
{
|
||||
header =
|
||||
{ RifTextDataTableColumn( "Well" ),
|
||||
header = {RifTextDataTableColumn( "Well" ),
|
||||
RifTextDataTableColumn( "LgrName" ),
|
||||
RifTextDataTableColumn( "I" ),
|
||||
RifTextDataTableColumn( "J" ),
|
||||
@ -1151,23 +1149,22 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWpimultTableUsingFormatte
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::generatePerforationsCompdatValues(
|
||||
const RimWellPath* wellPath,
|
||||
gsl::not_null<const RimWellPath*> wellPath,
|
||||
const std::vector<const RimPerforationInterval*>& intervals,
|
||||
const RicExportCompletionDataSettingsUi& settings )
|
||||
{
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem = settings.caseToApply->eclipseCaseData()->unitsType();
|
||||
|
||||
std::vector<RigCompletionData> completionData;
|
||||
if ( !wellPath || !wellPath->wellPathGeometry() )
|
||||
{
|
||||
return completionData;
|
||||
}
|
||||
|
||||
const RigActiveCellInfo* activeCellInfo =
|
||||
settings.caseToApply->eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL );
|
||||
|
||||
auto wellPathGeometry = wellPath->wellPathGeometry();
|
||||
if ( !wellPathGeometry ) return completionData;
|
||||
auto timeSteps = settings.caseToApply->timeStepDates();
|
||||
|
||||
|
||||
if ( wellPath->perforationIntervalCollection()->isChecked() )
|
||||
{
|
||||
for ( const RimPerforationInterval* interval : intervals )
|
||||
@ -1178,7 +1175,7 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::gener
|
||||
continue;
|
||||
|
||||
std::pair<std::vector<cvf::Vec3d>, std::vector<double>> perforationPointsAndMD =
|
||||
wellPath->wellPathGeometry()->clippedPointSubset( interval->startMD(), interval->endMD() );
|
||||
wellPathGeometry->clippedPointSubset( interval->startMD(), interval->endMD() );
|
||||
|
||||
std::vector<WellPathCellIntersectionInfo> intersectedCells =
|
||||
RigWellPathIntersectionTools::findCellIntersectionInfosAlongPath( settings.caseToApply->eclipseCaseData(),
|
||||
@ -1654,17 +1651,20 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAsEc
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::pair<double, cvf::Vec2i>
|
||||
RicWellPathExportCompletionDataFeatureImpl::wellPathUpperGridIntersectionIJ( const RimEclipseCase* gridCase,
|
||||
const RimWellPath* wellPath,
|
||||
std::pair<double, cvf::Vec2i> RicWellPathExportCompletionDataFeatureImpl::wellPathUpperGridIntersectionIJ(
|
||||
gsl::not_null<const RimEclipseCase*> gridCase,
|
||||
gsl::not_null<const RimWellPath*> wellPath,
|
||||
const QString& gridName )
|
||||
{
|
||||
const RigEclipseCaseData* caseData = gridCase->eclipseCaseData();
|
||||
const RigMainGrid* mainGrid = caseData->mainGrid();
|
||||
const RigActiveCellInfo* activeCellInfo = caseData->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL );
|
||||
const RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
||||
|
||||
auto wellPathGeometry = wellPath->wellPathGeometry();
|
||||
CVF_ASSERT( wellPathGeometry );
|
||||
|
||||
const std::vector<cvf::Vec3d>& coords = wellPathGeometry->wellPathPoints();
|
||||
const std::vector<double>& mds = wellPathGeometry->measureDepths();
|
||||
const std::vector<double>& mds = wellPathGeometry->measuredDepths();
|
||||
CVF_ASSERT( !coords.empty() && !mds.empty() );
|
||||
|
||||
std::vector<WellPathCellIntersectionInfo> intersections =
|
||||
|
@ -23,11 +23,13 @@
|
||||
#include "RicExportCompletionDataSettingsUi.h"
|
||||
#include "RicWellPathFractureReportItem.h"
|
||||
|
||||
#include <QFile>
|
||||
|
||||
#include "cvfVector2.h"
|
||||
#include "cvfVector3.h"
|
||||
|
||||
#include <QFile>
|
||||
|
||||
#include <gsl/gsl>
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
@ -127,7 +129,7 @@ public:
|
||||
computeDynamicCompletionsForWellPath( RimWellPath* wellPath, RimEclipseCase* eclipseCase, size_t timeStepIndex );
|
||||
|
||||
static std::vector<RigCompletionData>
|
||||
generatePerforationsCompdatValues( const RimWellPath* wellPath,
|
||||
generatePerforationsCompdatValues( gsl::not_null<const RimWellPath*> wellPath,
|
||||
const std::vector<const RimPerforationInterval*>& intervals,
|
||||
const RicExportCompletionDataSettingsUi& settings );
|
||||
|
||||
@ -182,8 +184,8 @@ private:
|
||||
static void appendCompletionData( std::map<size_t, std::vector<RigCompletionData>>* completionData,
|
||||
const std::vector<RigCompletionData>& data );
|
||||
|
||||
static std::pair<double, cvf::Vec2i> wellPathUpperGridIntersectionIJ( const RimEclipseCase* gridCase,
|
||||
const RimWellPath* wellPath,
|
||||
static std::pair<double, cvf::Vec2i> wellPathUpperGridIntersectionIJ( gsl::not_null<const RimEclipseCase*> gridCase,
|
||||
gsl::not_null<const RimWellPath*> wellPath,
|
||||
const QString& gridName = "" );
|
||||
|
||||
static void exportCarfinForTemporaryLgrs( const RimEclipseCase* sourceCase, const QString& folder );
|
||||
|
@ -940,9 +940,11 @@ RicMswExportInfo
|
||||
caseToApply->eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL );
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem = caseToApply->eclipseCaseData()->unitsType();
|
||||
|
||||
const RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
||||
auto wellPathGeometry = wellPath->wellPathGeometry();
|
||||
CVF_ASSERT( wellPathGeometry );
|
||||
|
||||
const std::vector<cvf::Vec3d>& coords = wellPathGeometry->wellPathPoints();
|
||||
const std::vector<double>& mds = wellPathGeometry->measureDepths();
|
||||
const std::vector<double>& mds = wellPathGeometry->measuredDepths();
|
||||
CVF_ASSERT( !coords.empty() && !mds.empty() );
|
||||
|
||||
std::vector<WellPathCellIntersectionInfo> intersections =
|
||||
@ -1119,9 +1121,12 @@ std::vector<WellPathCellIntersectionInfo>
|
||||
{
|
||||
const RigActiveCellInfo* activeCellInfo =
|
||||
eclipseCase->eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL );
|
||||
const RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
||||
|
||||
auto wellPathGeometry = wellPath->wellPathGeometry();
|
||||
CVF_ASSERT( wellPathGeometry );
|
||||
|
||||
const std::vector<cvf::Vec3d>& coords = wellPathGeometry->wellPathPoints();
|
||||
const std::vector<double>& mds = wellPathGeometry->measureDepths();
|
||||
const std::vector<double>& mds = wellPathGeometry->measuredDepths();
|
||||
CVF_ASSERT( !coords.empty() && !mds.empty() );
|
||||
|
||||
const RigMainGrid* mainGrid = eclipseCase->mainGrid();
|
||||
@ -1177,8 +1182,8 @@ std::vector<WellPathCellIntersectionInfo>
|
||||
std::vector<WellPathCellIntersectionInfo>
|
||||
RicWellPathExportMswCompletionsImpl::filterIntersections( const std::vector<WellPathCellIntersectionInfo>& intersections,
|
||||
double initialMD,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
const RimEclipseCase* eclipseCase )
|
||||
gsl::not_null<const RigWellPath*> wellPathGeometry,
|
||||
gsl::not_null<const RimEclipseCase*> eclipseCase )
|
||||
{
|
||||
std::vector<WellPathCellIntersectionInfo> filteredIntersections;
|
||||
|
||||
@ -1669,6 +1674,10 @@ void RicWellPathExportMswCompletionsImpl::writeMainBoreWelsegsSegment( std::shar
|
||||
|
||||
std::vector<std::pair<double, double>> subSegments = createSubSegmentMDPairs( startMD, endMD, maxSegmentLength );
|
||||
|
||||
CVF_ASSERT( exportInfo.wellPath() );
|
||||
auto wellPathGeometry = exportInfo.wellPath()->wellPathGeometry();
|
||||
CVF_ASSERT( wellPathGeometry );
|
||||
|
||||
double prevOutMD = exportInfo.initialMD();
|
||||
double prevOutTVD = exportInfo.initialTVD();
|
||||
if ( previousSegment )
|
||||
@ -1678,8 +1687,8 @@ void RicWellPathExportMswCompletionsImpl::writeMainBoreWelsegsSegment( std::shar
|
||||
}
|
||||
for ( const auto& [subStartMD, subEndMD] : subSegments )
|
||||
{
|
||||
auto startPoint = exportInfo.wellPath()->wellPathGeometry()->interpolatedPointAlongWellPath( subStartMD );
|
||||
auto endPoint = exportInfo.wellPath()->wellPathGeometry()->interpolatedPointAlongWellPath( subEndMD );
|
||||
auto startPoint = wellPathGeometry->interpolatedPointAlongWellPath( subStartMD );
|
||||
auto endPoint = wellPathGeometry->interpolatedPointAlongWellPath( subEndMD );
|
||||
|
||||
double subStartTVD = -startPoint.z();
|
||||
double subEndTVD = -endPoint.z();
|
||||
@ -1745,12 +1754,16 @@ void RicWellPathExportMswCompletionsImpl::writeValveWelsegsSegment( std::shared_
|
||||
|
||||
std::vector<std::pair<double, double>> splitSegments = createSubSegmentMDPairs( startMD, endMD, maxSegmentLength );
|
||||
|
||||
CVF_ASSERT( exportInfo.wellPath() );
|
||||
auto wellPathGeometry = exportInfo.wellPath()->wellPathGeometry();
|
||||
CVF_ASSERT( wellPathGeometry );
|
||||
|
||||
for ( const auto& [subStartMD, subEndMD] : splitSegments )
|
||||
{
|
||||
int subSegmentNumber = ( *segmentNumber )++;
|
||||
|
||||
auto startPoint = exportInfo.wellPath()->wellPathGeometry()->interpolatedPointAlongWellPath( subStartMD );
|
||||
auto endPoint = exportInfo.wellPath()->wellPathGeometry()->interpolatedPointAlongWellPath( subEndMD );
|
||||
auto startPoint = wellPathGeometry->interpolatedPointAlongWellPath( subStartMD );
|
||||
auto endPoint = wellPathGeometry->interpolatedPointAlongWellPath( subEndMD );
|
||||
|
||||
double subStartTVD = -startPoint.z();
|
||||
double subEndTVD = -endPoint.z();
|
||||
@ -1801,6 +1814,10 @@ void RicWellPathExportMswCompletionsImpl::writeCompletionWelsegsSegment( std::sh
|
||||
formatter.comment( QString( "%1 connected to %2" ).arg( completion->label() ).arg( segment->label() ) );
|
||||
}
|
||||
|
||||
CVF_ASSERT( exportInfo.wellPath() );
|
||||
auto wellPathGeometry = exportInfo.wellPath()->wellPathGeometry();
|
||||
CVF_ASSERT( wellPathGeometry );
|
||||
|
||||
for ( std::shared_ptr<RicMswSubSegment> subSegment : completion->subSegments() )
|
||||
{
|
||||
double startMD = subSegment->startMD();
|
||||
@ -1812,8 +1829,8 @@ void RicWellPathExportMswCompletionsImpl::writeCompletionWelsegsSegment( std::sh
|
||||
{
|
||||
int subSegmentNumber = ( *segmentNumber )++;
|
||||
|
||||
auto startPoint = exportInfo.wellPath()->wellPathGeometry()->interpolatedPointAlongWellPath( subStartMD );
|
||||
auto endPoint = exportInfo.wellPath()->wellPathGeometry()->interpolatedPointAlongWellPath( subEndMD );
|
||||
auto startPoint = wellPathGeometry->interpolatedPointAlongWellPath( subStartMD );
|
||||
auto endPoint = wellPathGeometry->interpolatedPointAlongWellPath( subEndMD );
|
||||
|
||||
double subStartTVD = -startPoint.z();
|
||||
double subEndTVD = -endPoint.z();
|
||||
@ -1932,9 +1949,7 @@ void RicWellPathExportMswCompletionsImpl::assignFishbonesLateralIntersections( c
|
||||
lateralCoords,
|
||||
lateralMDs );
|
||||
|
||||
RigWellPath pathGeometry;
|
||||
pathGeometry.m_wellPathPoints = lateralCoords;
|
||||
pathGeometry.m_measuredDepths = lateralMDs;
|
||||
RigWellPath pathGeometry( lateralCoords, lateralMDs );
|
||||
|
||||
double previousExitMD = lateralMDs.front();
|
||||
double previousExitTVD = -lateralCoords.front().z();
|
||||
@ -2009,24 +2024,25 @@ void RicWellPathExportMswCompletionsImpl::assignFractureCompletionsToCellSegment
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RigCompletionData>
|
||||
RicWellPathExportMswCompletionsImpl::generatePerforationIntersections( const RimWellPath* wellPath,
|
||||
const RimPerforationInterval* perforationInterval,
|
||||
std::vector<RigCompletionData> RicWellPathExportMswCompletionsImpl::generatePerforationIntersections(
|
||||
gsl::not_null<const RimWellPath*> wellPath,
|
||||
gsl::not_null<const RimPerforationInterval*> perforationInterval,
|
||||
int timeStep,
|
||||
RimEclipseCase* eclipseCase )
|
||||
gsl::not_null<RimEclipseCase*> eclipseCase )
|
||||
{
|
||||
std::vector<RigCompletionData> completionData;
|
||||
const RigActiveCellInfo* activeCellInfo =
|
||||
eclipseCase->eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL );
|
||||
|
||||
auto wellPathGeometry = wellPath->wellPathGeometry();
|
||||
CVF_ASSERT( wellPathGeometry );
|
||||
bool hasDate = (size_t)timeStep < eclipseCase->timeStepDates().size();
|
||||
bool isActive = !hasDate || perforationInterval->isActiveOnDate( eclipseCase->timeStepDates()[timeStep] );
|
||||
|
||||
if ( wellPath->perforationIntervalCollection()->isChecked() && perforationInterval->isChecked() && isActive )
|
||||
{
|
||||
std::pair<std::vector<cvf::Vec3d>, std::vector<double>> perforationPointsAndMD =
|
||||
wellPath->wellPathGeometry()->clippedPointSubset( perforationInterval->startMD(),
|
||||
perforationInterval->endMD() );
|
||||
wellPathGeometry->clippedPointSubset( perforationInterval->startMD(), perforationInterval->endMD() );
|
||||
|
||||
std::vector<WellPathCellIntersectionInfo> intersectedCells =
|
||||
RigWellPathIntersectionTools::findCellIntersectionInfosAlongPath( eclipseCase->eclipseCaseData(),
|
||||
@ -2139,11 +2155,13 @@ void RicWellPathExportMswCompletionsImpl::assignBranchNumbers( const RimEclipseC
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicWellPathExportMswCompletionsImpl::tvdFromMeasuredDepth( const RimWellPath* wellPath, double measuredDepth )
|
||||
double RicWellPathExportMswCompletionsImpl::tvdFromMeasuredDepth( gsl::not_null<const RimWellPath*> wellPath,
|
||||
double measuredDepth )
|
||||
{
|
||||
CVF_ASSERT( wellPath && wellPath->wellPathGeometry() );
|
||||
auto wellPathGeometry = wellPath->wellPathGeometry();
|
||||
CVF_ASSERT( wellPathGeometry );
|
||||
|
||||
double tvdValue = -wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( measuredDepth ).z();
|
||||
double tvdValue = -wellPathGeometry->interpolatedPointAlongWellPath( measuredDepth ).z();
|
||||
|
||||
return tvdValue;
|
||||
}
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include "RicMswExportInfo.h"
|
||||
#include "RigCompletionData.h"
|
||||
|
||||
#include <gsl/gsl>
|
||||
|
||||
class RicExportCompletionDataSettingsUi;
|
||||
class RifTextDataTableFormatter;
|
||||
class RigActiveCellInfo;
|
||||
@ -83,8 +85,8 @@ private:
|
||||
static std::vector<WellPathCellIntersectionInfo>
|
||||
filterIntersections( const std::vector<WellPathCellIntersectionInfo>& intersections,
|
||||
double initialMD,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
const RimEclipseCase* eclipseCase );
|
||||
gsl::not_null<const RigWellPath*> wellPathGeometry,
|
||||
gsl::not_null<const RimEclipseCase*> eclipseCase );
|
||||
|
||||
static void generateWelsegsTable( RifTextDataTableFormatter& formatter,
|
||||
const RicMswExportInfo& exportInfo,
|
||||
@ -180,10 +182,11 @@ private:
|
||||
std::shared_ptr<RicMswSegment> segment,
|
||||
bool* foundSubGridIntersections );
|
||||
|
||||
static std::vector<RigCompletionData> generatePerforationIntersections( const RimWellPath* wellPath,
|
||||
const RimPerforationInterval* perforationInterval,
|
||||
static std::vector<RigCompletionData>
|
||||
generatePerforationIntersections( gsl::not_null<const RimWellPath*> wellPath,
|
||||
gsl::not_null<const RimPerforationInterval*> perforationInterval,
|
||||
int timeStep,
|
||||
RimEclipseCase* eclipseCase );
|
||||
gsl::not_null<RimEclipseCase*> eclipseCase );
|
||||
|
||||
static void assignPerforationIntersections( const std::vector<RigCompletionData>& completionData,
|
||||
std::shared_ptr<RicMswCompletion> perforationCompletion,
|
||||
@ -196,5 +199,5 @@ private:
|
||||
assignBranchNumbers( const RimEclipseCase* caseToApply, std::shared_ptr<RicMswSegment> segment, int* branchNum );
|
||||
static void assignBranchNumbers( const RimEclipseCase* caseToApply, RicMswExportInfo* exportInfo );
|
||||
|
||||
static double tvdFromMeasuredDepth( const RimWellPath* wellPath, double measuredDepth );
|
||||
static double tvdFromMeasuredDepth( gsl::not_null<const RimWellPath*> wellPath, double measuredDepth );
|
||||
};
|
||||
|
@ -50,7 +50,7 @@ CAF_CMD_SOURCE_INIT( RicExportSelectedWellPathsFeature, "RicExportSelectedWellPa
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportSelectedWellPathsFeature::exportWellPath( const RimWellPath* wellPath,
|
||||
void RicExportSelectedWellPathsFeature::exportWellPath( gsl::not_null<const RimWellPath*> wellPath,
|
||||
double mdStepSize,
|
||||
const QString& folder,
|
||||
bool writeProjectInfo )
|
||||
@ -75,7 +75,7 @@ void RicExportSelectedWellPathsFeature::exportWellPath( const RimWellPath* wellP
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportSelectedWellPathsFeature::writeWellPathGeometryToStream( QTextStream& stream,
|
||||
const RigWellPath* wellPathGeom,
|
||||
const RigWellPath& wellPathGeom,
|
||||
const QString& exportName,
|
||||
double mdStepSize,
|
||||
bool useMdRkb,
|
||||
|
@ -22,6 +22,8 @@
|
||||
|
||||
#include <QFile>
|
||||
|
||||
#include <gsl/gsl>
|
||||
|
||||
#include <memory>
|
||||
|
||||
class RigWellPath;
|
||||
@ -44,21 +46,23 @@ class RicExportSelectedWellPathsFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
static void handleAction( const std::vector<RimWellPath*>& wellPaths );
|
||||
static void
|
||||
exportWellPath( const RimWellPath* wellPath, double mdStepSize, const QString& folder, bool writeProjectInfo = true );
|
||||
static void exportWellPath( gsl::not_null<const RimWellPath*> wellPath,
|
||||
double mdStepSize,
|
||||
const QString& folder,
|
||||
bool writeProjectInfo = true );
|
||||
|
||||
static RicExportWellPathsUi* openDialog();
|
||||
static QFilePtr openFileForExport( const QString& folderName, const QString& fileName );
|
||||
static QTextStreamPtr createOutputFileStream( QFile& file );
|
||||
|
||||
static void writeWellPathGeometryToStream( QTextStream& stream,
|
||||
const RimWellPath* wellPath,
|
||||
gsl::not_null<const RimWellPath*> wellPath,
|
||||
const QString& exportName,
|
||||
double mdStepSize,
|
||||
bool writeProjectInfo = true );
|
||||
|
||||
static void writeWellPathGeometryToStream( QTextStream& stream,
|
||||
const RigWellPath* wellPath,
|
||||
const RigWellPath& wellPath,
|
||||
const QString& exportName,
|
||||
double mdStepSize,
|
||||
bool useMdRkb,
|
||||
|
@ -330,13 +330,13 @@ std::vector<LocationForNewFracture> RiuCreateMultipleFractionsUi::locationsForNe
|
||||
{
|
||||
for ( auto w : m_wellPaths )
|
||||
{
|
||||
auto wellPathGeometry = w->wellPathGeometry();
|
||||
if ( wellPathGeometry )
|
||||
if ( w->wellPathGeometry() )
|
||||
{
|
||||
double endMD = w->endMD();
|
||||
|
||||
int fractureCountForWell = 0;
|
||||
auto options = fractureOptions( m_sourceCase->eclipseCaseData(), w, this->options() );
|
||||
auto mdOfWellPathTip = wellPathGeometry->measureDepths().back();
|
||||
double lastFracMd = mdOfWellPathTip;
|
||||
double lastFracMd = endMD;
|
||||
|
||||
// Iterate options which are sorted from deeper to shallower
|
||||
for ( size_t i = 0; i < options.size(); i++ )
|
||||
@ -345,7 +345,7 @@ std::vector<LocationForNewFracture> RiuCreateMultipleFractionsUi::locationsForNe
|
||||
double fracMdCandidate;
|
||||
if ( i == 0 )
|
||||
{
|
||||
fracMdCandidate = mdOfWellPathTip - m_minDistanceFromWellTd;
|
||||
fracMdCandidate = endMD - m_minDistanceFromWellTd;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -428,12 +428,13 @@ std::vector<MultipleFracturesOption>
|
||||
if ( !caseData->mainGrid() ) return options;
|
||||
|
||||
auto wellPathGeometry = wellPath->wellPathGeometry();
|
||||
CAF_ASSERT( wellPathGeometry );
|
||||
|
||||
std::vector<WellPathCellIntersectionInfo> wellPathInfos =
|
||||
RigWellPathIntersectionTools::findCellIntersectionInfosAlongPath( caseData,
|
||||
wellPath->name(),
|
||||
wellPathGeometry->wellPathPoints(),
|
||||
wellPathGeometry->measureDepths() );
|
||||
wellPathGeometry->measuredDepths() );
|
||||
std::reverse( wellPathInfos.begin(), wellPathInfos.end() );
|
||||
|
||||
bool doCreateNewOption = true;
|
||||
|
@ -52,10 +52,8 @@ CAF_CMD_SOURCE_INIT( RicNewWellPathFractureFeature, "RicNewWellPathFractureFeatu
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewWellPathFractureFeature::addFracture( RimWellPath* wellPath, double measuredDepth )
|
||||
void RicNewWellPathFractureFeature::addFracture( gsl::not_null<RimWellPath*> wellPath, double measuredDepth )
|
||||
{
|
||||
CVF_ASSERT( wellPath );
|
||||
|
||||
if ( !RicWellPathsUnitSystemSettingsImpl::ensureHasUnitSystem( wellPath ) ) return;
|
||||
|
||||
RimWellPathFractureCollection* fractureCollection = wellPath->fractureCollection();
|
||||
@ -76,7 +74,10 @@ void RicNewWellPathFractureFeature::addFracture( RimWellPath* wellPath, double m
|
||||
fracture->setMeasuredDepth( measuredDepth );
|
||||
fracture->setFractureUnit( wellPath->unitSystem() );
|
||||
|
||||
RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
||||
auto wellPathGeometry = wellPath->wellPathGeometry();
|
||||
CVF_ASSERT( wellPathGeometry );
|
||||
if ( !wellPathGeometry ) return;
|
||||
|
||||
cvf::Vec3d positionAtWellpath = wellPathGeometry->interpolatedPointAlongWellPath( measuredDepth );
|
||||
fracture->setAnchorPosition( positionAtWellpath );
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "cafCmdFeature.h"
|
||||
|
||||
#include <gsl/gsl>
|
||||
#include <vector>
|
||||
|
||||
class RimWellPathFractureCollection;
|
||||
@ -33,7 +34,7 @@ class RicNewWellPathFractureFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
public:
|
||||
static void addFracture( RimWellPath* wellPath, double measuredDepth );
|
||||
static void addFracture( gsl::not_null<RimWellPath*> wellPath, double measuredDepth );
|
||||
|
||||
protected:
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
|
@ -61,7 +61,7 @@ bool RicNewPltPlotFeature::isCommandEnabled()
|
||||
|
||||
if ( selectedWellPath )
|
||||
{
|
||||
if ( selectedWellPath->wellPathGeometry() == nullptr && !RimWellPlotTools::hasFlowData( selectedWellPath ) )
|
||||
if ( !selectedWellPath->wellPathGeometry() || !RimWellPlotTools::hasFlowData( selectedWellPath ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -178,13 +178,15 @@ void RicNewWellBoreStabilityPlotFeature::onActionTriggered( bool isChecked )
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !wellPath->wellPathGeometry() )
|
||||
auto wellPathGeometry = wellPath->wellPathGeometry();
|
||||
|
||||
if ( !wellPathGeometry )
|
||||
{
|
||||
RiaLogging::error(
|
||||
QString( "The well path %1 has no geometry. Cannot create a Well Bore Stability Plot" ).arg( wellPath->name() ) );
|
||||
return;
|
||||
}
|
||||
if ( wellPath->wellPathGeometry()->rkbDiff() == HUGE_VAL )
|
||||
if ( wellPathGeometry->rkbDiff() == HUGE_VAL )
|
||||
{
|
||||
RiaLogging::error( QString( "The well path %1 has no datum elevation and we cannot estimate TVDRKB. Cannot "
|
||||
"create a Well Bore Stability Plot" )
|
||||
|
@ -60,7 +60,7 @@ RimWellBoreStabilityPlot*
|
||||
|
||||
plot->setAsPlotMdiWindow();
|
||||
|
||||
wellLogPlotColl->wellLogPlots().push_back( plot );
|
||||
wellLogPlotColl->addWellLogPlot( plot );
|
||||
|
||||
if ( !plotDescription.isEmpty() )
|
||||
{
|
||||
@ -69,7 +69,7 @@ RimWellBoreStabilityPlot*
|
||||
else
|
||||
{
|
||||
plot->nameConfig()->setCustomName(
|
||||
QString( "Well Bore Stability Plot %1" ).arg( wellLogPlotCollection()->wellLogPlots.size() ) );
|
||||
QString( "Well Bore Stability Plot %1" ).arg( wellLogPlotCollection()->wellLogPlots().size() ) );
|
||||
}
|
||||
|
||||
if ( showAfterCreation )
|
||||
@ -94,7 +94,7 @@ RimWellLogPlot* RicNewWellLogPlotFeatureImpl::createWellLogPlot( bool showAfterC
|
||||
RimWellLogPlot* plot = new RimWellLogPlot();
|
||||
plot->setAsPlotMdiWindow();
|
||||
|
||||
wellLogPlotColl->wellLogPlots().push_back( plot );
|
||||
wellLogPlotColl->addWellLogPlot( plot );
|
||||
|
||||
if ( !plotDescription.isEmpty() )
|
||||
{
|
||||
@ -103,7 +103,7 @@ RimWellLogPlot* RicNewWellLogPlotFeatureImpl::createWellLogPlot( bool showAfterC
|
||||
else
|
||||
{
|
||||
plot->nameConfig()->setCustomName(
|
||||
QString( "Well Log Plot %1" ).arg( wellLogPlotCollection()->wellLogPlots.size() ) );
|
||||
QString( "Well Log Plot %1" ).arg( wellLogPlotCollection()->wellLogPlots().size() ) );
|
||||
}
|
||||
|
||||
if ( showAfterCreation )
|
||||
|
@ -79,7 +79,7 @@ void RicPasteWellLogPlotFeature::onActionTriggered( bool isChecked )
|
||||
fileCurve->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
|
||||
CVF_ASSERT( newObject );
|
||||
|
||||
wellLogPlotCollection->wellLogPlots.push_back( newObject );
|
||||
wellLogPlotCollection->addWellLogPlot( newObject );
|
||||
|
||||
// Resolve references after object has been inserted into the project data model
|
||||
newObject->resolveReferencesRecursively();
|
||||
|
@ -55,7 +55,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicCreateWellTargetsPickEventHandler::RicCreateWellTargetsPickEventHandler( RimWellPathGeometryDef* wellGeometryDef )
|
||||
RicCreateWellTargetsPickEventHandler::RicCreateWellTargetsPickEventHandler( gsl::not_null<RimWellPathGeometryDef*> wellGeometryDef )
|
||||
: m_geometryToAddTargetsTo( wellGeometryDef )
|
||||
{
|
||||
}
|
||||
@ -104,17 +104,15 @@ bool RicCreateWellTargetsPickEventHandler::handle3dPickEvent( const Ric3dPickEve
|
||||
double azimuth = 0.0;
|
||||
double inclination = 0.0;
|
||||
|
||||
if ( wellPathSourceInfo )
|
||||
if ( wellPathSourceInfo && wellPathSourceInfo->wellPath() && wellPathSourceInfo->wellPath()->wellPathGeometry() )
|
||||
{
|
||||
auto wellPathGeometry = wellPathSourceInfo->wellPath()->wellPathGeometry();
|
||||
|
||||
targetPointInDomain =
|
||||
wellPathSourceInfo->closestPointOnCenterLine( firstPickItem.faceIdx(), intersectionPointInDomain );
|
||||
double md = wellPathSourceInfo->measuredDepth( firstPickItem.faceIdx(), intersectionPointInDomain );
|
||||
doSetAzimuthAndInclination =
|
||||
calculateAzimuthAndInclinationAtMd( md,
|
||||
wellPathSourceInfo->wellPath()->wellPathGeometry(),
|
||||
&azimuth,
|
||||
&inclination );
|
||||
double rkbDiff = wellPathSourceInfo->wellPath()->wellPathGeometry()->rkbDiff();
|
||||
doSetAzimuthAndInclination = calculateAzimuthAndInclinationAtMd( md, wellPathGeometry, &azimuth, &inclination );
|
||||
double rkbDiff = wellPathGeometry->rkbDiff();
|
||||
if ( m_geometryToAddTargetsTo->airGap() == 0.0 && rkbDiff != std::numeric_limits<double>::infinity() )
|
||||
{
|
||||
m_geometryToAddTargetsTo->setAirGap( rkbDiff );
|
||||
@ -196,12 +194,12 @@ bool RicCreateWellTargetsPickEventHandler::handle3dPickEvent( const Ric3dPickEve
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicCreateWellTargetsPickEventHandler::calculateAzimuthAndInclinationAtMd( double measuredDepth,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
gsl::not_null<const RigWellPath*> wellPathGeometry,
|
||||
double* azimuth,
|
||||
double* inclination ) const
|
||||
{
|
||||
int mdIndex = -1;
|
||||
auto mdList = wellPathGeometry->measureDepths();
|
||||
auto mdList = wellPathGeometry->measuredDepths();
|
||||
|
||||
for ( int i = 0; i < (int)mdList.size(); i++ )
|
||||
{
|
||||
@ -258,7 +256,7 @@ bool RicCreateWellTargetsPickEventHandler::isGridSourceObject( const cvf::Object
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Vec3d RicCreateWellTargetsPickEventHandler::findHexElementIntersection( Rim3dView* view,
|
||||
cvf::Vec3d RicCreateWellTargetsPickEventHandler::findHexElementIntersection( gsl::not_null<Rim3dView*> view,
|
||||
const RiuPickItemInfo& pickItem,
|
||||
const cvf::Vec3d& domainRayOrigin,
|
||||
const cvf::Vec3d& domainRayEnd )
|
||||
@ -275,7 +273,7 @@ cvf::Vec3d RicCreateWellTargetsPickEventHandler::findHexElementIntersection( Rim
|
||||
{
|
||||
cellIndex = sourceInfo->m_cellFaceFromTriangleMapper->cellIndex( pickItem.faceIdx() );
|
||||
|
||||
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( view );
|
||||
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( view.get() );
|
||||
if ( eclipseView && eclipseView->mainGrid() )
|
||||
{
|
||||
RigGridBase* hitGrid = eclipseView->mainGrid()->gridByIndex( gridIndex );
|
||||
@ -290,7 +288,7 @@ cvf::Vec3d RicCreateWellTargetsPickEventHandler::findHexElementIntersection( Rim
|
||||
{
|
||||
size_t elementIndex = femSourceInfo->triangleToElmMapper()->elementIndex( pickItem.faceIdx() );
|
||||
|
||||
RimGeoMechView* geoMechView = dynamic_cast<RimGeoMechView*>( view );
|
||||
RimGeoMechView* geoMechView = dynamic_cast<RimGeoMechView*>( view.get() );
|
||||
if ( geoMechView && geoMechView->femParts() )
|
||||
{
|
||||
RigFemPart* femPart = geoMechView->femParts()->part( femPartIndex );
|
||||
|
@ -22,6 +22,8 @@
|
||||
|
||||
#include "cafPdmPointer.h"
|
||||
|
||||
#include <gsl/gsl>
|
||||
|
||||
class RimWellPathGeometryDef;
|
||||
class RigWellPath;
|
||||
|
||||
@ -31,7 +33,7 @@ class RigWellPath;
|
||||
class RicCreateWellTargetsPickEventHandler : public Ric3dViewPickEventHandler
|
||||
{
|
||||
public:
|
||||
RicCreateWellTargetsPickEventHandler( RimWellPathGeometryDef* wellGeometryDef );
|
||||
RicCreateWellTargetsPickEventHandler( gsl::not_null<RimWellPathGeometryDef*> wellGeometryDef );
|
||||
~RicCreateWellTargetsPickEventHandler();
|
||||
|
||||
void registerAsPickEventHandler() override;
|
||||
@ -42,12 +44,12 @@ protected:
|
||||
|
||||
private:
|
||||
bool calculateAzimuthAndInclinationAtMd( double measuredDepth,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
gsl::not_null<const RigWellPath*> wellPathGeometry,
|
||||
double* azimuth,
|
||||
double* inclination ) const;
|
||||
|
||||
static bool isGridSourceObject( const cvf::Object* object );
|
||||
static cvf::Vec3d findHexElementIntersection( Rim3dView* view,
|
||||
static cvf::Vec3d findHexElementIntersection( gsl::not_null<Rim3dView*> view,
|
||||
const RiuPickItemInfo& pickItem,
|
||||
const cvf::Vec3d& domainRayOrigin,
|
||||
const cvf::Vec3d& domainRayEnd );
|
||||
|
@ -121,7 +121,7 @@ double RifFractureModelPerfsFrkExporter::computeMeasuredDepthForPosition( const
|
||||
{
|
||||
const RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
||||
|
||||
const std::vector<double>& mdValuesOfWellPath = wellPathGeometry->measureDepths();
|
||||
const std::vector<double>& mdValuesOfWellPath = wellPathGeometry->measuredDepths();
|
||||
const std::vector<double>& tvdValuesOfWellPath = wellPathGeometry->trueVerticalDepths();
|
||||
const double targetTvd = -position.z();
|
||||
|
||||
|
@ -178,9 +178,11 @@ RifWellPathImporter::WellData RifWellPathImporter::readJsonWellData( const QStri
|
||||
cvf::Vec3d vec3d( coordinateMap["east"].toDouble(),
|
||||
coordinateMap["north"].toDouble(),
|
||||
-( coordinateMap["tvd"].toDouble() - datumElevation ) );
|
||||
wellData.m_wellPathGeometry->m_wellPathPoints.push_back( vec3d );
|
||||
|
||||
double measuredDepth = coordinateMap["md"].toDouble();
|
||||
wellData.m_wellPathGeometry->m_measuredDepths.push_back( measuredDepth );
|
||||
|
||||
wellData.m_wellPathGeometry->addWellPathPoint( vec3d );
|
||||
wellData.m_wellPathGeometry->addMeasuredDepth( measuredDepth );
|
||||
}
|
||||
return wellData;
|
||||
}
|
||||
@ -225,8 +227,8 @@ void RifWellPathImporter::readAllAsciiWellData( const QString& filePath )
|
||||
}
|
||||
|
||||
cvf::Vec3d wellPoint( x, y, -tvd );
|
||||
fileWellDataArray.back().m_wellPathGeometry->m_wellPathPoints.push_back( wellPoint );
|
||||
fileWellDataArray.back().m_wellPathGeometry->m_measuredDepths.push_back( md );
|
||||
fileWellDataArray.back().m_wellPathGeometry->addWellPathPoint( wellPoint );
|
||||
fileWellDataArray.back().m_wellPathGeometry->addMeasuredDepth( md );
|
||||
|
||||
hasReadWellPointInCurrentWell = true;
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ void RigFemPartResultsCollection::setActiveFormationNames( RigFormationNames* ac
|
||||
RimWellLogPlotCollection* plotCollection = project->mainPlotCollection()->wellLogPlotCollection();
|
||||
if ( plotCollection )
|
||||
{
|
||||
for ( RimWellLogPlot* wellLogPlot : plotCollection->wellLogPlots )
|
||||
for ( auto wellLogPlot : plotCollection->wellLogPlots() )
|
||||
{
|
||||
wellLogPlot->loadDataAndUpdate();
|
||||
}
|
||||
|
@ -45,21 +45,19 @@ Riv3dWellLogCurveGeometryGenerator::Riv3dWellLogCurveGeometryGenerator( RimWellP
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Riv3dWellLogCurveGeometryGenerator::createCurveDrawables( const caf::DisplayCoordTransform* displayCoordTransform,
|
||||
void Riv3dWellLogCurveGeometryGenerator::createCurveDrawables( gsl::not_null<const caf::DisplayCoordTransform*> displayCoordTransform,
|
||||
const cvf::BoundingBox& wellPathClipBoundingBox,
|
||||
const Rim3dWellLogCurve* rim3dWellLogCurve,
|
||||
gsl::not_null<const Rim3dWellLogCurve*> wellLogCurve,
|
||||
double planeOffsetFromWellPathCenter,
|
||||
double planeWidth,
|
||||
const std::vector<cvf::Vec3d>& drawSurfaceVertices,
|
||||
int currentTimeStep )
|
||||
{
|
||||
CVF_ASSERT( rim3dWellLogCurve );
|
||||
|
||||
// Make sure all drawables are cleared in case we return early to avoid a
|
||||
// previous drawable being "stuck" when changing result type.
|
||||
clearCurvePointsAndGeometry();
|
||||
|
||||
float curveUIRange = rim3dWellLogCurve->maxCurveUIValue() - rim3dWellLogCurve->minCurveUIValue();
|
||||
float curveUIRange = wellLogCurve->maxCurveUIValue() - wellLogCurve->minCurveUIValue();
|
||||
if ( curveUIRange < 1.0e-6f )
|
||||
{
|
||||
return;
|
||||
@ -67,19 +65,21 @@ void Riv3dWellLogCurveGeometryGenerator::createCurveDrawables( const caf::Displa
|
||||
|
||||
std::vector<double> resultValues;
|
||||
std::vector<double> resultMds;
|
||||
if ( rim3dWellLogCurve->followAnimationTimeStep() )
|
||||
if ( wellLogCurve->followAnimationTimeStep() )
|
||||
{
|
||||
rim3dWellLogCurve->curveValuesAndMdsAtTimeStep( &resultValues, &resultMds, currentTimeStep );
|
||||
wellLogCurve->curveValuesAndMdsAtTimeStep( &resultValues, &resultMds, currentTimeStep );
|
||||
}
|
||||
else
|
||||
{
|
||||
rim3dWellLogCurve->curveValuesAndMds( &resultValues, &resultMds );
|
||||
wellLogCurve->curveValuesAndMds( &resultValues, &resultMds );
|
||||
}
|
||||
|
||||
m_planeWidth = planeWidth;
|
||||
|
||||
if ( !wellPathGeometry() ) return;
|
||||
if ( wellPathGeometry()->m_wellPathPoints.empty() ) return;
|
||||
auto wellPathGeometry = this->wellPathGeometry();
|
||||
if ( !wellPathGeometry ) return;
|
||||
|
||||
if ( wellPathGeometry->wellPathPoints().empty() ) return;
|
||||
if ( !wellPathClipBoundingBox.isValid() ) return;
|
||||
|
||||
if ( resultValues.empty() ) return;
|
||||
@ -88,7 +88,7 @@ void Riv3dWellLogCurveGeometryGenerator::createCurveDrawables( const caf::Displa
|
||||
RimWellPathCollection* wellPathCollection = nullptr;
|
||||
m_wellPath->firstAncestorOrThisOfTypeAsserted( wellPathCollection );
|
||||
|
||||
cvf::Vec3d clipLocation = wellPathGeometry()->m_wellPathPoints.front();
|
||||
cvf::Vec3d clipLocation = wellPathGeometry->wellPathPoints().front();
|
||||
if ( wellPathCollection->wellPathClip )
|
||||
{
|
||||
double clipZDistance = wellPathCollection->wellPathClipZDistance;
|
||||
@ -97,20 +97,19 @@ void Riv3dWellLogCurveGeometryGenerator::createCurveDrawables( const caf::Displa
|
||||
clipLocation = displayCoordTransform->transformToDisplayCoord( clipLocation );
|
||||
|
||||
std::vector<cvf::Vec3d> displayCoords =
|
||||
displayCoordTransform->transformToDisplayCoords( wellPathGeometry()->m_wellPathPoints );
|
||||
displayCoordTransform->transformToDisplayCoords( wellPathGeometry->wellPathPoints() );
|
||||
|
||||
std::vector<cvf::Vec3d> wellPathCurveNormals =
|
||||
RigWellPathGeometryTools::calculateLineSegmentNormals( displayCoords,
|
||||
rim3dWellLogCurve->drawPlaneAngle(
|
||||
rim3dWellLogCurve->drawPlane() ) );
|
||||
wellLogCurve->drawPlaneAngle( wellLogCurve->drawPlane() ) );
|
||||
|
||||
std::vector<cvf::Vec3d> interpolatedWellPathPoints;
|
||||
std::vector<cvf::Vec3d> interpolatedCurveNormals;
|
||||
// Iterate from bottom of well path and up to be able to stop at given Z max clipping height
|
||||
for ( auto md = resultMds.rbegin(); md != resultMds.rend(); md++ )
|
||||
{
|
||||
cvf::Vec3d point = wellPathGeometry()->interpolatedVectorValuesAlongWellPath( displayCoords, *md );
|
||||
cvf::Vec3d normal = wellPathGeometry()->interpolatedVectorValuesAlongWellPath( wellPathCurveNormals, *md );
|
||||
cvf::Vec3d point = wellPathGeometry->interpolatedVectorValuesAlongWellPath( displayCoords, *md );
|
||||
cvf::Vec3d normal = wellPathGeometry->interpolatedVectorValuesAlongWellPath( wellPathCurveNormals, *md );
|
||||
if ( point.z() > clipLocation.z() ) break;
|
||||
|
||||
interpolatedWellPathPoints.push_back( point );
|
||||
@ -129,8 +128,8 @@ void Riv3dWellLogCurveGeometryGenerator::createCurveDrawables( const caf::Displa
|
||||
double maxVisibleResult = -std::numeric_limits<double>::max();
|
||||
double minVisibleResult = std::numeric_limits<double>::max();
|
||||
|
||||
double minCurveValue = rim3dWellLogCurve->minCurveUIValue();
|
||||
double maxCurveValue = rim3dWellLogCurve->maxCurveUIValue();
|
||||
double minCurveValue = wellLogCurve->minCurveUIValue();
|
||||
double maxCurveValue = wellLogCurve->maxCurveUIValue();
|
||||
|
||||
double curveEpsilon = 1.0e-6;
|
||||
|
||||
|
@ -24,6 +24,8 @@
|
||||
|
||||
#include "cafPdmPointer.h"
|
||||
|
||||
#include <gsl/gsl>
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace caf
|
||||
@ -46,9 +48,9 @@ public:
|
||||
typedef std::pair<cvf::Vec3d, double> PointValuePair;
|
||||
Riv3dWellLogCurveGeometryGenerator( RimWellPath* wellPath );
|
||||
|
||||
void createCurveDrawables( const caf::DisplayCoordTransform* displayCoordTransform,
|
||||
void createCurveDrawables( gsl::not_null<const caf::DisplayCoordTransform*> displayCoordTransform,
|
||||
const cvf::BoundingBox& wellPathClipBoundingBox,
|
||||
const Rim3dWellLogCurve* rim3dWellLogCurve,
|
||||
gsl::not_null<const Rim3dWellLogCurve*> wellLogCurve,
|
||||
double planeOffsetFromWellPathCenter,
|
||||
double planeWidth,
|
||||
const std::vector<cvf::Vec3d>& drawSurfaceVertices,
|
||||
|
@ -57,7 +57,7 @@ bool Riv3dWellLogDrawSurfaceGenerator::createDrawSurface( const caf::DisplayCoor
|
||||
|
||||
clearGeometry();
|
||||
|
||||
if ( !wellPathGeometry() || wellPathGeometry()->m_measuredDepths.empty() )
|
||||
if ( !wellPathGeometry() || wellPathGeometry()->measuredDepths().empty() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -72,7 +72,7 @@ bool Riv3dWellLogDrawSurfaceGenerator::createDrawSurface( const caf::DisplayCoor
|
||||
|
||||
std::vector<cvf::Vec3d> wellPathDisplayCoords;
|
||||
{
|
||||
std::vector<cvf::Vec3d> domainCoords = wellPathGeometry()->m_wellPathPoints;
|
||||
const std::vector<cvf::Vec3d>& domainCoords = wellPathGeometry()->wellPathPoints();
|
||||
if ( domainCoords.size() < (size_t)2 )
|
||||
{
|
||||
// Need at least two well path points to create a valid path.
|
||||
@ -193,8 +193,8 @@ void Riv3dWellLogDrawSurfaceGenerator::createCurveNormalVectors( const caf::Disp
|
||||
std::vector<cvf::Vec3d> interpolatedWellPathPoints;
|
||||
std::vector<cvf::Vec3d> interpolatedWellPathNormals;
|
||||
|
||||
double firstMd = wellPathGeometry()->m_measuredDepths.at( clipStartIndex );
|
||||
double lastMd = wellPathGeometry()->m_measuredDepths.back();
|
||||
double firstMd = wellPathGeometry()->measuredDepths().at( clipStartIndex );
|
||||
double lastMd = wellPathGeometry()->measuredDepths().back();
|
||||
|
||||
double md = lastMd;
|
||||
while ( md >= firstMd )
|
||||
|
@ -104,7 +104,7 @@ void RivWellConnectionFactorPartMgr::appendDynamicGeometryPartsToModel( cvf::Mod
|
||||
std::vector<WellPathCellIntersectionInfo> wellPathCellIntersections;
|
||||
{
|
||||
RigEclipseWellLogExtractor* extractor =
|
||||
RiaExtractionTools::wellLogExtractorEclipseCase( m_rimWellPath, eclipseCase );
|
||||
RiaExtractionTools::findOrCreateWellLogExtractor( m_rimWellPath, eclipseCase );
|
||||
if ( extractor )
|
||||
{
|
||||
wellPathCellIntersections = extractor->cellIntersectionInfosAlongWellPath();
|
||||
|
@ -100,7 +100,7 @@ bool RivWellPathPartMgr::isWellPathWithinBoundingBox( const cvf::BoundingBox& we
|
||||
{
|
||||
if ( !m_rimWellPath->wellPathGeometry() ) return false;
|
||||
|
||||
const std::vector<cvf::Vec3d>& wellpathCenterLine = m_rimWellPath->wellPathGeometry()->m_wellPathPoints;
|
||||
const std::vector<cvf::Vec3d>& wellpathCenterLine = m_rimWellPath->wellPathGeometry()->wellPathPoints();
|
||||
if ( wellpathCenterLine.size() < 2 ) return false;
|
||||
|
||||
// Skip visualization if outside the domain of this case
|
||||
@ -430,7 +430,7 @@ void RivWellPathPartMgr::appendPerforationsToModel( cvf::ModelBasicList*
|
||||
}
|
||||
|
||||
// Since we're using the index of measured depths to find the index of a point, ensure they're equal
|
||||
CVF_ASSERT( wellPathGeometry->m_measuredDepths.size() == wellPathGeometry->m_wellPathPoints.size() );
|
||||
CVF_ASSERT( wellPathGeometry->measuredDepths().size() == wellPathGeometry->wellPathPoints().size() );
|
||||
|
||||
double wellPathRadius = this->wellPathRadius( characteristicCellSize, wellPathCollection );
|
||||
double perforationRadius = wellPathRadius * 1.1;
|
||||
@ -652,7 +652,7 @@ void RivWellPathPartMgr::buildWellPathParts( const caf::DisplayCoordTransform* d
|
||||
RigWellPath* wellPathGeometry = m_rimWellPath->wellPathGeometry();
|
||||
if ( !wellPathGeometry ) return;
|
||||
|
||||
const std::vector<cvf::Vec3d>& wellpathCenterLine = wellPathGeometry->m_wellPathPoints;
|
||||
const std::vector<cvf::Vec3d>& wellpathCenterLine = wellPathGeometry->wellPathPoints();
|
||||
|
||||
if ( wellpathCenterLine.size() < 2 ) return;
|
||||
|
||||
|
@ -64,10 +64,14 @@ double RivWellPathSourceInfo::measuredDepth( size_t triangleIndex, const cvf::Ve
|
||||
size_t firstSegmentIndex = cvf::UNDEFINED_SIZE_T;
|
||||
double norm = 0.0;
|
||||
|
||||
CAF_ASSERT( m_wellPath.notNull() );
|
||||
auto wellPathGeometry = m_wellPath->wellPathGeometry();
|
||||
CAF_ASSERT( wellPathGeometry );
|
||||
|
||||
normalizedIntersection( triangleIndex, globalIntersectionInDomain, &firstSegmentIndex, &norm );
|
||||
|
||||
double firstDepth = m_wellPath->wellPathGeometry()->m_measuredDepths[firstSegmentIndex];
|
||||
double secDepth = m_wellPath->wellPathGeometry()->m_measuredDepths[firstSegmentIndex + 1];
|
||||
double firstDepth = wellPathGeometry->measuredDepths()[firstSegmentIndex];
|
||||
double secDepth = wellPathGeometry->measuredDepths()[firstSegmentIndex + 1];
|
||||
|
||||
return firstDepth * ( 1.0 - norm ) + norm * secDepth;
|
||||
}
|
||||
@ -81,10 +85,14 @@ cvf::Vec3d RivWellPathSourceInfo::closestPointOnCenterLine( size_t tr
|
||||
size_t firstSegmentIndex = cvf::UNDEFINED_SIZE_T;
|
||||
double norm = 0.0;
|
||||
|
||||
CAF_ASSERT( m_wellPath.notNull() );
|
||||
auto wellPathGeometry = m_wellPath->wellPathGeometry();
|
||||
CAF_ASSERT( wellPathGeometry );
|
||||
|
||||
normalizedIntersection( triangleIndex, globalIntersectionInDomain, &firstSegmentIndex, &norm );
|
||||
|
||||
cvf::Vec3d firstDepth = m_wellPath->wellPathGeometry()->m_wellPathPoints[firstSegmentIndex];
|
||||
cvf::Vec3d secDepth = m_wellPath->wellPathGeometry()->m_wellPathPoints[firstSegmentIndex + 1];
|
||||
cvf::Vec3d firstDepth = wellPathGeometry->wellPathPoints()[firstSegmentIndex];
|
||||
cvf::Vec3d secDepth = wellPathGeometry->wellPathPoints()[firstSegmentIndex + 1];
|
||||
|
||||
return firstDepth * ( 1.0 - norm ) + norm * secDepth;
|
||||
}
|
||||
@ -97,11 +105,14 @@ void RivWellPathSourceInfo::normalizedIntersection( size_t triangleIn
|
||||
size_t* firstSegmentIndex,
|
||||
double* normalizedSegmentIntersection ) const
|
||||
{
|
||||
size_t segIndex = segmentIndex( triangleIndex );
|
||||
RigWellPath* rigWellPath = m_wellPath->wellPathGeometry();
|
||||
CAF_ASSERT( m_wellPath.notNull() );
|
||||
auto wellPathGeometry = m_wellPath->wellPathGeometry();
|
||||
CAF_ASSERT( wellPathGeometry );
|
||||
|
||||
cvf::Vec3d segmentStart = rigWellPath->m_wellPathPoints[segIndex];
|
||||
cvf::Vec3d segmentEnd = rigWellPath->m_wellPathPoints[segIndex + 1];
|
||||
size_t segIndex = segmentIndex( triangleIndex );
|
||||
|
||||
cvf::Vec3d segmentStart = wellPathGeometry->wellPathPoints()[segIndex];
|
||||
cvf::Vec3d segmentEnd = wellPathGeometry->wellPathPoints()[segIndex + 1];
|
||||
|
||||
double norm = 0.0;
|
||||
cvf::GeometryTools::projectPointOnLine( segmentStart, segmentEnd, globalIntersectionInDomain, &norm );
|
||||
|
@ -24,6 +24,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RimCellEdgeColors.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSimWellInView.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSimWellInViewCollection.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSimWellInViewTools.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimAbstractWellPath.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimWellPath.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimFileWellPath.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimModeledWellPath.h
|
||||
@ -204,6 +205,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RimCellEdgeColors.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSimWellInView.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSimWellInViewCollection.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSimWellInViewTools.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimAbstractWellPath.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimWellPath.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimFileWellPath.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimModeledWellPath.cpp
|
||||
|
@ -81,7 +81,8 @@ void RimCompletionCellIntersectionCalc::calculateCompletionTypeResult( RimEclips
|
||||
{
|
||||
auto intersectedCells =
|
||||
RigWellPathIntersectionTools::findIntersectedGlobalCellIndices( eclipseCaseData,
|
||||
wellPath->wellPathGeometry()->m_wellPathPoints );
|
||||
wellPath->wellPathGeometry()
|
||||
->wellPathPoints() );
|
||||
|
||||
for ( auto& intersection : intersectedCells )
|
||||
{
|
||||
|
@ -68,8 +68,8 @@ void RimFishboneWellPathCollection::importCompletionsFromFile( const QStringList
|
||||
RifWellPathImporter::WellData wellData = wellPathImporter.readWellData( filePath, i );
|
||||
RimFishboneWellPath* wellCompletion = new RimFishboneWellPath();
|
||||
wellCompletion->setName( wellData.m_name );
|
||||
wellCompletion->setCoordinates( wellData.m_wellPathGeometry->m_wellPathPoints );
|
||||
wellCompletion->setMeasuredDepths( wellData.m_wellPathGeometry->m_measuredDepths );
|
||||
wellCompletion->setCoordinates( wellData.m_wellPathGeometry->wellPathPoints() );
|
||||
wellCompletion->setMeasuredDepths( wellData.m_wellPathGeometry->measuredDepths() );
|
||||
appendCompletion( wellCompletion );
|
||||
}
|
||||
}
|
||||
|
@ -868,18 +868,12 @@ void RimFractureModel::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
|
||||
if ( myAttr )
|
||||
{
|
||||
RimWellPath* rimWellPath = nullptr;
|
||||
this->firstAncestorOrThisOfType( rimWellPath );
|
||||
if ( !rimWellPath ) return;
|
||||
RimWellPath* wellPath = nullptr;
|
||||
this->firstAncestorOrThisOfType( wellPath );
|
||||
if ( !wellPath ) return;
|
||||
|
||||
RigWellPath* wellPathGeo = rimWellPath->wellPathGeometry();
|
||||
if ( !wellPathGeo ) return;
|
||||
|
||||
if ( wellPathGeo->m_measuredDepths.size() > 1 )
|
||||
{
|
||||
myAttr->m_minimum = wellPathGeo->m_measuredDepths.front();
|
||||
myAttr->m_maximum = wellPathGeo->m_measuredDepths.back();
|
||||
}
|
||||
myAttr->m_minimum = wellPath->startMD();
|
||||
myAttr->m_maximum = wellPath->endMD();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -159,11 +159,8 @@ void RimMultipleValveLocations::computeRangesAndLocations()
|
||||
RimWellPath* wellPath = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted( wellPath );
|
||||
|
||||
RigWellPath* rigWellPathGeo = wellPath->wellPathGeometry();
|
||||
if ( rigWellPathGeo && rigWellPathGeo->m_measuredDepths.size() > 1 )
|
||||
{
|
||||
double firstWellPathMD = rigWellPathGeo->m_measuredDepths.front();
|
||||
double lastWellPathMD = rigWellPathGeo->m_measuredDepths.back();
|
||||
double firstWellPathMD = wellPath->startMD();
|
||||
double lastWellPathMD = wellPath->endMD();
|
||||
|
||||
double overlapStart = std::max( firstWellPathMD, m_rangeStart() );
|
||||
double overlapEnd = std::min( lastWellPathMD, m_rangeEnd() );
|
||||
@ -171,14 +168,12 @@ void RimMultipleValveLocations::computeRangesAndLocations()
|
||||
|
||||
if ( overlap )
|
||||
{
|
||||
for ( auto md :
|
||||
locationsFromStartSpacingAndCount( overlapStart, m_rangeValveSpacing, m_rangeValveCount ) )
|
||||
for ( auto md : locationsFromStartSpacingAndCount( overlapStart, m_rangeValveSpacing, m_rangeValveCount ) )
|
||||
{
|
||||
validMeasuredDepths.push_back( md );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_locationOfValves = validMeasuredDepths;
|
||||
}
|
||||
@ -433,13 +428,7 @@ double RimMultipleValveLocations::perforationEndMD() const
|
||||
RimWellPath* wellPath = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted( wellPath );
|
||||
|
||||
RigWellPath* rigWellPathGeo = wellPath->wellPathGeometry();
|
||||
if ( rigWellPathGeo && !rigWellPathGeo->m_measuredDepths.empty() )
|
||||
{
|
||||
double lastWellPathMD = rigWellPathGeo->m_measuredDepths.back();
|
||||
return lastWellPathMD;
|
||||
}
|
||||
return std::numeric_limits<double>::infinity();
|
||||
return wellPath->endMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -397,18 +397,12 @@ void RimPerforationInterval::defineEditorAttribute( const caf::PdmFieldHandle* f
|
||||
|
||||
if ( myAttr )
|
||||
{
|
||||
RimWellPath* rimWellPath = nullptr;
|
||||
this->firstAncestorOrThisOfType( rimWellPath );
|
||||
if ( !rimWellPath ) return;
|
||||
RimWellPath* wellPath = nullptr;
|
||||
this->firstAncestorOrThisOfType( wellPath );
|
||||
if ( !wellPath ) return;
|
||||
|
||||
RigWellPath* wellPathGeo = rimWellPath->wellPathGeometry();
|
||||
if ( !wellPathGeo ) return;
|
||||
|
||||
if ( wellPathGeo->m_measuredDepths.size() > 1 )
|
||||
{
|
||||
myAttr->m_minimum = wellPathGeo->m_measuredDepths.front();
|
||||
myAttr->m_maximum = wellPathGeo->m_measuredDepths.back();
|
||||
}
|
||||
myAttr->m_minimum = wellPath->startMD();
|
||||
myAttr->m_maximum = wellPath->endMD();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -134,10 +134,8 @@ std::vector<cvf::Vec3d> RimSimWellFracture::perforationLengthCenterLineCoords()
|
||||
|
||||
if ( !m_branchCenterLines.empty() && m_branchIndex < static_cast<int>( m_branchCenterLines.size() ) )
|
||||
{
|
||||
RigWellPath wellPathGeometry;
|
||||
|
||||
wellPathGeometry.m_wellPathPoints = m_branchCenterLines[m_branchIndex].wellPathPoints();
|
||||
wellPathGeometry.m_measuredDepths = m_branchCenterLines[m_branchIndex].measuredDepths();
|
||||
RigWellPath wellPathGeometry( m_branchCenterLines[m_branchIndex].wellPathPoints(),
|
||||
m_branchCenterLines[m_branchIndex].measuredDepths() );
|
||||
|
||||
double startMd = m_location - perforationLength() / 2.0;
|
||||
double endMd = m_location + perforationLength() / 2.0;
|
||||
|
@ -293,18 +293,12 @@ void RimWellPathFracture::defineEditorAttribute( const caf::PdmFieldHandle* fiel
|
||||
|
||||
if ( myAttr )
|
||||
{
|
||||
RimWellPath* rimWellPath = nullptr;
|
||||
this->firstAncestorOrThisOfType( rimWellPath );
|
||||
if ( !rimWellPath ) return;
|
||||
RimWellPath* wellPath = nullptr;
|
||||
this->firstAncestorOrThisOfType( wellPath );
|
||||
if ( !wellPath ) return;
|
||||
|
||||
RigWellPath* wellPathGeo = rimWellPath->wellPathGeometry();
|
||||
if ( !wellPathGeo ) return;
|
||||
|
||||
if ( wellPathGeo->m_measuredDepths.size() > 1 )
|
||||
{
|
||||
myAttr->m_minimum = wellPathGeo->m_measuredDepths.front();
|
||||
myAttr->m_maximum = wellPathGeo->m_measuredDepths.back();
|
||||
}
|
||||
myAttr->m_minimum = wellPath->startMD();
|
||||
myAttr->m_maximum = wellPath->endMD();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -572,16 +572,11 @@ void RimWellPathValve::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
}
|
||||
else
|
||||
{
|
||||
RimWellPath* rimWellPath = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted( rimWellPath );
|
||||
RigWellPath* wellPathGeo = rimWellPath->wellPathGeometry();
|
||||
if ( !wellPathGeo ) return;
|
||||
RimWellPath* wellPath = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted( wellPath );
|
||||
|
||||
if ( wellPathGeo->m_measuredDepths.size() > 1 )
|
||||
{
|
||||
minimumValue = wellPathGeo->measureDepths().front();
|
||||
maximumValue = wellPathGeo->measureDepths().back();
|
||||
}
|
||||
minimumValue = wellPath->startMD();
|
||||
maximumValue = wellPath->endMD();
|
||||
}
|
||||
myAttr->m_minimum = minimumValue;
|
||||
myAttr->m_maximum = maximumValue;
|
||||
|
@ -190,7 +190,7 @@ void Rim3dWellLogExtractionCurve::curveValuesAndMdsAtTimeStep( std::vector<doubl
|
||||
if ( eclipseCase )
|
||||
{
|
||||
cvf::ref<RigEclipseWellLogExtractor> eclExtractor =
|
||||
RiaExtractionTools::wellLogExtractorEclipseCase( wellPath, eclipseCase );
|
||||
RiaExtractionTools::findOrCreateWellLogExtractor( wellPath, eclipseCase );
|
||||
if ( eclExtractor.notNull() )
|
||||
{
|
||||
*measuredDepthValues = eclExtractor->cellIntersectionMDs();
|
||||
@ -214,7 +214,7 @@ void Rim3dWellLogExtractionCurve::curveValuesAndMdsAtTimeStep( std::vector<doubl
|
||||
if ( geomCase )
|
||||
{
|
||||
cvf::ref<RigGeoMechWellLogExtractor> geomExtractor =
|
||||
RiaExtractionTools::wellLogExtractorGeoMechCase( wellPath, geomCase );
|
||||
RiaExtractionTools::findOrCreateWellLogExtractor( wellPath, geomCase );
|
||||
|
||||
if ( geomExtractor.notNull() )
|
||||
{
|
||||
|
29
ApplicationCode/ProjectDataModel/RimAbstractWellPath.cpp
Normal file
29
ApplicationCode/ProjectDataModel/RimAbstractWellPath.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
#include "RimAbstractWellPath.h"
|
||||
|
||||
#include "RigWellPath.h"
|
||||
|
||||
CAF_PDM_ABSTRACT_SOURCE_INIT( RimAbstractWellPath, "AbstractWellPath" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimAbstractWellPath::startMD() const
|
||||
{
|
||||
if ( wellPathGeometry() )
|
||||
{
|
||||
return wellPathGeometry()->measuredDepths().front();
|
||||
}
|
||||
return std::numeric_limits<double>::infinity();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimAbstractWellPath::endMD() const
|
||||
{
|
||||
if ( wellPathGeometry() )
|
||||
{
|
||||
return wellPathGeometry()->measuredDepths().back();
|
||||
}
|
||||
return std::numeric_limits<double>::infinity();
|
||||
}
|
36
ApplicationCode/ProjectDataModel/RimAbstractWellPath.h
Normal file
36
ApplicationCode/ProjectDataModel/RimAbstractWellPath.h
Normal file
@ -0,0 +1,36 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2020- Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
#pragma once
|
||||
|
||||
#include "RimWellPathComponentInterface.h"
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
class RigWellPath;
|
||||
|
||||
class RimAbstractWellPath : public caf::PdmObject, public RimWellPathComponentInterface
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
virtual RigWellPath* wellPathGeometry() = 0;
|
||||
virtual const RigWellPath* wellPathGeometry() const = 0;
|
||||
|
||||
double startMD() const override;
|
||||
double endMD() const override;
|
||||
};
|
@ -434,7 +434,7 @@ std::vector<std::vector<cvf::Vec3d>> RimExtrudedCurveIntersection::polyLines( cv
|
||||
{
|
||||
if ( wellPath() && wellPath->wellPathGeometry() )
|
||||
{
|
||||
lines.push_back( wellPath->wellPathGeometry()->m_wellPathPoints );
|
||||
lines.push_back( wellPath->wellPathGeometry()->wellPathPoints() );
|
||||
RimCase* ownerCase = nullptr;
|
||||
this->firstAncestorOrThisOfType( ownerCase );
|
||||
if ( ownerCase )
|
||||
@ -550,7 +550,7 @@ void RimExtrudedCurveIntersection::updateSimulationWellCenterline() const
|
||||
auto branches = simulationWell->wellPipeBranches();
|
||||
for ( const auto& branch : branches )
|
||||
{
|
||||
m_simulationWellBranchCenterlines.push_back( branch->m_wellPathPoints );
|
||||
m_simulationWellBranchCenterlines.push_back( branch->wellPathPoints() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ RimFractureModelPlotCollection* RimMainPlotCollection::fractureModelPlotCollecti
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimMainPlotCollection::deleteAllContainedObjects()
|
||||
{
|
||||
m_wellLogPlotCollection()->wellLogPlots.deleteAllChildObjects();
|
||||
m_wellLogPlotCollection()->deleteAllPlots();
|
||||
m_rftPlotCollection()->deleteAllPlots();
|
||||
m_pltPlotCollection()->deleteAllPlots();
|
||||
m_summaryPlotCollection()->deleteAllPlots();
|
||||
|
@ -56,19 +56,20 @@ RimPltPlotCollection::~RimPltPlotCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigEclipseWellLogExtractor* RimPltPlotCollection::findOrCreateSimWellExtractor( const QString& simWellName,
|
||||
RigEclipseWellLogExtractor*
|
||||
RimPltPlotCollection::findOrCreateSimWellExtractor( const QString& simWellName,
|
||||
const QString& caseUserDescription,
|
||||
const RigWellPath* wellPathGeom,
|
||||
const RigEclipseCaseData* eclCaseData )
|
||||
gsl::not_null<const RigWellPath*> wellPathGeometry,
|
||||
gsl::not_null<const RigEclipseCaseData*> eclCaseData )
|
||||
{
|
||||
if ( !( wellPathGeom && eclCaseData ) )
|
||||
if ( !( wellPathGeometry && eclCaseData ) )
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
for ( size_t exIdx = 0; exIdx < m_extractors.size(); ++exIdx )
|
||||
{
|
||||
if ( m_extractors[exIdx]->caseData() == eclCaseData && m_extractors[exIdx]->wellPathData() == wellPathGeom )
|
||||
if ( m_extractors[exIdx]->caseData() == eclCaseData && m_extractors[exIdx]->wellPathGeometry() == wellPathGeometry )
|
||||
{
|
||||
return m_extractors[exIdx].p();
|
||||
}
|
||||
@ -76,7 +77,7 @@ RigEclipseWellLogExtractor* RimPltPlotCollection::findOrCreateSimWellExtractor(
|
||||
|
||||
std::string errorIdName = ( simWellName + " " + caseUserDescription ).toStdString();
|
||||
cvf::ref<RigEclipseWellLogExtractor> extractor =
|
||||
new RigEclipseWellLogExtractor( eclCaseData, wellPathGeom, errorIdName );
|
||||
new RigEclipseWellLogExtractor( eclCaseData, wellPathGeometry, errorIdName );
|
||||
m_extractors.push_back( extractor.p() );
|
||||
|
||||
return extractor.p();
|
||||
@ -85,7 +86,8 @@ RigEclipseWellLogExtractor* RimPltPlotCollection::findOrCreateSimWellExtractor(
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigEclipseWellLogExtractor* RimPltPlotCollection::findOrCreateExtractor( RimWellPath* wellPath, RimEclipseCase* eclCase )
|
||||
RigEclipseWellLogExtractor* RimPltPlotCollection::findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath,
|
||||
gsl::not_null<RimEclipseCase*> eclCase )
|
||||
{
|
||||
if ( !( wellPath && eclCase && wellPath->wellPathGeometry() && eclCase->eclipseCaseData() ) )
|
||||
{
|
||||
@ -93,10 +95,10 @@ RigEclipseWellLogExtractor* RimPltPlotCollection::findOrCreateExtractor( RimWell
|
||||
}
|
||||
|
||||
RigEclipseCaseData* eclCaseData = eclCase->eclipseCaseData();
|
||||
RigWellPath* wellPathGeom = wellPath->wellPathGeometry();
|
||||
RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
||||
for ( size_t exIdx = 0; exIdx < m_extractors.size(); ++exIdx )
|
||||
{
|
||||
if ( m_extractors[exIdx]->caseData() == eclCaseData && m_extractors[exIdx]->wellPathData() == wellPathGeom )
|
||||
if ( m_extractors[exIdx]->caseData() == eclCaseData && m_extractors[exIdx]->wellPathGeometry() == wellPathGeometry )
|
||||
{
|
||||
return m_extractors[exIdx].p();
|
||||
}
|
||||
@ -104,7 +106,7 @@ RigEclipseWellLogExtractor* RimPltPlotCollection::findOrCreateExtractor( RimWell
|
||||
|
||||
std::string errorIdName = ( wellPath->name() + " " + eclCase->caseUserDescription() ).toStdString();
|
||||
cvf::ref<RigEclipseWellLogExtractor> extractor =
|
||||
new RigEclipseWellLogExtractor( eclCaseData, wellPathGeom, errorIdName );
|
||||
new RigEclipseWellLogExtractor( eclCaseData, wellPathGeometry, errorIdName );
|
||||
m_extractors.push_back( extractor.p() );
|
||||
|
||||
return extractor.p();
|
||||
@ -113,7 +115,8 @@ RigEclipseWellLogExtractor* RimPltPlotCollection::findOrCreateExtractor( RimWell
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigGeoMechWellLogExtractor* RimPltPlotCollection::findOrCreateExtractor( RimWellPath* wellPath, RimGeoMechCase* geomCase )
|
||||
RigGeoMechWellLogExtractor* RimPltPlotCollection::findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath,
|
||||
gsl::not_null<RimGeoMechCase*> geomCase )
|
||||
{
|
||||
if ( !( wellPath && geomCase && wellPath->wellPathGeometry() && geomCase->geoMechData() ) )
|
||||
{
|
||||
@ -121,10 +124,11 @@ RigGeoMechWellLogExtractor* RimPltPlotCollection::findOrCreateExtractor( RimWell
|
||||
}
|
||||
|
||||
RigGeoMechCaseData* geomCaseData = geomCase->geoMechData();
|
||||
RigWellPath* wellPathGeom = wellPath->wellPathGeometry();
|
||||
RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
||||
for ( size_t exIdx = 0; exIdx < m_geomExtractors.size(); ++exIdx )
|
||||
{
|
||||
if ( m_geomExtractors[exIdx]->caseData() == geomCaseData && m_geomExtractors[exIdx]->wellPathData() == wellPathGeom )
|
||||
if ( m_geomExtractors[exIdx]->caseData() == geomCaseData &&
|
||||
m_geomExtractors[exIdx]->wellPathGeometry() == wellPathGeometry )
|
||||
{
|
||||
return m_geomExtractors[exIdx].p();
|
||||
}
|
||||
@ -132,7 +136,7 @@ RigGeoMechWellLogExtractor* RimPltPlotCollection::findOrCreateExtractor( RimWell
|
||||
|
||||
std::string errorIdName = ( wellPath->name() + " " + geomCase->caseUserDescription() ).toStdString();
|
||||
cvf::ref<RigGeoMechWellLogExtractor> extractor =
|
||||
new RigGeoMechWellLogExtractor( geomCaseData, wellPathGeom, errorIdName );
|
||||
new RigGeoMechWellLogExtractor( geomCaseData, wellPathGeometry, errorIdName );
|
||||
m_geomExtractors.push_back( extractor.p() );
|
||||
|
||||
return extractor.p();
|
||||
@ -141,11 +145,11 @@ RigGeoMechWellLogExtractor* RimPltPlotCollection::findOrCreateExtractor( RimWell
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPltPlotCollection::removeExtractors( const RigWellPath* wellPath )
|
||||
void RimPltPlotCollection::removeExtractors( const RigWellPath* wellPathGeometry )
|
||||
{
|
||||
for ( int eIdx = (int)m_extractors.size() - 1; eIdx >= 0; eIdx-- )
|
||||
{
|
||||
if ( m_extractors[eIdx]->wellPathData() == wellPath )
|
||||
if ( m_extractors[eIdx]->wellPathGeometry() == wellPathGeometry )
|
||||
{
|
||||
m_extractors.eraseAt( eIdx );
|
||||
}
|
||||
@ -153,7 +157,7 @@ void RimPltPlotCollection::removeExtractors( const RigWellPath* wellPath )
|
||||
|
||||
for ( int eIdx = (int)m_geomExtractors.size() - 1; eIdx >= 0; eIdx-- )
|
||||
{
|
||||
if ( m_geomExtractors[eIdx]->wellPathData() == wellPath )
|
||||
if ( m_geomExtractors[eIdx]->wellPathGeometry() == wellPathGeometry )
|
||||
{
|
||||
m_geomExtractors.eraseAt( eIdx );
|
||||
}
|
||||
@ -213,7 +217,7 @@ const std::vector<RimWellPltPlot*> RimPltPlotCollection::pltPlots() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPltPlotCollection::addPlot( RimWellPltPlot* newPlot )
|
||||
void RimPltPlotCollection::addPlot( gsl::not_null<RimWellPltPlot*> newPlot )
|
||||
{
|
||||
m_pltPlots.push_back( newPlot );
|
||||
}
|
||||
@ -221,7 +225,7 @@ void RimPltPlotCollection::addPlot( RimWellPltPlot* newPlot )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPltPlotCollection::removePlot( RimWellPltPlot* plot )
|
||||
void RimPltPlotCollection::removePlot( gsl::not_null<RimWellPltPlot*> plot )
|
||||
{
|
||||
m_pltPlots.removeChildObject( plot );
|
||||
updateAllRequiredEditors();
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include "cafPdmObject.h"
|
||||
#include "cvfCollection.h"
|
||||
|
||||
#include <gsl/gsl>
|
||||
|
||||
class RimWellLogPlot;
|
||||
class RigEclipseWellLogExtractor;
|
||||
class RigGeoMechWellLogExtractor;
|
||||
@ -50,11 +52,13 @@ public:
|
||||
|
||||
RigEclipseWellLogExtractor* findOrCreateSimWellExtractor( const QString& simWellName,
|
||||
const QString& caseUserDescription,
|
||||
const RigWellPath* wellPathGeom,
|
||||
const RigEclipseCaseData* eclCaseData );
|
||||
gsl::not_null<const RigWellPath*> wellPathGeom,
|
||||
gsl::not_null<const RigEclipseCaseData*> eclCaseData );
|
||||
|
||||
RigEclipseWellLogExtractor* findOrCreateExtractor( RimWellPath* wellPath, RimEclipseCase* eclCase );
|
||||
RigGeoMechWellLogExtractor* findOrCreateExtractor( RimWellPath* wellPath, RimGeoMechCase* eclCase );
|
||||
RigEclipseWellLogExtractor* findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath,
|
||||
gsl::not_null<RimEclipseCase*> eclCase );
|
||||
RigGeoMechWellLogExtractor* findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath,
|
||||
gsl::not_null<RimGeoMechCase*> eclCase );
|
||||
|
||||
void removeExtractors( const RigWellPath* wellPath );
|
||||
void removeExtractors( const RigEclipseCaseData* caseData );
|
||||
@ -62,8 +66,8 @@ public:
|
||||
void deleteAllExtractors();
|
||||
|
||||
const std::vector<RimWellPltPlot*> pltPlots() const;
|
||||
void addPlot( RimWellPltPlot* newPlot );
|
||||
void removePlot( RimWellPltPlot* plot );
|
||||
void addPlot( gsl::not_null<RimWellPltPlot*> newPlot );
|
||||
void removePlot( gsl::not_null<RimWellPltPlot*> plot );
|
||||
void deleteAllPlots();
|
||||
|
||||
private:
|
||||
|
@ -56,10 +56,11 @@ RimRftPlotCollection::~RimRftPlotCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigEclipseWellLogExtractor* RimRftPlotCollection::findOrCreateSimWellExtractor( const QString& simWellName,
|
||||
RigEclipseWellLogExtractor*
|
||||
RimRftPlotCollection::findOrCreateSimWellExtractor( const QString& simWellName,
|
||||
const QString& caseUserDescription,
|
||||
const RigWellPath* wellPathGeom,
|
||||
const RigEclipseCaseData* eclCaseData )
|
||||
gsl::not_null<const RigWellPath*> wellPathGeom,
|
||||
gsl::not_null<const RigEclipseCaseData*> eclCaseData )
|
||||
{
|
||||
if ( !( wellPathGeom && eclCaseData ) )
|
||||
{
|
||||
@ -68,7 +69,7 @@ RigEclipseWellLogExtractor* RimRftPlotCollection::findOrCreateSimWellExtractor(
|
||||
|
||||
for ( size_t exIdx = 0; exIdx < m_extractors.size(); ++exIdx )
|
||||
{
|
||||
if ( m_extractors[exIdx]->caseData() == eclCaseData && m_extractors[exIdx]->wellPathData() == wellPathGeom )
|
||||
if ( m_extractors[exIdx]->caseData() == eclCaseData && m_extractors[exIdx]->wellPathGeometry() == wellPathGeom )
|
||||
{
|
||||
return m_extractors[exIdx].p();
|
||||
}
|
||||
@ -85,18 +86,19 @@ RigEclipseWellLogExtractor* RimRftPlotCollection::findOrCreateSimWellExtractor(
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigEclipseWellLogExtractor* RimRftPlotCollection::findOrCreateExtractor( RimWellPath* wellPath, RimEclipseCase* eclCase )
|
||||
RigEclipseWellLogExtractor* RimRftPlotCollection::findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath,
|
||||
gsl::not_null<RimEclipseCase*> eclCase )
|
||||
{
|
||||
if ( !( wellPath && eclCase && wellPath->wellPathGeometry() && eclCase->eclipseCaseData() ) )
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RigEclipseCaseData* eclCaseData = eclCase->eclipseCaseData();
|
||||
RigWellPath* wellPathGeom = wellPath->wellPathGeometry();
|
||||
RigEclipseCaseData* caseData = eclCase->eclipseCaseData();
|
||||
RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
||||
for ( size_t exIdx = 0; exIdx < m_extractors.size(); ++exIdx )
|
||||
{
|
||||
if ( m_extractors[exIdx]->caseData() == eclCaseData && m_extractors[exIdx]->wellPathData() == wellPathGeom )
|
||||
if ( m_extractors[exIdx]->caseData() == caseData && m_extractors[exIdx]->wellPathGeometry() == wellPathGeometry )
|
||||
{
|
||||
return m_extractors[exIdx].p();
|
||||
}
|
||||
@ -104,7 +106,7 @@ RigEclipseWellLogExtractor* RimRftPlotCollection::findOrCreateExtractor( RimWell
|
||||
|
||||
std::string errorIdName = ( wellPath->name() + " " + eclCase->caseUserDescription() ).toStdString();
|
||||
cvf::ref<RigEclipseWellLogExtractor> extractor =
|
||||
new RigEclipseWellLogExtractor( eclCaseData, wellPathGeom, errorIdName );
|
||||
new RigEclipseWellLogExtractor( caseData, wellPathGeometry, errorIdName );
|
||||
m_extractors.push_back( extractor.p() );
|
||||
|
||||
return extractor.p();
|
||||
@ -113,18 +115,20 @@ RigEclipseWellLogExtractor* RimRftPlotCollection::findOrCreateExtractor( RimWell
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigGeoMechWellLogExtractor* RimRftPlotCollection::findOrCreateExtractor( RimWellPath* wellPath, RimGeoMechCase* geomCase )
|
||||
RigGeoMechWellLogExtractor* RimRftPlotCollection::findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath,
|
||||
gsl::not_null<RimGeoMechCase*> geomCase )
|
||||
{
|
||||
if ( !( wellPath && geomCase && wellPath->wellPathGeometry() && geomCase->geoMechData() ) )
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RigGeoMechCaseData* geomCaseData = geomCase->geoMechData();
|
||||
RigWellPath* wellPathGeom = wellPath->wellPathGeometry();
|
||||
RigGeoMechCaseData* caseData = geomCase->geoMechData();
|
||||
RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
||||
for ( size_t exIdx = 0; exIdx < m_geomExtractors.size(); ++exIdx )
|
||||
{
|
||||
if ( m_geomExtractors[exIdx]->caseData() == geomCaseData && m_geomExtractors[exIdx]->wellPathData() == wellPathGeom )
|
||||
if ( m_geomExtractors[exIdx]->caseData() == caseData &&
|
||||
m_geomExtractors[exIdx]->wellPathGeometry() == wellPathGeometry )
|
||||
{
|
||||
return m_geomExtractors[exIdx].p();
|
||||
}
|
||||
@ -132,7 +136,7 @@ RigGeoMechWellLogExtractor* RimRftPlotCollection::findOrCreateExtractor( RimWell
|
||||
|
||||
std::string errorIdName = ( wellPath->name() + " " + geomCase->caseUserDescription() ).toStdString();
|
||||
cvf::ref<RigGeoMechWellLogExtractor> extractor =
|
||||
new RigGeoMechWellLogExtractor( geomCaseData, wellPathGeom, errorIdName );
|
||||
new RigGeoMechWellLogExtractor( caseData, wellPathGeometry, errorIdName );
|
||||
m_geomExtractors.push_back( extractor.p() );
|
||||
|
||||
return extractor.p();
|
||||
@ -141,11 +145,11 @@ RigGeoMechWellLogExtractor* RimRftPlotCollection::findOrCreateExtractor( RimWell
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimRftPlotCollection::removeExtractors( const RigWellPath* wellPath )
|
||||
void RimRftPlotCollection::removeExtractors( const RigWellPath* wellPathGeometry )
|
||||
{
|
||||
for ( int eIdx = (int)m_extractors.size() - 1; eIdx >= 0; eIdx-- )
|
||||
{
|
||||
if ( m_extractors[eIdx]->wellPathData() == wellPath )
|
||||
if ( m_extractors[eIdx]->wellPathGeometry() == wellPathGeometry )
|
||||
{
|
||||
m_extractors.eraseAt( eIdx );
|
||||
}
|
||||
@ -153,7 +157,7 @@ void RimRftPlotCollection::removeExtractors( const RigWellPath* wellPath )
|
||||
|
||||
for ( int eIdx = (int)m_geomExtractors.size() - 1; eIdx >= 0; eIdx-- )
|
||||
{
|
||||
if ( m_geomExtractors[eIdx]->wellPathData() == wellPath )
|
||||
if ( m_geomExtractors[eIdx]->wellPathGeometry() == wellPathGeometry )
|
||||
{
|
||||
m_geomExtractors.eraseAt( eIdx );
|
||||
}
|
||||
@ -213,7 +217,7 @@ const std::vector<RimWellRftPlot*> RimRftPlotCollection::rftPlots() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimRftPlotCollection::addPlot( RimWellRftPlot* newPlot )
|
||||
void RimRftPlotCollection::addPlot( gsl::not_null<RimWellRftPlot*> newPlot )
|
||||
{
|
||||
m_rftPlots.push_back( newPlot );
|
||||
}
|
||||
@ -221,7 +225,7 @@ void RimRftPlotCollection::addPlot( RimWellRftPlot* newPlot )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimRftPlotCollection::removePlot( RimWellRftPlot* plot )
|
||||
void RimRftPlotCollection::removePlot( gsl::not_null<RimWellRftPlot*> plot )
|
||||
{
|
||||
m_rftPlots.removeChildObject( plot );
|
||||
updateAllRequiredEditors();
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include "cafPdmObject.h"
|
||||
#include "cvfCollection.h"
|
||||
|
||||
#include <gsl/gsl>
|
||||
|
||||
class RimWellLogPlot;
|
||||
class RigEclipseWellLogExtractor;
|
||||
class RigGeoMechWellLogExtractor;
|
||||
@ -50,11 +52,13 @@ public:
|
||||
|
||||
RigEclipseWellLogExtractor* findOrCreateSimWellExtractor( const QString& simWellName,
|
||||
const QString& caseUserDescription,
|
||||
const RigWellPath* wellPathGeom,
|
||||
const RigEclipseCaseData* eclCaseData );
|
||||
gsl::not_null<const RigWellPath*> wellPathGeom,
|
||||
gsl::not_null<const RigEclipseCaseData*> eclCaseData );
|
||||
|
||||
RigEclipseWellLogExtractor* findOrCreateExtractor( RimWellPath* wellPath, RimEclipseCase* eclCase );
|
||||
RigGeoMechWellLogExtractor* findOrCreateExtractor( RimWellPath* wellPath, RimGeoMechCase* eclCase );
|
||||
RigEclipseWellLogExtractor* findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath,
|
||||
gsl::not_null<RimEclipseCase*> eclCase );
|
||||
RigGeoMechWellLogExtractor* findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath,
|
||||
gsl::not_null<RimGeoMechCase*> eclCase );
|
||||
|
||||
void removeExtractors( const RigWellPath* wellPath );
|
||||
void removeExtractors( const RigEclipseCaseData* caseData );
|
||||
@ -62,8 +66,8 @@ public:
|
||||
void deleteAllExtractors();
|
||||
|
||||
const std::vector<RimWellRftPlot*> rftPlots() const;
|
||||
void addPlot( RimWellRftPlot* newPlot );
|
||||
void removePlot( RimWellRftPlot* plot );
|
||||
void addPlot( gsl::not_null<RimWellRftPlot*> newPlot );
|
||||
void removePlot( gsl::not_null<RimWellRftPlot*> plot );
|
||||
void deleteAllPlots();
|
||||
|
||||
private:
|
||||
|
@ -462,7 +462,7 @@ void RimWellLogExtractionCurve::extractData( bool* isUsingPseudoLength,
|
||||
{
|
||||
measuredDepthValues = eclExtractor->cellIntersectionMDs();
|
||||
tvDepthValues = eclExtractor->cellIntersectionTVDs();
|
||||
rkbDiff = eclExtractor->wellPathData()->rkbDiff();
|
||||
rkbDiff = eclExtractor->wellPathGeometry()->rkbDiff();
|
||||
|
||||
m_eclipseResultDefinition->loadResult();
|
||||
|
||||
@ -489,7 +489,7 @@ void RimWellLogExtractionCurve::extractData( bool* isUsingPseudoLength,
|
||||
{
|
||||
measuredDepthValues = geomExtractor->cellIntersectionMDs();
|
||||
tvDepthValues = geomExtractor->cellIntersectionTVDs();
|
||||
rkbDiff = geomExtractor->wellPathData()->rkbDiff();
|
||||
rkbDiff = geomExtractor->wellPathGeometry()->rkbDiff();
|
||||
|
||||
if ( measuredDepthValues.empty() )
|
||||
{
|
||||
|
@ -45,8 +45,8 @@ RimWellLogPlotCollection::RimWellLogPlotCollection()
|
||||
{
|
||||
CAF_PDM_InitObject( "Well Log Plots", ":/WellLogPlots16x16.png", "", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &wellLogPlots, "WellLogPlots", "", "", "", "" );
|
||||
wellLogPlots.uiCapability()->setUiHidden( true );
|
||||
CAF_PDM_InitFieldNoDefault( &m_wellLogPlots, "WellLogPlots", "", "", "", "" );
|
||||
m_wellLogPlots.uiCapability()->setUiHidden( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -54,25 +54,20 @@ RimWellLogPlotCollection::RimWellLogPlotCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellLogPlotCollection::~RimWellLogPlotCollection()
|
||||
{
|
||||
wellLogPlots.deleteAllChildObjects();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigEclipseWellLogExtractor* RimWellLogPlotCollection::findOrCreateSimWellExtractor( const QString& simWellName,
|
||||
RigEclipseWellLogExtractor*
|
||||
RimWellLogPlotCollection::findOrCreateSimWellExtractor( const QString& simWellName,
|
||||
const QString& caseUserDescription,
|
||||
const RigWellPath* wellPathGeom,
|
||||
const RigEclipseCaseData* eclCaseData )
|
||||
gsl::not_null<const RigWellPath*> wellPathGeometry,
|
||||
gsl::not_null<const RigEclipseCaseData*> eclCaseData )
|
||||
{
|
||||
if ( !( wellPathGeom && eclCaseData ) )
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
for ( size_t exIdx = 0; exIdx < m_extractors.size(); ++exIdx )
|
||||
{
|
||||
if ( m_extractors[exIdx]->caseData() == eclCaseData && m_extractors[exIdx]->wellPathData() == wellPathGeom )
|
||||
if ( m_extractors[exIdx]->caseData() == eclCaseData && m_extractors[exIdx]->wellPathGeometry() == wellPathGeometry )
|
||||
{
|
||||
return m_extractors[exIdx].p();
|
||||
}
|
||||
@ -80,7 +75,7 @@ RigEclipseWellLogExtractor* RimWellLogPlotCollection::findOrCreateSimWellExtract
|
||||
|
||||
std::string errorIdName = ( simWellName + " " + caseUserDescription ).toStdString();
|
||||
cvf::ref<RigEclipseWellLogExtractor> extractor =
|
||||
new RigEclipseWellLogExtractor( eclCaseData, wellPathGeom, errorIdName );
|
||||
new RigEclipseWellLogExtractor( eclCaseData, wellPathGeometry, errorIdName );
|
||||
m_extractors.push_back( extractor.p() );
|
||||
|
||||
return extractor.p();
|
||||
@ -89,18 +84,17 @@ RigEclipseWellLogExtractor* RimWellLogPlotCollection::findOrCreateSimWellExtract
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigEclipseWellLogExtractor* RimWellLogPlotCollection::findOrCreateExtractor( RimWellPath* wellPath, RimEclipseCase* eclCase )
|
||||
RigEclipseWellLogExtractor* RimWellLogPlotCollection::findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath,
|
||||
gsl::not_null<RimEclipseCase*> eclCase )
|
||||
{
|
||||
if ( !( wellPath && eclCase && wellPath->wellPathGeometry() && eclCase->eclipseCaseData() ) )
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RigEclipseCaseData* eclCaseData = eclCase->eclipseCaseData();
|
||||
RigWellPath* wellPathGeom = wellPath->wellPathGeometry();
|
||||
auto wellPathGeometry = wellPath->wellPathGeometry();
|
||||
|
||||
if ( !( eclCaseData && wellPathGeometry ) ) return nullptr;
|
||||
|
||||
for ( size_t exIdx = 0; exIdx < m_extractors.size(); ++exIdx )
|
||||
{
|
||||
if ( m_extractors[exIdx]->caseData() == eclCaseData && m_extractors[exIdx]->wellPathData() == wellPathGeom )
|
||||
if ( m_extractors[exIdx]->caseData() == eclCaseData && m_extractors[exIdx]->wellPathGeometry() == wellPathGeometry )
|
||||
{
|
||||
return m_extractors[exIdx].p();
|
||||
}
|
||||
@ -108,7 +102,7 @@ RigEclipseWellLogExtractor* RimWellLogPlotCollection::findOrCreateExtractor( Rim
|
||||
|
||||
std::string errorIdName = ( wellPath->name() + " " + eclCase->caseUserDescription() ).toStdString();
|
||||
cvf::ref<RigEclipseWellLogExtractor> extractor =
|
||||
new RigEclipseWellLogExtractor( eclCaseData, wellPathGeom, errorIdName );
|
||||
new RigEclipseWellLogExtractor( eclCaseData, wellPathGeometry, errorIdName );
|
||||
m_extractors.push_back( extractor.p() );
|
||||
|
||||
return extractor.p();
|
||||
@ -117,37 +111,60 @@ RigEclipseWellLogExtractor* RimWellLogPlotCollection::findOrCreateExtractor( Rim
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigGeoMechWellLogExtractor* RimWellLogPlotCollection::findOrCreateExtractor( RimWellPath* wellPath, RimGeoMechCase* geomCase )
|
||||
RigGeoMechWellLogExtractor* RimWellLogPlotCollection::findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath,
|
||||
gsl::not_null<RimGeoMechCase*> geoMechCase )
|
||||
{
|
||||
if ( !( wellPath && geomCase && wellPath->wellPathGeometry() && geomCase->geoMechData() ) )
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
RigGeoMechCaseData* caseData = geoMechCase->geoMechData();
|
||||
auto wellPathGeometry = wellPath->wellPathGeometry();
|
||||
if ( !( caseData && wellPathGeometry ) ) return nullptr;
|
||||
|
||||
RigGeoMechCaseData* geomCaseData = geomCase->geoMechData();
|
||||
RigWellPath* wellPathGeom = wellPath->wellPathGeometry();
|
||||
for ( size_t exIdx = 0; exIdx < m_geomExtractors.size(); ++exIdx )
|
||||
{
|
||||
if ( m_geomExtractors[exIdx]->caseData() == geomCaseData && m_geomExtractors[exIdx]->wellPathData() == wellPathGeom )
|
||||
if ( m_geomExtractors[exIdx]->caseData() == caseData &&
|
||||
m_geomExtractors[exIdx]->wellPathGeometry() == wellPathGeometry )
|
||||
{
|
||||
return m_geomExtractors[exIdx].p();
|
||||
}
|
||||
}
|
||||
|
||||
std::string errorIdName = ( wellPath->name() + " " + geomCase->caseUserDescription() ).toStdString();
|
||||
std::string errorIdName = ( wellPath->name() + " " + geoMechCase->caseUserDescription() ).toStdString();
|
||||
cvf::ref<RigGeoMechWellLogExtractor> extractor =
|
||||
new RigGeoMechWellLogExtractor( geomCaseData, wellPathGeom, errorIdName );
|
||||
new RigGeoMechWellLogExtractor( caseData, wellPathGeometry, errorIdName );
|
||||
m_geomExtractors.push_back( extractor.p() );
|
||||
|
||||
return extractor.p();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimWellLogPlot*> RimWellLogPlotCollection::wellLogPlots() const
|
||||
{
|
||||
return m_wellLogPlots.childObjects();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogPlotCollection::addWellLogPlot( gsl::not_null<RimWellLogPlot*> wellLogPlot )
|
||||
{
|
||||
m_wellLogPlots.push_back( wellLogPlot );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogPlotCollection::deleteAllPlots()
|
||||
{
|
||||
m_wellLogPlots.deleteAllChildObjects();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogPlotCollection::reloadAllPlots()
|
||||
{
|
||||
for ( const auto& w : wellLogPlots() )
|
||||
for ( const auto& w : m_wellLogPlots() )
|
||||
{
|
||||
w->loadDataAndUpdate();
|
||||
}
|
||||
@ -165,11 +182,11 @@ void RimWellLogPlotCollection::deleteAllExtractors()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogPlotCollection::removeExtractors( const RigWellPath* wellPath )
|
||||
void RimWellLogPlotCollection::removeExtractors( const RigWellPath* wellPathGeometry )
|
||||
{
|
||||
for ( int eIdx = (int)m_extractors.size() - 1; eIdx >= 0; eIdx-- )
|
||||
{
|
||||
if ( m_extractors[eIdx]->wellPathData() == wellPath )
|
||||
if ( m_extractors[eIdx]->wellPathGeometry() == wellPathGeometry )
|
||||
{
|
||||
m_extractors.eraseAt( eIdx );
|
||||
}
|
||||
@ -177,7 +194,7 @@ void RimWellLogPlotCollection::removeExtractors( const RigWellPath* wellPath )
|
||||
|
||||
for ( int eIdx = (int)m_geomExtractors.size() - 1; eIdx >= 0; eIdx-- )
|
||||
{
|
||||
if ( m_geomExtractors[eIdx]->wellPathData() == wellPath )
|
||||
if ( m_geomExtractors[eIdx]->wellPathGeometry() == wellPathGeometry )
|
||||
{
|
||||
m_geomExtractors.eraseAt( eIdx );
|
||||
}
|
||||
@ -216,7 +233,7 @@ void RimWellLogPlotCollection::onChildDeleted( caf::PdmChildArrayFieldHandle*
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
// Make sure the plot collection disappears with the last plot
|
||||
if ( wellLogPlots.empty() )
|
||||
if ( m_wellLogPlots().empty() )
|
||||
{
|
||||
RimProject* project = RimProject::current();
|
||||
if ( project )
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include "cafPdmObject.h"
|
||||
#include "cvfCollection.h"
|
||||
|
||||
#include <gsl/gsl>
|
||||
|
||||
class RimWellLogPlot;
|
||||
class RigEclipseWellLogExtractor;
|
||||
class RigGeoMechWellLogExtractor;
|
||||
@ -48,25 +50,30 @@ public:
|
||||
|
||||
RigEclipseWellLogExtractor* findOrCreateSimWellExtractor( const QString& simWellName,
|
||||
const QString& caseUserDescription,
|
||||
const RigWellPath* wellPathGeom,
|
||||
const RigEclipseCaseData* eclCaseData );
|
||||
gsl::not_null<const RigWellPath*> wellPathGeometry,
|
||||
gsl::not_null<const RigEclipseCaseData*> eclCaseData );
|
||||
|
||||
RigEclipseWellLogExtractor* findOrCreateExtractor( RimWellPath* wellPath, RimEclipseCase* eclCase );
|
||||
RigGeoMechWellLogExtractor* findOrCreateExtractor( RimWellPath* wellPath, RimGeoMechCase* eclCase );
|
||||
RigEclipseWellLogExtractor* findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath,
|
||||
gsl::not_null<RimEclipseCase*> eclCase );
|
||||
RigGeoMechWellLogExtractor* findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath,
|
||||
gsl::not_null<RimGeoMechCase*> geoMechCase );
|
||||
|
||||
std::vector<RimWellLogPlot*> wellLogPlots() const;
|
||||
void addWellLogPlot( gsl::not_null<RimWellLogPlot*> wellLogPlot );
|
||||
void deleteAllPlots();
|
||||
|
||||
void reloadAllPlots();
|
||||
|
||||
void deleteAllExtractors();
|
||||
void removeExtractors( const RigWellPath* wellPath );
|
||||
void removeExtractors( const RigWellPath* wellPathGeometry );
|
||||
void removeExtractors( const RigEclipseCaseData* caseData );
|
||||
void removeExtractors( const RigGeoMechCaseData* caseData );
|
||||
|
||||
private:
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
caf::PdmChildArrayField<RimWellLogPlot*> wellLogPlots;
|
||||
|
||||
private:
|
||||
caf::PdmChildArrayField<RimWellLogPlot*> m_wellLogPlots;
|
||||
cvf::Collection<RigEclipseWellLogExtractor> m_extractors;
|
||||
cvf::Collection<RigGeoMechWellLogExtractor> m_geomExtractors;
|
||||
};
|
||||
|
@ -1016,7 +1016,7 @@ bool RimWellLogRftCurve::deriveMeasuredDepthValuesFromWellPath( const std::vecto
|
||||
|
||||
if ( wellPath )
|
||||
{
|
||||
const std::vector<double>& mdValuesOfWellPath = wellPath->wellPathGeometry()->measureDepths();
|
||||
const std::vector<double>& mdValuesOfWellPath = wellPath->wellPathGeometry()->measuredDepths();
|
||||
const std::vector<double>& tvdValuesOfWellPath = wellPath->wellPathGeometry()->trueVerticalDepths();
|
||||
|
||||
derivedMDValues =
|
||||
|
@ -1988,9 +1988,9 @@ std::vector<std::pair<double, double>> RimWellLogTrack::waterAndRockRegions( Ria
|
||||
if ( depthType == RiaDefines::DepthTypeEnum::MEASURED_DEPTH )
|
||||
{
|
||||
double waterStartMD = 0.0;
|
||||
if ( extractor->wellPathData()->rkbDiff() != std::numeric_limits<double>::infinity() )
|
||||
if ( extractor->wellPathGeometry()->rkbDiff() != std::numeric_limits<double>::infinity() )
|
||||
{
|
||||
waterStartMD += extractor->wellPathData()->rkbDiff();
|
||||
waterStartMD += extractor->wellPathGeometry()->rkbDiff();
|
||||
}
|
||||
double waterEndMD = extractor->cellIntersectionMDs().front();
|
||||
double rockEndMD = extractor->cellIntersectionMDs().back();
|
||||
@ -2005,9 +2005,9 @@ std::vector<std::pair<double, double>> RimWellLogTrack::waterAndRockRegions( Ria
|
||||
}
|
||||
else if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB )
|
||||
{
|
||||
double waterStartTVDRKB = extractor->wellPathData()->rkbDiff();
|
||||
double waterEndTVDRKB = extractor->cellIntersectionTVDs().front() + extractor->wellPathData()->rkbDiff();
|
||||
double rockEndTVDRKB = extractor->cellIntersectionTVDs().back() + extractor->wellPathData()->rkbDiff();
|
||||
double waterStartTVDRKB = extractor->wellPathGeometry()->rkbDiff();
|
||||
double waterEndTVDRKB = extractor->cellIntersectionTVDs().front() + extractor->wellPathGeometry()->rkbDiff();
|
||||
double rockEndTVDRKB = extractor->cellIntersectionTVDs().back() + extractor->wellPathGeometry()->rkbDiff();
|
||||
return {{waterStartTVDRKB, waterEndTVDRKB}, {waterEndTVDRKB, rockEndTVDRKB}};
|
||||
}
|
||||
return {};
|
||||
@ -2198,7 +2198,7 @@ CurveSamplingPointData RimWellLogTrack::curveSamplingPointData( RigEclipseWellLo
|
||||
|
||||
curveData.md = extractor->cellIntersectionMDs();
|
||||
curveData.tvd = extractor->cellIntersectionTVDs();
|
||||
curveData.rkbDiff = extractor->wellPathData()->rkbDiff();
|
||||
curveData.rkbDiff = extractor->wellPathGeometry()->rkbDiff();
|
||||
|
||||
extractor->curveData( resultAccessor, &curveData.data );
|
||||
|
||||
@ -2215,7 +2215,7 @@ CurveSamplingPointData RimWellLogTrack::curveSamplingPointData( RigGeoMechWellLo
|
||||
|
||||
curveData.md = extractor->cellIntersectionMDs();
|
||||
curveData.tvd = extractor->cellIntersectionTVDs();
|
||||
curveData.rkbDiff = extractor->wellPathData()->rkbDiff();
|
||||
curveData.rkbDiff = extractor->wellPathGeometry()->rkbDiff();
|
||||
|
||||
extractor->curveData( resultAddress, 0, &curveData.data );
|
||||
return curveData;
|
||||
@ -2545,7 +2545,7 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
||||
else
|
||||
{
|
||||
eclWellLogExtractor =
|
||||
RiaExtractionTools::wellLogExtractorEclipseCase( m_formationWellPathForSourceCase,
|
||||
RiaExtractionTools::findOrCreateWellLogExtractor( m_formationWellPathForSourceCase,
|
||||
dynamic_cast<RimEclipseCase*>( m_formationCase() ) );
|
||||
}
|
||||
|
||||
@ -2566,7 +2566,7 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
||||
else
|
||||
{
|
||||
geoMechWellLogExtractor =
|
||||
RiaExtractionTools::wellLogExtractorGeoMechCase( m_formationWellPathForSourceCase,
|
||||
RiaExtractionTools::findOrCreateWellLogExtractor( m_formationWellPathForSourceCase,
|
||||
dynamic_cast<RimGeoMechCase*>( m_formationCase() ) );
|
||||
if ( !geoMechWellLogExtractor ) return;
|
||||
|
||||
@ -2659,7 +2659,7 @@ void RimWellLogTrack::updateResultPropertyNamesOnPlot()
|
||||
RiaDefines::DepthUnitType toDepthUnit = plot->depthUnit();
|
||||
|
||||
RigEclipseWellLogExtractor* eclWellLogExtractor =
|
||||
RiaExtractionTools::wellLogExtractorEclipseCase( m_formationWellPathForSourceCase,
|
||||
RiaExtractionTools::findOrCreateWellLogExtractor( m_formationWellPathForSourceCase,
|
||||
dynamic_cast<RimEclipseCase*>( m_formationCase() ) );
|
||||
|
||||
if ( !eclWellLogExtractor )
|
||||
@ -2768,7 +2768,7 @@ void RimWellLogTrack::updateCurveDataRegionsOnPlot()
|
||||
{
|
||||
RigGeoMechWellLogExtractor* geoMechWellLogExtractor = nullptr;
|
||||
geoMechWellLogExtractor =
|
||||
RiaExtractionTools::wellLogExtractorGeoMechCase( wellPath, dynamic_cast<RimGeoMechCase*>( geoMechCase ) );
|
||||
RiaExtractionTools::findOrCreateWellLogExtractor( wellPath, dynamic_cast<RimGeoMechCase*>( geoMechCase ) );
|
||||
if ( !geoMechWellLogExtractor ) return;
|
||||
|
||||
std::pair<double, double> xRange = std::make_pair( m_visibleXRangeMin(), m_visibleXRangeMax() );
|
||||
|
@ -73,7 +73,7 @@ const char RimWellPath::SIM_WELL_NONE_UI_TEXT[] = "None";
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellPath::RimWellPath()
|
||||
{
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "WellPath", ":/Well.png", "", "", "WellPath", "The Base class for Well Paths" );
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "WellPath", ":/Well.png", "", "", "WellPath", "A ResInsight Well Path" );
|
||||
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_name, "Name", "Name", "", "", "" );
|
||||
m_name.registerKeywordAlias( "WellPathName" );
|
||||
@ -127,7 +127,7 @@ RimWellPath::RimWellPath()
|
||||
m_wellPathAttributes = new RimWellPathAttributeCollection;
|
||||
m_wellPathAttributes->uiCapability()->setUiTreeHidden( true );
|
||||
|
||||
m_wellPath = nullptr;
|
||||
m_wellPathGeometry = nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -154,7 +154,7 @@ RimWellPath::~RimWellPath()
|
||||
RimWellLogPlotCollection* plotCollection = project->mainPlotCollection()->wellLogPlotCollection();
|
||||
if ( plotCollection )
|
||||
{
|
||||
plotCollection->removeExtractors( m_wellPath.p() );
|
||||
plotCollection->removeExtractors( m_wellPathGeometry.p() );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -233,30 +233,6 @@ cvf::Color3f RimWellPath::defaultComponentColor() const
|
||||
return RiaColorTables::wellPathComponentColors()[componentType()];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimWellPath::startMD() const
|
||||
{
|
||||
if ( wellPathGeometry() )
|
||||
{
|
||||
return wellPathGeometry()->measureDepths().front();
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimWellPath::endMD() const
|
||||
{
|
||||
if ( wellPathGeometry() )
|
||||
{
|
||||
return wellPathGeometry()->measureDepths().back();
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -350,7 +326,7 @@ const RimFractureModelCollection* RimWellPath::fractureModelCollection() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigWellPath* RimWellPath::wellPathGeometry()
|
||||
{
|
||||
return m_wellPath.p();
|
||||
return m_wellPathGeometry.p();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -358,7 +334,7 @@ RigWellPath* RimWellPath::wellPathGeometry()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigWellPath* RimWellPath::wellPathGeometry() const
|
||||
{
|
||||
return m_wellPath.p();
|
||||
return m_wellPathGeometry.p();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -562,7 +538,7 @@ caf::PdmFieldHandle* RimWellPath::objectToggleField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPath::setWellPathGeometry( RigWellPath* wellPathModel )
|
||||
{
|
||||
m_wellPath = wellPathModel;
|
||||
m_wellPathGeometry = wellPathModel;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -591,12 +567,12 @@ void RimWellPath::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& ui
|
||||
|
||||
caf::PdmUiGroup* ssihubGroup = uiOrdering.addNewGroup( "Well Info" );
|
||||
|
||||
if ( m_wellPath.notNull() && m_wellPath->rkbDiff() > 0.0 )
|
||||
if ( m_wellPathGeometry.notNull() && m_wellPathGeometry->rkbDiff() > 0.0 )
|
||||
{
|
||||
ssihubGroup->add( &m_airGap );
|
||||
}
|
||||
|
||||
if ( m_wellPath.notNull() && m_wellPath->hasDatumElevation() )
|
||||
if ( m_wellPathGeometry.notNull() && m_wellPathGeometry->hasDatumElevation() )
|
||||
{
|
||||
ssihubGroup->add( &m_datumElevation );
|
||||
}
|
||||
@ -701,9 +677,9 @@ RiaEclipseUnitTools::UnitSystem RimWellPath::unitSystem() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimWellPath::airGap() const
|
||||
{
|
||||
if ( m_wellPath.notNull() && m_wellPath->rkbDiff() > 0.0 )
|
||||
if ( m_wellPathGeometry.notNull() && m_wellPathGeometry->rkbDiff() > 0.0 )
|
||||
{
|
||||
return m_wellPath->rkbDiff();
|
||||
return m_wellPathGeometry->rkbDiff();
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
@ -713,9 +689,9 @@ double RimWellPath::airGap() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimWellPath::datumElevation() const
|
||||
{
|
||||
if ( m_wellPath.notNull() && m_wellPath->hasDatumElevation() )
|
||||
if ( m_wellPathGeometry.notNull() && m_wellPathGeometry->hasDatumElevation() )
|
||||
{
|
||||
return m_wellPath->datumElevation();
|
||||
return m_wellPathGeometry->datumElevation();
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
|
@ -22,13 +22,12 @@
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "RimWellPathComponentInterface.h"
|
||||
#include "RimAbstractWellPath.h"
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
#include "cafFilePath.h"
|
||||
#include "cafPdmChildField.h"
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmPointer.h"
|
||||
#include "cafPdmProxyValueField.h"
|
||||
|
||||
@ -42,7 +41,6 @@
|
||||
|
||||
class RifWellPathImporter;
|
||||
class RifWellPathFormationsImporter;
|
||||
class RigWellPath;
|
||||
class RimProject;
|
||||
class RimWellLogFile;
|
||||
class RimFractureTemplateCollection;
|
||||
@ -63,7 +61,7 @@ class Rim3dWellLogCurveCollection;
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimWellPath : public caf::PdmObject, public RimWellPathComponentInterface
|
||||
class RimWellPath : public RimAbstractWellPath
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
@ -90,8 +88,8 @@ public:
|
||||
double airGap() const;
|
||||
double datumElevation() const;
|
||||
|
||||
RigWellPath* wellPathGeometry();
|
||||
const RigWellPath* wellPathGeometry() const;
|
||||
RigWellPath* wellPathGeometry() override;
|
||||
const RigWellPath* wellPathGeometry() const override;
|
||||
|
||||
void addWellLogFile( RimWellLogFile* logFileInfo );
|
||||
void deleteWellLogFile( RimWellLogFile* logFileInfo );
|
||||
@ -136,8 +134,6 @@ public:
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
cvf::Color3f defaultComponentColor() const override;
|
||||
double startMD() const override;
|
||||
double endMD() const override;
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
@ -188,8 +184,7 @@ private:
|
||||
|
||||
private:
|
||||
// Geometry and data
|
||||
|
||||
cvf::ref<RigWellPath> m_wellPath;
|
||||
cvf::ref<RigWellPath> m_wellPathGeometry;
|
||||
cvf::ref<RigWellPathFormations> m_wellPathFormations;
|
||||
|
||||
// Obsolete fields
|
||||
|
@ -84,10 +84,10 @@ bool RimWellPathAttribute::operator<( const RimWellPathAttribute& rhs ) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathAttribute::setDepthsFromWellPath( const RimWellPath* wellPath )
|
||||
void RimWellPathAttribute::setDepthsFromWellPath( gsl::not_null<const RimWellPath*> wellPath )
|
||||
{
|
||||
m_startMD = wellPath->wellPathGeometry()->measureDepths().front();
|
||||
m_endMD = wellPath->wellPathGeometry()->measureDepths().back();
|
||||
m_startMD = wellPath->startMD();
|
||||
m_endMD = wellPath->endMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -256,7 +256,7 @@ void RimWellPathAttribute::fieldChangedByUi( const caf::PdmFieldHandle* changedF
|
||||
{
|
||||
RimWellPath* wellPath = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted( wellPath );
|
||||
m_startMD = wellPath->wellPathGeometry()->measureDepths().front();
|
||||
m_startMD = wellPath->startMD();
|
||||
|
||||
if ( !supportedDiameters( m_type() ).count( m_diameterInInches() ) )
|
||||
{
|
||||
|
@ -19,14 +19,14 @@
|
||||
|
||||
#include "RimWellPathComponentInterface.h"
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
|
||||
#include "cafPdmField.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include <gsl/gsl>
|
||||
|
||||
class RimWellPath;
|
||||
|
||||
class RimWellPathAttribute : public caf::PdmObject, public RimWellPathComponentInterface
|
||||
@ -44,7 +44,7 @@ public:
|
||||
double diameterInInches() const;
|
||||
QString diameterLabel() const;
|
||||
bool operator<( const RimWellPathAttribute& rhs ) const;
|
||||
void setDepthsFromWellPath( const RimWellPath* wellPath );
|
||||
void setDepthsFromWellPath( gsl::not_null<const RimWellPath*> wellPath );
|
||||
|
||||
// Overrides from RimWellPathCompletionInterface
|
||||
bool isEnabled() const override;
|
||||
|
@ -652,7 +652,7 @@ RiaEclipseUnitTools::UnitSystemType RimWellPathCollection::findUnitSystemForWell
|
||||
const RigEclipseCaseData* eclipseCaseData = project->activeOilField()->analysisModels->cases()[0]->eclipseCaseData();
|
||||
cvf::BoundingBox caseBoundingBox = eclipseCaseData->mainGrid()->boundingBox();
|
||||
cvf::BoundingBox wellPathBoundingBox;
|
||||
for ( auto& wellPathPoint : wellPath->wellPathGeometry()->m_wellPathPoints )
|
||||
for ( const auto& wellPathPoint : wellPath->wellPathGeometry()->wellPathPoints() )
|
||||
{
|
||||
wellPathBoundingBox.add( wellPathPoint );
|
||||
}
|
||||
|
@ -173,10 +173,10 @@ cvf::ref<RigWellPath> RimWellPathGeometryDef::createWellPathGeometry()
|
||||
|
||||
RiaPolyArcLineSampler arcLineSampler( wellPathCalculator.startTangent(), wellPathCalculator.lineArcEndpoints() );
|
||||
|
||||
arcLineSampler.sampledPointsAndMDs( 30,
|
||||
false,
|
||||
&( wellPathGeometry->m_wellPathPoints ),
|
||||
&( wellPathGeometry->m_measuredDepths ) );
|
||||
auto [wellPathPoints, measuredDepths] = arcLineSampler.sampledPointsAndMDs( 30, false );
|
||||
|
||||
wellPathGeometry->setWellPathPoints( wellPathPoints );
|
||||
wellPathGeometry->setMeasuredDepths( measuredDepths );
|
||||
|
||||
if ( m_airGap != 0.0 )
|
||||
{
|
||||
|
@ -36,8 +36,8 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigWellPathStimplanIntersector::RigWellPathStimplanIntersector( const RigWellPath* wellPathGeom,
|
||||
const RimFracture* rimFracture )
|
||||
RigWellPathStimplanIntersector::RigWellPathStimplanIntersector( gsl::not_null<const RigWellPath*> wellPathGeom,
|
||||
gsl::not_null<const RimFracture*> rimFracture )
|
||||
{
|
||||
std::vector<cvf::Vec3d> wellPathPoints =
|
||||
wellPathGeom->wellPathPointsIncludingInterpolatedIntersectionPoint( rimFracture->fractureMD() );
|
||||
|
@ -20,6 +20,8 @@
|
||||
|
||||
#include "cvfMatrix4.h"
|
||||
|
||||
#include <gsl/gsl>
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
@ -48,7 +50,8 @@ public:
|
||||
double computeLength() const { return cvf::Math::sqrt( hlength * hlength + vlength * vlength ); }
|
||||
};
|
||||
|
||||
RigWellPathStimplanIntersector( const RigWellPath* wellpathGeom, const RimFracture* rimFracture );
|
||||
RigWellPathStimplanIntersector( gsl::not_null<const RigWellPath*> wellpathGeom,
|
||||
gsl::not_null<const RimFracture*> rimFracture );
|
||||
|
||||
const std::map<size_t, WellCellIntersection>& intersections() const;
|
||||
|
||||
|
@ -522,9 +522,8 @@ std::vector<const RigWellPath*> RigEclipseCaseData::simulationWellBranches( cons
|
||||
{
|
||||
auto wellMdCalculator = RigSimulationWellCoordsAndMD( pipeBranchesCLCoords[brIdx] );
|
||||
|
||||
cvf::ref<RigWellPath> newWellPath = new RigWellPath();
|
||||
newWellPath->m_measuredDepths = wellMdCalculator.measuredDepths();
|
||||
newWellPath->m_wellPathPoints = wellMdCalculator.wellPathPoints();
|
||||
cvf::ref<RigWellPath> newWellPath =
|
||||
new RigWellPath( wellMdCalculator.wellPathPoints(), wellMdCalculator.measuredDepths() );
|
||||
|
||||
m_simWellBranchCache[simWellSeachItem].push_back( newWellPath.p() );
|
||||
}
|
||||
|
@ -37,8 +37,8 @@
|
||||
///
|
||||
//==================================================================================================
|
||||
|
||||
RigEclipseWellLogExtractor::RigEclipseWellLogExtractor( const RigEclipseCaseData* aCase,
|
||||
const RigWellPath* wellpath,
|
||||
RigEclipseWellLogExtractor::RigEclipseWellLogExtractor( gsl::not_null<const RigEclipseCaseData*> aCase,
|
||||
gsl::not_null<const RigWellPath*> wellpath,
|
||||
const std::string& wellCaseErrorMsgName )
|
||||
: RigWellLogExtractor( wellpath, wellCaseErrorMsgName )
|
||||
, m_caseData( aCase )
|
||||
@ -55,13 +55,13 @@ void RigEclipseWellLogExtractor::calculateIntersection()
|
||||
|
||||
bool isCellFaceNormalsOut = m_caseData->mainGrid()->isFaceNormalsOutwards();
|
||||
|
||||
if ( m_wellPath->m_wellPathPoints.empty() ) return;
|
||||
if ( m_wellPathGeometry->wellPathPoints().empty() ) return;
|
||||
|
||||
for ( size_t wpp = 0; wpp < m_wellPath->m_wellPathPoints.size() - 1; ++wpp )
|
||||
for ( size_t wpp = 0; wpp < m_wellPathGeometry->wellPathPoints().size() - 1; ++wpp )
|
||||
{
|
||||
std::vector<HexIntersectionInfo> intersections;
|
||||
cvf::Vec3d p1 = m_wellPath->m_wellPathPoints[wpp];
|
||||
cvf::Vec3d p2 = m_wellPath->m_wellPathPoints[wpp + 1];
|
||||
cvf::Vec3d p1 = m_wellPathGeometry->wellPathPoints()[wpp];
|
||||
cvf::Vec3d p2 = m_wellPathGeometry->wellPathPoints()[wpp + 1];
|
||||
|
||||
cvf::BoundingBox bb;
|
||||
|
||||
@ -96,19 +96,19 @@ void RigEclipseWellLogExtractor::calculateIntersection()
|
||||
// Inserting the intersections in this map will remove identical intersections
|
||||
// and sort them according to MD, CellIdx, Leave/enter
|
||||
|
||||
double md1 = m_wellPath->m_measuredDepths[wpp];
|
||||
double md2 = m_wellPath->m_measuredDepths[wpp + 1];
|
||||
double md1 = m_wellPathGeometry->measuredDepths()[wpp];
|
||||
double md2 = m_wellPathGeometry->measuredDepths()[wpp + 1];
|
||||
|
||||
insertIntersectionsInMap( intersections, p1, md1, p2, md2, &uniqueIntersections );
|
||||
}
|
||||
|
||||
if ( uniqueIntersections.empty() && m_wellPath->m_wellPathPoints.size() > 1 )
|
||||
if ( uniqueIntersections.empty() && m_wellPathGeometry->wellPathPoints().size() > 1 )
|
||||
{
|
||||
// When entering this function, all well path points are either completely outside the grid
|
||||
// or all well path points are inside one cell
|
||||
|
||||
cvf::Vec3d firstPoint = m_wellPath->m_wellPathPoints.front();
|
||||
cvf::Vec3d lastPoint = m_wellPath->m_wellPathPoints.back();
|
||||
cvf::Vec3d firstPoint = m_wellPathGeometry->wellPathPoints().front();
|
||||
cvf::Vec3d lastPoint = m_wellPathGeometry->wellPathPoints().back();
|
||||
|
||||
{
|
||||
cvf::BoundingBox bb;
|
||||
@ -137,7 +137,7 @@ void RigEclipseWellLogExtractor::calculateIntersection()
|
||||
isEntering,
|
||||
cvf::StructGridInterface::NO_FACE,
|
||||
globalCellIndex );
|
||||
RigMDCellIdxEnterLeaveKey enterLeaveKey( m_wellPath->m_measuredDepths.front(),
|
||||
RigMDCellIdxEnterLeaveKey enterLeaveKey( m_wellPathGeometry->measuredDepths().front(),
|
||||
globalCellIndex,
|
||||
isEntering );
|
||||
|
||||
@ -149,7 +149,7 @@ void RigEclipseWellLogExtractor::calculateIntersection()
|
||||
|
||||
bool isEntering = false;
|
||||
HexIntersectionInfo info( lastPoint, isEntering, cvf::StructGridInterface::NO_FACE, globalCellIndex );
|
||||
RigMDCellIdxEnterLeaveKey enterLeaveKey( m_wellPath->m_measuredDepths.back(),
|
||||
RigMDCellIdxEnterLeaveKey enterLeaveKey( m_wellPathGeometry->measuredDepths().back(),
|
||||
globalCellIndex,
|
||||
isEntering );
|
||||
|
||||
|
@ -36,8 +36,8 @@ class BoundingBox;
|
||||
class RigEclipseWellLogExtractor : public RigWellLogExtractor
|
||||
{
|
||||
public:
|
||||
RigEclipseWellLogExtractor( const RigEclipseCaseData* aCase,
|
||||
const RigWellPath* wellpath,
|
||||
RigEclipseWellLogExtractor( gsl::not_null<const RigEclipseCaseData*> aCase,
|
||||
gsl::not_null<const RigWellPath*> wellpath,
|
||||
const std::string& wellCaseErrorMsgName );
|
||||
|
||||
void curveData( const RigResultAccessor* resultAccessor, std::vector<double>* values );
|
||||
|
@ -80,12 +80,12 @@ void RigFisbonesGeometry::computeLateralPositionAndOrientation( size_t subI
|
||||
RimWellPath* wellPath = nullptr;
|
||||
m_fishbonesSub->firstAncestorOrThisOfTypeAsserted( wellPath );
|
||||
|
||||
RigWellPath* rigWellPath = wellPath->wellPathGeometry();
|
||||
CVF_ASSERT( rigWellPath );
|
||||
auto wellPathGeometry = wellPath->wellPathGeometry();
|
||||
if ( !wellPathGeometry ) return;
|
||||
|
||||
double measuredDepth = m_fishbonesSub->measuredDepth( subIndex );
|
||||
|
||||
cvf::Vec3d position = rigWellPath->interpolatedPointAlongWellPath( measuredDepth );
|
||||
cvf::Vec3d position = wellPathGeometry->interpolatedPointAlongWellPath( measuredDepth );
|
||||
|
||||
cvf::Mat4d buildAngleMat;
|
||||
cvf::Vec3d lateralDirection;
|
||||
@ -94,7 +94,7 @@ void RigFisbonesGeometry::computeLateralPositionAndOrientation( size_t subI
|
||||
cvf::Vec3d lateralInitialDirection = cvf::Vec3d::Z_AXIS;
|
||||
cvf::Vec3d p1 = cvf::Vec3d::UNDEFINED;
|
||||
cvf::Vec3d p2 = cvf::Vec3d::UNDEFINED;
|
||||
rigWellPath->twoClosestPoints( position, &p1, &p2 );
|
||||
wellPathGeometry->twoClosestPoints( position, &p1, &p2 );
|
||||
|
||||
CVF_ASSERT( !p1.isUndefined() && !p2.isUndefined() );
|
||||
|
||||
|
@ -53,8 +53,8 @@ const double RigGeoMechWellLogExtractor::GRAVITY_ACCEL = 9.81; // m /
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigGeoMechWellLogExtractor::RigGeoMechWellLogExtractor( RigGeoMechCaseData* aCase,
|
||||
const RigWellPath* wellpath,
|
||||
RigGeoMechWellLogExtractor::RigGeoMechWellLogExtractor( gsl::not_null<RigGeoMechCaseData*> aCase,
|
||||
gsl::not_null<const RigWellPath*> wellpath,
|
||||
const std::string& wellCaseErrorMsgName )
|
||||
: RigWellLogExtractor( wellpath, wellCaseErrorMsgName )
|
||||
, m_caseData( aCase )
|
||||
@ -118,7 +118,7 @@ QString RigGeoMechWellLogExtractor::curveData( const RigFemResultAddress& resAdd
|
||||
|
||||
if ( resAddr.resultPosType == RIG_WELLPATH_DERIVED )
|
||||
{
|
||||
if ( m_wellPath->rkbDiff() == HUGE_VAL )
|
||||
if ( m_wellPathGeometry->rkbDiff() == HUGE_VAL )
|
||||
{
|
||||
RiaLogging::error( "Well path has an invalid datum elevation and we cannot estimate TVDRKB. No well bore "
|
||||
"stability curves created." );
|
||||
@ -276,7 +276,7 @@ std::vector<RigGeoMechWellLogExtractor::WbsParameterSource>
|
||||
std::vector<float> tvdRKBs;
|
||||
for ( double tvdValue : m_intersectionTVDs )
|
||||
{
|
||||
tvdRKBs.push_back( tvdValue + m_wellPath->rkbDiff() );
|
||||
tvdRKBs.push_back( tvdValue + m_wellPathGeometry->rkbDiff() );
|
||||
}
|
||||
RigFemResultAddress elementPropertyAddr = parameter.femAddress( RigWbsParameter::ELEMENT_PROPERTY_TABLE );
|
||||
elementPropertyValuesInput = &( resultCollection->resultValues( elementPropertyAddr, 0, frameIndex ) );
|
||||
@ -970,11 +970,11 @@ void RigGeoMechWellLogExtractor::calculateIntersection()
|
||||
const RigFemPart* femPart = m_caseData->femParts()->part( 0 );
|
||||
const std::vector<cvf::Vec3f>& nodeCoords = femPart->nodes().coordinates;
|
||||
|
||||
for ( size_t wpp = 0; wpp < m_wellPath->m_wellPathPoints.size() - 1; ++wpp )
|
||||
for ( size_t wpp = 0; wpp < m_wellPathGeometry->wellPathPoints().size() - 1; ++wpp )
|
||||
{
|
||||
std::vector<HexIntersectionInfo> intersections;
|
||||
cvf::Vec3d p1 = m_wellPath->m_wellPathPoints[wpp];
|
||||
cvf::Vec3d p2 = m_wellPath->m_wellPathPoints[wpp + 1];
|
||||
cvf::Vec3d p1 = m_wellPathGeometry->wellPathPoints()[wpp];
|
||||
cvf::Vec3d p2 = m_wellPathGeometry->wellPathPoints()[wpp + 1];
|
||||
|
||||
cvf::BoundingBox bb;
|
||||
|
||||
@ -1011,8 +1011,8 @@ void RigGeoMechWellLogExtractor::calculateIntersection()
|
||||
// Inserting the intersections in this map will remove identical intersections
|
||||
// and sort them according to MD, CellIdx, Leave/enter
|
||||
|
||||
double md1 = m_wellPath->m_measuredDepths[wpp];
|
||||
double md2 = m_wellPath->m_measuredDepths[wpp + 1];
|
||||
double md1 = m_wellPathGeometry->measuredDepths()[wpp];
|
||||
double md2 = m_wellPathGeometry->measuredDepths()[wpp + 1];
|
||||
|
||||
insertIntersectionsInMap( intersections, p1, md1, p2, md2, &uniqueIntersections );
|
||||
}
|
||||
@ -1068,7 +1068,7 @@ cvf::Vec3d RigGeoMechWellLogExtractor::calculateWellPathTangent( int64_t
|
||||
if ( calculationType == TangentFollowWellPathSegments )
|
||||
{
|
||||
cvf::Vec3d segmentStart, segmentEnd;
|
||||
m_wellPath->twoClosestPoints( m_intersections[intersectionIdx], &segmentStart, &segmentEnd );
|
||||
m_wellPathGeometry->twoClosestPoints( m_intersections[intersectionIdx], &segmentStart, &segmentEnd );
|
||||
return ( segmentEnd - segmentStart ).getNormalized();
|
||||
}
|
||||
else
|
||||
@ -1374,7 +1374,7 @@ double RigGeoMechWellLogExtractor::hydroStaticPorePressureForIntersection( size_
|
||||
double waterDensityGCM3 ) const
|
||||
{
|
||||
double trueVerticalDepth = m_intersectionTVDs[intersectionIdx];
|
||||
double effectiveDepthMeters = trueVerticalDepth + wellPathData()->rkbDiff();
|
||||
double effectiveDepthMeters = trueVerticalDepth + m_wellPathGeometry->rkbDiff();
|
||||
return hydroStaticPorePressureAtDepth( effectiveDepthMeters, waterDensityGCM3 );
|
||||
}
|
||||
|
||||
@ -1385,7 +1385,7 @@ double RigGeoMechWellLogExtractor::hydroStaticPorePressureForSegment( size_t int
|
||||
{
|
||||
cvf::Vec3f centroid = cellCentroid( intersectionIdx );
|
||||
double trueVerticalDepth = -centroid.z();
|
||||
double effectiveDepthMeters = trueVerticalDepth + wellPathData()->rkbDiff();
|
||||
double effectiveDepthMeters = trueVerticalDepth + m_wellPathGeometry->rkbDiff();
|
||||
return hydroStaticPorePressureAtDepth( effectiveDepthMeters, waterDensityGCM3 );
|
||||
}
|
||||
|
||||
@ -1405,9 +1405,9 @@ double RigGeoMechWellLogExtractor::hydroStaticPorePressureAtDepth( double effect
|
||||
double RigGeoMechWellLogExtractor::wbsCurveValuesAtMsl() const
|
||||
{
|
||||
double waterDensityGCM3 = m_userDefinedValues.at( RigWbsParameter::waterDensity() );
|
||||
double waterDepth = std::abs( wellPathData()->wellPathPoints().front().z() );
|
||||
double waterDepth = std::abs( m_wellPathGeometry->wellPathPoints().front().z() );
|
||||
|
||||
double rkbDiff = wellPathData()->rkbDiff();
|
||||
double rkbDiff = m_wellPathGeometry->rkbDiff();
|
||||
if ( rkbDiff == std::numeric_limits<double>::infinity() )
|
||||
{
|
||||
rkbDiff = 0.0;
|
||||
|
@ -58,8 +58,8 @@ public:
|
||||
using WbsParameterSourceEnum = RigWbsParameter::SourceEnum;
|
||||
|
||||
public:
|
||||
RigGeoMechWellLogExtractor( RigGeoMechCaseData* aCase,
|
||||
const RigWellPath* wellpath,
|
||||
RigGeoMechWellLogExtractor( gsl::not_null<RigGeoMechCaseData*> aCase,
|
||||
gsl::not_null<const RigWellPath*> wellpath,
|
||||
const std::string& wellCaseErrorMsgName );
|
||||
|
||||
void performCurveDataSmoothing( int frameIndex,
|
||||
|
@ -25,8 +25,9 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigWellLogExtractor::RigWellLogExtractor( const RigWellPath* wellpath, const std::string& wellCaseErrorMsgName )
|
||||
: m_wellPath( wellpath )
|
||||
RigWellLogExtractor::RigWellLogExtractor( gsl::not_null<const RigWellPath*> wellpath,
|
||||
const std::string& wellCaseErrorMsgName )
|
||||
: m_wellPathGeometry( wellpath )
|
||||
, m_wellCaseErrorMsgName( wellCaseErrorMsgName )
|
||||
{
|
||||
}
|
||||
@ -97,9 +98,9 @@ const std::vector<size_t>& RigWellLogExtractor::intersectedCellsGlobIdx() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigWellPath* RigWellLogExtractor::wellPathData() const
|
||||
const RigWellPath* RigWellLogExtractor::wellPathGeometry() const
|
||||
{
|
||||
return m_wellPath.p();
|
||||
return m_wellPathGeometry.p();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -202,11 +203,12 @@ void RigWellLogExtractor::populateReturnArrays( std::map<RigMDCellIdxEnterLeaveK
|
||||
{
|
||||
// Needs wellpath start point in front
|
||||
HexIntersectionInfo firstLeavingPoint = it->second;
|
||||
firstLeavingPoint.m_intersectionPoint = m_wellPath->m_wellPathPoints[0];
|
||||
firstLeavingPoint.m_intersectionPoint = m_wellPathGeometry->wellPathPoints()[0];
|
||||
firstLeavingPoint.m_face = cvf::StructGridInterface::NO_FACE;
|
||||
firstLeavingPoint.m_isIntersectionEntering = true;
|
||||
|
||||
sortedUniqueIntersections.insert( std::make_pair( RigMDEnterLeaveCellIdxKey( m_wellPath->m_measuredDepths[0],
|
||||
sortedUniqueIntersections.insert(
|
||||
std::make_pair( RigMDEnterLeaveCellIdxKey( m_wellPathGeometry->measuredDepths()[0],
|
||||
true,
|
||||
firstLeavingPoint.m_hexIndex ),
|
||||
firstLeavingPoint ) );
|
||||
@ -221,12 +223,14 @@ void RigWellLogExtractor::populateReturnArrays( std::map<RigMDCellIdxEnterLeaveK
|
||||
{
|
||||
// Needs wellpath end point at end
|
||||
HexIntersectionInfo lastEnterPoint = rit->second;
|
||||
lastEnterPoint.m_intersectionPoint = m_wellPath->m_wellPathPoints.back();
|
||||
lastEnterPoint.m_intersectionPoint = m_wellPathGeometry->wellPathPoints().back();
|
||||
lastEnterPoint.m_isIntersectionEntering = false;
|
||||
lastEnterPoint.m_face = cvf::StructGridInterface::NO_FACE;
|
||||
|
||||
sortedUniqueIntersections.insert(
|
||||
std::make_pair( RigMDEnterLeaveCellIdxKey( m_wellPath->m_measuredDepths.back(), false, lastEnterPoint.m_hexIndex ),
|
||||
std::make_pair( RigMDEnterLeaveCellIdxKey( m_wellPathGeometry->measuredDepths().back(),
|
||||
false,
|
||||
lastEnterPoint.m_hexIndex ),
|
||||
lastEnterPoint ) );
|
||||
}
|
||||
}
|
||||
|
@ -59,14 +59,14 @@ class RigWellPath;
|
||||
class RigWellLogExtractor : public cvf::Object
|
||||
{
|
||||
public:
|
||||
RigWellLogExtractor( const RigWellPath* wellpath, const std::string& wellCaseErrorMsgName );
|
||||
RigWellLogExtractor( gsl::not_null<const RigWellPath*> wellpath, const std::string& wellCaseErrorMsgName );
|
||||
~RigWellLogExtractor() override;
|
||||
|
||||
const std::vector<double>& cellIntersectionMDs() const;
|
||||
const std::vector<double>& cellIntersectionTVDs() const;
|
||||
const std::vector<size_t>& intersectedCellsGlobIdx() const;
|
||||
|
||||
const RigWellPath* wellPathData() const;
|
||||
const RigWellPath* wellPathGeometry() const;
|
||||
|
||||
std::vector<WellPathCellIntersectionInfo> cellIntersectionInfosAlongWellPath() const;
|
||||
|
||||
@ -90,7 +90,7 @@ protected:
|
||||
std::vector<size_t> m_intersectedCellsGlobIdx;
|
||||
std::vector<cvf::StructGridInterface::FaceType> m_intersectedCellFaces;
|
||||
|
||||
cvf::cref<RigWellPath> m_wellPath;
|
||||
cvf::cref<RigWellPath> m_wellPathGeometry;
|
||||
|
||||
std::vector<double> m_intersectionMeasuredDepths;
|
||||
std::vector<double> m_intersectionTVDs;
|
||||
|
@ -31,6 +31,99 @@ RigWellPath::RigWellPath()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigWellPath::RigWellPath( const RigWellPath& rhs )
|
||||
: m_wellPathPoints( rhs.m_wellPathPoints )
|
||||
, m_measuredDepths( rhs.m_measuredDepths )
|
||||
, m_hasDatumElevation( rhs.m_hasDatumElevation )
|
||||
, m_datumElevation( rhs.m_datumElevation )
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigWellPath::RigWellPath( const std::vector<cvf::Vec3d>& wellPathPoints, const std::vector<double>& measuredDepths )
|
||||
: m_wellPathPoints( wellPathPoints )
|
||||
, m_measuredDepths( measuredDepths )
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigWellPath& RigWellPath::operator=( const RigWellPath& rhs )
|
||||
{
|
||||
m_wellPathPoints = rhs.m_wellPathPoints;
|
||||
m_measuredDepths = rhs.m_measuredDepths;
|
||||
m_hasDatumElevation = rhs.m_hasDatumElevation;
|
||||
m_datumElevation = rhs.m_datumElevation;
|
||||
return *this;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<cvf::Vec3d>& RigWellPath::wellPathPoints() const
|
||||
{
|
||||
return m_wellPathPoints;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<double>& RigWellPath::measuredDepths() const
|
||||
{
|
||||
return m_measuredDepths;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<double> RigWellPath::trueVerticalDepths() const
|
||||
{
|
||||
std::vector<double> tvds;
|
||||
for ( const cvf::Vec3d& point : m_wellPathPoints )
|
||||
{
|
||||
tvds.push_back( std::fabs( point.z() ) );
|
||||
}
|
||||
return tvds;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigWellPath::setWellPathPoints( const std::vector<cvf::Vec3d>& wellPathPoints )
|
||||
{
|
||||
m_wellPathPoints = wellPathPoints;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigWellPath::setMeasuredDepths( const std::vector<double>& measuredDepths )
|
||||
{
|
||||
m_measuredDepths = measuredDepths;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigWellPath::addWellPathPoint( const cvf::Vec3d& wellPathPoint )
|
||||
{
|
||||
m_wellPathPoints.push_back( wellPathPoint );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigWellPath::addMeasuredDepth( double measuredDepth )
|
||||
{
|
||||
m_measuredDepths.push_back( measuredDepth );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -399,26 +492,3 @@ std::vector<cvf::Vec3d> RigWellPath::clipPolylineStartAboveZ( const std::vector<
|
||||
|
||||
return clippedPolyLine;
|
||||
}
|
||||
|
||||
const std::vector<cvf::Vec3d>& RigWellPath::wellPathPoints() const
|
||||
{
|
||||
return m_wellPathPoints;
|
||||
}
|
||||
|
||||
const std::vector<double>& RigWellPath::measureDepths() const
|
||||
{
|
||||
return m_measuredDepths;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<double> RigWellPath::trueVerticalDepths() const
|
||||
{
|
||||
std::vector<double> tvds;
|
||||
for ( const cvf::Vec3d& point : m_wellPathPoints )
|
||||
{
|
||||
tvds.push_back( std::fabs( point.z() ) );
|
||||
}
|
||||
return tvds;
|
||||
}
|
||||
|
@ -35,14 +35,21 @@ class BoundingBox;
|
||||
class RigWellPath : public cvf::Object
|
||||
{
|
||||
public:
|
||||
std::vector<cvf::Vec3d> m_wellPathPoints;
|
||||
std::vector<double> m_measuredDepths;
|
||||
RigWellPath();
|
||||
RigWellPath( const std::vector<cvf::Vec3d>& wellPathPoints, const std::vector<double>& measuredDepths );
|
||||
RigWellPath( const RigWellPath& rhs );
|
||||
RigWellPath& operator=( const RigWellPath& rhs );
|
||||
|
||||
const std::vector<cvf::Vec3d>& wellPathPoints() const;
|
||||
const std::vector<double>& measureDepths() const;
|
||||
const std::vector<double>& measuredDepths() const;
|
||||
std::vector<double> trueVerticalDepths() const;
|
||||
|
||||
RigWellPath();
|
||||
void setWellPathPoints( const std::vector<cvf::Vec3d>& wellPathPoints );
|
||||
void setMeasuredDepths( const std::vector<double>& measuredDepths );
|
||||
|
||||
void addWellPathPoint( const cvf::Vec3d& wellPathPoint );
|
||||
void addMeasuredDepth( double measuredDepth );
|
||||
|
||||
void setDatumElevation( double value );
|
||||
bool hasDatumElevation() const;
|
||||
double datumElevation() const;
|
||||
@ -69,6 +76,9 @@ public:
|
||||
size_t* indexToFirstVisibleSegment );
|
||||
|
||||
private:
|
||||
std::vector<cvf::Vec3d> m_wellPathPoints;
|
||||
std::vector<double> m_measuredDepths;
|
||||
|
||||
bool m_hasDatumElevation;
|
||||
double m_datumElevation;
|
||||
};
|
||||
|
@ -27,7 +27,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigWellPathGeometryExporter::exportWellPathGeometry( const RimWellPath* wellPath,
|
||||
void RigWellPathGeometryExporter::exportWellPathGeometry( gsl::not_null<const RimWellPath*> wellPath,
|
||||
double mdStepSize,
|
||||
std::vector<double>& xValues,
|
||||
std::vector<double>& yValues,
|
||||
@ -41,7 +41,7 @@ void RigWellPathGeometryExporter::exportWellPathGeometry( const RimWellPath* w
|
||||
useMdRkb = false;
|
||||
double rkbOffset = 0.0;
|
||||
{
|
||||
const RimModeledWellPath* modeledWellPath = dynamic_cast<const RimModeledWellPath*>( wellPath );
|
||||
const RimModeledWellPath* modeledWellPath = dynamic_cast<const RimModeledWellPath*>( wellPath.get() );
|
||||
if ( modeledWellPath )
|
||||
{
|
||||
useMdRkb = true;
|
||||
@ -55,13 +55,13 @@ void RigWellPathGeometryExporter::exportWellPathGeometry( const RimWellPath* w
|
||||
}
|
||||
}
|
||||
}
|
||||
exportWellPathGeometry( wellPathGeom, mdStepSize, rkbOffset, xValues, yValues, tvdValues, mdValues );
|
||||
exportWellPathGeometry( *wellPathGeom, mdStepSize, rkbOffset, xValues, yValues, tvdValues, mdValues );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigWellPathGeometryExporter::exportWellPathGeometry( const RigWellPath* wellPathGeom,
|
||||
void RigWellPathGeometryExporter::exportWellPathGeometry( const RigWellPath& wellPathGeom,
|
||||
double mdStepSize,
|
||||
double rkbOffset,
|
||||
std::vector<double>& xValues,
|
||||
@ -69,8 +69,8 @@ void RigWellPathGeometryExporter::exportWellPathGeometry( const RigWellPath* w
|
||||
std::vector<double>& tvdValues,
|
||||
std::vector<double>& mdValues )
|
||||
{
|
||||
double currMd = wellPathGeom->measureDepths().front() - mdStepSize;
|
||||
double endMd = wellPathGeom->measureDepths().back();
|
||||
double currMd = wellPathGeom.measuredDepths().front() - mdStepSize;
|
||||
double endMd = wellPathGeom.measuredDepths().back();
|
||||
|
||||
bool isFirst = true;
|
||||
double prevMd = 0.0;
|
||||
@ -80,7 +80,7 @@ void RigWellPathGeometryExporter::exportWellPathGeometry( const RigWellPath* w
|
||||
currMd += mdStepSize;
|
||||
if ( currMd > endMd ) currMd = endMd;
|
||||
|
||||
auto pt = wellPathGeom->interpolatedPointAlongWellPath( currMd );
|
||||
auto pt = wellPathGeom.interpolatedPointAlongWellPath( currMd );
|
||||
double tvd = -pt.z();
|
||||
|
||||
// The change in measured depth (MD) must be greater or equal to change in
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <gsl/gsl>
|
||||
|
||||
#include <vector>
|
||||
|
||||
class RimWellPath;
|
||||
@ -29,7 +31,7 @@ class RigWellPath;
|
||||
class RigWellPathGeometryExporter
|
||||
{
|
||||
public:
|
||||
static void exportWellPathGeometry( const RimWellPath* wellPath,
|
||||
static void exportWellPathGeometry( gsl::not_null<const RimWellPath*> wellPath,
|
||||
double mdStepSize,
|
||||
std::vector<double>& xValues,
|
||||
std::vector<double>& yValues,
|
||||
@ -37,7 +39,7 @@ public:
|
||||
std::vector<double>& mdValues,
|
||||
bool& useMdRkb );
|
||||
|
||||
static void exportWellPathGeometry( const RigWellPath* wellPath,
|
||||
static void exportWellPathGeometry( const RigWellPath& wellPath,
|
||||
double mdStepSize,
|
||||
double rkbOffset,
|
||||
std::vector<double>& xValues,
|
||||
|
@ -43,9 +43,7 @@ std::vector<WellPathCellIntersectionInfo>
|
||||
|
||||
if ( pathCoords.size() < 2 ) return intersectionInfos;
|
||||
|
||||
cvf::ref<RigWellPath> dummyWellPath = new RigWellPath;
|
||||
dummyWellPath->m_wellPathPoints = pathCoords;
|
||||
dummyWellPath->m_measuredDepths = pathMds;
|
||||
cvf::ref<RigWellPath> dummyWellPath = new RigWellPath( pathCoords, pathMds );
|
||||
|
||||
std::string errorIdName = ( wellPathName + " " + caseData->ownerCase()->caseUserDescription() ).toStdString();
|
||||
|
||||
@ -90,19 +88,17 @@ std::set<size_t> RigWellPathIntersectionTools::findIntersectedGlobalCellIndices(
|
||||
|
||||
if ( caseData )
|
||||
{
|
||||
cvf::ref<RigWellPath> dummyWellPath = new RigWellPath;
|
||||
cvf::ref<RigWellPath> dummyWellPath;
|
||||
|
||||
if ( measuredDepths.size() == coords.size() )
|
||||
{
|
||||
dummyWellPath->m_wellPathPoints = coords;
|
||||
dummyWellPath->m_measuredDepths = measuredDepths;
|
||||
dummyWellPath = new RigWellPath( coords, measuredDepths );
|
||||
}
|
||||
else
|
||||
{
|
||||
RigSimulationWellCoordsAndMD helper( coords );
|
||||
|
||||
dummyWellPath->m_wellPathPoints = helper.wellPathPoints();
|
||||
dummyWellPath->m_measuredDepths = helper.measuredDepths();
|
||||
dummyWellPath = new RigWellPath( helper.wellPathPoints(), helper.measuredDepths() );
|
||||
}
|
||||
|
||||
globalCellIndices = findIntersectedGlobalCellIndicesForWellPath( caseData, dummyWellPath.p() );
|
||||
|
@ -10,10 +10,7 @@ TEST( RiaPolyArcLineSampler, Basic )
|
||||
|
||||
RiaPolyArcLineSampler sampler( {0, 0, -1}, points );
|
||||
|
||||
std::vector<cvf::Vec3d> sampledPoints;
|
||||
std::vector<double> mds;
|
||||
|
||||
sampler.sampledPointsAndMDs( 2, true, &sampledPoints, &mds );
|
||||
auto [sampledPoints, mds] = sampler.sampledPointsAndMDs( 2, true );
|
||||
#if 1
|
||||
for ( size_t pIdx = 0; pIdx < sampledPoints.size(); ++pIdx )
|
||||
{
|
||||
@ -40,10 +37,7 @@ TEST( RiaPolyArcLineSampler, TestInvalidInput )
|
||||
|
||||
RiaPolyArcLineSampler sampler( {0, 0, -1}, points );
|
||||
|
||||
std::vector<cvf::Vec3d> sampledPoints;
|
||||
std::vector<double> mds;
|
||||
|
||||
sampler.sampledPointsAndMDs( 2, true, &sampledPoints, &mds );
|
||||
auto [sampledPoints, mds] = sampler.sampledPointsAndMDs( 2, true );
|
||||
|
||||
EXPECT_EQ( 0, (int)sampledPoints.size() );
|
||||
}
|
||||
@ -53,10 +47,7 @@ TEST( RiaPolyArcLineSampler, TestInvalidInput )
|
||||
|
||||
RiaPolyArcLineSampler sampler( {0, 0, -1}, points );
|
||||
|
||||
std::vector<cvf::Vec3d> sampledPoints;
|
||||
std::vector<double> mds;
|
||||
|
||||
sampler.sampledPointsAndMDs( 2, true, &sampledPoints, &mds );
|
||||
auto [sampledPoints, mds] = sampler.sampledPointsAndMDs( 2, true );
|
||||
|
||||
EXPECT_EQ( 0, (int)sampledPoints.size() );
|
||||
}
|
||||
@ -66,10 +57,7 @@ TEST( RiaPolyArcLineSampler, TestInvalidInput )
|
||||
|
||||
RiaPolyArcLineSampler sampler( {0, 0, -1}, points );
|
||||
|
||||
std::vector<cvf::Vec3d> sampledPoints;
|
||||
std::vector<double> mds;
|
||||
|
||||
sampler.sampledPointsAndMDs( 2, true, &sampledPoints, &mds );
|
||||
auto [sampledPoints, mds] = sampler.sampledPointsAndMDs( 2, true );
|
||||
|
||||
EXPECT_EQ( 0, (int)sampledPoints.size() );
|
||||
}
|
||||
|
@ -68,8 +68,8 @@ TEST( RigEclipseWellLogExtractor, ShortWellPathInsideOneCell )
|
||||
mdValues.push_back( offset );
|
||||
}
|
||||
|
||||
wellPathGeometry->m_wellPathPoints = wellPathPoints;
|
||||
wellPathGeometry->m_measuredDepths = mdValues;
|
||||
wellPathGeometry->setWellPathPoints( wellPathPoints );
|
||||
wellPathGeometry->setMeasuredDepths( mdValues );
|
||||
}
|
||||
|
||||
cvf::ref<RigEclipseWellLogExtractor> e = new RigEclipseWellLogExtractor( reservoir.p(), wellPathGeometry.p(), "" );
|
||||
|
@ -39,8 +39,8 @@ TEST( RigWellPathGeometryExporter, VerticalPath )
|
||||
|
||||
for ( double md : inputMds )
|
||||
{
|
||||
rigWellPath.m_measuredDepths.push_back( md );
|
||||
rigWellPath.m_wellPathPoints.push_back( cvf::Vec3d( x, y, -md ) );
|
||||
rigWellPath.addMeasuredDepth( md );
|
||||
rigWellPath.addWellPathPoint( cvf::Vec3d( x, y, -md ) );
|
||||
}
|
||||
|
||||
double mdStepSize = 5.0;
|
||||
@ -49,7 +49,7 @@ TEST( RigWellPathGeometryExporter, VerticalPath )
|
||||
std::vector<double> yValues;
|
||||
std::vector<double> tvdValues;
|
||||
std::vector<double> mdValues;
|
||||
RigWellPathGeometryExporter::exportWellPathGeometry( &rigWellPath, mdStepSize, rkbOffset, xValues, yValues, tvdValues, mdValues );
|
||||
RigWellPathGeometryExporter::exportWellPathGeometry( rigWellPath, mdStepSize, rkbOffset, xValues, yValues, tvdValues, mdValues );
|
||||
|
||||
double firstMd = inputMds.front();
|
||||
double lastMd = inputMds.back();
|
||||
|
@ -46,8 +46,8 @@ TEST( RigWellPathTest, FindWellPathCoordsIncludingIntersectionPoint )
|
||||
mdValues.push_back( 3.0 );
|
||||
mdValues.push_back( 4.0 );
|
||||
|
||||
wellPathGeometry.m_wellPathPoints = wellPathPoints;
|
||||
wellPathGeometry.m_measuredDepths = mdValues;
|
||||
wellPathGeometry.setWellPathPoints( wellPathPoints );
|
||||
wellPathGeometry.setMeasuredDepths( mdValues );
|
||||
}
|
||||
|
||||
// Before first MD
|
||||
|
@ -54,10 +54,8 @@ RiuWellPathComponentPlotItem::RiuWellPathComponentPlotItem( const RimWellPath* w
|
||||
, m_showLabel( false )
|
||||
{
|
||||
CVF_ASSERT( wellPath && wellPath->wellPathGeometry() );
|
||||
double wellStart = 0.0;
|
||||
double wellEnd = wellPath->wellPathGeometry()->measureDepths().back();
|
||||
m_startMD = wellStart;
|
||||
m_endMD = wellEnd;
|
||||
m_startMD = wellPath->startMD();
|
||||
m_endMD = wellPath->endMD();
|
||||
m_label = wellPath->name();
|
||||
m_legendTitle = "Well Tube";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user