#14245 Remove gsl functions and ThirdParty/gsl folder

This commit is contained in:
Magne Sjaastad committed 2026-06-24 18:47:04 +02:00
1 parent 0a97fa0a29
commit 2ac1948abe
61 files changed
+162 -5086

No files matched your search

@@ -536,13 +536,13 @@ void RicExportFractureCompletionsImpl::calculateInternalFractureTransmissibiliti
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities( gsl::not_null<const RimFractureTemplate*> fracTemplate,
gsl::not_null<const RigFractureGrid*> fractureGrid,
gsl::not_null<const RimFracture*> fracture,
double cDarcyInCorrectUnit,
gsl::not_null<const RigWellPath*> wellPathGeometry,
RigTransmissibilityCondenser& transCondenser,
bool useInfiniteWellPI )
void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities( const RimFractureTemplate* fracTemplate,
const RigFractureGrid* fractureGrid,
const RimFracture* fracture,
double cDarcyInCorrectUnit,
const RigWellPath* wellPathGeometry,
RigTransmissibilityCondenser& transCondenser,
bool useInfiniteWellPI )
{
// If fracture has orientation Azimuth (without user-defined perforation length) or Transverse,
// assume only radial inflow
@@ -635,8 +635,8 @@ void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<cvf::Vec3d> RicExportFractureCompletionsImpl::computeWellPointsInFracturePlane( gsl::not_null<const RimFracture*> fracture,
gsl::not_null<const RigWellPath*> wellPathGeometry )
std::vector<cvf::Vec3d> RicExportFractureCompletionsImpl::computeWellPointsInFracturePlane( const RimFracture* fracture,
const RigWellPath* wellPathGeometry )
{
std::vector<cvf::Vec3d> wellPathPoints = wellPathGeometry->wellPathPointsIncludingInterpolatedIntersectionPoint( fracture->fractureMD() );
@@ -22,8 +22,6 @@
#include "cvfVector3.h"
#include <gsl/gsl>
#include <map>
#include <vector>
@@ -113,13 +111,13 @@ private:
double cDarcyInCorrectUnit,
RigTransmissibilityCondenser& transCondenser );
static void calculateFractureToWellTransmissibilities( gsl::not_null<const RimFractureTemplate*> fracTemplate,
gsl::not_null<const RigFractureGrid*> fractureGrid,
gsl::not_null<const RimFracture*> fracture,
double cDarcyInCorrectUnit,
gsl::not_null<const RigWellPath*> wellPathGeometry,
RigTransmissibilityCondenser& transCondenser,
bool useInfiniteWellPI );
static void calculateFractureToWellTransmissibilities( const RimFractureTemplate* fracTemplate,
const RigFractureGrid* fractureGrid,
const RimFracture* fracture,
double cDarcyInCorrectUnit,
const RigWellPath* wellPathGeometry,
RigTransmissibilityCondenser& transCondenser,
bool useInfiniteWellPI );
static std::map<size_t, double> calculateMatrixToWellTransmissibilities( RigTransmissibilityCondenser& transCondenser );
@@ -143,8 +141,7 @@ private:
const RigMainGrid* mainGrid,
const RigFractureGrid* fractureGrid );
static std::vector<cvf::Vec3d> computeWellPointsInFracturePlane( gsl::not_null<const RimFracture*> fracture,
gsl::not_null<const RigWellPath*> wellPathGeometry );
static std::vector<cvf::Vec3d> computeWellPointsInFracturePlane( const RimFracture* fracture, const RigWellPath* wellPathGeometry );
static bool loadResultsByName( RigCaseCellResultsData* cellResultsData, const std::vector<QString>& resultNames );
};
@@ -135,7 +135,7 @@ std::vector<std::pair<double, double>>
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RicMswTableDataTools::tvdFromMeasuredDepth( gsl::not_null<const RimWellPath*> wellPath, double measuredDepth )
double RicMswTableDataTools::tvdFromMeasuredDepth( const RimWellPath* wellPath, double measuredDepth )
{
auto wellPathGeometry = wellPath->wellPathGeometry();
CVF_ASSERT( wellPathGeometry );
@@ -18,8 +18,6 @@
#pragma once
#include <gsl/gsl>
#include <utility>
#include <vector>
@@ -36,7 +34,7 @@ std::vector<std::pair<double, double>> createSubSegmentMDPairs( double
double maxSegmentLength,
const std::vector<std::pair<double, double>>& customSegmentIntervals = {} );
double tvdFromMeasuredDepth( gsl::not_null<const RimWellPath*> wellPath, double measuredDepth );
double tvdFromMeasuredDepth( const RimWellPath* wellPath, double measuredDepth );
inline constexpr double valveSegmentLength = 0.1;
@@ -1140,7 +1140,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWpimultTableUsingFormatte
///
//--------------------------------------------------------------------------------------------------
std::vector<RigCompletionData>
RicWellPathExportCompletionDataFeatureImpl::generatePerforationsCompdatValues( gsl::not_null<const RimWellPath*> wellPath,
RicWellPathExportCompletionDataFeatureImpl::generatePerforationsCompdatValues( const RimWellPath* wellPath,
const std::vector<const RimPerforationInterval*>& intervals,
const RicExportCompletionDataSettingsUi& settings,
const std::optional<QDateTime>& exportDate )
@@ -1301,10 +1301,9 @@ void RicWellPathExportCompletionDataFeatureImpl::appendCompletionData( std::map<
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::pair<double, cvf::Vec2i>
RicWellPathExportCompletionDataFeatureImpl::wellPathUpperGridIntersectionIJ( gsl::not_null<const RimEclipseCase*> gridCase,
gsl::not_null<const RimWellPath*> wellPath,
const QString& gridName )
std::pair<double, cvf::Vec2i> RicWellPathExportCompletionDataFeatureImpl::wellPathUpperGridIntersectionIJ( const RimEclipseCase* gridCase,
const RimWellPath* wellPath,
const QString& gridName )
{
const RigEclipseCaseData* caseData = gridCase->eclipseCaseData();
const RigMainGrid* mainGrid = caseData->mainGrid();
@@ -28,8 +28,6 @@
#include <QDateTime>
#include <QFile>
#include <gsl/gsl>
#include <memory>
#include <optional>
#include <vector>
@@ -69,14 +67,13 @@ public:
static std::vector<RigCompletionData>
completionDataForWellPath( RimWellPath* wellPath, RimEclipseCase* eCase, const std::optional<QDateTime>& exportDate = std::nullopt );
static std::pair<double, cvf::Vec2i> wellPathUpperGridIntersectionIJ( gsl::not_null<const RimEclipseCase*> gridCase,
gsl::not_null<const RimWellPath*> wellPath,
const QString& gridName = "" );
static std::pair<double, cvf::Vec2i>
wellPathUpperGridIntersectionIJ( const RimEclipseCase* gridCase, const RimWellPath* wellPath, const QString& gridName = "" );
static std::optional<QDateTime> exportDateForTimeStep( const RimEclipseCase* eclipseCase, size_t timeStepIndex );
private:
static std::vector<RigCompletionData> generatePerforationsCompdatValues( gsl::not_null<const RimWellPath*> wellPath,
static std::vector<RigCompletionData> generatePerforationsCompdatValues( const RimWellPath* wellPath,
const std::vector<const RimPerforationInterval*>& intervals,
const RicExportCompletionDataSettingsUi& settings,
const std::optional<QDateTime>& exportDate = std::nullopt );
@@ -193,8 +193,8 @@ double RicWellPathExportMswTableData::computeIntitialMeasuredDepth( const RimEcl
std::vector<WellPathCellIntersectionInfo>
RicWellPathExportMswTableData::filterIntersections( const std::vector<WellPathCellIntersectionInfo>& intersections,
double initialMD,
gsl::not_null<const RigWellPath*> wellPathGeometry,
gsl::not_null<const RimEclipseCase*> eclipseCase )
const RigWellPath* wellPathGeometry,
const RimEclipseCase* eclipseCase )
{
std::vector<WellPathCellIntersectionInfo> filteredIntersections;
@@ -20,8 +20,6 @@
#include "Tools/enum_bitmask.hpp"
#include <gsl/gsl>
#include <expected>
#include <optional>
#include <vector>
@@ -72,8 +70,8 @@ public:
static std::vector<WellPathCellIntersectionInfo> filterIntersections( const std::vector<WellPathCellIntersectionInfo>& intersections,
double initialMD,
gsl::not_null<const RigWellPath*> wellPathGeometry,
gsl::not_null<const RimEclipseCase*> eclipseCase );
const RigWellPath* wellPathGeometry,
const RimEclipseCase* eclipseCase );
static std::vector<RimWellPath*> wellPathsWithTieIn( const RimWellPath* wellPath );
@@ -50,10 +50,7 @@ CAF_CMD_SOURCE_INIT( RicExportSelectedWellPathsFeature, "RicExportSelectedWellPa
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicExportSelectedWellPathsFeature::exportWellPath( gsl::not_null<const RimWellPath*> wellPath,
double mdStepSize,
const QString& folder,
bool writeProjectInfo )
void RicExportSelectedWellPathsFeature::exportWellPath( const RimWellPath* wellPath, double mdStepSize, const QString& folder, bool writeProjectInfo )
{
auto fileName = caf::Utils::makeValidFileBasename( wellPath->name() );
fileName += ".dev";
@@ -22,8 +22,6 @@
#include <QFile>
#include <gsl/gsl>
#include <memory>
class RigWellPath;
@@ -46,18 +44,17 @@ class RicExportSelectedWellPathsFeature : public caf::CmdFeature
CAF_CMD_HEADER_INIT;
static void exportWellPathsToFile( const std::vector<RimWellPath*>& wellPaths );
static void
exportWellPath( gsl::not_null<const RimWellPath*> wellPath, double mdStepSize, const QString& folder, bool writeProjectInfo = true );
static void exportWellPath( 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,
gsl::not_null<const RimWellPath*> wellPath,
const QString& exportName,
double mdStepSize,
bool writeProjectInfo = true );
static void writeWellPathGeometryToStream( QTextStream& stream,
const RimWellPath* wellPath,
const QString& exportName,
double mdStepSize,
bool writeProjectInfo = true );
static void writeWellPathGeometryToStream( QTextStream& stream,
const RigWellPath& wellPath,
@@ -52,7 +52,7 @@ CAF_CMD_SOURCE_INIT( RicNewWellPathFractureFeature, "RicNewWellPathFractureFeatu
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellPathFracture* RicNewWellPathFractureFeature::addFracture( gsl::not_null<RimWellPath*> wellPath, double measuredDepth )
RimWellPathFracture* RicNewWellPathFractureFeature::addFracture( RimWellPath* wellPath, double measuredDepth )
{
if ( !RicWellPathsUnitSystemSettingsImpl::ensureHasUnitSystem( wellPath ) ) return nullptr;
@@ -20,7 +20,6 @@
#include "cafCmdFeature.h"
#include <gsl/gsl>
#include <vector>
class RimWellPathFractureCollection;
@@ -35,7 +34,7 @@ class RicNewWellPathFractureFeature : public caf::CmdFeature
CAF_CMD_HEADER_INIT;
public:
static RimWellPathFracture* addFracture( gsl::not_null<RimWellPath*> wellPath, double measuredDepth );
static RimWellPathFracture* addFracture( RimWellPath* wellPath, double measuredDepth );
protected:
void onActionTriggered( bool isChecked ) override;
@@ -48,7 +48,7 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RicCreateWellTargetsPickEventHandler::RicCreateWellTargetsPickEventHandler( gsl::not_null<RimWellPathGeometryDef*> wellGeometryDef )
RicCreateWellTargetsPickEventHandler::RicCreateWellTargetsPickEventHandler( RimWellPathGeometryDef* wellGeometryDef )
: m_geometryToAddTargetsTo( wellGeometryDef )
{
}
@@ -202,10 +202,10 @@ bool RicCreateWellTargetsPickEventHandler::isGridSourceObject( const cvf::Object
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::Vec3d RicCreateWellTargetsPickEventHandler::findHexElementIntersection( gsl::not_null<Rim3dView*> view,
const RiuPickItemInfo& pickItem,
const cvf::Vec3d& domainRayOrigin,
const cvf::Vec3d& domainRayEnd )
cvf::Vec3d RicCreateWellTargetsPickEventHandler::findHexElementIntersection( Rim3dView* view,
const RiuPickItemInfo& pickItem,
const cvf::Vec3d& domainRayOrigin,
const cvf::Vec3d& domainRayEnd )
{
auto sourceInfo = dynamic_cast<const RivSourceInfo*>( pickItem.sourceInfo() );
auto femSourceInfo = dynamic_cast<const RivFemPickSourceInfo*>( pickItem.sourceInfo() );
@@ -219,7 +219,7 @@ cvf::Vec3d RicCreateWellTargetsPickEventHandler::findHexElementIntersection( gsl
{
cellIndex = sourceInfo->m_cellFaceFromTriangleMapper->cellIndex( pickItem.faceIdx() );
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( view.get() );
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( view );
if ( eclipseView && eclipseView->mainGrid() )
{
RigGridBase* hitGrid = eclipseView->mainGrid()->gridByIndex( gridIndex );
@@ -234,7 +234,7 @@ cvf::Vec3d RicCreateWellTargetsPickEventHandler::findHexElementIntersection( gsl
{
size_t elementIndex = femSourceInfo->triangleToElmMapper()->elementIndex( pickItem.faceIdx() );
RimGeoMechView* geoMechView = dynamic_cast<RimGeoMechView*>( view.get() );
RimGeoMechView* geoMechView = dynamic_cast<RimGeoMechView*>( view );
if ( geoMechView && geoMechView->femParts() )
{
RigFemPart* femPart = geoMechView->femParts()->part( femPartIndex );
@@ -22,8 +22,6 @@
#include "cafPdmPointer.h"
#include <gsl/gsl>
class RimWellPathGeometryDef;
class RigWellPath;
@@ -33,7 +31,7 @@ class RigWellPath;
class RicCreateWellTargetsPickEventHandler : public Ric3dViewPickEventHandler
{
public:
RicCreateWellTargetsPickEventHandler( gsl::not_null<RimWellPathGeometryDef*> wellGeometryDef );
RicCreateWellTargetsPickEventHandler( RimWellPathGeometryDef* wellGeometryDef );
~RicCreateWellTargetsPickEventHandler();
void registerAsPickEventHandler() override;
@@ -44,10 +42,10 @@ protected:
private:
static bool isGridSourceObject( const cvf::Object* object );
static cvf::Vec3d findHexElementIntersection( gsl::not_null<Rim3dView*> view,
const RiuPickItemInfo& pickItem,
const cvf::Vec3d& domainRayOrigin,
const cvf::Vec3d& domainRayEnd );
static cvf::Vec3d findHexElementIntersection( Rim3dView* view,
const RiuPickItemInfo& pickItem,
const cvf::Vec3d& domainRayOrigin,
const cvf::Vec3d& domainRayEnd );
private:
caf::PdmPointer<RimWellPathGeometryDef> m_geometryToAddTargetsTo;