Skip to content

snappyHexMesh type castellatedBufferLayer crashes when using addBufferLayers false and true for adjacent patches

Summary

The new buffer layer feature of SnappyHexMesh looks awesome, but there are still some bugs to fix. This one is about fatal error crashing, which takes place when addBufferLayers false is specified for one patch, addBufferLayers true is specified for another patch, and the patches are next to each other, sharing some edges.

Steps to reproduce

See example case

Example case

This example case has walls patch, and top patch of a cube, with different setting of addBufferLayers. Run blockMesh, surfaceFeatureExtract and snappyHexMesh to reproduce

bugcase.zip

What is the current bug behaviour?

Crashing with following fatal error:

--> FOAM FATAL ERROR: (openfoam-2412)
Inconsistent sizes. samples:2482 search-radius:2402

    From static void Foam::searchableSurfacesQueries::findNearest(const Foam::PtrList<Foam::searchableSurface>&, const Foam::labelList&, const Foam::pointField&, const Foam::scalarField&, Foam::labelList&, Foam::List<Foam::PointIndexHit<Foam::Vector<double> > >&)
    in file searchableSurfaces/searchableSurfacesQueries/searchableSurfacesQueries.C at line 362.

What is the expected correct behavior?

No crashing. Buffer layers added to specified patches only.

Environment information

  • OpenFOAM version : v2412, installed from prebuilt deb packages
  • Operating system : ubuntu
  • Hardware info : x64
  • Compiler : gcc