Skip to content
Snippets Groups Projects
Commit 067c80b0 authored by laurence's avatar laurence
Browse files

ENH: foamyHexMesh: correct proc boundary intersection in ray shooting

parent 20a8649a
Branches
Tags
No related merge requests found
...@@ -140,7 +140,7 @@ List<Vb::Point> rayShooting::initialPoints() const ...@@ -140,7 +140,7 @@ List<Vb::Point> rayShooting::initialPoints() const
geometryToConformTo().findSurfaceNearestIntersection geometryToConformTo().findSurfaceNearestIntersection
( (
fC - normStart[0]*SMALL, fC - normStart[0]*pert,
fC - normStart[0]*maxRayLength, fC - normStart[0]*maxRayLength,
surfHitEnd, surfHitEnd,
hitSurfaceEnd hitSurfaceEnd
...@@ -166,8 +166,8 @@ List<Vb::Point> rayShooting::initialPoints() const ...@@ -166,8 +166,8 @@ List<Vb::Point> rayShooting::initialPoints() const
pointIndexHit procIntersection = pointIndexHit procIntersection =
decomposition().findLine decomposition().findLine
( (
l.start() + l.vec()*SMALL, l.start(),
l.end() - l.vec()*maxRayLength l.end()
); );
if (procIntersection.hit()) if (procIntersection.hit())
...@@ -187,19 +187,19 @@ List<Vb::Point> rayShooting::initialPoints() const ...@@ -187,19 +187,19 @@ List<Vb::Point> rayShooting::initialPoints() const
minimumSurfaceDistanceCoeffSqr_ minimumSurfaceDistanceCoeffSqr_
*sqr(cellShapeControls().cellSize(midPoint)); *sqr(cellShapeControls().cellSize(midPoint));
if (randomiseInitialGrid_)
{
midPoint.x() += pert*(rndGen().scalar01() - 0.5);
midPoint.y() += pert*(rndGen().scalar01() - 0.5);
midPoint.z() += pert*(rndGen().scalar01() - 0.5);
}
if if
( (
magSqr(midPoint - l.start()) > minDistFromSurfaceSqr magSqr(midPoint - l.start()) > minDistFromSurfaceSqr
&& magSqr(midPoint - l.end()) > minDistFromSurfaceSqr && magSqr(midPoint - l.end()) > minDistFromSurfaceSqr
) )
{ {
if (randomiseInitialGrid_)
{
midPoint.x() += pert*(rndGen().scalar01() - 0.5);
midPoint.y() += pert*(rndGen().scalar01() - 0.5);
midPoint.z() += pert*(rndGen().scalar01() - 0.5);
}
initialPoints.append(toPoint(midPoint)); initialPoints.append(toPoint(midPoint));
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment