mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-12 16:32:12 -05:00
#9622: Exclude cells with very small volumes
This commit is contained in:
1 parent
1bbe02614b
commit
62a13d3847
1 file changed
+11
@@ -36,6 +36,7 @@
|
||||
|
||||
#include "cvfStructGrid.h"
|
||||
#include "cvfBase.h"
|
||||
#include "cvfBoundingBox.h"
|
||||
|
||||
namespace caf
|
||||
{
|
||||
@@ -360,6 +361,16 @@ void StructGridInterface::characteristicCellSizes( double* iSize, double* jSize,
|
||||
size_t cellIndex = cellIndexFromIJK( i, j, k );
|
||||
cellCornerVertices( cellIndex, cornerVerts );
|
||||
|
||||
cvf::BoundingBox bb;
|
||||
for ( const auto& v : cornerVerts )
|
||||
{
|
||||
bb.add( v );
|
||||
}
|
||||
|
||||
// Exclude cells with very small volumes
|
||||
const double tolerance = 0.2;
|
||||
if ( bb.extent().z() < tolerance ) continue;
|
||||
|
||||
iLengthAccumulated +=
|
||||
( cornerVerts[faceConnPosI[0]] - cornerVerts[faceConnNegI[0]] ).lengthSquared();
|
||||
iLengthAccumulated +=
|
||||
|
||||
Reference in new issue
Block a user