diff --git a/libsrc/meshing/meshfunc.cpp b/libsrc/meshing/meshfunc.cpp index 4427318e..91dee1be 100644 --- a/libsrc/meshing/meshfunc.cpp +++ b/libsrc/meshing/meshfunc.cpp @@ -721,7 +721,9 @@ namespace netgen if(mesh3d.GetNDomains()==0) return MESHING3_OK; - if (!mesh3d.HasLocalHFunction()) mesh3d.CalcLocalH(mp.grading); + // localh function is built for each domain separately in blockfill ( more efficient ) + if (!mesh3d.HasLocalHFunction() && !mp.blockfill) + mesh3d.CalcLocalH(mp.grading); auto md = DivideMesh(mesh3d, mp); diff --git a/libsrc/meshing/meshing3.cpp b/libsrc/meshing/meshing3.cpp index 5798302f..3d1b7341 100644 --- a/libsrc/meshing/meshing3.cpp +++ b/libsrc/meshing/meshing3.cpp @@ -1182,7 +1182,12 @@ void Meshing3 :: BlockFillLocalH (Mesh & mesh, const MeshingParameters & mp) { static Timer t("Mesing3::BlockFillLocalH"); RegionTimer reg(t); - // PrepareBlockFillLocalH(mesh, mp); + + if (!mesh.HasLocalHFunction()) + { + mesh.CalcLocalH(mp.grading); + PrepareBlockFillLocalH(mesh, mp); + } double filldist = mp.filldist;