44#ifndef Foam_searchableSurface_H
45#define Foam_searchableSurface_H
70class searchableSurface
84 searchableSurface(
const searchableSurface&) =
delete;
87 void operator=(
const searchableSurface&) =
delete;
126 word surfaceType(is);
131 namedIO().rename(readName);
154 const word& surfaceType,
167 virtual bool global()
const
203 virtual label
size()
const = 0;
375 const bool keepNonLocal,
Minimal example by using system/controlDict.functions:
Defines the attributes of an object for which implicit objectRegistry management is supported,...
InfoProxy< IOobject > info() const noexcept
Return info proxy, for printing information to a stream.
fileName globalFilePath(const word &typeName, const bool search=true) const
Redirect to fileHandler filePath, searching up if in parallel.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A bounding box defined in terms of min/max extrema points.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A class for handling file names.
Class containing processor-to-processor mapping information.
Registry of regIOobjects.
regIOobject(const IOobject &io, const bool isTimeObject=false)
Construct from IOobject. The optional flag adds special handling if the object is the top-level regIO...
Class used for the read-construction of.
autoPtr< searchableSurface > operator()(Istream &is) const
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
virtual autoPtr< searchableSurface > clone() const
Clone.
virtual void getRegion(const List< pointIndexHit > &, labelList ®ion) const =0
From a set of points and indices get the region.
virtual void findLineAll(const pointField &start, const pointField &end, List< List< pointIndexHit > > &) const =0
Get all intersections in order from start to end.
virtual void findLine(const pointField &start, const pointField &end, List< pointIndexHit > &) const =0
Find first intersection on segment from start to end.
virtual void getVolumeType(const pointField &, List< volumeType > &) const =0
Determine type (inside/outside) for point.
virtual void findNearest(const pointField &sample, const scalarField &nearestDistSqr, List< pointIndexHit > &) const =0
virtual void distribute(const List< treeBoundBox > &, const bool keepNonLocal, autoPtr< mapDistribute > &faceMap, autoPtr< mapDistribute > &pointMap)
Set bounds of surface. Bounds currently set as list of.
virtual volumeType outsideVolumeType() const =0
If surface supports volume queries, what is type of points outside.
virtual void setField(const labelList &values)
WIP. Store element-wise field.
virtual bool global() const
Is object global.
declareRunTimeSelectionTable(autoPtr, searchableSurface, dict,(const IOobject &io, const dictionary &dict),(io, dict))
virtual boundBox & bounds()
Return non-const access to the boundBox to allow it to be set.
virtual void getField(const List< pointIndexHit > &, labelList &values) const
WIP. From a set of hits (points and.
virtual bool overlaps(const boundBox &bb) const =0
Does any part of the surface overlap the supplied bound box?
virtual const wordList & regions() const =0
Names of regions.
TypeName("searchableSurface")
Runtime type information.
virtual ~searchableSurface()=default
Destructor.
static autoPtr< searchableSurface > New(const word &surfaceType, const IOobject &io, const dictionary &dict)
Return a reference to the selected searchableSurface.
virtual fileName filePath() const
Return complete path + object name if the file exists.
virtual tmp< pointField > points() const =0
Get the points that define the surface.
virtual void findNearest(const pointField &samples, const scalarField &nearestDistSqr, const labelList ®ionIndices, List< pointIndexHit > &info) const
Find the nearest locations for the supplied points to a.
virtual label size() const =0
Range of local indices that can be returned.
virtual bool hasVolumeType() const
Whether supports volume type (below).
virtual void findLineAny(const pointField &start, const pointField &end, List< pointIndexHit > &) const =0
Return any intersection on segment from start to end.
virtual label globalSize() const
Range of global indices that can be returned.
virtual void getNormal(const List< pointIndexHit > &, vectorField &normal) const =0
From a set of points and indices get the normal.
virtual void boundingSpheres(pointField ¢res, scalarField &radiusSqr) const =0
Get bounding spheres (centre and radius squared), one per element.
virtual const boundBox & bounds() const
Return const reference to boundBox.
virtual tmp< pointField > coordinates() const =0
Get representative set of element coordinates.
A class for managing temporary objects.
Standard boundBox with extra functionality for use in octree.
An enumeration wrapper for classification of a location as being inside/outside of a volume.
A class for handling words, derived from Foam::string.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
List< word > wordList
List of word.
List< label > labelList
A List of labels.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Field< vector > vectorField
Specialisation of Field<T> for vector.
vectorField pointField
pointField is a vectorField.
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes).
Trait for specifying global vs. local IOobject file types.
Basic run-time type information using word as the type's name. Used to enhance the standard RTTI to c...
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
scalarField samples(nIntervals, Zero)