74 info.setPoint(start+t*l.vec());
85 for (
direction dir = 0; dir < vector::nComponents; dir++)
87 if (
mag(normal()[dir]) - 1 < SMALL)
101 Foam::searchablePlane::searchablePlane
104 const point& basePoint,
111 bounds() = calcBounds();
115 Foam::searchablePlane::searchablePlane
124 bounds() = calcBounds();
132 if (regions_.empty())
135 regions_[0] =
"region0";
150 centres[0] = origin();
166 info[i].setPoint(nearestPoint(
samples[i]));
168 if (info[i].
point().distSqr(
samples[i]) > nearestDistSqr[i])
170 info[i].setIndex(-1);
182 void Foam::searchablePlane::findLine
186 List<pointIndexHit>& info
189 info.setSize(start.size());
193 info[i] = findLine(start[i],
end[i]);
202 List<pointIndexHit>& info
205 findLine(start,
end, info);
217 findLine(start,
end, nearestInfo);
222 if (nearestInfo[pointi].hit())
225 info[pointi][0] = nearestInfo[pointi];
237 const List<pointIndexHit>& info,
241 region.setSize(info.size());
252 n.setSize(info.
size());
264 <<
"Volume type not supported for plane."
void size(const label n)
Older name for setAddressableSize.
virtual void getRegion(const List< pointIndexHit > &, labelList ®ion) const
From a set of points and indices get the region.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
virtual void boundingSpheres(pointField ¢res, scalarField &radiusSqr) const
Get bounding spheres (centre and radius squared), one per element.
virtual void findLineAll(const pointField &start, const pointField &end, List< List< pointIndexHit >> &) const
Get all intersections in order from start to end.
scalarField samples(nIntervals, Zero)
PointIndexHit< point > pointIndexHit
A PointIndexHit with a 3D point.
A bounding box defined in terms of min/max extrema points.
This class describes the interaction of an object (often a face) and a point. It carries the info of ...
static const boundBox greatBox
A large boundBox: min/max == -/+ ROOTVGREAT.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines. WIP.
Geometric class that creates a 3D plane and can return the intersection point between a line and the ...
Macros for easy insertion into run-time selection tables.
scalar lineIntersect(const line< PointType, PointRef > &l) const
Return the cutting point between the plane and a line passing through the supplied points...
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
#define forAll(list, i)
Loop across all elements in list.
vectorField pointField
pointField is a vectorField.
void setSize(const label n)
Alias for resize()
line< point, const point & > linePointRef
A line using referred points.
void clear()
Clear the list, i.e. set size to zero.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
InfoProxy< IOobject > info() const noexcept
Return info proxy, for printing information to a stream.
virtual const wordList & regions() const
Names of regions.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
defineTypeNameAndDebug(combustionModel, 0)
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
vector point
Point is a vector.
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.
List< label > labelList
A List of labels.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
virtual void findNearest(const pointField &sample, const scalarField &nearestDistSqr, List< pointIndexHit > &) const
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)