Commit 20a8649a authored by laurence's avatar laurence
Browse files

ENH: foamyHexMesh: calc maxRayLength from bounds of surface

parent 8dda57dd
......@@ -59,7 +59,6 @@ rayShooting::rayShooting
cellShapeControls,
decomposition
),
maxRayLength_(readScalar(detailsDict().lookup("maxRayLength"))),
randomiseInitialGrid_(detailsDict().lookup("randomiseInitialGrid")),
randomPerturbationCoeff_
(
......@@ -76,6 +75,8 @@ List<Vb::Point> rayShooting::initialPoints() const
const searchableSurfaces& surfaces = geometryToConformTo().geometry();
const labelList& surfacesToConformTo = geometryToConformTo().surfaces();
const scalar maxRayLength = surfaces.bounds().mag();
// Initialise points list
label initialPointsSize = 0;
forAll(surfaces, surfI)
......@@ -140,7 +141,7 @@ List<Vb::Point> rayShooting::initialPoints() const
geometryToConformTo().findSurfaceNearestIntersection
(
fC - normStart[0]*SMALL,
fC - normStart[0]*maxRayLength_,
fC - normStart[0]*maxRayLength,
surfHitEnd,
hitSurfaceEnd
);
......@@ -166,7 +167,7 @@ List<Vb::Point> rayShooting::initialPoints() const
decomposition().findLine
(
l.start() + l.vec()*SMALL,
l.end() - l.vec()*maxRayLength_
l.end() - l.vec()*maxRayLength
);
if (procIntersection.hit())
......
......@@ -54,8 +54,6 @@ private:
// Private data
const scalar maxRayLength_;
//- Should the initial positions be randomised
Switch randomiseInitialGrid_;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment