Reviewed and simplified DataAccess classes.

Includes some const changes and some renaming
p4#: 20687
This commit is contained in:
Jacob Støren
2013-03-01 16:00:34 +01:00
parent cd0b40ef20
commit 1181d62b75
12 changed files with 138 additions and 139 deletions

View File

@@ -45,7 +45,7 @@ void RigActiveCellInfo::setGlobalCellCount(size_t globalCellCount)
//--------------------------------------------------------------------------------------------------
bool RigActiveCellInfo::isActiveInMatrixModel(size_t globalCellIndex) const
{
if (globalCellIndex >= m_activeInMatrixModel.size()) return false;
CVF_TIGHT_ASSERT(globalCellIndex < m_activeInMatrixModel.size());
return m_activeInMatrixModel[globalCellIndex] != cvf::UNDEFINED_SIZE_T;
}
@@ -55,7 +55,7 @@ bool RigActiveCellInfo::isActiveInMatrixModel(size_t globalCellIndex) const
//--------------------------------------------------------------------------------------------------
size_t RigActiveCellInfo::activeIndexInMatrixModel(size_t globalCellIndex) const
{
if (globalCellIndex >= m_activeInMatrixModel.size()) return cvf::UNDEFINED_SIZE_T;
CVF_TIGHT_ASSERT(globalCellIndex < m_activeInMatrixModel.size());
return m_activeInMatrixModel[globalCellIndex];
}
@@ -75,7 +75,7 @@ void RigActiveCellInfo::setActiveIndexInMatrixModel(size_t globalCellIndex, size
//--------------------------------------------------------------------------------------------------
bool RigActiveCellInfo::isActiveInFractureModel(size_t globalCellIndex) const
{
if (globalCellIndex >= m_activeInFractureModel.size()) return false;
CVF_TIGHT_ASSERT(globalCellIndex < m_activeInFractureModel.size());
return m_activeInFractureModel[globalCellIndex] != cvf::UNDEFINED_SIZE_T;
}
@@ -85,7 +85,7 @@ bool RigActiveCellInfo::isActiveInFractureModel(size_t globalCellIndex) const
//--------------------------------------------------------------------------------------------------
size_t RigActiveCellInfo::activeIndexInFractureModel(size_t globalCellIndex) const
{
if (globalCellIndex >= m_activeInFractureModel.size()) return cvf::UNDEFINED_SIZE_T;
CVF_TIGHT_ASSERT(globalCellIndex < m_activeInFractureModel.size());
return m_activeInFractureModel[globalCellIndex];
}
@@ -133,10 +133,6 @@ void RigActiveCellInfo::computeDerivedData()
m_globalFractureModelActiveCellCount += m_perGridActiveCellInfo[i].fractureModelActiveCellCount();
}
if (m_globalFractureModelActiveCellCount == 0)
{
m_activeInFractureModel.resize(0);
}
}
//--------------------------------------------------------------------------------------------------