Base class of (analytical or triangulated) surface. Encapsulates all the search routines. WIP. More...
#include <meshTools/searchableSurface.H>
Base class of (analytical or triangulated) surface. Encapsulates all the search routines. WIP.
Information returned is usually a pointIndexHit:
Definition at line 65 of file searchableSurface.H.
Classes | |
class | iNew |
Class used for the read-construction of. More... |
Public Types | |
enum | volumeType { UNKNOWN = 0, MIXED = 1, INSIDE = 2, OUTSIDE = 3 } |
volume types More... |
Public Member Functions | |
TypeName ("searchableSurface") | |
Runtime type information. | |
declareRunTimeSelectionTable (autoPtr, searchableSurface, dict,(const IOobject &io, const dictionary &dict),(io, dict)) | |
searchableSurface (const IOobject &io) | |
virtual autoPtr < searchableSurface > | clone () const |
Clone. | |
virtual | ~searchableSurface () |
virtual const wordList & | regions () const =0 |
Names of regions. | |
virtual bool | hasVolumeType () const =0 |
Whether supports volume type below. | |
virtual label | size () const =0 |
Range of local indices that can be returned. | |
virtual label | globalSize () const |
Range of global indices that can be returned. | |
virtual pointField | coordinates () const =0 |
Get representative set of element coordinates. | |
virtual void | findNearest (const pointField &sample, const scalarField &nearestDistSqr, List< pointIndexHit > &) const =0 |
virtual void | findLine (const pointField &start, const pointField &end, List< pointIndexHit > &) const =0 |
Find first intersection on segment from start to end. | |
virtual void | findLineAny (const pointField &start, const pointField &end, List< pointIndexHit > &) const =0 |
Return any intersection on segment from start to end. | |
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 | getRegion (const List< pointIndexHit > &, labelList ®ion) const =0 |
From a set of points and indices get the region. | |
virtual void | getNormal (const List< pointIndexHit > &, vectorField &normal) const =0 |
From a set of points and indices get the normal. | |
virtual void | getVolumeType (const pointField &, List< volumeType > &) const =0 |
Determine type (inside/outside) for point. unknown if. | |
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 void | setField (const labelList &values) |
WIP. Store element-wise field. | |
virtual void | getField (const List< pointIndexHit > &, labelList &values) const |
WIP. From a set of hits (points and. | |
![]() | |
TypeName ("regIOobject") | |
Runtime type information. | |
regIOobject (const IOobject &, const bool isTime=false) | |
Construct from IOobject. Optional flag for if IOobject is the. | |
regIOobject (const regIOobject &) | |
Construct as copy. | |
regIOobject (const regIOobject &, bool registerCopy) | |
Construct as copy, and transferring registry registration to copy. | |
virtual | ~regIOobject () |
bool | checkIn () |
Add object to registry. | |
bool | checkOut () |
Remove object from registry. | |
bool | ownedByRegistry () const |
Is this object owned by the registry? | |
void | store () |
Transfer ownership of this object to its registry. | |
void | release () |
Release ownership of this object from its registry. | |
label | eventNo () const |
Event number at last update. | |
label & | eventNo () |
Event number at last update. | |
bool | upToDate (const word &) const |
Am I uptodate with respect to other regIOobjects. | |
bool | upToDate (const word &, const word &) const |
bool | upToDate (const word &, const word &, const word &) const |
bool | upToDate (const word &, const word &, const word &, const word &) const |
void | setUpToDate () |
Flag me as up to date. | |
virtual void | rename (const word &newName) |
Rename. | |
Istream & | readStream (const word &) |
Return Istream and check object type against that given. | |
void | close () |
Close Istream. | |
virtual bool | readData (Istream &) |
Virtual readData function. | |
virtual bool | read () |
Read object. | |
virtual bool | modified () const |
Return true if the object's file has been modified. | |
virtual bool | readIfModified () |
Read object if modified. | |
virtual bool | writeData (Ostream &) const =0 |
Pure virtual writaData function. | |
virtual bool | writeObject (IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType) const |
Write using given format, version and compression. | |
virtual bool | write () const |
Write using setting from DB. | |
void | operator= (const IOobject &) |
![]() | |
TypeName ("IOobject") | |
Runtime type information. | |
IOobject (const word &name, const fileName &instance, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true) | |
Construct from name, instance, registry, io options. | |
IOobject (const word &name, const fileName &instance, const fileName &local, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true) | |
Construct from name, instance, local, registry, io options. | |
IOobject (const fileName &path, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true) | |
Construct from path, registry, io options. | |
virtual | ~IOobject () |
const Time & | time () const |
Return time. | |
const objectRegistry & | db () const |
Return the local objectRegistry. | |
const word & | name () const |
Return name. | |
const word & | headerClassName () const |
Return name of the class name read from header. | |
string & | note () |
Return non-constant access to the optional note. | |
const string & | note () const |
Return the optional note. | |
bool | registerObject () const |
Register object created from this IOobject with registry if true. | |
readOption | readOpt () const |
readOption & | readOpt () |
writeOption | writeOpt () const |
writeOption & | writeOpt () |
const fileName & | rootPath () const |
const fileName & | caseName () const |
const fileName & | instance () const |
fileName & | instance () |
const fileName & | local () const |
fileName | path () const |
Return complete path. | |
fileName | path (const word &instance, const fileName &local="") const |
Return complete path with alternative instance and local. | |
fileName | objectPath () const |
Return complete path + object name. | |
fileName | filePath () const |
Return complete path + object name if the file exists. | |
bool | readHeader (Istream &) |
Read header. | |
bool | headerOk () |
Read and check header info. | |
bool | writeHeader (Ostream &) const |
Write header. | |
bool | good () const |
bool | bad () const |
InfoProxy< IOobject > | info () const |
Return info proxy. |
Static Public Member Functions | |
static autoPtr< searchableSurface > | New (const word &surfaceType, const IOobject &io, const dictionary &dict) |
Return a reference to the selected searchableSurface. | |
![]() | |
template<class Type > | |
static Type & | store (Type *) |
Transfer ownership of the given object pointer to its registry. | |
template<class Type > | |
static Type & | store (autoPtr< Type > &) |
Transfer ownership of the given object pointer to its registry. | |
![]() | |
static bool | fileNameComponents (const fileName &path, fileName &instance, fileName &local, word &name) |
Split path into instance, local, name components. | |
template<class Stream > | |
static Stream & | writeBanner (Stream &os, bool noHint=false) |
Write the standard OpenFOAM file/dictionary banner. | |
template<class Stream > | |
static Stream & | writeDivider (Stream &os) |
Write the standard file section divider. | |
template<class Stream > | |
static Stream & | writeEndDivider (Stream &os) |
Write the standard end file divider. |
Additional Inherited Members | |
![]() | |
static int | fileModificationSkew |
enum volumeType |
volume types
Definition at line 74 of file searchableSurface.H.
searchableSurface | ( | const IOobject & | io | ) |
Definition at line 69 of file searchableSurface.C.
|
virtual |
Definition at line 77 of file searchableSurface.C.
TypeName | ( | "searchableSurface" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
searchableSurface | , | ||
dict | , | ||
(const IOobject &io, const dictionary &dict) | , | ||
(io, dict) | |||
) |
|
inlinevirtual |
Clone.
Reimplemented from IOobject.
Definition at line 151 of file searchableSurface.H.
References notImplemented.
|
static |
Return a reference to the selected searchableSurface.
Definition at line 40 of file searchableSurface.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, and FatalErrorIn.
Referenced by searchableSurface::iNew::operator()(), and searchableSurfaces::searchableSurfaces().
|
pure virtual |
Names of regions.
Implemented in triSurfaceMesh, searchableSurfaceCollection, searchableCylinder, searchableSurfaceWithGaps, searchablePlate, searchableSphere, searchableBox, and searchablePlane.
Referenced by refinementSurfaces::findHigherIntersection(), searchableSurfaceWithGaps::regions(), searchableSurfaces::searchableSurfaces(), and refinementSurfaces::setMinLevelFields().
|
pure virtual |
Whether supports volume type below.
Implemented in distributedTriSurfaceMesh, triSurfaceMesh, searchableSurfaceCollection, searchableSurfaceWithGaps, searchableCylinder, searchablePlate, searchableSphere, searchableBox, and searchablePlane.
Referenced by searchableSurfaceWithGaps::hasVolumeType().
|
pure virtual |
Range of local indices that can be returned.
Implemented in triSurfaceMesh, searchableSurfaceCollection, searchableSurfaceWithGaps, searchableCylinder, searchablePlate, searchableSphere, searchableBox, and searchablePlane.
Referenced by searchableSurface::globalSize(), and searchableSurfaceWithGaps::size().
|
inlinevirtual |
Range of global indices that can be returned.
Reimplemented in distributedTriSurfaceMesh.
Definition at line 187 of file searchableSurface.H.
References searchableSurface::size().
Referenced by refinementSurfaces::setMinLevelFields().
|
pure virtual |
Get representative set of element coordinates.
Usually the element centres (should be of length size()).
Implemented in triSurfaceMesh, searchableSurfaceWithGaps, searchableCylinder, searchableSurfaceCollection, searchablePlate, searchableSphere, searchableBox, and searchablePlane.
Referenced by searchableSurfaceWithGaps::coordinates(), and refinementSurfaces::setMinLevelFields().
|
pure virtual |
Implemented in distributedTriSurfaceMesh, triSurfaceMesh, searchableBox, searchableSurfaceWithGaps, searchableCylinder, searchableSurfaceCollection, searchablePlate, searchableSphere, and searchablePlane.
Referenced by searchableSurfaceWithGaps::findNearest(), and refinementSurfaces::setMinLevelFields().
|
pure virtual |
Find first intersection on segment from start to end.
Note: searchableSurfacesQueries expects no intersection to be found if start==end. Is problem?
Implemented in distributedTriSurfaceMesh, triSurfaceMesh, searchableBox, searchableSurfaceWithGaps, searchableCylinder, searchableSurfaceCollection, searchablePlate, searchableSphere, and searchablePlane.
|
pure virtual |
Return any intersection on segment from start to end.
Implemented in distributedTriSurfaceMesh, triSurfaceMesh, searchableBox, searchableSurfaceWithGaps, searchableCylinder, searchableSurfaceCollection, searchablePlate, searchableSphere, and searchablePlane.
Referenced by refinementSurfaces::findHigherIntersection().
|
pure virtual |
Get all intersections in order from start to end.
Implemented in distributedTriSurfaceMesh, triSurfaceMesh, searchableBox, searchableSurfaceWithGaps, searchableCylinder, searchableSurfaceCollection, searchablePlate, searchableSphere, and searchablePlane.
|
pure virtual |
From a set of points and indices get the region.
Implemented in distributedTriSurfaceMesh, triSurfaceMesh, searchableBox, searchableSurfaceWithGaps, searchableCylinder, searchableSurfaceCollection, searchablePlate, searchableSphere, and searchablePlane.
Referenced by searchableSurfaceWithGaps::getRegion(), and refinementSurfaces::setMinLevelFields().
|
pure virtual |
From a set of points and indices get the normal.
Implemented in distributedTriSurfaceMesh, triSurfaceMesh, searchableBox, searchableSurfaceWithGaps, searchableCylinder, searchableSurfaceCollection, searchablePlate, searchableSphere, and searchablePlane.
Referenced by searchableSurfaceWithGaps::getNormal().
|
pure virtual |
Determine type (inside/outside) for point. unknown if.
cannot be determined (e.g. non-manifold surface)
Implemented in distributedTriSurfaceMesh, triSurfaceMesh, searchableBox, searchableSurfaceWithGaps, searchableCylinder, searchableSurfaceCollection, searchablePlate, searchableSphere, and searchablePlane.
Referenced by searchableSurfaceWithGaps::getVolumeType().
|
inlinevirtual |
Set bounds of surface. Bounds currently set as list of.
bounding boxes. The bounds are hints to the surface as for the range of queries it can expect. faceMap/pointMap can be set if the surface has done any redistribution.
Reimplemented in distributedTriSurfaceMesh, triSurfaceMesh, searchableSurfaceWithGaps, and searchableSurfaceCollection.
Definition at line 317 of file searchableSurface.H.
|
inlinevirtual |
WIP. Store element-wise field.
Reimplemented in triSurfaceMesh, searchableSurfaceWithGaps, and searchableSurfaceCollection.
Definition at line 326 of file searchableSurface.H.
|
inlinevirtual |
WIP. From a set of hits (points and.
indices) get the specified field. Misses do not get set. Return empty field if not supported.
Reimplemented in distributedTriSurfaceMesh, triSurfaceMesh, searchableSurfaceWithGaps, and searchableSurfaceCollection.
Definition at line 332 of file searchableSurface.H.
References List< T >::clear().
Referenced by refinementSurfaces::findHigherIntersection(), and searchableSurfaceWithGaps::getField().