Renamed globalCell to reservoirCell etc.

This commit is contained in:
Jacob Støren 2014-08-08 10:27:29 +02:00 committed by Magne Sjaastad
parent 6cdd9cfdc5
commit 3022a40204
13 changed files with 46 additions and 46 deletions

View File

@ -88,17 +88,17 @@ bool readDoubleValuesForActiveCells(RigCaseData* reservoir, size_t resultIndex,
newPropertyData.push_back(std::vector<double>());
RigActiveCellInfo* activeCellInfo = reservoir->activeCellInfo(RifReaderInterface::MATRIX_RESULTS);
if (activeCellInfo->globalCellCount() > 0 && activeCellInfo->globalCellCount() != activeCellInfo->globalActiveCellCount())
if (activeCellInfo->reservoirCellCount() > 0 && activeCellInfo->reservoirCellCount() != activeCellInfo->reservoirActiveCellCount())
{
std::vector<double> valuesAllCells;
valuesAllCells.resize(ecl_kw_get_size(eclKeyWordData), HUGE_VAL);
ecl_kw_get_data_as_double(eclKeyWordData, valuesAllCells.data());
newPropertyData[0].resize(activeCellInfo->globalActiveCellCount(), HUGE_VAL);
newPropertyData[0].resize(activeCellInfo->reservoirActiveCellCount(), HUGE_VAL);
std::vector<double>& valuesActiveCells = newPropertyData[0];
size_t acIdx = 0;
for (size_t gcIdx = 0; gcIdx < activeCellInfo->globalCellCount(); gcIdx++)
for (size_t gcIdx = 0; gcIdx < activeCellInfo->reservoirCellCount(); gcIdx++)
{
size_t activeCellResultIndex = activeCellInfo->cellResultIndex(gcIdx);
if (activeCellResultIndex != cvf::UNDEFINED_SIZE_T)

View File

@ -287,8 +287,8 @@ bool RifReaderEclipseOutput::transferGeometry(const ecl_grid_type* mainEclGrid,
totalCellCount += ecl_grid_get_global_size(localEclGrid);
}
activeCellInfo->setGlobalCellCount(totalCellCount);
fractureActiveCellInfo->setGlobalCellCount(totalCellCount);
activeCellInfo->setReservoirCellCount(totalCellCount);
fractureActiveCellInfo->setReservoirCellCount(totalCellCount);
// Reserve room for the cells and nodes and fill them with data
@ -570,8 +570,8 @@ bool RifReaderEclipseOutput::readActiveCellInfo()
RigActiveCellInfo* activeCellInfo = m_eclipseCase->activeCellInfo(RifReaderInterface::MATRIX_RESULTS);
RigActiveCellInfo* fractureActiveCellInfo = m_eclipseCase->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS);
activeCellInfo->setGlobalCellCount(globalCellCount);
fractureActiveCellInfo->setGlobalCellCount(globalCellCount);
activeCellInfo->setReservoirCellCount(globalCellCount);
fractureActiveCellInfo->setReservoirCellCount(globalCellCount);
activeCellInfo->setGridCount(actnumKeywordCount);
fractureActiveCellInfo->setGridCount(actnumKeywordCount);
@ -773,7 +773,7 @@ bool RifReaderEclipseOutput::staticResult(const QString& result, PorosityModelRe
if (result.compare("ACTNUM", Qt::CaseInsensitive) == 0)
{
RigActiveCellInfo* activeCellInfo = m_eclipseCase->activeCellInfo(matrixOrFracture);
values->resize(activeCellInfo->globalActiveCellCount(), 1.0);
values->resize(activeCellInfo->reservoirActiveCellCount(), 1.0);
return true;
}
@ -1551,7 +1551,7 @@ QStringList RifReaderEclipseOutput::validKeywordsForPorosityModel(const QStringL
if (matrixOrFracture == RifReaderInterface::FRACTURE_RESULTS)
{
if (fractureActiveCellInfo->globalActiveCellCount() == 0)
if (fractureActiveCellInfo->reservoirActiveCellCount() == 0)
{
return QStringList();
}
@ -1564,16 +1564,16 @@ QStringList RifReaderEclipseOutput::validKeywordsForPorosityModel(const QStringL
QString keyword = keywords[i];
size_t keywordDataCount = keywordDataItemCounts[i];
if (activeCellInfo->globalActiveCellCount() > 0)
if (activeCellInfo->reservoirActiveCellCount() > 0)
{
size_t timeStepsAllCells = keywordDataItemCounts[i] / activeCellInfo->globalCellCount();
size_t timeStepsAllCellsRest = keywordDataItemCounts[i] % activeCellInfo->globalCellCount();
size_t timeStepsAllCells = keywordDataItemCounts[i] / activeCellInfo->reservoirCellCount();
size_t timeStepsAllCellsRest = keywordDataItemCounts[i] % activeCellInfo->reservoirCellCount();
size_t timeStepsMatrix = keywordDataItemCounts[i] / activeCellInfo->globalActiveCellCount();
size_t timeStepsMatrixRest = keywordDataItemCounts[i] % activeCellInfo->globalActiveCellCount();
size_t timeStepsMatrix = keywordDataItemCounts[i] / activeCellInfo->reservoirActiveCellCount();
size_t timeStepsMatrixRest = keywordDataItemCounts[i] % activeCellInfo->reservoirActiveCellCount();
size_t timeStepsMatrixAndFracture = keywordDataItemCounts[i] / (activeCellInfo->globalActiveCellCount() + fractureActiveCellInfo->globalActiveCellCount());
size_t timeStepsMatrixAndFractureRest = keywordDataItemCounts[i] % (activeCellInfo->globalActiveCellCount() + fractureActiveCellInfo->globalActiveCellCount());
size_t timeStepsMatrixAndFracture = keywordDataItemCounts[i] / (activeCellInfo->reservoirActiveCellCount() + fractureActiveCellInfo->reservoirActiveCellCount());
size_t timeStepsMatrixAndFractureRest = keywordDataItemCounts[i] % (activeCellInfo->reservoirActiveCellCount() + fractureActiveCellInfo->reservoirActiveCellCount());
if (matrixOrFracture == RifReaderInterface::MATRIX_RESULTS)
{
@ -1620,7 +1620,7 @@ void RifReaderEclipseOutput::extractResultValuesBasedOnPorosityModel(PorosityMod
RigActiveCellInfo* fracActCellInfo = m_eclipseCase->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS);
if (matrixOrFracture == RifReaderInterface::MATRIX_RESULTS && fracActCellInfo->globalActiveCellCount() == 0)
if (matrixOrFracture == RifReaderInterface::MATRIX_RESULTS && fracActCellInfo->reservoirActiveCellCount() == 0)
{
destinationResultValues->insert(destinationResultValues->end(), sourceResultValues.begin(), sourceResultValues.end());
}

View File

@ -117,8 +117,8 @@ void Rim3dOverlayInfoConfig::update3DInfo()
{
caseName = m_reservoirView->eclipseCase()->caseUserDescription();
totCellCount = QString::number(m_reservoirView->eclipseCase()->reservoirData()->mainGrid()->cells().size());
size_t mxActCellCount = m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->globalActiveCellCount();
size_t frActCellCount = m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->globalActiveCellCount();
size_t mxActCellCount = m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->reservoirActiveCellCount();
size_t frActCellCount = m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->reservoirActiveCellCount();
if (frActCellCount > 0) activeCellCountText += "Matrix : ";
activeCellCountText += QString::number(mxActCellCount);
if (frActCellCount > 0) activeCellCountText += " Fracture : " + QString::number(frActCellCount);

View File

@ -223,7 +223,7 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
//--------------------------------------------------------------------------------------------------
void RimIdenticalGridCaseGroup::computeUnionOfActiveCells()
{
if (m_unionOfMatrixActiveCells->globalActiveCellCount() > 0)
if (m_unionOfMatrixActiveCells->reservoirActiveCellCount() > 0)
{
return;
}
@ -235,8 +235,8 @@ void RimIdenticalGridCaseGroup::computeUnionOfActiveCells()
return;
}
m_unionOfMatrixActiveCells->setGlobalCellCount(m_mainGrid->cells().size());
m_unionOfFractureActiveCells->setGlobalCellCount(m_mainGrid->cells().size());
m_unionOfMatrixActiveCells->setReservoirCellCount(m_mainGrid->cells().size());
m_unionOfFractureActiveCells->setReservoirCellCount(m_mainGrid->cells().size());
m_unionOfMatrixActiveCells->setGridCount(m_mainGrid->gridCount());
m_unionOfFractureActiveCells->setGridCount(m_mainGrid->gridCount());

View File

@ -345,7 +345,7 @@ void RimResultDefinition::updateFieldVisibility()
m_reservoirView->eclipseCase()->reservoirData() &&
m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS) )
{
if (m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->globalActiveCellCount() == 0)
if (m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->reservoirActiveCellCount() == 0)
{
m_porosityModelUiField.setUiHidden(true);
}

View File

@ -103,7 +103,7 @@ void RimStatisticsCaseEvaluator::evaluateForResults(const QList<ResSpec>& result
RimDefines::ResultCatType resultType = resultSpecification[i].m_resType;
QString resultName = resultSpecification[i].m_resVarName;
size_t activeCellCount = m_destinationCase->activeCellInfo(poroModel)->globalActiveCellCount();
size_t activeCellCount = m_destinationCase->activeCellInfo(poroModel)->reservoirActiveCellCount();
RigCaseCellResultsData* destCellResultsData = m_destinationCase->results(poroModel);
// Special handling if SOIL is asked for
@ -172,7 +172,7 @@ void RimStatisticsCaseEvaluator::evaluateForResults(const QList<ResSpec>& result
RimDefines::ResultCatType resultType = resultSpecification[resSpecIdx].m_resType;
QString resultName = resultSpecification[resSpecIdx].m_resVarName;
size_t activeCellCount = m_destinationCase->activeCellInfo(poroModel)->globalActiveCellCount();
size_t activeCellCount = m_destinationCase->activeCellInfo(poroModel)->reservoirActiveCellCount();
if (activeCellCount == 0) continue;

View File

@ -32,7 +32,7 @@ TEST(RigActiveCellInfo, BasicTest)
RigActiveCellInfo rigActiveCellInfo;
size_t globalActiveCellCount = 10;
rigActiveCellInfo.setGlobalCellCount(globalActiveCellCount);
rigActiveCellInfo.setReservoirCellCount(globalActiveCellCount);
for (size_t i = 0; i < globalActiveCellCount; i++)
{
@ -57,7 +57,7 @@ TEST(RigActiveCellInfo, GridCellCounts)
rigActiveCellInfo.setGridActiveCellCounts(2, 2);
rigActiveCellInfo.computeDerivedData();
EXPECT_TRUE(rigActiveCellInfo.globalActiveCellCount() == 3);
EXPECT_TRUE(rigActiveCellInfo.reservoirActiveCellCount() == 3);
}
{
@ -68,6 +68,6 @@ TEST(RigActiveCellInfo, GridCellCounts)
rigActiveCellInfo.setGridActiveCellCounts(2, 5 );
rigActiveCellInfo.computeDerivedData();
EXPECT_TRUE(rigActiveCellInfo.globalActiveCellCount() == 12);
EXPECT_TRUE(rigActiveCellInfo.reservoirActiveCellCount() == 12);
}
}

View File

@ -34,7 +34,7 @@ RigActiveCellInfo::RigActiveCellInfo()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigActiveCellInfo::setGlobalCellCount(size_t globalCellCount)
void RigActiveCellInfo::setReservoirCellCount(size_t globalCellCount)
{
m_cellIndexToResultIndex.resize(globalCellCount, cvf::UNDEFINED_SIZE_T);
}
@ -42,7 +42,7 @@ void RigActiveCellInfo::setGlobalCellCount(size_t globalCellCount)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
size_t RigActiveCellInfo::globalCellCount() const
size_t RigActiveCellInfo::reservoirCellCount() const
{
return m_cellIndexToResultIndex.size();
}
@ -50,7 +50,7 @@ size_t RigActiveCellInfo::globalCellCount() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
size_t RigActiveCellInfo::globalCellResultCount() const
size_t RigActiveCellInfo::reservoirCellResultCount() const
{
return m_globalCellResultCount;
}
@ -134,7 +134,7 @@ void RigActiveCellInfo::computeDerivedData()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
size_t RigActiveCellInfo::globalActiveCellCount() const
size_t RigActiveCellInfo::reservoirActiveCellCount() const
{
return m_globalActiveCellCount;
}

View File

@ -32,10 +32,10 @@ class RigActiveCellInfo : public cvf::Object
public:
RigActiveCellInfo();
void setGlobalCellCount(size_t globalCellCount);
size_t globalCellCount() const;
size_t globalActiveCellCount() const;
size_t globalCellResultCount() const;
void setReservoirCellCount(size_t globalCellCount);
size_t reservoirCellCount() const;
size_t reservoirActiveCellCount() const;
size_t reservoirCellResultCount() const;
bool isCoarseningActive() const;
bool isActive(size_t reservoirCellIndex) const;

View File

@ -247,7 +247,7 @@ void RigReservoirBuilderMock::populateReservoir(RigCaseData* eclipseCase)
// Set all cells active
RigActiveCellInfo* activeCellInfo = eclipseCase->activeCellInfo(RifReaderInterface::MATRIX_RESULTS);
activeCellInfo->setGlobalCellCount(eclipseCase->mainGrid()->cells().size());
activeCellInfo->setReservoirCellCount(eclipseCase->mainGrid()->cells().size());
for (size_t i = 0; i < eclipseCase->mainGrid()->cells().size(); i++)
{
activeCellInfo->setCellResultIndex(i, i);

View File

@ -158,7 +158,7 @@ public:
}
RigActiveCellInfo* actCellInfo = reservoirCase->reservoirData()->activeCellInfo(porosityModel);
size_t numMatrixModelActiveCells = actCellInfo->globalActiveCellCount();
size_t numMatrixModelActiveCells = actCellInfo->reservoirActiveCellCount();
gridNumber.reserve(numMatrixModelActiveCells);
cellI.reserve(numMatrixModelActiveCells);

View File

@ -152,7 +152,7 @@ public:
RigActiveCellInfo* actCellInfo = rimCase->reservoirData()->activeCellInfo(porosityModelEnum);
RigMainGrid* mainGrid = rimCase->reservoirData()->mainGrid();
size_t activeCellCount = actCellInfo->globalActiveCellCount();
size_t activeCellCount = actCellInfo->reservoirActiveCellCount();
size_t doubleValueCount = activeCellCount * 3;
socketStream << (quint64)activeCellCount;
@ -321,7 +321,7 @@ public:
RigActiveCellInfo* actCellInfo = rimCase->reservoirData()->activeCellInfo(porosityModelEnum);
RigMainGrid* mainGrid = rimCase->reservoirData()->mainGrid();
size_t activeCellCount = actCellInfo->globalActiveCellCount();
size_t activeCellCount = actCellInfo->reservoirActiveCellCount();
size_t doubleValueCount = activeCellCount * 3 * 8;
socketStream << (quint64)activeCellCount;

View File

@ -138,7 +138,7 @@ public:
// then the byte-size of the result values in one timestep
const RigActiveCellInfo* activeInfo = rimCase->reservoirData()->activeCellInfo(porosityModelEnum);
size_t timestepResultCount = activeInfo->globalActiveCellCount();
size_t timestepResultCount = activeInfo->reservoirActiveCellCount();
quint64 timestepByteCount = (quint64)(timestepResultCount*sizeof(double));
socketStream << timestepByteCount ;
@ -148,7 +148,7 @@ public:
std::vector<double> values(valueCount);
size_t valueIndex = 0;
size_t globalCellCount = activeInfo->globalCellCount();
size_t globalCellCount = activeInfo->reservoirCellCount();
for (size_t tIdx = 0; tIdx < requestedTimesteps.size(); ++tIdx)
{
std::vector<double>& doubleValues = scalarResultFrames->at(requestedTimesteps[tIdx]);
@ -159,7 +159,7 @@ public:
if (resultIdx < doubleValues.size())
{
if (doubleValues.size() == activeInfo->globalCellCount())
if (doubleValues.size() == activeInfo->reservoirCellCount())
{
// When reading data from input text files, result data is read for all grid cells
// Read out values from data vector using global cell index instead of active cell result index
@ -528,9 +528,9 @@ public:
RigActiveCellInfo* activeCellInfo = m_currentReservoir->reservoirData()->activeCellInfo(m_porosityModelEnum);
size_t globalActiveCellCount = activeCellInfo->globalActiveCellCount();
size_t totalCellCount = activeCellInfo->globalCellCount();
size_t globalCellResultCount = activeCellInfo->globalCellResultCount();
size_t globalActiveCellCount = activeCellInfo->reservoirActiveCellCount();
size_t totalCellCount = activeCellInfo->reservoirCellCount();
size_t globalCellResultCount = activeCellInfo->reservoirCellResultCount();
bool isCoarseningActive = globalCellResultCount != globalActiveCellCount;