43 void rayShooting::splitLine
45 const line<point, point>& l,
47 DynamicList<Vb::Point>& initialPoints
53 const scalar minDistFromSurfaceSqr
61 magSqr(midPoint - l.start()) > minDistFromSurfaceSqr
62 &&
magSqr(midPoint - l.end()) > minDistFromSurfaceSqr
85 if (randomiseInitialGrid_)
108 <<
"Point perturbation crosses a surface. Not inserting." 113 initialPoints.append(
toPoint(midPoint));
141 randomPerturbationCoeff_
156 const scalar maxRayLength(surfaces.bounds().mag());
159 label initialPointsSize = 0;
162 initialPointsSize += surfaces[surfI].size();
167 forAll(surfacesToConformTo, surfI)
169 const searchableSurface& s = surfaces[surfacesToConformTo[surfI]];
171 tmp<pointField> faceCentresTmp(s.coordinates());
172 const pointField& faceCentres = faceCentresTmp();
174 Info<<
" Shoot rays from " << s.name() <<
nl 175 <<
" nRays = " << faceCentres.size() <<
endl;
192 randomPerturbationCoeff_
197 label hitSurfaceStart;
213 List<pointIndexHit>(1, surfHitStart),
222 fC - normStart[0]*pert,
223 fC - normStart[0]*maxRayLength,
228 if (surfHitEnd.hit())
234 List<pointIndexHit>(1, surfHitEnd),
238 if ((normStart[0] & normEnd[0]) < 0)
240 line<point, point> l(fC, surfHitEnd.hitPoint());
252 if (procIntersection.hit())
258 procIntersection.hitPoint()
274 return initialPoints.shrink();
virtual List< Vb::Point > initialPoints() const
Return the initial points for the conformalVoronoiMesh.
#define forAll(list, i)
Loop across all elements in list.
const cellShapeControl & cellShapeControls() const
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual List< Vb::Point > initialPoints() const
Return the initial points for the conformalVoronoiMesh.
rayShooting(const dictionary &initialPointsDict, const Time &runTime, Random &rndGen, const conformationSurfaces &geometryToConformTo, const cellShapeControl &cellShapeControls, const autoPtr< backgroundMeshDecomposition > &decomposition)
Construct from components.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Ostream & endl(Ostream &os)
Add newline and flush stream.
PointIndexHit< point > pointIndexHit
static const Vector< scalar > min
const dictionary & detailsDict() const
Const access to the details dictionary.
Macros for easy insertion into run-time selection tables.
dictionary()
Construct top-level dictionary null.
vectorField pointField
pointField is a vectorField.
initialPointsMethod(const word &type, const dictionary &initialPointsDict, const Time &runTime, Random &rndGen, const conformationSurfaces &geometryToConformTo, const cellShapeControl &cellShapeControls, const autoPtr< backgroundMeshDecomposition > &decomposition)
Construct from components.
PointFrompoint toPoint(const Foam::point &p)
List< label > labelList
A List of labels.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
pointIndexHit findLine(const point &start, const point &end) const
Find nearest intersection of line between start and end, (exposing.
static bool & parRun()
Is this a parallel run?
#define WarningInFunction
Report a warning using Foam::Warning.
const conformationSurfaces & geometryToConformTo() const
Field< vector > vectorField
Specialisation of Field<T> for vector.
const backgroundMeshDecomposition & decomposition() const
scalar scalar01()
Scalar [0..1] (so including 0,1)
scalar minimumSurfaceDistanceCoeffSqr_
Only allow the placement of initial points that are within the.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.