[Gmsh] A suggested improvement to Field::Distance!
cgeuzaine at uliege.be
Mon Apr 22 20:58:51 CEST 2019
Indeed, this part needs to be improved. There's ongoing work on a "real" boundary mesh generator, which will overhaul the whole thing.
> On 17 Apr 2019, at 21:15, Gavin Ridley <gavin.keith.ridley at gmail.com> wrote:
> Seems like the compute distance function in Field.cpp could be quite improved when using OpenCASCADE surfaces by using GeomAPI_ProjectPointOnSurf, which is provided by OpenCASCADE. I recently needed to get a good Distance calculation to make a 3D mesh with a boundary layer. It seems that the current implementation puts several points on the surface (20, hardcoded), which leads to very oscillatory values of the Distance field on slightly long surfaces. I managed to get a satisfactory mesh by cranking this number up to 400, then recompiling.
> Another idea would be adaptively adding more points on long surfaces, so that meshes like the attached picture don't happen. This could probably be done by drawing a bounding box for the whole geometry, and then computing the number of points on the surface so that the error in calculating distance to a surface is bounded by some (maybe) user-adjustable threshold.
> Thanks for gmsh! It's a great tool!
> Gavin Ridley
> gmsh mailing list
> gmsh at onelab.info
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
More information about the gmsh