mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -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
|
|||||||
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
|
|||||||
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user