mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improve NNC memory use
This commit is contained in:
committed by
Magne Sjaastad
parent
97dd891d38
commit
ab0b05b31c
@@ -41,8 +41,8 @@ void RigNNCData::processNativeConnections( const RigMainGrid& mainGrid )
|
||||
|
||||
for ( size_t cnIdx = 0; cnIdx < m_connections.size(); ++cnIdx )
|
||||
{
|
||||
const RigCell& c1 = mainGrid.globalCellArray()[m_connections[cnIdx].m_c1GlobIdx];
|
||||
const RigCell& c2 = mainGrid.globalCellArray()[m_connections[cnIdx].m_c2GlobIdx];
|
||||
const RigCell& c1 = mainGrid.globalCellArray()[m_connections[cnIdx].c1GlobIdx()];
|
||||
const RigCell& c2 = mainGrid.globalCellArray()[m_connections[cnIdx].c2GlobIdx()];
|
||||
|
||||
std::vector<size_t> connectionPolygon;
|
||||
std::vector<cvf::Vec3d> connectionIntersections;
|
||||
@@ -53,21 +53,9 @@ void RigNNCData::processNativeConnections( const RigMainGrid& mainGrid )
|
||||
|
||||
if ( connectionFace != cvf::StructGridInterface::NO_FACE )
|
||||
{
|
||||
// Found an overlap polygon. Store data about connection
|
||||
|
||||
m_connections.face( cnIdx ) = connectionFace;
|
||||
|
||||
m_connections.polygon( cnIdx ) =
|
||||
RigCellFaceGeometryTools::extractPolygon( mainGrid.nodes(), connectionPolygon, connectionIntersections );
|
||||
|
||||
// Add to search map, possibly not needed
|
||||
// m_cellIdxToFaceToConnectionIdxMap[m_connections[cnIdx].m_c1GlobIdx][connectionFace].push_back(cnIdx);
|
||||
// m_cellIdxToFaceToConnectionIdxMap[m_connections[cnIdx].m_c2GlobIdx][cvf::StructGridInterface::oppositeFace(connectionFace].push_back(cnIdx);
|
||||
}
|
||||
else
|
||||
{
|
||||
// cvf::Trace::show("NNC: No overlap found for : C1: " + cvf::String((int)m_connections[cnIdx].m_c1GlobIdx)
|
||||
// + "C2: " + cvf::String((int)m_connections[cnIdx].m_c2GlobIdx));
|
||||
m_connections[cnIdx].setFace( connectionFace );
|
||||
m_connections[cnIdx].setPolygon(
|
||||
RigCellFaceGeometryTools::extractPolygon( mainGrid.nodes(), connectionPolygon, connectionIntersections ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -80,13 +68,12 @@ void RigNNCData::computeCompleteSetOfNncs( const RigMainGrid* mainGrid,
|
||||
bool includeInactiveCells )
|
||||
{
|
||||
m_nativeConnectionCount = m_connections.size();
|
||||
|
||||
RigConnectionContainer otherConnections =
|
||||
RigCellFaceGeometryTools::computeOtherNncs( mainGrid, m_connections, activeCellInfo, includeInactiveCells );
|
||||
|
||||
if ( !otherConnections.empty() )
|
||||
{
|
||||
m_connections.insert( otherConnections );
|
||||
m_connections.push_back( otherConnections );
|
||||
|
||||
// Transmissibility values from Eclipse has been read into propertyNameCombTrans in
|
||||
// RifReaderEclipseOutput::transferStaticNNCData(). Initialize computed NNCs with zero transmissibility
|
||||
|
||||
Reference in New Issue
Block a user