mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Reduce NNC memory use
This commit is contained in:
committed by
Magne Sjaastad
parent
34dcd3c737
commit
97dd891d38
@@ -2366,11 +2366,11 @@ void RigCaseCellResultsData::computeNncCombRiTrans()
|
||||
|
||||
// Connection geometry
|
||||
|
||||
cvf::Vec3d faceAreaVec = cvf::Vec3d::ZERO;
|
||||
cvf::Vec3d faceCenter = cvf::Vec3d::ZERO;
|
||||
cvf::Vec3f faceAreaVec = cvf::Vec3f::ZERO;
|
||||
cvf::Vec3f faceCenter = cvf::Vec3f::ZERO;
|
||||
|
||||
// Polygon center
|
||||
const std::vector<cvf::Vec3d>& realPolygon = nncConnections[connIdx].m_polygon;
|
||||
const std::vector<cvf::Vec3f>& realPolygon = nncConnections[connIdx].m_polygon;
|
||||
for ( size_t pIdx = 0; pIdx < realPolygon.size(); ++pIdx )
|
||||
{
|
||||
faceCenter += realPolygon[pIdx];
|
||||
@@ -2400,7 +2400,7 @@ void RigCaseCellResultsData::computeNncCombRiTrans()
|
||||
ntg = ( *ntgResults )[ntgResIdx];
|
||||
}
|
||||
|
||||
halfCellTrans = halfCellTransmissibility( perm, ntg, centerToFace, faceAreaVec );
|
||||
halfCellTrans = halfCellTransmissibility( perm, ntg, centerToFace, cvf::Vec3d( faceAreaVec ) );
|
||||
}
|
||||
|
||||
// Neighbor cell half cell transm
|
||||
@@ -2417,7 +2417,7 @@ void RigCaseCellResultsData::computeNncCombRiTrans()
|
||||
ntg = ( *ntgResults )[ntgResIdx];
|
||||
}
|
||||
|
||||
neighborHalfCellTrans = halfCellTransmissibility( perm, ntg, centerToFace, -faceAreaVec );
|
||||
neighborHalfCellTrans = halfCellTransmissibility( perm, ntg, centerToFace, -cvf::Vec3d( faceAreaVec ) );
|
||||
}
|
||||
|
||||
double newtranTemp = newtran( cdarchy, 1.0, halfCellTrans, neighborHalfCellTrans );
|
||||
@@ -2686,8 +2686,8 @@ void RigCaseCellResultsData::computeNncCombRiTRANSbyArea()
|
||||
|
||||
for ( size_t nncConIdx = 0; nncConIdx < riAreaNormTransResults.size(); ++nncConIdx )
|
||||
{
|
||||
const std::vector<cvf::Vec3d>& realPolygon = connections[nncConIdx].m_polygon;
|
||||
cvf::Vec3d faceAreaVec = cvf::GeometryTools::polygonAreaNormal3D( realPolygon );
|
||||
const std::vector<cvf::Vec3f>& realPolygon = connections[nncConIdx].m_polygon;
|
||||
cvf::Vec3f faceAreaVec = cvf::GeometryTools::polygonAreaNormal3D( realPolygon );
|
||||
double areaOfOverlap = faceAreaVec.length();
|
||||
|
||||
riAreaNormTransResults[nncConIdx] = ( *transResults )[nncConIdx] / areaOfOverlap;
|
||||
|
||||
Reference in New Issue
Block a user