mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: snappyHexMesh: attraction distance mapping. Fixes #941.
This commit is contained in:
@ -306,7 +306,7 @@ void Foam::snappySnapDriver::calcNearestFace
|
||||
(
|
||||
labelList(1, zoneSurfi),
|
||||
fc,
|
||||
sqr(faceSnapDist),// sqr of attract dist
|
||||
sqr(scalarField(faceSnapDist, ppFaces)),// sqr of attract dist
|
||||
hitSurface,
|
||||
hitInfo,
|
||||
hitRegion,
|
||||
@ -382,7 +382,7 @@ void Foam::snappySnapDriver::calcNearestFace
|
||||
(
|
||||
unzonedSurfaces,
|
||||
fc,
|
||||
sqr(faceSnapDist),// sqr of attract dist
|
||||
sqr(scalarField(faceSnapDist, ppFaces)),// sqr of attract dist
|
||||
hitSurface,
|
||||
hitInfo,
|
||||
hitRegion,
|
||||
|
||||
@ -354,6 +354,13 @@ void Foam::searchableSurfacesQueries::findNearest
|
||||
{
|
||||
// Find nearest. Return -1 or nearest point
|
||||
|
||||
if (samples.size() != nearestDistSqr.size())
|
||||
{
|
||||
FatalErrorInFunction << "Inconsistent sizes. samples:" << samples.size()
|
||||
<< " search-radius:" << nearestDistSqr.size()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
// Initialise
|
||||
nearestSurfaces.setSize(samples.size());
|
||||
nearestSurfaces = -1;
|
||||
@ -405,6 +412,14 @@ void Foam::searchableSurfacesQueries::findNearest
|
||||
{
|
||||
// Find nearest. Return -1 or nearest point
|
||||
|
||||
if (samples.size() != nearestDistSqr.size())
|
||||
{
|
||||
FatalErrorInFunction << "Inconsistent sizes. samples:" << samples.size()
|
||||
<< " search-radius:" << nearestDistSqr.size()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
|
||||
if (regionIndices.empty())
|
||||
{
|
||||
findNearest
|
||||
@ -468,6 +483,15 @@ void Foam::searchableSurfacesQueries::findNearest
|
||||
{
|
||||
// Multi-surface findNearest
|
||||
|
||||
|
||||
if (start.size() != distSqr.size())
|
||||
{
|
||||
FatalErrorInFunction << "Inconsistent sizes. samples:" << start.size()
|
||||
<< " search-radius:" << distSqr.size()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
|
||||
vectorField normal;
|
||||
List<pointIndexHit> info;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user