Go to the documentation of this file.
74 info.setPoint(start+t*l.vec());
87 if (
mag(normal()[dir]) - 1 < SMALL)
103 Foam::searchablePlane::searchablePlane
106 const point& basePoint,
111 plane(basePoint, normal)
113 bounds() = calcBounds();
117 Foam::searchablePlane::searchablePlane
126 bounds() = calcBounds();
134 if (regions_.empty())
137 regions_[0] =
"region0";
150 centres[0] = origin();
152 radiusSqr.setSize(1);
168 info[i].setPoint(nearestPoint(
samples[i]));
170 if (
magSqr(
samples[i]-info[i].rawPoint()) > nearestDistSqr[i])
172 info[i].setIndex(-1);
184 void Foam::searchablePlane::findLine
195 info[i] = findLine(start[i],
end[i]);
207 findLine(start,
end, info);
219 findLine(start,
end, nearestInfo);
224 if (nearestInfo[pointi].hit())
227 info[pointi][0] = nearestInfo[pointi];
231 info[pointi].
clear();
254 n.setSize(info.size());
266 <<
"Volume type not supported for plane."
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Defines the attributes of an object for which implicit objectRegistry management is supported,...
virtual void getVolumeType(const pointField &, List< volumeType > &) const
Determine type (inside/outside/mixed) for point.
static constexpr const zero Zero
Global zero (0)
InfoProxy< IOobject > info() const
Return info proxy.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
#define forAll(list, i)
Loop across all elements in list.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
virtual void boundingSpheres(pointField ¢res, scalarField &radiusSqr) const
Get bounding spheres (centre and radius squared), one per element.
Geometric class that creates a 3D plane and can return the intersection point between a line and the ...
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
scalarField samples(nIntervals, Zero)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
scalar lineIntersect(const line< Point, PointRef > &l) const
Return the cutting point between the plane and.
Macros for easy insertion into run-time selection tables.
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
virtual void findNearest(const pointField &sample, const scalarField &nearestDistSqr, List< pointIndexHit > &) const
errorManipArg< error, int > exit(error &err, const int errNo=1)
line< point, const point & > linePointRef
Line using referred points.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
PointIndexHit< point > pointIndexHit
virtual const wordList & regions() const
Names of regions.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void clear()
Clear the list, i.e. set size to zero.
virtual void getRegion(const List< pointIndexHit > &, labelList ®ion) const
From a set of points and indices get the region.
A bounding box defined in terms of min/max extrema points.
vector point
Point is a vector.
void setSize(const label newSize)
Alias for resize(const label)
defineTypeNameAndDebug(combustionModel, 0)
virtual void findLineAny(const pointField &start, const pointField &end, List< pointIndexHit > &) const
Return any intersection on segment from start to end.
virtual void getNormal(const List< pointIndexHit > &, vectorField &normal) const
From a set of points and indices get the normal.
virtual void findLineAll(const pointField &start, const pointField &end, List< List< pointIndexHit >> &) const
Get all intersections in order from start to end.
static constexpr direction nComponents
Number of components in this vector space.