mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Work in progress
This commit is contained in:
@@ -189,7 +189,7 @@ public:
|
||||
hostCellK.reserve( numMatrixModelActiveCells );
|
||||
globalCoarseningBoxIdx.reserve( numMatrixModelActiveCells );
|
||||
|
||||
const std::vector<RigCell>& reservoirCells = reservoirCase->eclipseCaseData()->mainGrid()->globalCellArray();
|
||||
auto mainGrid = reservoirCase->eclipseCaseData()->mainGrid();
|
||||
|
||||
std::vector<size_t> globalCoarseningBoxIndexStart;
|
||||
{
|
||||
@@ -206,13 +206,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
for ( size_t cIdx = 0; cIdx < reservoirCells.size(); ++cIdx )
|
||||
for ( size_t ncIdx = 0; ncIdx < mainGrid->cellCount(); ++ncIdx )
|
||||
{
|
||||
if ( actCellInfo->isActive( cIdx ) )
|
||||
if ( actCellInfo->isActive( ncIdx ) )
|
||||
{
|
||||
RigGridBase* grid = reservoirCells[cIdx].hostGrid();
|
||||
RigGridBase* grid = mainGrid->nativeCell( ncIdx ).hostGrid();
|
||||
CVF_ASSERT( grid != nullptr );
|
||||
size_t cellIndex = reservoirCells[cIdx].gridLocalCellIndex();
|
||||
size_t cellIndex = mainGrid->nativeCell( ncIdx ).gridLocalCellIndex();
|
||||
|
||||
size_t i, j, k;
|
||||
grid->ijkFromCellIndex( cellIndex, &i, &j, &k );
|
||||
@@ -229,7 +229,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t parentCellIdx = reservoirCells[cIdx].parentCellIndex();
|
||||
size_t parentCellIdx = mainGrid->nativeCell( ncIdx ).parentCellIndex();
|
||||
parentGrid = ( static_cast<RigLocalGrid*>( grid ) )->parentGrid();
|
||||
CVF_ASSERT( parentGrid != nullptr );
|
||||
parentGrid->ijkFromCellIndex( parentCellIdx, &pi, &pj, &pk );
|
||||
@@ -245,7 +245,7 @@ public:
|
||||
hostCellJ.push_back( static_cast<qint32>( pj + 1 ) ); // NB: 1-based index in Octave
|
||||
hostCellK.push_back( static_cast<qint32>( pk + 1 ) ); // NB: 1-based index in Octave
|
||||
|
||||
size_t coarseningIdx = reservoirCells[cIdx].coarseningBoxIndex();
|
||||
size_t coarseningIdx = mainGrid->nativeCell( ncIdx ).coarseningBoxIndex();
|
||||
if ( coarseningIdx != cvf::UNDEFINED_SIZE_T )
|
||||
{
|
||||
size_t globalCoarseningIdx = globalCoarseningBoxIndexStart[grid->gridIndex()] + coarseningIdx;
|
||||
|
||||
@@ -203,11 +203,11 @@ public:
|
||||
{
|
||||
quint64 valueIndex = 0;
|
||||
|
||||
for ( size_t reservoirCellIndex = 0; reservoirCellIndex < mainGrid->globalCellArray().size(); reservoirCellIndex++ )
|
||||
for ( size_t nativeCellIndex = 0; nativeCellIndex < mainGrid->cellCount(); nativeCellIndex++ )
|
||||
{
|
||||
if ( !actCellInfo->isActive( reservoirCellIndex ) ) continue;
|
||||
if ( !actCellInfo->isActive( nativeCellIndex ) ) continue;
|
||||
|
||||
cvf::Vec3d center = mainGrid->globalCellArray()[reservoirCellIndex].center();
|
||||
cvf::Vec3d center = mainGrid->nativeCell( nativeCellIndex ).center();
|
||||
|
||||
convertVec3dToPositiveDepth( ¢er );
|
||||
|
||||
@@ -377,11 +377,11 @@ public:
|
||||
|
||||
quint64 valueIndex = 0;
|
||||
|
||||
for ( size_t reservoirCellIndex = 0; reservoirCellIndex < mainGrid->globalCellArray().size(); reservoirCellIndex++ )
|
||||
for ( size_t nativeCellIndex = 0; nativeCellIndex < mainGrid->cellCount(); nativeCellIndex++ )
|
||||
{
|
||||
if ( !actCellInfo->isActive( reservoirCellIndex ) ) continue;
|
||||
if ( !actCellInfo->isActive( nativeCellIndex ) ) continue;
|
||||
|
||||
mainGrid->cellCornerVertices( reservoirCellIndex, cornerVerts );
|
||||
mainGrid->cellCornerVertices( nativeCellIndex, cornerVerts );
|
||||
|
||||
doubleValues[valueIndex++] = getCellCornerWithPositiveDepth( cornerVerts, cornerIndexMapping, coordIdx );
|
||||
}
|
||||
|
||||
@@ -73,8 +73,8 @@ public:
|
||||
{
|
||||
RigConnection connection = mainGrid->nncData()->allConnections()[i];
|
||||
|
||||
const RigCell& cell1 = mainGrid->globalCellArray()[connection.c1GlobIdx()];
|
||||
const RigCell& cell2 = mainGrid->globalCellArray()[connection.c2GlobIdx()];
|
||||
const RigCell& cell1 = mainGrid->cell( connection.c1GlobIdx() );
|
||||
const RigCell& cell2 = mainGrid->cell( connection.c2GlobIdx() );
|
||||
|
||||
sendCellInfo( socketStream, cell1 );
|
||||
sendCellInfo( socketStream, cell2 );
|
||||
|
||||
@@ -933,7 +933,7 @@ public:
|
||||
// The size of this array must match the test in RigCaseCellResultsData::isUsingGlobalActiveIndex(),
|
||||
// as it is used to determine if we have data for active cells or all cells
|
||||
// See RigCaseCellResultsData::isUsingGlobalActiveIndex()
|
||||
size_t totalNumberOfCellsIncludingLgrCells = grid->mainGrid()->globalCellArray().size();
|
||||
size_t totalNumberOfCellsIncludingLgrCells = grid->mainGrid()->cellCount();
|
||||
|
||||
m_scalarResultsToAdd->at( tsId ).resize( totalNumberOfCellsIncludingLgrCells, HUGE_VAL );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user