Public Member Functions | List of all members
searchableRotatedBox Class Reference

Searching on a rotated box. More...

Inheritance diagram for searchableRotatedBox:
Inheritance graph
[legend]
Collaboration diagram for searchableRotatedBox:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("searchableRotatedBox")
 
 searchableRotatedBox (const IOobject &io, const vector &span, const coordSystem::cartesian &csys=coordSystem::cartesian{})
 
 searchableRotatedBox (const IOobject &io, const dictionary &dict)
 
virtual ~searchableRotatedBox ()=default
 
virtual const wordListregions () const
 
virtual bool hasVolumeType () const
 
virtual volumeType outsideVolumeType () const
 
virtual label size () const
 
virtual tmp< pointFieldcoordinates () const
 
virtual void boundingSpheres (pointField &centres, scalarField &radiusSqr) const
 
virtual tmp< pointFieldpoints () const
 
virtual bool overlaps (const boundBox &bb) const
 
pointIndexHit findNearest (const point &sample, const scalar nearestDistSqr) const
 
pointIndexHit findNearest (const linePointRef &ln, treeBoundBox &tightest, point &linePoint) const
 
pointIndexHit findLine (const point &start, const point &end) const
 
pointIndexHit findLineAny (const point &start, const point &end) const
 
virtual void findNearest (const pointField &sample, const scalarField &nearestDistSqr, List< pointIndexHit > &) const
 
virtual void findLine (const pointField &start, const pointField &end, List< pointIndexHit > &) const
 
virtual void findLineAny (const pointField &start, const pointField &end, List< pointIndexHit > &) const
 
virtual void findLineAll (const pointField &start, const pointField &end, List< List< pointIndexHit >> &) const
 
virtual void getRegion (const List< pointIndexHit > &, labelList &region) const
 
virtual void getNormal (const List< pointIndexHit > &, vectorField &normal) const
 
virtual void getVolumeType (const pointField &points, List< volumeType > &volType) const
 
bool writeData (Ostream &) const
 
virtual void findNearest (const pointField &sample, const scalarField &nearestDistSqr, List< pointIndexHit > &) const=0
 
virtual void findNearest (const pointField &samples, const scalarField &nearestDistSqr, const labelList &regionIndices, List< pointIndexHit > &info) const
 
virtual void findNearest (const pointField &sample, const scalarField &nearestDistSqr, List< pointIndexHit > &, vectorField &normal, labelList &region) const
 
- Public Member Functions inherited from searchableSurface
 TypeName ("searchableSurface")
 
 declareRunTimeSelectionTable (autoPtr, searchableSurface, dict,(const IOobject &io, const dictionary &dict),(io, dict))
 
 searchableSurface (const IOobject &io)
 
virtual autoPtr< searchableSurfaceclone () const
 
virtual ~searchableSurface ()=default
 
virtual bool global () const
 
virtual fileName filePath () const
 
virtual const boundBoxbounds () const
 
virtual boundBoxbounds ()
 
virtual label globalSize () const
 
virtual void findNearest (const pointField &samples, const scalarField &nearestDistSqr, const labelList &regionIndices, List< pointIndexHit > &info) const
 
virtual void findNearest (const pointField &sample, const scalarField &nearestDistSqr, List< pointIndexHit > &, vectorField &normal, labelList &region) const
 
virtual void distribute (const List< treeBoundBox > &, const bool keepNonLocal, autoPtr< mapDistribute > &faceMap, autoPtr< mapDistribute > &pointMap)
 
virtual void setField (const labelList &values)
 
virtual void getField (const List< pointIndexHit > &, labelList &values) const
 
- Public Member Functions inherited from regIOobject
 TypeName ("regIOobject")
 
 regIOobject (const IOobject &io, const bool isTimeObject=false)
 
 regIOobject (const regIOobject &rio)
 
 regIOobject (const regIOobject &rio, bool registerCopy)
 
 regIOobject (const word &newName, const regIOobject &, bool registerCopy)
 
 regIOobject (const IOobject &io, const regIOobject &rio)
 
virtual ~regIOobject ()
 
bool checkIn ()
 
bool checkOut ()
 
virtual void addWatch ()
 
bool ownedByRegistry () const
 
bool store ()
 
