Go to the documentation of this file.
45 const scalar nearestDistSqr
50 vector v(sample - origin_);
53 scalar parallel = (v & normal_);
56 v -= parallel*normal_;
59 if (magV < ROOTVSMALL)
93 scalar parallel = (v & normal_);
95 if (
sign(parallel) ==
sign((end - origin_) & normal_))
101 v -= parallel*normal_;
102 scalar magV =
mag(v);
104 if (magV < ROOTVSMALL)
151 bounds().
min() = origin_ - span;
152 bounds().
max() = origin_ + span;
163 origin_(
dict.lookup(
"origin")),
164 normal_(
dict.lookup(
"normal")),
167 normal_ /=
mag(normal_);
181 bounds().
min() = origin_ - span;
182 bounds().
max() = origin_ + span;
196 if (regions_.empty())
199 regions_[0] =
"region0";
212 centres[0] = origin_;
214 radiusSqr.setSize(1);
215 radiusSqr[0] =
sqr(radius_);
233 info[i] = findNearest(
samples[i], nearestDistSqr[i]);
249 findLine(start[i], end[i], info[i]);
261 findLine(start, end, info);
277 findLine(start[i], end[i], inter);
321 <<
"Volume type not supported for disk."
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
void setIndex(const label index)
#define forAll(list, i)
Loop across all elements in list.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
searchableDisk(const searchableDisk &)
Disallow default bitwise copy construct.
virtual ~searchableDisk()
Destructor.
bool hit() const
Is there a hit.
virtual const wordList & regions() const
Names of regions.
dimensioned< scalar > mag(const dimensioned< Type > &)
dimensionedScalar sign(const dimensionedScalar &ds)
scalarField samples(nIntervals, 0)
pointIndexHit findNearest(const point &sample, const scalar nearestDistSqr) const
Find nearest point on disk.
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
const Point & rawPoint() const
Return point with no checking.
Pre-declare SubField and related Field type.
virtual void getVolumeType(const pointField &, List< volumeType > &) const
Determine type (inside/outside/mixed) for point. unknown if.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
virtual void boundingSpheres(pointField ¢res, scalarField &radiusSqr) const
Get bounding spheres (centre and radius squared), one per element.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Macros for easy insertion into run-time selection tables.
virtual void getNormal(const List< pointIndexHit > &, vectorField &normal) const
From a set of points and indices get the normal.
void setPoint(const Point &p)
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual void findLineAll(const pointField &start, const pointField &end, List< List< pointIndexHit > > &) const
Get all intersections in order from start to end.
void setSize(const label)
Reset size of List.
virtual void getRegion(const List< pointIndexHit > &, labelList ®ion) const
From a set of points and indices get the region.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
PointIndexHit< point > pointIndexHit
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
dimensionedScalar sqrt(const dimensionedScalar &ds)
void clear()
Clear the list, i.e. set size to zero.
void findLine(const point &start, const point &end, pointIndexHit &) const
Find intersection with disk.
virtual void findLineAny(const pointField &start, const pointField &end, List< pointIndexHit > &) const
Return any intersection on segment from start to end.
void size(const label)
Override size to be inconsistent with allocated storage.
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
A normal distribution model.