mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#401) Sync Visible Cells: More refactoring
This commit is contained in:
parent
577c0c4578
commit
35c6316d9c
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user