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> mdValues;
|
||||
|
||||
bool useMdRkb = false;
|
||||
RigWellPathGeometryExporter::exportWellPathGeometry( wellPath, mdStepSize, xValues, yValues, tvdValues, mdValues, useMdRkb );
|
||||
bool showTextMdRkb = false;
|
||||
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();
|
||||
|
||||
RiaLogging::info( QString( "Exported well geometry to %1" ).arg( filePtr->fileName() ) );
|
||||
@ -81,7 +87,7 @@ void RicExportSelectedWellPathsFeature::writeWellPathGeometryToStream( QTextStre
|
||||
const RigWellPath& wellPathGeom,
|
||||
const QString& exportName,
|
||||
double mdStepSize,
|
||||
bool useMdRkb,
|
||||
bool showTextMdRkb,
|
||||
double rkbOffset,
|
||||
bool writeProjectInfo )
|
||||
{
|
||||
@ -90,8 +96,14 @@ void RicExportSelectedWellPathsFeature::writeWellPathGeometryToStream( QTextStre
|
||||
std::vector<double> tvdValues;
|
||||
std::vector<double> mdValues;
|
||||
|
||||
RigWellPathGeometryExporter::exportWellPathGeometry( wellPathGeom, mdStepSize, rkbOffset, xValues, yValues, tvdValues, mdValues );
|
||||
writeWellPathGeometryToStream( stream, exportName, xValues, yValues, tvdValues, mdValues, useMdRkb, writeProjectInfo );
|
||||
RigWellPathGeometryExporter::computeWellPathDataForExport( wellPathGeom,
|
||||
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>& tvdValues,
|
||||
const std::vector<double>& mdValues,
|
||||
bool useMdRkb,
|
||||
bool showTextMdRkb,
|
||||
bool writeProjectInfo )
|
||||
{
|
||||
RifTextDataTableFormatter formatter( stream );
|
||||
@ -124,7 +136,7 @@ void RicExportSelectedWellPathsFeature::writeWellPathGeometryToStream( QTextStre
|
||||
formatter.header( { { "X", numberFormat, RIGHT },
|
||||
{ "Y", numberFormat, RIGHT },
|
||||
{ "TVDMSL", numberFormat, RIGHT },
|
||||
{ useMdRkb ? "MDRKB" : "MDMSL", numberFormat, RIGHT } } );
|
||||
{ showTextMdRkb ? "MDRKB" : "MDMSL", numberFormat, RIGHT } } );
|
||||
|
||||
for ( size_t i = 0; i < xValues.size(); i++ )
|
||||
{
|
||||
|
@ -65,7 +65,7 @@ class RicExportSelectedWellPathsFeature : public caf::CmdFeature
|
||||
const RigWellPath& wellPath,
|
||||
const QString& exportName,
|
||||
double mdStepSize,
|
||||
bool useMdRkb,
|
||||
bool showTextMdRkb,
|
||||
double rkbOffset,
|
||||
bool writeProjectInfo );
|
||||
|
||||
@ -76,7 +76,7 @@ private:
|
||||
const std::vector<double>& yValues,
|
||||
const std::vector<double>& tvdValues,
|
||||
const std::vector<double>& mdValues,
|
||||
bool useMdRkb,
|
||||
bool showTextMdRkb,
|
||||
bool writeProjectInfo );
|
||||
|
||||
bool isCommandEnabled() override;
|
||||
|
@ -48,13 +48,19 @@ bool RifStimPlanModelDeviationFrkExporter::writeToFile( RimStimPlanModel* stimPl
|
||||
QTextStream stream( &data );
|
||||
appendHeaderToStream( stream );
|
||||
|
||||
bool useMdRkb = false;
|
||||
double mdStepSize = 5.0;
|
||||
bool showTextMdRkb = false;
|
||||
double mdStepSize = 5.0;
|
||||
std::vector<double> xValues;
|
||||
std::vector<double> yValues;
|
||||
std::vector<double> tvdValues;
|
||||
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( tvdValues );
|
||||
|
||||
|
@ -28,18 +28,18 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigWellPathGeometryExporter::exportWellPathGeometry( gsl::not_null<const RimWellPath*> wellPath,
|
||||
double mdStepSize,
|
||||
std::vector<double>& xValues,
|
||||
std::vector<double>& yValues,
|
||||
std::vector<double>& tvdValues,
|
||||
std::vector<double>& mdValues,
|
||||
bool& useMdRkb )
|
||||
void RigWellPathGeometryExporter::computeWellPathDataForExport( gsl::not_null<const RimWellPath*> wellPath,
|
||||
double mdStepSize,
|
||||
std::vector<double>& xValues,
|
||||
std::vector<double>& yValues,
|
||||
std::vector<double>& tvdValues,
|
||||
std::vector<double>& mdValues,
|
||||
bool& showTextMdRkb )
|
||||
{
|
||||
auto wellPathGeom = wellPath->wellPathGeometry();
|
||||
if ( !wellPathGeom ) return;
|
||||
|
||||
useMdRkb = false;
|
||||
showTextMdRkb = false;
|
||||
double rkbOffset = 0.0;
|
||||
|
||||
{
|
||||
@ -52,30 +52,30 @@ void RigWellPathGeometryExporter::exportWellPathGeometry( gsl::not_null<const Ri
|
||||
{
|
||||
if ( modeledWellPath->geometryDefinition()->airGap() != 0.0 )
|
||||
{
|
||||
useMdRkb = true;
|
||||
rkbOffset = modeledWellPath->geometryDefinition()->airGap();
|
||||
showTextMdRkb = true;
|
||||
rkbOffset = modeledWellPath->geometryDefinition()->airGap();
|
||||
}
|
||||
}
|
||||
|
||||
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,
|
||||
double mdStepSize,
|
||||
double rkbOffset,
|
||||
std::vector<double>& xValues,
|
||||
std::vector<double>& yValues,
|
||||
std::vector<double>& tvdValues,
|
||||
std::vector<double>& mdValues )
|
||||
void RigWellPathGeometryExporter::computeWellPathDataForExport( const RigWellPath& wellPathGeom,
|
||||
double mdStepSize,
|
||||
double rkbOffset,
|
||||
std::vector<double>& xValues,
|
||||
std::vector<double>& yValues,
|
||||
std::vector<double>& tvdValues,
|
||||
std::vector<double>& mdValues )
|
||||
{
|
||||
double currMd = wellPathGeom.measuredDepths().front() - mdStepSize;
|
||||
double endMd = wellPathGeom.measuredDepths().back();
|
||||
|
@ -31,19 +31,19 @@ class RigWellPath;
|
||||
class RigWellPathGeometryExporter
|
||||
{
|
||||
public:
|
||||
static void exportWellPathGeometry( gsl::not_null<const RimWellPath*> wellPath,
|
||||
double mdStepSize,
|
||||
std::vector<double>& xValues,
|
||||
std::vector<double>& yValues,
|
||||
std::vector<double>& tvdValues,
|
||||
std::vector<double>& mdValues,
|
||||
bool& useMdRkb );
|
||||
static void computeWellPathDataForExport( gsl::not_null<const RimWellPath*> wellPath,
|
||||
double mdStepSize,
|
||||
std::vector<double>& xValues,
|
||||
std::vector<double>& yValues,
|
||||
std::vector<double>& tvdValues,
|
||||
std::vector<double>& mdValues,
|
||||
bool& showTextMdRkb );
|
||||
|
||||
static void exportWellPathGeometry( const RigWellPath& wellPath,
|
||||
double mdStepSize,
|
||||
double rkbOffset,
|
||||
std::vector<double>& xValues,
|
||||
std::vector<double>& yValues,
|
||||
std::vector<double>& tvdValues,
|
||||
std::vector<double>& mdValues );
|
||||
static void computeWellPathDataForExport( const RigWellPath& wellPath,
|
||||
double mdStepSize,
|
||||
double rkbOffset,
|
||||
std::vector<double>& xValues,
|
||||
std::vector<double>& yValues,
|
||||
std::vector<double>& tvdValues,
|
||||
std::vector<double>& mdValues );
|
||||
};
|
||||
|
@ -49,7 +49,13 @@ 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::computeWellPathDataForExport( rigWellPath,
|
||||
mdStepSize,
|
||||
rkbOffset,
|
||||
xValues,
|
||||
yValues,
|
||||
tvdValues,
|
||||
mdValues );
|
||||
|
||||
double firstMd = inputMds.front();
|
||||
double lastMd = inputMds.back();
|
||||
|
Loading…
Reference in New Issue
Block a user