CppCheck : Remove unused variables

This commit is contained in:
Magne Sjaastad 2017-09-07 22:05:20 +02:00
parent b82cf1377d
commit fb1b6cc628
10 changed files with 7 additions and 23 deletions

View File

@ -180,13 +180,10 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
size_t stimPlanCellIndex = fractureGrid->getGlobalIndexFromIJ(fractureCell.getI(), fractureCell.getJ());
bool hasAnyContribEclCellWithinContainment = false;
for ( size_t i = 0; i < fractureCellContributingEclipseCells.size(); i++ )
{
if ( fracture->isEclipseCellWithinContainment(caseToApply->eclipseCaseData()->mainGrid(), fractureCellContributingEclipseCells[i]) )
{
hasAnyContribEclCellWithinContainment = true;
if ( useFiniteConductivityInFracture )
{
transCondenser.addNeighborTransmissibility({ true, CellIdxSpace::ECLIPSE, fractureCellContributingEclipseCells[i] },

View File

@ -202,7 +202,6 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findMainWellBoreParts(st
RiaEclipseUnitTools::UnitSystem unitSystem = settings.caseToApply->eclipseCaseData()->unitsType();
bool isMainBore = true;
double holeDiameter = wellPath->fishbonesCollection()->mainBoreDiameter(unitSystem);
double FishboneStartMD = wellPath->fishbonesCollection()->startMD();
std::vector<double> wellPathMD = wellPath->wellPathGeometry()->m_measuredDepths;
double wellPathEndMD = 0.0;

View File

@ -978,14 +978,13 @@ void RifReaderEclipseOutput::sourSimRlResult(const QString& result, size_t stepI
size_t fileIndex = timeStepIndexOnFile(stepIndex);
bool readCellResultOk = m_hdfReaderInterface->dynamicResult(result, fileIndex, values);
m_hdfReaderInterface->dynamicResult(result, fileIndex, values);
if (activeCellCount != values->size())
{
values->clear();
RiaLogging::error("SourSimRL results does not match the number of active cells in the grid");
return;
}
}

View File

@ -205,8 +205,6 @@ void RimEllipseFractureTemplate::setupFractureGridCells()
std::vector<RigFractureCell> fractureCells;
std::pair<size_t, size_t> wellCenterFractureCellIJ = std::make_pair(0, 0);
bool wellCenterFractureCellFound = false;
int numberOfCellsX = 35;
int numberOfCellsY = 35;
@ -268,16 +266,12 @@ void RimEllipseFractureTemplate::setupFractureGridCells()
wellCenterFractureCellIJ = std::make_pair(fractureCell.getI(), fractureCell.getJ());
RiaLogging::debug(QString("Setting wellCenterFractureCell at cell %1, %2").
arg(QString::number(fractureCell.getI()), QString::number(fractureCell.getJ())));
wellCenterFractureCellFound = true;
}
}
fractureCells.push_back(fractureCell);
}
}
m_fractureGrid->setFractureCells(fractureCells);
m_fractureGrid->setWellCenterFractureCellIJ(wellCenterFractureCellIJ);

View File

@ -15,11 +15,15 @@
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RimFractureContainment.h"
#include "cafPdmUiSliderEditor.h"
#include "RigMainGrid.h"
#include "RimProject.h"
#include "cafPdmUiSliderEditor.h"
CAF_PDM_SOURCE_INIT(RimFractureContainment, "FractureContainment");
@ -95,7 +99,7 @@ bool RimFractureContainment::isEclipseCellWithinContainment(const RigMainGrid* m
size_t i, j, k;
if (globalCellIndex >= mainGrid->globalCellArray().size()) return false;
bool ok = mainGrid->ijkFromCellIndex(globalCellIndex, &i, &j, &k);
mainGrid->ijkFromCellIndex(globalCellIndex, &i, &j, &k);
if (k + 1 < static_cast<size_t>(m_topKLayer()))
{

View File

@ -190,7 +190,6 @@ bool RimEclipseInputCase::openEclipseGridFile()
}
else
{
RiaPreferences* prefs = RiaApplication::instance()->preferences();
readerInterface = new RifReaderEclipseInput;
cvf::ref<RigEclipseCaseData> eclipseCase = new RigEclipseCaseData;

View File

@ -122,7 +122,6 @@ bool RimEclipseResultCase::importGridAndResultMetaData(bool showTimeStepFilter)
return false;
}
RiaPreferences* prefs = RiaApplication::instance()->preferences();
cvf::ref<RifReaderEclipseOutput> readerEclipseOutput = new RifReaderEclipseOutput;
readerEclipseOutput->setFilenamesWithFaults(this->filesContainingFaults());

View File

@ -365,8 +365,6 @@ std::vector<std::vector<cvf::Vec3d> > RigCellGeometryTools::clipPolylineByPolygo
//Adjusting polygon to avoid clipper issue with interpolating z-values when lines crosses though polygon vertecies
std::vector<cvf::Vec3d> adjustedPolygon = ajustPolygonToAvoidIntersectionsAtVertex(polyLine, polygon);
int polygonScaleFactor = 10000; //For transform to clipper int
//Convert to int for clipper library and store as clipper "path"
ClipperLib::Path polyLinePath;
for (const cvf::Vec3d& v : polyLine)

View File

@ -177,8 +177,6 @@ void RigEclipseToStimPlanCellTransmissibilityCalculator::calculateStimPlanCellsM
lengthXareaOfFractureParts.push_back(length * area);
cvf::Plane fracturePlane;
bool isCellIntersected = false;
fracturePlane.setFromPointAndNormal(static_cast<cvf::Vec3d>(m_fractureTransform.translation()),
static_cast<cvf::Vec3d>(m_fractureTransform.col(2)));

View File

@ -96,7 +96,6 @@ std::vector<WellPathCellIntersectionInfo> RigWellPathIntersectionTools::findCell
//--------------------------------------------------------------------------------------------------
std::vector<HexIntersectionInfo> RigWellPathIntersectionTools::getIntersectedCells(const RigMainGrid* grid, const std::vector<cvf::Vec3d>& coords)
{
const std::vector<cvf::Vec3d>& nodeCoords = grid->nodes();
std::vector<HexIntersectionInfo> intersections;
for (size_t i = 0; i < coords.size() - 1; ++i)
{
@ -167,8 +166,6 @@ std::vector<size_t> RigWellPathIntersectionTools::findCloseCells(const RigMainGr
//--------------------------------------------------------------------------------------------------
size_t RigWellPathIntersectionTools::findCellFromCoords(const RigMainGrid* grid, const cvf::Vec3d& coords, bool* foundCell)
{
const std::vector<cvf::Vec3d>& nodeCoords = grid->nodes();
cvf::BoundingBox bb;
bb.add(coords);
std::vector<size_t> closeCells = findCloseCells(grid, bb);