System : Removed unused variables

This commit is contained in:
Magne Sjaastad 2015-10-26 10:13:34 +01:00
parent 14dedf5d4a
commit 01224dd5e6
26 changed files with 15 additions and 76 deletions

View File

@ -1154,7 +1154,8 @@ void RiaApplication::launchUnitTests()
int argc = QCoreApplication::argc();
testing::InitGoogleTest(&argc, QCoreApplication::argv());
int result = RUN_ALL_TESTS();
//int result = RUN_ALL_TESTS();
RUN_ALL_TESTS();
}
//--------------------------------------------------------------------------------------------------

View File

@ -100,7 +100,6 @@ bool readDoubleValuesForActiveCells(RigCaseData* reservoir, size_t resultIndex,
newPropertyData[0].resize(activeCellInfo->reservoirActiveCellCount(), HUGE_VAL);
std::vector<double>& valuesActiveCells = newPropertyData[0];
size_t acIdx = 0;
for (size_t gcIdx = 0; gcIdx < activeCellInfo->reservoirCellCount(); gcIdx++)
{
size_t activeCellResultIndex = activeCellInfo->cellResultIndex(gcIdx);
@ -187,7 +186,6 @@ bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigCaseData
bool allKwReadOk = true;
bool continueReading = true;
fseek(gridFilePointer, specgridPos, SEEK_SET);
allKwReadOk = allKwReadOk && NULL != (specGridKw = ecl_kw_fscanf_alloc_current_grdecl__(gridFilePointer, false , ECL_INT_TYPE));
@ -297,7 +295,6 @@ std::map<QString, QString> RifEclipseInputFileTools::readProperties(const QStri
return std::map<QString, QString>();
}
bool isSomethingRead = false;
std::map<QString, QString> newResults;
for (size_t i = 0; i < fileKeywords.size(); ++i)
{

View File

@ -513,7 +513,6 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateDerivedResult(in
RigFemScalarResultFrames * srcSDataFrames = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "S-Bar", resVarAddr.componentName));
RigFemScalarResultFrames * dstDataFrames = m_femPartResults[partIndex]->createScalarResult(resVarAddr);
const RigFemPart * femPart = m_femParts->part(partIndex);
int frameCount = srcSDataFrames->frameCount();
for (int fIdx = 0; fIdx < frameCount; ++fIdx)
{
@ -522,7 +521,6 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateDerivedResult(in
size_t valCount = srcSFrameData.size();
dstFrameData.resize(valCount);
int nodeIdx = 0;
for (size_t vIdx = 0; vIdx < valCount; ++vIdx)
{
dstFrameData[vIdx] = -srcSFrameData[vIdx];

View File

@ -218,7 +218,6 @@ void RivCellEdgeGeometryUtils::addTernaryCellEdgeResultsToDrawableGeo(size_t tim
cellEdgeColorTextureCoordsArrays.push_back(colorArray.p());
}
RivTernaryScalarMapper* ternaryCellResultScalarMapper = cellResultColors->ternaryLegendConfig()->scalarMapper();
cvf::ScalarMapper* edgeResultScalarMapper = cellEdgeResultColors->legendConfig()->scalarMapper();
double ignoredScalarValue = cellEdgeResultColors->ignoredScalarValue();

View File

@ -100,12 +100,6 @@ void RivFaultPartMgr::updateCellResultColor(size_t timeStepIndex, RimEclipseCell
updateNNCColors(cellResultColors);
size_t scalarSetIndex = cellResultColors->scalarResultIndex();
// If the result is static, only read that.
size_t resTimeStepIdx = timeStepIndex;
if (cellResultColors->hasStaticResult()) resTimeStepIdx = 0;
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel());
RimEclipseView* eclipseView = cellResultColors->reservoirView();
RigCaseData* eclipseCase = eclipseView->eclipseCase()->reservoirData();

View File

@ -225,8 +225,6 @@ void RivGridPartMgr::updateCellResultColor(size_t timeStepIndex, RimEclipseCellC
{
CVF_ASSERT(cellResultColors);
RigCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
cvf::ref<cvf::Color3ubArray> surfaceFacesColorArray;
// Outer surface

View File

@ -472,9 +472,7 @@ void RivPipeGeometryGenerator::updateFilteredPipeCenterCoords()
if (m_originalPipeCenterCoords->size() < 2) return;
if (m_filteredPipeCenterCoords.size() > 0) return;
double squareDistanceTolerance = 1e-4*1e-4;
double angleTolerance = 1e-5;
size_t firstSegmentWithLength = 0;
size_t i;
@ -507,7 +505,6 @@ void RivPipeGeometryGenerator::updateFilteredPipeCenterCoords()
cvf::Vec3d directionAB = coordB - coordA;
// Skip segment lengths below tolerance
double dirLengthSq = directionAB.lengthSquared();
if (directionAB.lengthSquared() > squareDistanceTolerance)
{
lastValidDirectionAB = directionAB.getNormalized();

View File

@ -209,8 +209,6 @@ void RivReservoirFaultsPartMgr::updateColors(size_t timeStepIndex, RimEclipseCel
for (size_t i = 0; i < faultCollection->faults.size(); i++)
{
RimFault* rimFault = faultCollection->faults[i];
if (cellResultColors && (cellResultColors->hasResult() || cellResultColors->isTernarySaturationSelected()) )
{
m_faultParts[i]->updateCellResultColor(timeStepIndex, cellResultColors);

View File

@ -785,8 +785,6 @@ void RivReservoirViewPartMgr::computePropertyVisibility(cvf::UByteArray* cellVis
const double lowerBound = propertyFilter->lowerBound();
const double upperBound = propertyFilter->upperBound();
size_t scalarResultIndex = propertyFilter->resultDefinition->scalarResultIndex();
size_t adjustedTimeStepIndex = timeStepIndex;
// Set time step to zero for static results

View File

@ -97,7 +97,6 @@ void RivWellPipesPartMgr::buildWellPipeParts()
m_wellBranches.clear();
std::vector< size_t > pipeBranchIds;
std::vector< std::vector <cvf::Vec3d> > pipeBranchesCLCoords;
std::vector< std::vector <RigWellResultPoint> > pipeBranchesCellIds;
@ -315,7 +314,7 @@ void RivWellPipesPartMgr::calculateWellPipeCenterline( std::vector< std::vector
cvf::Vec3d outOfPrevCell(centerPreviousCell);
int intersectionOk = prevCell.firstIntersectionPoint(rayToThisCell, &outOfPrevCell);
//int intersectionOk = prevCell.firstIntersectionPoint(rayToThisCell, &outOfPrevCell);
//CVF_ASSERT(intersectionOk);
//CVF_ASSERT(intersectionOk);
if ((currentPoint - outOfPrevCell).lengthSquared() > 1e-3)
@ -413,7 +412,7 @@ void RivWellPipesPartMgr::calculateWellPipeCenterline( std::vector< std::vector
cvf::Vec3d outOfPrevCell(centerPreviousCell);
const RigCell& prevCell = rigReservoir->cellFromWellResultCell(*prevWellResPoint);
bool intersectionOk = prevCell.firstIntersectionPoint(rayToThisCell, &outOfPrevCell);
//bool intersectionOk = prevCell.firstIntersectionPoint(rayToThisCell, &outOfPrevCell);
//CVF_ASSERT(intersectionOk);
//CVF_ASSERT(intersectionOk);
if ((intoThisCell - outOfPrevCell).lengthSquared() > 1e-3)

View File

@ -195,9 +195,7 @@ void RimEclipseCase::removeResult(const QString& resultName)
rebuildDisplayModel = true;
}
std::list< caf::PdmPointer< RimEclipsePropertyFilter > >::iterator it;
RimEclipsePropertyFilterCollection* propFilterCollection = reservoirView->propertyFilterCollection();
for (size_t filter = 0; filter < propFilterCollection->propertyFilters().size(); filter++)
{
RimEclipsePropertyFilter* propertyFilter = propFilterCollection->propertyFilters()[filter];

View File

@ -300,9 +300,6 @@ void RimEclipseInputCase::loadAndSyncronizeInputProperties()
if (!fileKeywordSet.empty())
{
std::vector<QString> knownKwsLeft;
for_all(knownKeywords, fkIt)
{
if (fileKeywordSet.count(knownKeywords[fkIt]))
@ -382,14 +379,14 @@ cvf::ref<RifReaderInterface> RimEclipseInputCase::createMockModel(QString modelN
mockFileInterface->open("", reservoir.p());
{
size_t idx = reservoir->mainGrid()->cellIndexFromIJK(1, 3, 4);
//size_t idx = reservoir->mainGrid()->cellIndexFromIJK(1, 3, 4);
//TODO: Rewrite active cell info in mock models
//reservoir->mainGrid()->cell(idx).setActiveIndexInMatrixModel(cvf::UNDEFINED_SIZE_T);
}
{
size_t idx = reservoir->mainGrid()->cellIndexFromIJK(2, 2, 3);
//size_t idx = reservoir->mainGrid()->cellIndexFromIJK(2, 2, 3);
//TODO: Rewrite active cell info in mock models
//reservoir->mainGrid()->cell(idx).setActiveIndexInMatrixModel(cvf::UNDEFINED_SIZE_T);

View File

@ -217,8 +217,6 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptionsF
{
QStringList varList = getResultVariableListForCurrentUIFieldSettings();
bool hasCombinedTransmissibility = false;
QList<caf::PdmOptionItemInfo> optionList;
QList<caf::PdmOptionItemInfo> perCellFaceOptionList;
for (int i = 0; i < varList.size(); ++i)

View File

@ -311,8 +311,6 @@ void RimEclipseView::createDisplayModel()
// Remove all existing animation frames from the viewer.
// The parts are still cached in the RivReservoir geometry and friends
bool isAnimationActive = m_viewer->isAnimationActive();
m_viewer->removeAllFrames();
wellCollection->scheduleIsWellPipesVisibleRecalculation();
@ -409,7 +407,7 @@ void RimEclipseView::createDisplayModel()
}
// Compute triangle count, Debug only
/*
if (false)
{
size_t totalTriangleCount = 0;
@ -431,6 +429,7 @@ void RimEclipseView::createDisplayModel()
}
}
}
*/
// Create Scenes from the frameModels
// Animation frames for results display, starts from frame 1

View File

@ -56,7 +56,6 @@ RimFaultCollection::RimFaultCollection()
{
CAF_PDM_InitObject("Faults", ":/draw_style_faults_24x24.png", "", "");
RiaPreferences* prefs = RiaApplication::instance()->preferences();
CAF_PDM_InitField(&showFaultCollection, "Active", true, "Active", "", "", "");
showFaultCollection.uiCapability()->setUiHidden(true);

View File

@ -978,16 +978,6 @@ void RimReservoirCellResultsStorage::computeNncCombRiTrans()
bool hasNTGResults = ntgResultIdx != cvf::UNDEFINED_SIZE_T;
// Get the result count, to handle that one of them might be globally defined
size_t permxResultValueCount = m_cellResults->cellScalarResults(permXResultIdx)[0].size();
size_t resultValueCount = permxResultValueCount;
if (hasNTGResults)
{
size_t ntgResultValueCount = m_cellResults->cellScalarResults(ntgResultIdx)[0].size();
resultValueCount = CVF_MIN(permxResultValueCount, ntgResultValueCount);
}
// Get all the actual result values
std::vector<double> & permXResults = m_cellResults->cellScalarResults(permXResultIdx)[0];
@ -1028,7 +1018,6 @@ void RimReservoirCellResultsStorage::computeNncCombRiTrans()
}
const RigActiveCellInfo* activeCellInfo = m_cellResults->activeCellInfo();
const std::vector<cvf::Vec3d>& nodes = m_ownerMainGrid->nodes();
bool isFaceNormalsOutwards = m_ownerMainGrid->isFaceNormalsOutwards();
// NNC calculation
@ -1217,8 +1206,6 @@ void RimReservoirCellResultsStorage::computeRiMULTComponent(const QString& riMul
// Set up output container to correct number of results
riMultResults.resize(resultValueCount);
const RigActiveCellInfo* activeCellInfo = m_cellResults->activeCellInfo();
for (size_t vIdx = 0; vIdx < transResults.size(); ++vIdx)
{
@ -1313,7 +1300,6 @@ void RimReservoirCellResultsStorage::computeRiTRANSbyAreaComponent(const QString
const RigActiveCellInfo* activeCellInfo = m_cellResults->activeCellInfo();
const std::vector<cvf::Vec3d>& nodes = m_ownerMainGrid->nodes();
bool isFaceNormalsOutwards = m_ownerMainGrid->isFaceNormalsOutwards();
for (size_t nativeResvCellIndex = 0; nativeResvCellIndex < m_ownerMainGrid->cells().size(); nativeResvCellIndex++)
{

View File

@ -76,7 +76,7 @@ RimView::RimView(void)
cameraPosition.uiCapability()->setUiHidden(true);
double defaultScaleFactor = 1.0;
if (preferences) defaultScaleFactor = preferences->defaultScaleFactorZ;
defaultScaleFactor = preferences->defaultScaleFactorZ;
CAF_PDM_InitField(&scaleZ, "GridZScale", defaultScaleFactor, "Z Scale", "", "Scales the scene in the Z direction", "");
cvf::Color3f defBackgColor = preferences->defaultViewerBackgroundColor();

View File

@ -190,7 +190,6 @@ void RimWellLogExtractionCurve::updatePlotData()
RimWellLogPlotCollection* wellLogCollection = NULL;
this->firstAnchestorOrThisOfType(wellLogCollection);
CVF_ASSERT(wellLogCollection);
cvf::ref<RigEclipseWellLogExtractor> eclExtractor = wellLogCollection->findOrCreateExtractor(m_wellPath, eclipseCase);
@ -525,14 +524,12 @@ QString RimWellLogExtractionCurve::wellDate() const
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>(m_case.value());
QStringList timeStepNames;
size_t maxTimeStep = 0;
if (eclipseCase)
{
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(m_eclipseResultDefinition->porosityModel());
if (eclipseCase->reservoirData())
{
maxTimeStep = eclipseCase->reservoirData()->results(porosityModel)->maxTimeStepCount();
timeStepNames = eclipseCase->timeStepStrings();
}
}
@ -540,7 +537,6 @@ QString RimWellLogExtractionCurve::wellDate() const
{
if (geomCase->geoMechData())
{
maxTimeStep = geomCase->geoMechData()->femPartResults()->frameCount();
timeStepNames = geomCase->timeStepStrings();
}
}

View File

@ -106,8 +106,6 @@ bool RigCell::isLongPyramidCell(double maxHeightFactor, double nodeNearTolerance
const std::vector<cvf::Vec3d>& nodes = m_hostGrid->mainGrid()->nodes();
bool isPyramidCell = false;
int face;
for ( face = 0; face < 6 ; ++face)
{
@ -228,7 +226,6 @@ bool RigCell::isCollapsedCell(double nodeNearTolerance) const
{
const std::vector<cvf::Vec3d>& nodes = m_hostGrid->mainGrid()->nodes();
bool isPyramidCell = false;
cvf::ubyte faceVertexIndices[4];
cvf::ubyte oppFaceVertexIndices[4];

View File

@ -81,7 +81,8 @@ void RigEclipseWellLogExtractor::calculateIntersection()
hexCorners[6] = nodeCoords[cornerIndices[6]];
hexCorners[7] = nodeCoords[cornerIndices[7]];
int intersectionCount = RigHexIntersector::lineHexCellIntersection(p1, p2, hexCorners, closeCells[cIdx], &intersections);
//int intersectionCount = RigHexIntersector::lineHexCellIntersection(p1, p2, hexCorners, closeCells[cIdx], &intersections);
RigHexIntersector::lineHexCellIntersection(p1, p2, hexCorners, closeCells[cIdx], &intersections);
}
if (!isCellFaceNormalsOut)

View File

@ -154,7 +154,8 @@ void RigGeoMechWellLogExtractor::calculateIntersection()
hexCorners[6] = cvf::Vec3d(nodeCoords[cornerIndices[6]]);
hexCorners[7] = cvf::Vec3d(nodeCoords[cornerIndices[7]]);
int intersectionCount = RigHexIntersector::lineHexCellIntersection(p1, p2, hexCorners, closeCells[ccIdx], &intersections);
//int intersectionCount = RigHexIntersector::lineHexCellIntersection(p1, p2, hexCorners, closeCells[ccIdx], &intersections);
RigHexIntersector::lineHexCellIntersection(p1, p2, hexCorners, closeCells[ccIdx], &intersections);
}
// Now, with all the intersections of this piece of line, we need to

View File

@ -35,8 +35,6 @@ void RigGridManager::addCase(RigCaseData* eclipseCase)
//--------------------------------------------------------------------------------------------------
void RigGridManager::removeCase(RigCaseData* eclipseCase)
{
size_t indexToErase = cvf::UNDEFINED_SIZE_T;
for (size_t i = 0; i < m_caseToGrid.size(); i++)
{
if (m_caseToGrid[i]->m_eclipseCase == eclipseCase)

View File

@ -136,7 +136,6 @@ void RigReservoirBuilderMock::appendCubeNodes(const cvf::Vec3d& min, const cvf::
//--------------------------------------------------------------------------------------------------
void RigReservoirBuilderMock::appendCells(size_t nodeStartIndex, size_t cellCount, RigGridBase* hostGrid, std::vector<RigCell>& cells)
{
size_t activeCellIndex = 0;
long long i;
size_t cellIndexStart = cells.size();
@ -347,11 +346,8 @@ bool RigReservoirBuilderMock::dynamicResult(RigCaseData* eclipseCase, const QStr
#pragma omp parallel for
for (long long k = 0; k < static_cast<long long>(eclipseCase->mainGrid()->cells().size()); k++)
{
RigCell& cell = eclipseCase->mainGrid()->cells()[k];
{
double val = offsetValue + scaleValue * ( (stepIndex * 1000 + k) % eclipseCase->mainGrid()->cells().size() );
values->at(k) = val;
}
double val = offsetValue + scaleValue * ( (stepIndex * 1000 + k) % eclipseCase->mainGrid()->cells().size() );
values->at(k) = val;
}
// Set result size to zero for some timesteps

View File

@ -155,8 +155,6 @@ void RigSingleWellResultsData::computeStaticWellCellPath()
std::vector<RigWellResultPoint>& resBranch = m_wellCellsTimeSteps[tIdx].m_wellResultBranches[bIdx].m_branchResultPoints;
std::list< RigWellResultPoint >& stBranch = staticWellBranches[branchId];
std::list< RigWellResultPoint >::iterator it;
std::list< RigWellResultPoint >::iterator sStartIt;
std::list< RigWellResultPoint >::iterator sEndIt;
size_t rStartIdx;
size_t rEndIdx;
@ -190,7 +188,6 @@ void RigSingleWellResultsData::computeStaticWellCellPath()
rEndIdx = 0;
}
sStartIt = sEndIt;
rStartIdx = rEndIdx;
}
@ -227,7 +224,6 @@ void RigSingleWellResultsData::computeStaticWellCellPath()
rEndIdx = rStartIdx;
}
sStartIt = sEndIt;
rStartIdx = rEndIdx;
}

View File

@ -105,7 +105,6 @@ bool RigWellLogFile::open(const QString& fileName, QString* errorMessage)
QStringList wellLogNames;
const std::map<std::string, std::vector<double> >& contLogs = well->GetContLog();
std::vector<std::string> contLogNames;
std::map<std::string, std::vector<double> >::const_iterator itCL;
for (itCL = contLogs.begin(); itCL != contLogs.end(); itCL++)
{

View File

@ -89,7 +89,6 @@ public:
// dv(2) = cellCountK;
// dv(3) = 3;
cvf::Vec3d cornerVerts[8];
size_t blockByteCount = cellCount * sizeof(double);
std::vector<double> doubleValues(blockByteCount);