62 info.setPoint(start+t*l.vec());
75 if (
mag(normal()[dir]) - 1 < small)
94 const point& basePoint,
99 plane(basePoint, normal)
128 if (regions_.empty())
131 regions_[0] =
"region0";
144 centres[0] = refPoint();
162 info[i].setPoint(nearestPoint(
samples[i]));
164 if (
magSqr(
samples[i]-info[i].rawPoint()) > nearestDistSqr[i])
166 info[i].setIndex(-1);
178 void Foam::searchablePlane::findLine
189 info[i] = findLine(start[i], end[i]);
201 findLine(start, end, info);
213 findLine(start, end, nearestInfo);
215 info.setSize(start.
size());
218 if (nearestInfo[pointi].hit())
220 info[pointi].setSize(1);
221 info[pointi][0] = nearestInfo[pointi];
225 info[pointi].
clear();
248 n.setSize(info.
size());
260 <<
"Volume type not supported for plane."
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
InfoProxy< IOobject > info() const
Return info proxy.
void size(const label)
Override size to be inconsistent with allocated storage.
void clear()
Clear the list, i.e. set size to zero.
void setSize(const label)
Reset size of List.
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
static const direction nComponents
Number of components in this vector space.
A bounding box defined in terms of the points at its extremities.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Geometric class that creates a 2D plane and can return the intersection point between a line and the ...
scalar lineIntersect(const line< Point, PointRef > &l) const
Return the cutting point between the plane and.
Surface geometry of an infinite plane, which can be used with snappyHexMesh.
virtual void getVolumeType(const pointField &, List< volumeType > &) const
Determine type (inside/outside/mixed) for point. unknown if.
virtual void findLineAny(const pointField &start, const pointField &end, List< pointIndexHit > &) const
Return any intersection on segment from start to end.
virtual void boundingSpheres(pointField ¢res, scalarField &radiusSqr) const
Get bounding spheres (centre and radius squared), one per element.
searchablePlane(const IOobject &io, const point &basePoint, const vector &normal)
Construct from components.
virtual void getNormal(const List< pointIndexHit > &, vectorField &normal) const
From a set of points and indices get the normal.
virtual ~searchablePlane()
Destructor.
virtual void getRegion(const List< pointIndexHit > &, labelList ®ion) const
From a set of points and indices get the region.
virtual const wordList & regions() const
Names of regions.
virtual void findNearest(const pointField &sample, const scalarField &nearestDistSqr, List< pointIndexHit > &) const
virtual void findLineAll(const pointField &start, const pointField &end, List< List< pointIndexHit >> &) const
Get all intersections in order from start to end.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
const boundBox & bounds() const
Return const reference to boundBox.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
PointIndexHit< point > pointIndexHit
line< point, const point & > linePointRef
Line using referred points.
vector point
Point is a vector.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
dimensioned< scalar > mag(const dimensioned< Type > &)
defineTypeNameAndDebug(combustionModel, 0)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
scalarField samples(nIntervals, 0)