Fix excessive hashtable size if meshpoints are close together (happens with boundary layers)

This commit is contained in:
Matthias Hochsteger 2025-02-27 19:44:36 +01:00
parent 9601f70c17
commit 82befccada

View File

@ -106,6 +106,12 @@ namespace netgen
size.i1 = int (boxext.X()/midext.X()/hashelemsizefactor+1);
size.i2 = int (boxext.Y()/midext.Y()/hashelemsizefactor+1);
size.i3 = int (boxext.Z()/midext.Z()/hashelemsizefactor+1);
int nfaces = faces->Size();
size.i1 = min(size.i1, nfaces);
size.i2 = min(size.i2, nfaces);
size.i3 = min(size.i3, nfaces);
// PrintMessage (5, "hashsizes = ", size.i1, ", ", size.i2, ", ", size.i3);
elemsize.X()=boxext.X()/size.i1;