55 Foam::searchableRotatedBox::searchableRotatedBox
77 transform_(csys.origin(), csys.e3(), csys.e1())
79 points_ = transform_.globalPosition(box_.points());
83 Foam::searchableRotatedBox::searchableRotatedBox
93 coordSystem::cartesian
107 return box_.regions();
113 return transform_.globalPosition(box_.coordinates());
123 box_.boundingSpheres(centres, radiusSqr);
124 centres = transform_.globalPosition(centres);
153 const treeBoundBox treeBb(bb);
159 if (treeBb.intersects(points_[
e[0]], points_[
e[1]], inter))
171 const point fc =
f.centre(points_);
184 if (inter.hit() && inter.distance() <= 1)
198 const scalar nearestDistSqr
205 transform_.localPosition(sample),
210 boxNearest.point() = transform_.globalPosition(boxNearest.point());
238 transform_.localPosition(start),
239 transform_.localPosition(
end)
243 boxHit.point() = transform_.globalPosition(boxHit.point());
255 return findLine(start,
end);
270 info[i] = findNearest(
samples[i], nearestDistSqr[i]);
279 List<pointIndexHit>& info
282 info.setSize(start.size());
286 info[i] = findLine(start[i],
end[i]);
295 List<pointIndexHit>& info
298 info.setSize(start.size());
302 info[i] = findLineAny(start[i],
end[i]);
311 List<List<pointIndexHit>>& info
314 info.setSize(start.size());
317 DynamicList<pointIndexHit> hits;
330 +
vector(ROOTVSMALL,ROOTVSMALL,ROOTVSMALL)
343 point pt = inter.point() + smallVec[pointI];
345 while (((pt-start[pointI])&dirVec[pointI]) <= magSqrDirVec[pointI])
355 || (inter.index() == hits.last().index())
362 pt = inter.point() + smallVec[pointI];
365 info[pointI].transfer(hits);
369 info[pointI].clear();
377 const List<pointIndexHit>& info,
381 region.setSize(info.size());
393 box_.getNormal(info, normal);
395 normal = transform_.globalVector(normal);
405 box_.getVolumeType(transform_.localPosition(
points), volType);
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
virtual void getRegion(const List< pointIndexHit > &, labelList ®ion) const
From a set of points and indices get the region.
void size(const label n)
Older name for setAddressableSize.
virtual bool overlaps(const boundBox &bb) const
Does any part of the surface overlap the supplied bound box?
virtual const wordList & regions() const
Names of regions.
pointIndexHit findLine(const point &start, const point &end) const
Find nearest intersection of line between start and end.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual void getNormal(const List< pointIndexHit > &, vectorField &normal) const
From a set of points and indices get the normal.
scalarField samples(nIntervals, Zero)
dimensionedScalar sqrt(const dimensionedScalar &ds)
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 ...
Base class of (analytical or triangulated) surface. Encapsulates all the search routines. WIP.
static const faceList faces
Face to point addressing, using octant corner points.
Macros for easy insertion into run-time selection tables.
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
#define forAll(list, i)
Loop across all elements in list.
A Cartesian coordinate system.
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.
virtual tmp< pointField > coordinates() const
Get representative set of element coordinates.
virtual void getVolumeType(const pointField &points, List< volumeType > &volType) const
Determine type (inside/outside/mixed) for point. unknown if.
vectorField pointField
pointField is a vectorField.
const dimensionedScalar e
Elementary charge.
void setSize(const label n)
Alias for resize()
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Searching on a rotated box.
static const edgeList edges
Edge to point addressing, using octant corner points.
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
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)
bool containsAny(const UList< point > &points) const
Contains any of the points? (inside or on edge)
pointIndexHit findLineAny(const point &start, const point &end) const
Find any intersection of line between start and end.
pointIndexHit findNearest(const point &sample, const scalar nearestDistSqr) const
Calculate nearest point on surface.
vector point
Point is a vector.
tmp< pointField > points() const
Corner points in an order corresponding to a 'hex' cell.
Standard boundBox with extra functionality for use in octree.
Field< vector > vectorField
Specialisation of Field<T> for vector.
virtual tmp< pointField > points() const
Get the points that define the surface.
List< label > labelList
A List of labels.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
A class for managing temporary objects.
bool overlaps(const boundBox &bb) const
Overlaps/touches boundingBox?
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Defines the attributes of an object for which implicit objectRegistry management is supported...
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
PointHit< point > pointHit
A PointHit with a 3D point.
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)
static constexpr const zero Zero
Global zero (0)