Searching on bounding box. More...
Public Member Functions | |
TypeName ("searchableBox") | |
searchableBox (const IOobject &io, const treeBoundBox &bb) | |
searchableBox (const IOobject &io, const dictionary &dict) | |
virtual | ~searchableBox ()=default |
virtual const wordList & | regions () const |
virtual bool | hasVolumeType () const |
virtual volumeType | outsideVolumeType () const |
virtual label | size () const |
virtual tmp< pointField > | coordinates () const |
virtual void | boundingSpheres (pointField ¢res, scalarField &radiusSqr) const |
virtual tmp< pointField > | points () const |
virtual bool | overlaps (const boundBox &bb) const |
pointIndexHit | findNearest (const point &sample, const scalar nearestDistSqr) const |
pointIndexHit | findNearestOnEdge (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 ®ion) const |
virtual void | getNormal (const List< pointIndexHit > &, vectorField &normal) const |
virtual void | getVolumeType (const pointField &points, List< volumeType > &volType) const |
bool | writeData (Ostream &) const |
![]() | |
TypeName ("searchableSurface") | |
declareRunTimeSelectionTable (autoPtr, searchableSurface, dict,(const IOobject &io, const dictionary &dict),(io, dict)) | |
searchableSurface (const IOobject &io) | |
virtual autoPtr< searchableSurface > | clone () const |
virtual | ~searchableSurface ()=default |
virtual bool | global () const |
virtual fileName | filePath () const |
virtual const boundBox & | bounds () const |
virtual boundBox & | bounds () |
virtual label | globalSize () const |
virtual void | findNearest (const pointField &samples, const scalarField &nearestDistSqr, const labelList ®ionIndices, List< pointIndexHit > &info) const |
virtual void | findNearest (const pointField &sample, const scalarField &nearestDistSqr, List< pointIndexHit > &, vectorField &normal, labelList ®ion) 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 |
![]() | |
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 dictionary * | findMetaData () const noexcept |
dictionary & | getMetaData () noexcept |
void | removeMetaData () |
virtual void | updateMetaData () |
bool | headerOk () |
Istream & | readStream (const word &, const bool valid=true) |
void | close () |
virtual bool | readData (Istream &) |
virtual bool | read () |
virtual label | addWatch (const fileName &) |
const labelList & | watchIndices () const |
labelList & | watchIndices () |
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 |
![]() | |
TypeName ("IOobject") | |
IOobject (const IOobject &)=default | |
virtual | ~IOobject ()=default |
IOobject (const word &name, const fileName &instance, const objectRegistry ®istry, 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 ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false) | |
IOobject (const fileName &path, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false) | |
IOobject (const IOobject &io, const objectRegistry ®istry) | |
IOobject (const IOobject &io, const word &name) | |
IOobject (const IOobject &io, readOption, writeOption) | |
autoPtr< IOobject > | clone () const |
autoPtr< IOobject > | clone (const objectRegistry ®istry) const |
const objectRegistry & | db () const noexcept |
const Time & | time () const |
const word & | name () const noexcept |
const word & | headerClassName () const noexcept |
word & | headerClassName () noexcept |
const string & | note () const noexcept |
string & | note () 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 fileName & | rootPath () const |
const fileName & | caseName () const |
const fileName & | instance () const noexcept |
fileName & | instance () noexcept |
const fileName & | local () 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< IOobject > | info () const |
void | operator= (const IOobject &io) |
readOption & | readOpt () noexcept |
writeOption & | writeOpt () noexcept |
bool & | registerObject () noexcept |
bool & | globalObject () noexcept |
template<> | |
bool | isHeaderClassName () const |
template<class StringType > | |
Foam::word | groupName (StringType base, const word &group) |
![]() | |
treeBoundBox () | |
treeBoundBox (const boundBox &bb) | |
treeBoundBox (const point &pt) | |
treeBoundBox (const point &min, const point &max) | |
treeBoundBox (const UList< point > &points) | |
treeBoundBox (const UList< point > &points, const labelUList &indices) | |
template<unsigned N> | |
treeBoundBox (const UList< point > &points, const FixedList< label, N > &indices) | |
treeBoundBox (Istream &is) | |
scalar | typDim () const |
tmp< pointField > | points () const |
point | corner (const direction octant) const |
treeBoundBox | subBbox (const direction octant) const |
treeBoundBox | subBbox (const point &mid, const direction) const |
direction | subOctant (const point &pt) const |
direction | subOctant (const point &pt, bool &onEdge) const |
void | searchOrder (const point &pt, FixedList< direction, 8 > &octantOrder) const |
bool | intersects (const point &overallStart, const vector &overallVec, const point &start, const point &end, point &pt, direction &ptBits) const |
bool | intersects (const point &start, const point &end, point &pt) const |
bool | contains (const vector &dir, const point &) const |
direction | faceBits (const point &pt) const |
direction | posBits (const point &pt) const |
void | calcExtremities (const point &pt, point &nearest, point &furthest) const |
scalar | maxDist (const point &pt) const |
label | distanceCmp (const point &pt, const treeBoundBox &other) const |
treeBoundBox | extend (Random &rndGen, const scalar s) const |
bool | overlaps (const boundBox &bb) const |
bool | overlaps (const point ¢re, const scalar radiusSqr) const |
bool | contains (const point &pt) const |
bool | contains (const boundBox &bb) const |
bool | contains (const UList< point > &points) const |
template<unsigned N> | |
bool | contains (const UList< point > &points, const FixedList< label, N > &indices) const |
template<class IntContainer > | |
bool | contains (const UList< point > &points, const IntContainer &indices) const |
![]() | |
boundBox () | |
boundBox (const point &pt) | |
boundBox (const point &min, const point &max) | |
boundBox (const UList< point > &points, bool doReduce=true) | |
boundBox (const tmp< pointField > &tpoints, bool doReduce=true) | |
boundBox (const UList< point > &points, const labelUList &indices, bool doReduce=true) | |
template<unsigned N> | |
boundBox (const UList< point > &points, const FixedList< label, N > &indices, bool doReduce=true) | |
boundBox (Istream &is) | |
bool | empty () const |
bool | valid () const |
const point & | min () const |
const point & | max () const |
point & | min () |
point & | max () |
point | centre () const |
point | midpoint () const |
vector | span () const |
scalar | mag () const |
scalar | volume () const |
scalar | minDim () const |
scalar | maxDim () const |
scalar | avgDim () const |
label | nDim () const |
tmp< pointField > | points () const |
tmp< pointField > | faceCentres () const |
point | faceCentre (const direction facei) const |
void | clear () |
void | add (const boundBox &bb) |
void | add (const point &pt) |
void | add (const UList< point > &points) |
void | add (const tmp< pointField > &tpoints) |
template<unsigned N> | |
void | add (const FixedList< point, N > &points) |
template<unsigned N> | |
void | add (const UList< point > &points, const FixedList< label, N > &indices) |
template<class IntContainer > | |
void | add (const UList< point > &points, const IntContainer &indices) |
void | inflate (const scalar s) |
void | reduce () |
bool | intersect (const boundBox &bb) |
bool | intersects (const plane &pln) const |
bool | overlaps (const boundBox &bb) const |
bool | overlaps (const point ¢re, const scalar radiusSqr) const |
bool | contains (const point &pt) const |
bool | contains (const boundBox &bb) const |
bool | containsInside (const point &pt) const |
bool | contains (const UList< point > &points) const |
template<unsigned N> | |
bool | contains (const UList< point > &points, const FixedList< label, N > &indices) const |
template<class IntContainer > | |
bool | contains (const UList< point > &points, const IntContainer &indices) const |
bool | containsAny (const UList< point > &points) const |
template<unsigned N> | |
bool | containsAny (const UList< point > &points, const FixedList< label, N > &indices) const |
template<class IntContainer > | |
bool | containsAny (const UList< point > &points, const IntContainer &indices) const |
point | nearest (const point &pt) const |
void | operator+= (const boundBox &bb) |
Additional Inherited Members | |
![]() | |
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 } |
![]() | |
enum | octantBit : direction { RIGHTHALF = 0x1, TOPHALF = 0x2, FRONTHALF = 0x4 } |
enum | faceId { LEFT = 0, RIGHT = 1, BOTTOM = 2, TOP = 3, BACK = 4, FRONT = 5 } |
enum | faceBit : direction { NOFACE = 0, LEFTBIT = 0x1 << LEFT, RIGHTBIT = 0x1 << RIGHT, BOTTOMBIT = 0x1 << BOTTOM, TOPBIT = 0x1 << TOP, BACKBIT = 0x1 << BACK, FRONTBIT = 0x1 << FRONT } |
enum | edgeId { E01 = 0, E13 = 1, E23 = 2, E02 = 3, E45 = 4, E57 = 5, E67 = 6, E46 = 7, E04 = 8, E15 = 9, E37 = 10, E26 = 11 } |
![]() | |
enum | directionBit : direction { XDIR = 0x1, YDIR = 0x2, ZDIR = 0x4 } |
![]() | |
static autoPtr< searchableSurface > | New (const word &surfaceType, const IOobject &io, const dictionary &dict) |
![]() | |
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 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 Ostream & | writeBanner (Ostream &os, const bool noSyntaxHint=false) |
static Ostream & | writeDivider (Ostream &os) |
static Ostream & | writeEndDivider (Ostream &os) |
![]() | |
static direction | subOctant (const point &mid, const point &pt) |
static direction | subOctant (const point &mid, const point &pt, bool &onEdge) |
static direction | subOctant (const point &mid, const vector &dir, const point &pt, bool &onEdge) |
![]() | |
static const Enum< fileCheckTypes > | fileCheckTypesNames |
static char | scopeSeparator |
static fileCheckTypes | fileModificationChecking |
static float | fileModificationSkew |
static int | maxFileModificationPolls |
![]() | |
static const faceList | faces |
static const edgeList | edges |
![]() | |
static const boundBox | greatBox |
static const boundBox | invertedBox |
static const faceList | faces |
static const FixedList< vector, 6 > | faceNormals |
![]() | |
bool | readHeaderOk (const IOstreamOption::streamFormat fmt, const word &typeName) |
![]() | |
void | setBad (const string &s) |
![]() | |
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 bool | masterOnlyReading = false |
Searching on bounding box.
Dictionary parameters
Property | Description | Required | Default |
---|---|---|---|
type | box | selector | |
min | Minimum point for bounding box | yes | |
max | Maximum point for bounding box | yes | |
span | Box width | cond'l |
min-max
or min-span
pairsearchableBox
Definition at line 89 of file searchableBox.H.
searchableBox | ( | const IOobject & | io, |
const treeBoundBox & | bb | ||
) |
Definition at line 190 of file searchableBox.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::nl, and boundBox::valid().
searchableBox | ( | const IOobject & | io, |
const dictionary & | dict | ||
) |
Definition at line 211 of file searchableBox.C.
References dict, Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::nl, Foam::readBoxDim(), and boundBox::valid().
|
virtualdefault |
TypeName | ( | "searchableBox" | ) |
|
virtual |
Implements searchableSurface.
Definition at line 235 of file searchableBox.C.
References List::resize().
Referenced by searchableRotatedBox::regions().
|
inlinevirtual |
Reimplemented from searchableSurface.
Definition at line 157 of file searchableBox.H.
|
inlinevirtual |
Implements searchableSurface.
Definition at line 162 of file searchableBox.H.
References volumeType::OUTSIDE.
|
inlinevirtual |
Implements searchableSurface.
Definition at line 168 of file searchableBox.H.
|
virtual |
Implements searchableSurface.
Definition at line 246 of file searchableBox.C.
References treeBoundBox::faces, forAll, tmp::New(), and treeBoundBox::points().
|
virtual |
Implements searchableSurface.
Definition at line 264 of file searchableBox.C.
References f(), treeBoundBox::faces, forAll, Foam::magSqr(), Foam::max(), treeBoundBox::points(), Foam::sqr(), and Foam::Zero.
|
virtual |
Implements searchableSurface.
Definition at line 298 of file searchableBox.C.
References treeBoundBox::points().
Implements searchableSurface.
Definition at line 189 of file searchableBox.H.
References boundBox::overlaps().
Foam::pointIndexHit findNearest | ( | const point & | sample, |
const scalar | nearestDistSqr | ||
) | const |
Definition at line 305 of file searchableBox.C.
Foam::pointIndexHit findNearestOnEdge | ( | const point & | sample, |
const scalar | nearestDistSqr | ||
) | const |
Definition at line 315 of file searchableBox.C.
References Foam::cmptMag(), SortableList::indices(), Foam::magSqr(), Foam::max(), Foam::min(), VectorSpace< Vector< scalar >, scalar, 3 >::nComponents, PointIndexHit::rawPoint(), PointIndexHit::setIndex(), PointIndexHit::setMiss(), and SortableList::sort().
Foam::pointIndexHit findNearest | ( | const linePointRef & | ln, |
treeBoundBox & | tightest, | ||
point & | linePoint | ||
) | const |
Definition at line 385 of file searchableBox.C.
References NotImplemented.
Foam::pointIndexHit findLine | ( | const point & | start, |
const point & | end | ||
) | const |
Definition at line 397 of file searchableBox.C.
References Foam::abort(), stdFoam::end(), Foam::FatalError, FatalErrorInFunction, PointIndexHit::index(), Foam::max(), Foam::min(), VectorSpace< Vector< scalar >, scalar, 3 >::nComponents, PointIndexHit::rawPoint(), PointIndexHit::setHit(), and PointIndexHit::setIndex().
Foam::pointIndexHit findLineAny | ( | const point & | start, |
const point & | end | ||
) | const |
Definition at line 460 of file searchableBox.C.
References stdFoam::end().
|
virtual |
Implements searchableSurface.
Definition at line 470 of file searchableBox.C.
References forAll, samples(), and List::setSize().
|
virtual |
Implements searchableSurface.
Definition at line 488 of file searchableBox.C.
References stdFoam::end(), forAll, and List::setSize().
|
virtual |
Implements searchableSurface.
Definition at line 504 of file searchableBox.C.
References stdFoam::end(), forAll, and List::setSize().
|
virtual |
Implements searchableSurface.
Definition at line 520 of file searchableBox.C.
References DynamicList::append(), List::clear(), DynamicList::clear(), stdFoam::end(), forAll, PointIndexHit::hit(), PointIndexHit::hitPoint(), PointIndexHit::index(), Foam::magSqr(), List::setSize(), List::transfer(), and VectorSpace< Vector< scalar >, scalar, 3 >::uniform().
|
virtual |
Implements searchableSurface.
Definition at line 587 of file searchableBox.C.
References List::setSize().
|
virtual |
Implements searchableSurface.
Definition at line 598 of file searchableBox.C.
References boundBox::faceNormals, forAll, and Foam::Zero.
|
virtual |
Implements searchableSurface.
Definition at line 621 of file searchableBox.C.
References forAll, volumeType::INSIDE, Foam::max(), Foam::min(), VectorSpace< Vector< scalar >, scalar, 3 >::nComponents, volumeType::OUTSIDE, points, and List::setSize().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.