73 info.setPoint(start+t*l.vec());
86 if (
mag(normal()[dir]) - 1 < SMALL)
103 const point& basePoint,
108 plane(basePoint, normal)
131 if (regions_.empty())
134 regions_[0] =
"region0";
149 centres[0] = origin();
165 info[i].setPoint(nearestPoint(
samples[i]));
167 if (
magSqr(
samples[i]-info[i].rawPoint()) > nearestDistSqr[i])
169 info[i].setIndex(-1);
181void Foam::searchablePlane::findLine
192 info[i] = findLine(start[i], end[i]);
204 findLine(start, end, info);
216 findLine(start, end, nearestInfo);
218 info.setSize(start.
size());
221 if (nearestInfo[pointi].hit())
223 info[pointi].setSize(1);
224 info[pointi][0] = nearestInfo[pointi];
228 info[pointi].
clear();
251 n.setSize(info.
size());
263 <<
"Volume type not supported for plane."
Macros for easy insertion into run-time selection tables.
#define addNamedToRunTimeSelectionTable(baseType, thisType, argNames, lookupName)
Add to construction table with 'lookupName' as the key.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
InfoProxy< IOobject > info() const
Return info proxy, for printing information to a stream.
void setSize(const label n)
Alias for resize()
void resize(const label len)
Adjust allocated size of list.
void clear()
Clear the list, i.e. set size to zero.
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
void size(const label n)
Older name for setAddressableSize.
A bounding box defined in terms of min/max extrema points.
static const boundBox greatBox
A large boundBox: min/max == -/+ ROOTVGREAT.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
static constexpr direction nComponents
Number of components in bool is 1.
Geometric class that creates a 3D 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.
Searching on (infinite) plane. The dictionary specifications are identical to the Foam::plane require...
virtual void getVolumeType(const pointField &, List< volumeType > &) const
Determine type (inside/outside/mixed) for point.
virtual void findLineAll(const pointField &start, const pointField &end, List< List< pointIndexHit > > &) const
Get all intersections in order from start to end.
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.
virtual void getNormal(const List< pointIndexHit > &, vectorField &normal) const
From a set of points and indices get the normal.
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
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
virtual const boundBox & bounds() const
Return const reference to boundBox.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
PointIndexHit< point > pointIndexHit
A PointIndexHit for 3D points.
line< point, const point & > linePointRef
A line using referred points.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0)
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
#define forAll(list, i)
Loop across all elements in list.
scalarField samples(nIntervals, Zero)