void release (const bool unregister=false)
 
label eventNo () const
 
label & eventNo ()
 
bool upToDate (const regIOobject &) const
 
bool upToDate (const regIOobject &, const regIOobject &) const
 
bool upToDate (const regIOobject &, const regIOobject &, const regIOobject &) const
 
bool upToDate (const regIOobject &, const regIOobject &, const regIOobject &, const regIOobject &) const
 
void setUpToDate ()
 
virtual void rename (const word &newName)
 
const dictionaryfindMetaData () const noexcept
 
dictionarygetMetaData () noexcept
 
void removeMetaData ()
 
virtual void updateMetaData ()
 
bool headerOk ()
 
IstreamreadStream (const word &, const bool valid=true)
 
void close ()
 
virtual bool readData (Istream &)
 
virtual bool read ()
 
virtual label addWatch (const fileName &)
 
const labelListwatchIndices () const
 
labelListwatchIndices ()
 
virtual bool modified () const
 
virtual bool readIfModified ()
 
virtual bool writeObject (IOstreamOption streamOpt, const bool valid) const
 
virtual bool write (const bool valid=true) const
 
void operator= (const IOobject &io)
 
virtual bool writeObject (IOstreamOption::streamFormat fmt, IOstreamOption::versionNumber ver, IOstreamOption::compressionType comp, const bool valid) const
 
- Public Member Functions inherited from IOobject
 TypeName ("IOobject")
 
 IOobject (const IOobject &)=default
 
virtual ~IOobject ()=default
 
 IOobject (const word &name, const fileName &instance, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false)
 
 IOobject (const word &name, const fileName &instance, const fileName &local, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false)
 
 IOobject (const fileName &path, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false)
 
 IOobject (const IOobject &io, const objectRegistry &registry)
 
 IOobject (const IOobject &io, const word &name)
 
 IOobject (const IOobject &io, readOption, writeOption)
 
autoPtr< IOobjectclone () const
 
autoPtr< IOobjectclone (const objectRegistry &registry) const
 
const objectRegistrydb () const noexcept
 
const Timetime () const
 
const wordname () const noexcept
 
const wordheaderClassName () const noexcept
 
wordheaderClassName () noexcept
 
const stringnote () const noexcept
 
stringnote () noexcept
 
bool registerObject () const noexcept
 
bool registerObject (bool on) noexcept
 
bool globalObject () const noexcept
 
bool globalObject (bool on) noexcept
 
unsigned labelByteSize () const noexcept
 
unsigned scalarByteSize () const noexcept
 
bool isHeaderClassName (const word &clsName) const
 
template<class Type >
bool isHeaderClassName () const
 
readOption readOpt () const noexcept
 
readOption readOpt (readOption opt) noexcept
 
writeOption writeOpt () const noexcept
 
writeOption writeOpt (writeOption opt) noexcept
 
word group () const
 
word member () const
 
const fileNamerootPath () const
 
const fileNamecaseName () const
 
const fileNameinstance () const noexcept
 
fileNameinstance () noexcept
 
const fileNamelocal () const noexcept
 
fileName path () const
 
fileName path (const word &instance, const fileName &local=fileName::null) const
 
fileName objectPath () const
 
fileName objectRelPath () const
 
fileName localFilePath (const word &typeName, const bool search=true) const
 
fileName globalFilePath (const word &typeName, const bool search=true) const
 
IOstreamOption parseHeader (const dictionary &headerDict)
 
bool readHeader (Istream &is)
 
bool readHeader (dictionary &headerDict, Istream &is)
 
template<class Type >
bool typeHeaderOk (const bool checkType=true, const bool search=true, const bool verbose=true)
 
template<class Type >
void warnNoRereading () const
 
bool writeHeader (Ostream &os) const
 
bool writeHeader (Ostream &os, const word &objectType) const
 
void writeHeader (dictionary &dict, IOstreamOption streamOpt) const
 
void writeHeader (dictionary &dict, const word &objectType, IOstreamOption streamOpt) const
 
bool good () const noexcept
 
bool bad () const noexcept
 
InfoProxy< IOobjectinfo () const
 
void operator= (const IOobject &io)
 
readOptionreadOpt () noexcept
 
