ENH: foamyHexMesh: calc maxRayLength from bounds of surface

This commit is contained in:
laurence
2013-08-29 16:04:24 +01:00
parent 8dda57ddbf
commit 20a8649a00
2 changed files with 4 additions and 5 deletions

View File

@ -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())

View File

@ -54,8 +54,6 @@ private:
// Private data
const scalar maxRayLength_;
//- Should the initial positions be randomised
Switch randomiseInitialGrid_;