Go to the documentation of this file.
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
89 midPoint.x() + pert*(
rndGen().scalar01() - 0.5),
90 midPoint.y() + pert*(
rndGen().scalar01() - 0.5),
91 midPoint.z() + pert*(
rndGen().scalar01() - 0.5)
108 <<
"Point perturbation crosses a surface. Not inserting."
122 const dictionary& initialPointsDict,
125 const conformationSurfaces& geometryToConformTo,
126 const cellShapeControl& cellShapeControls,
127 const autoPtr<backgroundMeshDecomposition>& decomposition
140 randomiseInitialGrid_(detailsDict().
lookup(
"randomiseInitialGrid")),
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;
197 label hitSurfaceStart;
222 fC - normStart[0]*pert,
223 fC - normStart[0]*maxRayLength,
228 if (surfHitEnd.hit())
238 if ((normStart[0] & normEnd[0]) < 0)
240 line<point, point> l(fC, surfHitEnd.hitPoint());
252 if (procIntersection.hit())
258 procIntersection.hitPoint()
vectorField pointField
pointField is a vectorField.
const cellShapeControl & cellShapeControls() const
const backgroundMeshDecomposition & decomposition() const
List< label > labelList
A List of labels.
#define forAll(list, i)
Loop across all elements in list.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
void splitLine(const line< point, point > &l, const scalar &pert, DynamicList< Vb::Point > &initialPoints) const
static bool & parRun()
Is this a parallel run?
Ostream & endl(Ostream &os)
Add newline and flush stream.
Switch randomiseInitialGrid_
Should the initial positions be randomised.
Field< vector > vectorField
Specialisation of Field<T> for vector.
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.
const conformationSurfaces & geometryToConformTo() const
PointFrompoint toPoint(const Foam::point &p)
Macros for easy insertion into run-time selection tables.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
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)
PointIndexHit< point > pointIndexHit
scalar minimumSurfaceDistanceCoeffSqr_
Only allow the placement of initial points that are within the.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
pointIndexHit findLine(const point &start, const point &end) const
Find nearest intersection of line between start and end, (exposing.
scalar randomPerturbationCoeff_
Randomise the initial positions by fraction of the initialCellSize_.
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
cachedRandom rndGen(label(0), -1)
stressControl lookup("compactNormalStress") >> compactNormalStress