writeOptionwriteOpt () noexcept
 
boolregisterObject () noexcept
 
boolglobalObject () noexcept
 
template<>
bool isHeaderClassName () const
 
template<class StringType >
Foam::word groupName (StringType base, const word &group)
 

Additional Inherited Members

- Public Types inherited from IOobject
enum  objectState : char { GOOD, BAD }
 
enum  readOption : char { MUST_READ, MUST_READ_IF_MODIFIED, READ_IF_PRESENT, NO_READ }
 
enum  writeOption : char { AUTO_WRITE = 0, NO_WRITE = 1 }
 
enum  fileCheckTypes : char { timeStamp, timeStampMaster, inotify, inotifyMaster }
 
- Static Public Member Functions inherited from searchableSurface
static autoPtr< searchableSurfaceNew (const word &surfaceType, const IOobject &io, const dictionary &dict)
 
- Static Public Member Functions inherited from regIOobject
template<class Type >
static Type & store (Type *p)
 
template<class Type >
static Type & store (autoPtr< Type > &ptr)
 
template<class Type >
static Type & store (autoPtr< Type > &&ptr)
 
template<class Type >
static Type & store (refPtr< Type > &ptr)
 
template<class Type >
static Type & store (refPtr< Type > &&ptr)
 
template<class Type >
static Type & store (tmp< Type > &ptr)
 
template<class Type >
static Type & store (tmp< Type > &&ptr)
 
- Static Public Member Functions inherited from IOobject
static bool bannerEnabled () noexcept
 
static bool bannerEnabled (bool on) noexcept
 
static bool fileNameComponents (const fileName &path, fileName &instance, fileName &local, word &name)
 
template<class StringType >
static word groupName (StringType base, const word &group)
 
static word group (const word &name)
 
static word member (const word &name)
 
static word scopedName (const std::string &scope, const word &name)
 
static IOobject selectIO (const IOobject &io, const fileName &altFile, const word &ioName="")
 
static OstreamwriteBanner (Ostream &os, const bool noSyntaxHint=false)
 
static OstreamwriteDivider (Ostream &os)
 
static OstreamwriteEndDivider (Ostream &os)
 
- Static Public Attributes inherited from IOobject
static const Enum< fileCheckTypesfileCheckTypesNames
 
static char scopeSeparator
 
static fileCheckTypes fileModificationChecking
 
static float fileModificationSkew
 
static int maxFileModificationPolls
 
- Protected Member Functions inherited from regIOobject
bool readHeaderOk (const IOstreamOption::streamFormat fmt, const word &typeName)
 
- Protected Member Functions inherited from IOobject
void setBad (const string &s)
 
- Static Protected Member Functions inherited from IOobject
static void writeHeaderContent (Ostream &os, const IOobject &io, const word &objectType, const dictionary *metaDataDict=nullptr)
 
static void writeHeaderContent (dictionary &dict, const IOobject &io, const word &objectType, IOstreamOption streamOpt, const dictionary *metaDataDict=nullptr)
 
- Static Protected Attributes inherited from regIOobject
static bool masterOnlyReading = false
 

Detailed Description

Searching on a rotated box.

Box defined as min and max coordinate. Rotation by coordinate system at box middle.

E.g. box with sides 1 1 1 rotated 45 degrees around z-axis at origin (0.5 0.5 0.5)

    span    (1 1 1);
    origin  (0.5 0.5 0.5);
    e1      (1 1 0);
    e3      (0 0 1);


Dictionary parameters

Property Description Required Default
type rotatedBox selector
span The box dimensions yes
origin The box corner yes
e1 Local x-axis of the box yes
e3 Local z-axis of the box yes
Note
Longer type name : searchableRotatedBox
Source files

Definition at line 105 of file searchableRotatedBox.H.

Constructor & Destructor Documentation

◆ searchableRotatedBox() [1/2]

searchableRotatedBox ( const IOobject io,
const vector span,
const coordSystem::cartesian csys = coordSystem::cartesian{} 
)

Definition at line 49 of file searchableRotatedBox.C.

◆ searchableRotatedBox() [2/2]

searchableRotatedBox ( const IOobject io,
const dictionary dict 
)

Definition at line 77 of file searchableRotatedBox.C.

