FreeFOAM The Cross-Platform CFD Toolkit
searchableSurfaceWithGaps Class Reference

searchableSurface using multiple slightly shifted underlying surfaces to make sure pierces don't go through gaps: More...

#include <meshTools/searchableSurfaceWithGaps.H>


Detailed Description

searchableSurface using multiple slightly shifted underlying surfaces to make sure pierces don't go through gaps:

- shift test vector with two small vectors (of size gap_) perpendicular to the original. Test with + and - this vector. Only if both register a hit is it seen as one.

  • extend the test vector slightly (with SMALL) to account for numerical inaccuracies.
Source files

Definition at line 60 of file searchableSurfaceWithGaps.H.

+ Inheritance diagram for searchableSurfaceWithGaps:
+ Collaboration diagram for searchableSurfaceWithGaps:

List of all members.

Public Member Functions

 TypeName ("searchableSurfaceWithGaps")
 Runtime type information.
 searchableSurfaceWithGaps (const IOobject &io, const dictionary &dict)
 Construct from dictionary (used by searchableSurface)
virtual ~searchableSurfaceWithGaps ()
const searchableSurfacesurface () const
virtual const wordListregions () const
 Names of regions.
virtual bool hasVolumeType () const
 Whether supports volume type below.
virtual label size () const
 Range of local indices that can be returned.
virtual pointField coordinates () const
 Get representative set of element coordinates.
virtual void findNearest (const pointField &sample, const scalarField &nearestDistSqr, List< pointIndexHit > &info) const
 Find nearest on original surface. Note:does not use perturbation.
virtual void findLine (const pointField &start, const pointField &end, List< pointIndexHit > &) const
 Find first intersection on segment 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 findLineAll (const pointField &start, const pointField &end, List< List< pointIndexHit > > &) const
 Get all intersections in order from start to end.
virtual void getRegion (const List< pointIndexHit > &info, labelList &region) const
 From a set of points and indices get the region.
virtual void getNormal (const List< pointIndexHit > &info, vectorField &normal) const
 From a set of points and indices get the normal.
virtual void getVolumeType (const pointField &samples, List< volumeType > &info) const
 Determine type (inside/outside/mixed) for point. unknown if.
