mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#9622: Exclude cells with very small volumes
This commit is contained in:
parent
1bbe02614b
commit
62a13d3847
@ -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 +=
|
||||
|
Loading…
Reference in New Issue
Block a user