◆ ~searchableRotatedBox()

virtual ~searchableRotatedBox ( )
virtualdefault

Member Function Documentation

◆ TypeName()

TypeName ( "searchableRotatedBox"  )

◆ regions()

const Foam::wordList & regions ( ) const
virtual

Implements searchableSurface.

Definition at line 98 of file searchableRotatedBox.C.

References searchableBox::regions().

Here is the call graph for this function:

◆ hasVolumeType()

virtual bool hasVolumeType ( ) const
inlinevirtual

Reimplemented from searchableSurface.

Definition at line 164 of file searchableRotatedBox.H.

◆ outsideVolumeType()

virtual volumeType outsideVolumeType ( ) const
inlinevirtual

Implements searchableSurface.

Definition at line 170 of file searchableRotatedBox.H.

References volumeType::OUTSIDE.

◆ size()

virtual label size ( ) const
inlinevirtual

Implements searchableSurface.

Definition at line 176 of file searchableRotatedBox.H.

◆ coordinates()

Foam::tmp< Foam::pointField > coordinates ( ) const
virtual

Implements searchableSurface.

Definition at line 104 of file searchableRotatedBox.C.

◆ boundingSpheres()

void boundingSpheres ( pointField centres,
scalarField radiusSqr 
) const
virtual

Implements searchableSurface.

Definition at line 111 of file searchableRotatedBox.C.

◆ points()

Foam::tmp< Foam::pointField > points ( ) const
virtual

Implements searchableSurface.

Definition at line 121 of file searchableRotatedBox.C.

◆ overlaps()

bool overlaps ( const boundBox bb) const
virtual

◆ findNearest() [1/6]

Foam::pointIndexHit findNearest ( const point sample,
const scalar  nearestDistSqr 
) const

Definition at line 189 of file searchableRotatedBox.C.

References PointIndexHit::rawPoint().

Here is the call graph for this function:

◆ findNearest() [2/6]

Foam::pointIndexHit findNearest ( const linePointRef ln,
treeBoundBox tightest,
point linePoint 
) const

Definition at line 210 of file searchableRotatedBox.C.

References NotImplemented.

◆ findLine() [1/2]

Foam::pointIndexHit findLine ( const point start,
const point end 
) const

Definition at line 222 of file searchableRotatedBox.C.

References stdFoam::end(), and PointIndexHit::rawPoint().

Here is the call graph for this function:

◆ findLineAny() [1/2]

Foam::pointIndexHit findLineAny ( const point start,
const point end 
) const

Definition at line 243 of file searchableRotatedBox.C.

References stdFoam::end().

Here is the call graph for this function:

◆ findNearest() [3/6]

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

Implements searchableSurface.

Definition at line 253 of file searchableRotatedBox.C.

References forAll, samples(), and List::setSize().

Here is the call graph for this function:

◆ findLine() [2/2]

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

Implements searchableSurface.

Definition at line 269 of file searchableRotatedBox.C.

References stdFoam::end(), forAll, and List::setSize().

Here is the call graph for this function:

◆ findLineAny() [2/2]

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

Implements searchableSurface.

Definition at line 285 of file searchableRotatedBox.C.

References stdFoam::end(), forAll, and List::setSize().

Here is the call graph for this function:

◆ findLineAll()

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

◆ getRegion()

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

Implements searchableSurface.

Definition at line 369 of file searchableRotatedBox.C.

References List::setSize().

Here is the call graph for this function:

◆ getNormal()

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

Implements searchableSurface.

Definition at line 380 of file searchableRotatedBox.C.

◆ getVolumeType()

void getVolumeType ( const pointField points,
List< volumeType > &  volType 
) const
virtual

Implements searchableSurface.

Definition at line 393 of file searchableRotatedBox.C.

References points.

◆ writeData()

bool writeData ( Ostream ) const
inlinevirtual

Implements regIOobject.

Definition at line 301 of file searchableRotatedBox.H.

References NotImplemented.

◆ findNearest() [4/6]

virtual void findNearest

◆ findNearest() [5/6]

virtual void findNearest
inline

Definition at line 291 of file searchableSurface.H.

◆ findNearest() [6/6]

void findNearest

Definition at line 76 of file searchableSurface.C.


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