virtual void distribute (const List< treeBoundBox > &bbs, 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 > &info, labelList &values) const
 WIP. From a set of hits (points and.
bool writeData (Ostream &os) const
 Pure virtual writaData function.
- Public Member Functions inherited from searchableSurface
 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 label globalSize () const
 Range of global indices that can be returned.
- Public Member Functions inherited from regIOobject
 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.
IstreamreadStream (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 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 &)
- Public Member Functions inherited from IOobject
 TypeName ("IOobject")
 Runtime type information.
 IOobject (const word &name, const fileName &instance, const objectRegistry &registry, 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 &registry, 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 &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
 Construct from path, registry, io options.
virtual ~IOobject ()
const Timetime () const
 Return time.
const objectRegistrydb () const
 Return the local objectRegistry.
const wordname () const
 Return name.
const wordheaderClassName () const
 Return name of the class name read from header.
stringnote ()
 Return non-constant access to the optional note.
const stringnote () const
 Return the optional note.
bool registerObject () const
 Register object created from this IOobject with registry if true.
readOption readOpt () const
readOptionreadOpt ()
writeOption writeOpt () const
writeOptionwriteOpt ()
const fileNamerootPath () const
const fileNamecaseName () const
const fileNameinstance () const
fileNameinstance ()
const fileNamelocal () 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< IOobjectinfo () const
 Return info proxy.

Additional Inherited Members

- Public Types inherited from searchableSurface
enum  volumeType { UNKNOWN = 0, MIXED = 1, INSIDE = 2, OUTSIDE = 3 }
 volume types More...
- Static Public Member Functions inherited from searchableSurface
static autoPtr< searchableSurfaceNew (const word &surfaceType, const IOobject &io, const dictionary &dict)
 Return a reference to the selected searchableSurface.
- Static Public Member Functions inherited from regIOobject
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 Public Member Functions inherited from IOobject
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.

Constructor & Destructor Documentation

searchableSurfaceWithGaps ( const IOobject io,
const dictionary dict 
)

Construct from dictionary (used by searchableSurface)

Definition at line 175 of file searchableSurfaceWithGaps.C.

References IOobject::db(), dictionary::lookup(), and objectRegistry::lookupObject().

Definition at line 195 of file searchableSurfaceWithGaps.C.


Member Function Documentation

TypeName ( "searchableSurfaceWithGaps"  )

Runtime type information.

virtual const wordList& regions ( ) const
inlinevirtual

Names of regions.

Implements searchableSurface.

Definition at line 136 of file searchableSurfaceWithGaps.H.

References searchableSurface::regions(), and searchableSurfaceWithGaps::surface().

virtual bool hasVolumeType ( ) const
inlinevirtual

Whether supports volume type below.

Implements searchableSurface.

Definition at line 142 of file searchableSurfaceWithGaps.H.

References searchableSurface::hasVolumeType(), and searchableSurfaceWithGaps::surface().

virtual label size ( ) const
inlinevirtual

Range of local indices that can be returned.

Implements searchableSurface.

Definition at line 148 of file searchableSurfaceWithGaps.H.

References searchableSurface::size(), and searchableSurfaceWithGaps::surface().

virtual pointField coordinates ( ) const
inlinevirtual

Get representative set of element coordinates.

Usually the element centres (should be of length size()).

Implements searchableSurface.

Definition at line 155 of file searchableSurfaceWithGaps.H.

References searchableSurface::coordinates(), and searchableSurfaceWithGaps::surface().

virtual void findNearest ( const pointField sample,
const scalarField nearestDistSqr,
List< pointIndexHit > &  info 
) const
inlinevirtual

Find nearest on original surface. Note:does not use perturbation.

and hence might be inconsistent with intersections.

Implements searchableSurface.

Definition at line 166 of file searchableSurfaceWithGaps.H.

References searchableSurface::findNearest(), and searchableSurfaceWithGaps::surface().

void findLine ( const pointField start,
const pointField end,
List< pointIndexHit > &   
) const
virtual

Find first intersection on segment from start to end.

Note: searchableSurfacesQueries expects no intersection to be found if start==end. Is problem?

Implements searchableSurface.

Definition at line 202 of file searchableSurfaceWithGaps.C.

References forAll, Foam::returnReduce(), List< T >::setSize(), and List< T >::size().

void findLineAny ( const pointField start,
const pointField end,
List< pointIndexHit > &   
) const
virtual

Return any intersection on segment from start to end.

Implements searchableSurface.

Definition at line 327 of file searchableSurfaceWithGaps.C.

void findLineAll ( const pointField start,
const pointField end,
List< List< pointIndexHit > > &  info 
) const
virtual

Get all intersections in order from start to end.

Implements searchableSurface.

Definition at line 339 of file searchableSurfaceWithGaps.C.

References List< T >::clear(), forAll, List< T >::setSize(), and List< T >::size().

virtual void getRegion ( const List< pointIndexHit > &  info,
labelList region 
) const
inlinevirtual

From a set of points and indices get the region.

Implements searchableSurface.

Definition at line 204 of file searchableSurfaceWithGaps.H.

References searchableSurface::getRegion(), and searchableSurfaceWithGaps::surface().

virtual void getNormal ( const List< pointIndexHit > &  info,
vectorField normal 
) const
inlinevirtual

From a set of points and indices get the normal.

Implements searchableSurface.

Definition at line 214 of file searchableSurfaceWithGaps.H.

References searchableSurface::getNormal(), and searchableSurfaceWithGaps::surface().

virtual void getVolumeType ( const pointField samples,
List< volumeType > &  info 
) const
inlinevirtual

Determine type (inside/outside/mixed) for point. unknown if.

cannot be determined (e.g. non-manifold surface)

Implements searchableSurface.

Definition at line 225 of file searchableSurfaceWithGaps.H.

References searchableSurface::getVolumeType(), and searchableSurfaceWithGaps::surface().

virtual void distribute ( const List< treeBoundBox > &  bbs,
const bool  keepNonLocal,
autoPtr< mapDistribute > &  faceMap,
autoPtr< mapDistribute > &  pointMap 
)
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 from searchableSurface.

Definition at line 241 of file searchableSurfaceWithGaps.H.

virtual void setField ( const labelList values)
inlinevirtual

WIP. Store element-wise field.

Reimplemented from searchableSurface.

Definition at line 252 of file searchableSurfaceWithGaps.H.

virtual void getField ( const List< pointIndexHit > &  info,
labelList values 
) const
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 from searchableSurface.

Definition at line 261 of file searchableSurfaceWithGaps.H.

References searchableSurface::getField(), and searchableSurfaceWithGaps::surface().

bool writeData ( Ostream ) const
inlinevirtual

Pure virtual writaData function.

Must be defined in derived types

Implements regIOobject.

Definition at line 271 of file searchableSurfaceWithGaps.H.

References searchableSurfaceWithGaps::surface(), and regIOobject::writeData().


The documentation for this class was generated from the following files: