mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Some cleanup
This commit is contained in:
@@ -227,98 +227,6 @@ bool RifReaderOpmCommonActive::importGrid( RigMainGrid* /* mainGrid*/, RigEclips
|
||||
|
||||
return true;
|
||||
}
|
||||
//
|
||||
////--------------------------------------------------------------------------------------------------
|
||||
/////
|
||||
////--------------------------------------------------------------------------------------------------
|
||||
// void RifReaderOpmCommonActive::transferActiveGeometry( Opm::EclIO::EGrid& opmMainGrid,
|
||||
// RigActiveCellGrid* activeGrid,
|
||||
// RigEclipseCaseData* eclipseCaseData )
|
||||
//{
|
||||
// int cellCount = opmMainGrid.totalActiveCells();
|
||||
//
|
||||
// RigCell defaultCell;
|
||||
// defaultCell.setHostGrid( activeGrid );
|
||||
// for ( size_t i = 0; i < 8; i++ )
|
||||
// defaultCell.cornerIndices()[i] = 0;
|
||||
//
|
||||
// activeGrid->reservoirCells().resize( cellCount + 1, defaultCell );
|
||||
// activeGrid->reservoirCells()[cellCount].setInvalid( true );
|
||||
//
|
||||
// activeGrid->nodes().resize( ( cellCount + 1 ) * 8, cvf::Vec3d( 0, 0, 0 ) );
|
||||
//
|
||||
// auto& riNodes = activeGrid->nodes();
|
||||
//
|
||||
// opmMainGrid.loadData();
|
||||
// opmMainGrid.load_grid_data();
|
||||
//
|
||||
// const bool isRadialGrid = opmMainGrid.is_radial();
|
||||
// const auto& activeMatIndexes = opmMainGrid.active_indexes();
|
||||
// const auto& activeFracIndexes = opmMainGrid.active_frac_indexes();
|
||||
//
|
||||
// // Compute the center of the LGR radial grid cells for each K layer
|
||||
// auto radialGridCenterTopLayerOpm = isRadialGrid
|
||||
// ? RifOpmRadialGridTools::computeXyCenterForTopOfCells( opmMainGrid, opmMainGrid, activeGrid )
|
||||
// : std::map<int, std::pair<double, double>>();
|
||||
//
|
||||
// const bool invalidateLongPyramidCells = invalidateLongThinCells();
|
||||
//
|
||||
// // use same mapping as resdata
|
||||
// const size_t cellMappingECLRi[8] = { 0, 1, 3, 2, 4, 5, 7, 6 };
|
||||
//
|
||||
// #pragma omp parallel for
|
||||
// for ( int opmCellIndex = 0; opmCellIndex < static_cast<int>( opmMainGrid.totalNumberOfCells() ); opmCellIndex++ )
|
||||
// {
|
||||
// if ( ( activeMatIndexes[opmCellIndex] < 0 ) && ( activeFracIndexes[opmCellIndex] < 0 ) ) continue;
|
||||
//
|
||||
// auto opmIJK = opmMainGrid.ijk_from_global_index( opmCellIndex );
|
||||
//
|
||||
// double xCenterCoordOpm = 0.0;
|
||||
// double yCenterCoordOpm = 0.0;
|
||||
//
|
||||
// if ( isRadialGrid && radialGridCenterTopLayerOpm.contains( opmIJK[2] ) )
|
||||
// {
|
||||
// const auto& [xCenter, yCenter] = radialGridCenterTopLayerOpm[opmIJK[2]];
|
||||
// xCenterCoordOpm = xCenter;
|
||||
// yCenterCoordOpm = yCenter;
|
||||
// }
|
||||
//
|
||||
// auto nativeIndex = activeGrid->cellIndexFromIJK( opmIJK[0], opmIJK[1], opmIJK[2] );
|
||||
// RigCell& cell = activeGrid->nativeCell( nativeIndex );
|
||||
// // auto globalIndex = activeGrid->nativeCellIndexToGlobal( nativeIndex );
|
||||
// cell.setGridLocalCellIndex( nativeIndex );
|
||||
// cell.setParentCellIndex( cvf::UNDEFINED_SIZE_T );
|
||||
//
|
||||
// // corner coordinates
|
||||
// std::array<double, 8> opmX{};
|
||||
// std::array<double, 8> opmY{};
|
||||
// std::array<double, 8> opmZ{};
|
||||
// opmMainGrid.getCellCorners( opmCellIndex, opmX, opmY, opmZ );
|
||||
//
|
||||
// // Each cell has 8 nodes, use active cell index and multiply to find first node index for cell
|
||||
// auto riNodeStartIndex = nativeIndex * 8;
|
||||
//
|
||||
// for ( size_t opmNodeIndex = 0; opmNodeIndex < 8; opmNodeIndex++ )
|
||||
// {
|
||||
// auto riCornerIndex = cellMappingECLRi[opmNodeIndex];
|
||||
// size_t riNodeIndex = riNodeStartIndex + riCornerIndex;
|
||||
//
|
||||
// auto& riNode = riNodes[riNodeIndex];
|
||||
// riNode.x() = opmX[opmNodeIndex] + xCenterCoordOpm;
|
||||
// riNode.y() = opmY[opmNodeIndex] + yCenterCoordOpm;
|
||||
// riNode.z() = -opmZ[opmNodeIndex];
|
||||
//
|
||||
// cell.cornerIndices()[riCornerIndex] = riNodeIndex;
|
||||
// }
|
||||
//
|
||||
// if ( invalidateLongPyramidCells )
|
||||
// {
|
||||
// cell.setInvalid( cell.isLongPyramidCell() );
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if ( riNodes.size() > 1 ) riNodes[riNodes.size() - 1] = riNodes[0];
|
||||
// }
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user