mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Janitor : Rename variable and function names
This commit is contained in:
parent
917748e1a4
commit
88ca478bab
@ -65,10 +65,16 @@ void RicExportSelectedWellPathsFeature::exportWellPath( gsl::not_null<const RimW
|
|||||||
std::vector<double> tvdValues;
|
std::vector<double> tvdValues;
|
||||||
std::vector<double> mdValues;
|
std::vector<double> mdValues;
|
||||||
|
|
||||||
bool useMdRkb = false;
|
bool showTextMdRkb = false;
|
||||||
RigWellPathGeometryExporter::exportWellPathGeometry( wellPath, mdStepSize, xValues, yValues, tvdValues, mdValues, useMdRkb );
|
RigWellPathGeometryExporter::computeWellPathDataForExport( wellPath,
|
||||||
|
mdStepSize,
|
||||||
|
xValues,
|
||||||
|
yValues,
|
||||||
|
tvdValues,
|
||||||
|
mdValues,
|
||||||
|
showTextMdRkb );
|
||||||
|
|
||||||
writeWellPathGeometryToStream( *stream, wellPath->name(), xValues, yValues, tvdValues, mdValues, useMdRkb, writeProjectInfo );
|
writeWellPathGeometryToStream( *stream, wellPath->name(), xValues, yValues, tvdValues, mdValues, showTextMdRkb, writeProjectInfo );
|
||||||
filePtr->close();
|
filePtr->close();
|
||||||
|
|
||||||
RiaLogging::info( QString( "Exported well geometry to %1" ).arg( filePtr->fileName() ) );
|
RiaLogging::info( QString( "Exported well geometry to %1" ).arg( filePtr->fileName() ) );
|
||||||
@ -81,7 +87,7 @@ void RicExportSelectedWellPathsFeature::writeWellPathGeometryToStream( QTextStre
|
|||||||
const RigWellPath& wellPathGeom,
|
const RigWellPath& wellPathGeom,
|
||||||
const QString& exportName,
|
const QString& exportName,
|
||||||
double mdStepSize,
|
double mdStepSize,
|
||||||
bool useMdRkb,
|
bool showTextMdRkb,
|
||||||
double rkbOffset,
|
double rkbOffset,
|
||||||
bool writeProjectInfo )
|
bool writeProjectInfo )
|
||||||
{
|
{
|
||||||
@ -90,8 +96,14 @@ void RicExportSelectedWellPathsFeature::writeWellPathGeometryToStream( QTextStre
|
|||||||
std::vector<double> tvdValues;
|
std::vector<double> tvdValues;
|
||||||
std::vector<double> mdValues;
|
std::vector<double> mdValues;
|
||||||
|
|
||||||
RigWellPathGeometryExporter::exportWellPathGeometry( wellPathGeom, mdStepSize, rkbOffset, xValues, yValues, tvdValues, mdValues );
|
RigWellPathGeometryExporter::computeWellPathDataForExport( wellPathGeom,
|
||||||
writeWellPathGeometryToStream( stream, exportName, xValues, yValues, tvdValues, mdValues, useMdRkb, writeProjectInfo );
|
mdStepSize,
|
||||||
|
rkbOffset,
|
||||||
|
xValues,
|
||||||
|
yValues,
|
||||||
|
tvdValues,
|
||||||
|
mdValues );
|
||||||
|
writeWellPathGeometryToStream( stream, exportName, xValues, yValues, tvdValues, mdValues, showTextMdRkb, writeProjectInfo );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -103,7 +115,7 @@ void RicExportSelectedWellPathsFeature::writeWellPathGeometryToStream( QTextStre
|
|||||||
const std::vector<double>& yValues,
|
const std::vector<double>& yValues,
|
||||||
const std::vector<double>& tvdValues,
|
const std::vector<double>& tvdValues,
|
||||||
const std::vector<double>& mdValues,
|
const std::vector<double>& mdValues,
|
||||||
bool useMdRkb,
|
bool showTextMdRkb,
|
||||||
bool writeProjectInfo )
|
bool writeProjectInfo )
|
||||||
{
|
{
|
||||||
RifTextDataTableFormatter formatter( stream );
|
RifTextDataTableFormatter formatter( stream );
|
||||||
@ -124,7 +136,7 @@ void RicExportSelectedWellPathsFeature::writeWellPathGeometryToStream( QTextStre
|
|||||||
formatter.header( { { "X", numberFormat, RIGHT },
|
formatter.header( { { "X", numberFormat, RIGHT },
|
||||||
{ "Y", numberFormat, RIGHT },
|
{ "Y", numberFormat, RIGHT },
|
||||||
{ "TVDMSL", numberFormat, RIGHT },
|
{ "TVDMSL", numberFormat, RIGHT },
|
||||||
{ useMdRkb ? "MDRKB" : "MDMSL", numberFormat, RIGHT } } );
|
{ showTextMdRkb ? "MDRKB" : "MDMSL", numberFormat, RIGHT } } );
|
||||||
|
|
||||||
for ( size_t i = 0; i < xValues.size(); i++ )
|
for ( size_t i = 0; i < xValues.size(); i++ )
|
||||||
{
|
{
|
||||||
|
@ -65,7 +65,7 @@ class RicExportSelectedWellPathsFeature : public caf::CmdFeature
|
|||||||
const RigWellPath& wellPath,
|
const RigWellPath& wellPath,
|
||||||
const QString& exportName,
|
const QString& exportName,
|
||||||
double mdStepSize,
|
double mdStepSize,
|
||||||
bool useMdRkb,
|
bool showTextMdRkb,
|
||||||
double rkbOffset,
|
double rkbOffset,
|
||||||
bool writeProjectInfo );
|
bool writeProjectInfo );
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ private:
|
|||||||
const std::vector<double>& yValues,
|
const std::vector<double>& yValues,
|
||||||
const std::vector<double>& tvdValues,
|
const std::vector<double>& tvdValues,
|
||||||
const std::vector<double>& mdValues,
|
const std::vector<double>& mdValues,
|
||||||
bool useMdRkb,
|
bool showTextMdRkb,
|
||||||
bool writeProjectInfo );
|
bool writeProjectInfo );
|
||||||
|
|
||||||
bool isCommandEnabled() override;
|
bool isCommandEnabled() override;
|
||||||
|
@ -48,13 +48,19 @@ bool RifStimPlanModelDeviationFrkExporter::writeToFile( RimStimPlanModel* stimPl
|
|||||||
QTextStream stream( &data );
|
QTextStream stream( &data );
|
||||||
appendHeaderToStream( stream );
|
appendHeaderToStream( stream );
|
||||||
|
|
||||||
bool useMdRkb = false;
|
bool showTextMdRkb = false;
|
||||||
double mdStepSize = 5.0;
|
double mdStepSize = 5.0;
|
||||||
std::vector<double> xValues;
|
std::vector<double> xValues;
|
||||||
std::vector<double> yValues;
|
std::vector<double> yValues;
|
||||||
std::vector<double> tvdValues;
|
std::vector<double> tvdValues;
|
||||||
std::vector<double> mdValues;
|
std::vector<double> mdValues;
|
||||||
RigWellPathGeometryExporter::exportWellPathGeometry( wellPath, mdStepSize, xValues, yValues, tvdValues, mdValues, useMdRkb );
|
RigWellPathGeometryExporter::computeWellPathDataForExport( wellPath,
|
||||||
|
mdStepSize,
|
||||||
|
xValues,
|
||||||
|
yValues,
|
||||||
|
tvdValues,
|
||||||
|
mdValues,
|
||||||
|
showTextMdRkb );
|
||||||
convertFromMeterToFeet( mdValues );
|
convertFromMeterToFeet( mdValues );
|
||||||
convertFromMeterToFeet( tvdValues );
|
convertFromMeterToFeet( tvdValues );
|
||||||
|
|
||||||
|
@ -28,18 +28,18 @@
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RigWellPathGeometryExporter::exportWellPathGeometry( gsl::not_null<const RimWellPath*> wellPath,
|
void RigWellPathGeometryExporter::computeWellPathDataForExport( gsl::not_null<const RimWellPath*> wellPath,
|
||||||
double mdStepSize,
|
double mdStepSize,
|
||||||
std::vector<double>& xValues,
|
std::vector<double>& xValues,
|
||||||
std::vector<double>& yValues,
|
std::vector<double>& yValues,
|
||||||
std::vector<double>& tvdValues,
|
std::vector<double>& tvdValues,
|
||||||
std::vector<double>& mdValues,
|
std::vector<double>& mdValues,
|
||||||
bool& useMdRkb )
|
bool& showTextMdRkb )
|
||||||
{
|
{
|
||||||
auto wellPathGeom = wellPath->wellPathGeometry();
|
auto wellPathGeom = wellPath->wellPathGeometry();
|
||||||
if ( !wellPathGeom ) return;
|
if ( !wellPathGeom ) return;
|
||||||
|
|
||||||
useMdRkb = false;
|
showTextMdRkb = false;
|
||||||
double rkbOffset = 0.0;
|
double rkbOffset = 0.0;
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -52,30 +52,30 @@ void RigWellPathGeometryExporter::exportWellPathGeometry( gsl::not_null<const Ri
|
|||||||
{
|
{
|
||||||
if ( modeledWellPath->geometryDefinition()->airGap() != 0.0 )
|
if ( modeledWellPath->geometryDefinition()->airGap() != 0.0 )
|
||||||
{
|
{
|
||||||
useMdRkb = true;
|
showTextMdRkb = true;
|
||||||
rkbOffset = modeledWellPath->geometryDefinition()->airGap();
|
rkbOffset = modeledWellPath->geometryDefinition()->airGap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dynamic_cast<const RimFileWellPath*>( topLevelWellPath ) )
|
if ( dynamic_cast<const RimFileWellPath*>( topLevelWellPath ) )
|
||||||
{
|
{
|
||||||
useMdRkb = true;
|
showTextMdRkb = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exportWellPathGeometry( *wellPathGeom, mdStepSize, rkbOffset, xValues, yValues, tvdValues, mdValues );
|
computeWellPathDataForExport( *wellPathGeom, mdStepSize, rkbOffset, xValues, yValues, tvdValues, mdValues );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RigWellPathGeometryExporter::exportWellPathGeometry( const RigWellPath& wellPathGeom,
|
void RigWellPathGeometryExporter::computeWellPathDataForExport( const RigWellPath& wellPathGeom,
|
||||||
double mdStepSize,
|
double mdStepSize,
|
||||||
double rkbOffset,
|
double rkbOffset,
|
||||||
std::vector<double>& xValues,
|
std::vector<double>& xValues,
|
||||||
std::vector<double>& yValues,
|
std::vector<double>& yValues,
|
||||||
std::vector<double>& tvdValues,
|
std::vector<double>& tvdValues,
|
||||||
std::vector<double>& mdValues )
|
std::vector<double>& mdValues )
|
||||||
{
|
{
|
||||||
double currMd = wellPathGeom.measuredDepths().front() - mdStepSize;
|
double currMd = wellPathGeom.measuredDepths().front() - mdStepSize;
|
||||||
double endMd = wellPathGeom.measuredDepths().back();
|
double endMd = wellPathGeom.measuredDepths().back();
|
||||||
|
@ -31,19 +31,19 @@ class RigWellPath;
|
|||||||
class RigWellPathGeometryExporter
|
class RigWellPathGeometryExporter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static void exportWellPathGeometry( gsl::not_null<const RimWellPath*> wellPath,
|
static void computeWellPathDataForExport( gsl::not_null<const RimWellPath*> wellPath,
|
||||||
double mdStepSize,
|
double mdStepSize,
|
||||||
std::vector<double>& xValues,
|
std::vector<double>& xValues,
|
||||||
std::vector<double>& yValues,
|
std::vector<double>& yValues,
|
||||||
std::vector<double>& tvdValues,
|
std::vector<double>& tvdValues,
|
||||||
std::vector<double>& mdValues,
|
std::vector<double>& mdValues,
|
||||||
bool& useMdRkb );
|
bool& showTextMdRkb );
|
||||||
|
|
||||||
static void exportWellPathGeometry( const RigWellPath& wellPath,
|
static void computeWellPathDataForExport( const RigWellPath& wellPath,
|
||||||
double mdStepSize,
|
double mdStepSize,
|
||||||
double rkbOffset,
|
double rkbOffset,
|
||||||
std::vector<double>& xValues,
|
std::vector<double>& xValues,
|
||||||
std::vector<double>& yValues,
|
std::vector<double>& yValues,
|
||||||
std::vector<double>& tvdValues,
|
std::vector<double>& tvdValues,
|
||||||
std::vector<double>& mdValues );
|
std::vector<double>& mdValues );
|
||||||
};
|
};
|
||||||
|
@ -49,7 +49,13 @@ TEST( RigWellPathGeometryExporter, VerticalPath )
|
|||||||
std::vector<double> yValues;
|
std::vector<double> yValues;
|
||||||
std::vector<double> tvdValues;
|
std::vector<double> tvdValues;
|
||||||
std::vector<double> mdValues;
|
std::vector<double> mdValues;
|
||||||
RigWellPathGeometryExporter::exportWellPathGeometry( rigWellPath, mdStepSize, rkbOffset, xValues, yValues, tvdValues, mdValues );
|
RigWellPathGeometryExporter::computeWellPathDataForExport( rigWellPath,
|
||||||
|
mdStepSize,
|
||||||
|
rkbOffset,
|
||||||
|
xValues,
|
||||||
|
yValues,
|
||||||
|
tvdValues,
|
||||||
|
mdValues );
|
||||||
|
|
||||||
double firstMd = inputMds.front();
|
double firstMd = inputMds.front();
|
||||||
double lastMd = inputMds.back();
|
double lastMd = inputMds.back();
|
||||||
|
Loading…
Reference in New Issue
Block a user