(#401) Sync Visible Cells: More refactoring

This commit is contained in:
Jacob Støren 2015-09-18 10:40:17 +02:00
parent 577c0c4578
commit 35c6316d9c
2 changed files with 21 additions and 9 deletions

View File

@ -537,18 +537,28 @@ RigCaseToCaseCellMapper::RigCaseToCaseCellMapper(RigMainGrid* masterEclGrid, Rig
}
}
if (matchingCells.size() == 1)
{
m_masterCellOrIntervalIndex[elmIdx] = matchingCells[0];
}
else if (matchingCells.size() > 1)
{
m_masterCellOrIntervalIndex[elmIdx] = -((int)(m_masterCellIndexSeries.size()));
m_masterCellIndexSeries.push_back(matchingCells);
}
storeMapping(elmIdx, matchingCells);
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigCaseToCaseCellMapper::storeMapping(int depCaseCellIdx, const std::vector<int>& masterCaseMatchingCells)
{
if (masterCaseMatchingCells.size() == 1)
{
m_masterCellOrIntervalIndex[depCaseCellIdx] = masterCaseMatchingCells[0];
}
else if (masterCaseMatchingCells.size() > 1)
{
m_masterCellOrIntervalIndex[depCaseCellIdx] = -((int)(m_masterCellIndexSeries.size()));
m_masterCellIndexSeries.push_back(masterCaseMatchingCells);
}
}
#if 0
//--------------------------------------------------------------------------------------------------
/// Follows the HEX8 type in both RigFemTypes and cvf::StructGridInterface

View File

@ -50,6 +50,8 @@ public:
private:
void storeMapping(int depCaseCellIdx, const std::vector<int>& masterCaseMatchingCells);
std::vector<int> m_masterCellOrIntervalIndex;
std::vector<std::vector<int> > m_masterCellIndexSeries;