Container for searchableSurfaces. More...
Public Member Functions | |
ClassName ("searchableSurfaces") | |
searchableSurfaces (const label) | |
Construct with length specified. Fill later. More... | |
searchableSurfaces (const IOobject &, const dictionary &, const bool singleRegionName) | |
Construct from dictionary and whether to construct names always. More... | |
const wordList & | names () const |
wordList & | names () |
const List< wordList > & | regionNames () const |
List< wordList > & | regionNames () |
label | findSurfaceID (const word &name) const |
Find index of surface. Return -1 if not found. More... | |
label | findSurfaceRegionID (const word &surfaceName, const word ®ionName) const |
void | findAnyIntersection (const pointField &start, const pointField &end, labelList &surfaces, List< pointIndexHit > &) const |
Find any intersection. Return hit point information and. More... | |
void | findAllIntersections (const pointField &start, const pointField &end, labelListList &surfaces, List< List< pointIndexHit > > &) const |
Find all intersections in order from start to end. Returns for. More... | |
void | findNearestIntersection (const pointField &start, const pointField &end, labelList &surface1, List< pointIndexHit > &hit1, labelList &surface2, List< pointIndexHit > &hit2) const |
void | findNearest (const pointField &, const scalarField &nearestDistSqr, labelList &surfaces, List< pointIndexHit > &) const |
Find nearest. Return -1 (and a miss()) or surface and nearest. More... | |
void | findNearest (const pointField &samples, const scalarField &nearestDistSqr, const labelList ®ionIndices, labelList &nearestSurfaces, List< pointIndexHit > &nearestInfo) const |
boundBox | bounds () const |
Calculate bounding box. More... | |
pointIndexHit | facesIntersection (const scalar initialDistSqr, const scalar convergenceDistSqr, const point &start) const |
Calculate point which is on a set of surfaces. More... | |
bool | checkClosed (const bool report) const |
Are all surfaces closed and manifold. More... | |
bool | checkNormalOrientation (const bool report) const |
Are all (triangulated) surfaces consistent normal orientation. More... | |
bool | checkSizes (const scalar maxRatio, const bool report) const |
Are all bounding boxes of similar size. More... | |
bool | checkIntersection (const scalar tol, const autoPtr< writer< scalar > > &, const bool report) const |
Do surfaces self-intersect or intersect others. More... | |
bool | checkQuality (const scalar minQuality, const bool report) const |
Check triangle quality. More... | |
label | checkTopology (const bool report) const |
All topological checks. Return number of failed checks. More... | |
label | checkGeometry (const scalar maxRatio, const scalar tolerance, const autoPtr< writer< scalar > > &setWriter, const scalar minQuality, const bool report) const |
All geometric checks. Return number of failed checks. More... | |
void | writeStats (const List< wordList > &, Ostream &) const |
Write some stats. More... | |
const searchableSurface & | operator[] (const word &) const |
Return const reference to searchableSurface by name. More... | |
searchableSurface & | operator[] (const word &) |
Return reference to searchableSurface by name. More... | |
![]() | |
PtrList () | |
Null Constructor. More... | |
PtrList (const label) | |
Construct with size specified. More... | |
PtrList (const PtrList< searchableSurface > &) | |
Copy constructor. More... | |
PtrList (const PtrList< searchableSurface > &, const CloneArg &) | |
Copy constructor with additional argument for clone. More... | |
PtrList (const Xfer< PtrList< searchableSurface > > &) | |
Construct by transferring the parameter contents. More... | |
PtrList (PtrList< searchableSurface > &, bool reUse) | |
Construct as copy or re-use as specified. More... | |
PtrList (const SLPtrList< searchableSurface > &) | |
Construct as copy of SLPtrList<T> More... | |
PtrList (Istream &, const INew &) | |
Construct from Istream using given Istream constructor class. More... | |
PtrList (Istream &) | |
Construct from Istream using default Istream constructor class. More... | |
~PtrList () | |
Destructor. More... | |
label | size () const |
Return the number of elements in the PtrList. More... | |
bool | empty () const |
Return true if the PtrList is empty (ie, size() is zero). More... | |
searchableSurface & | first () |
Return reference to the first element of the list. More... | |
const searchableSurface & | first () const |
Return reference to first element of the list. More... | |
searchableSurface & | last () |
Return reference to the last element of the list. More... | |
const searchableSurface & | last () const |
Return reference to the last element of the list. More... | |
void | setSize (const label) |
Reset size of PtrList. If extending the PtrList, new entries are. More... | |
void | resize (const label) |
Alias for setSize(const label) More... | |
void | clear () |
Clear the PtrList, i.e. set size to zero deleting all the. More... | |
void | append (searchableSurface *) |
Append an element at the end of the list. More... | |
void | append (const autoPtr< searchableSurface > &) |
void | append (const tmp< searchableSurface > &) |
void | transfer (PtrList< searchableSurface > &) |
Transfer the contents of the argument PtrList into this PtrList. More... | |
Xfer< PtrList< searchableSurface > > | xfer () |
Transfer contents to the Xfer container. More... | |
bool | set (const label) const |
Is element set. More... | |
autoPtr< searchableSurface > | set (const label, searchableSurface *) |
Set element. Return old element (can be NULL). More... | |
autoPtr< searchableSurface > | set (const label, const autoPtr< searchableSurface > &) |
autoPtr< searchableSurface > | set (const label, const tmp< searchableSurface > &) |
void | reorder (const labelUList &) |
Reorders elements. Ordering does not have to be done in. More... | |
const searchableSurface & | operator[] (const label) const |
Return element const reference. More... | |
searchableSurface & | operator[] (const label) |
Return element reference. More... | |
const searchableSurface * | operator() (const label) const |
Return element const pointer. More... | |
PtrList< searchableSurface > & | operator= (const PtrList< searchableSurface > &) |
Assignment. More... | |
iterator | begin () |
Return an iterator to begin traversing the PtrList. More... | |
const_iterator | begin () const |
Return an const_iterator to begin traversing the PtrList. More... | |
iterator | end () |
Return an iterator to end traversing the PtrList. More... | |
const_iterator | end () const |
Return an const_iterator to end traversing the PtrList. More... | |
const_iterator | cbegin () const |
Return an const_iterator to begin traversing the PtrList. More... | |
const_iterator | cend () const |
Return an const_iterator to end traversing the PtrList. More... | |
Additional Inherited Members | |
![]() | |
typedef searchableSurface | value_type |
Type of values the PtrList contains. More... | |
typedef searchableSurface & | reference |
Type that can be used for storing into PtrList::value_type objects. More... | |
typedef const searchableSurface & | const_reference |
Type that can be used for storing into constant PtrList::value_type. More... | |
![]() | |
void | read (Istream &, const INew &inewt) |
Read from Istream using given Istream constructor class. More... | |
|
explicit |
Construct with length specified. Fill later.
Definition at line 72 of file searchableSurfaces.C.
searchableSurfaces | ( | const IOobject & | io, |
const dictionary & | topDict, | ||
const bool | singleRegionName | ||
) |
Construct from dictionary and whether to construct names always.
as surfaceName "_" regionName (singleRegionName false) or for single region surfaces as surfaceName only (singleRegionName true)
Definition at line 176 of file searchableSurfaces.C.
References IOobject::clone(), dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, Foam::findIndex(), searchableSurfaces::findSurfaceID(), forAll, forAllConstIter(), dictionary::found(), dictionary::isDict(), dictionary::lookup(), IOobject::name(), searchableSurface::New(), searchableSurfaces::operator[](), dictionary::readIfPresent(), searchableSurface::regions(), List< T >::setSize(), PtrList< T >::setSize(), List< T >::size(), and dictionary::subDict().
ClassName | ( | "searchableSurfaces" | ) |
|
inline |
Definition at line 117 of file searchableSurfaces.H.
Referenced by searchableSurfaces::checkClosed(), searchableSurfaces::checkIntersection(), searchableSurfaces::checkNormalOrientation(), searchableSurfaces::checkQuality(), searchableSurfaces::checkSizes(), shellSurfaces::shellSurfaces(), and searchableSurfaces::writeStats().
|
inline |
Definition at line 121 of file searchableSurfaces.H.
Definition at line 126 of file searchableSurfaces.H.
Definition at line 130 of file searchableSurfaces.H.
References searchableSurfaces::bounds(), searchableSurfaces::checkClosed(), searchableSurfaces::checkGeometry(), searchableSurfaces::checkIntersection(), searchableSurfaces::checkNormalOrientation(), searchableSurfaces::checkQuality(), searchableSurfaces::checkSizes(), searchableSurfaces::checkTopology(), PtrList< searchableSurface >::end(), searchableSurfaces::facesIntersection(), searchableSurfaces::findAllIntersections(), searchableSurfaces::findAnyIntersection(), searchableSurfaces::findNearest(), searchableSurfaces::findNearestIntersection(), searchableSurfaces::findSurfaceID(), searchableSurfaces::findSurfaceRegionID(), Foam::name(), searchableSurfaces::operator[](), regionName, samples(), and searchableSurfaces::writeStats().
Foam::label findSurfaceID | ( | const word & | name | ) | const |
Find index of surface. Return -1 if not found.
Definition at line 296 of file searchableSurfaces.C.
References Foam::findIndex(), and searchableSurfaces::findSurfaceRegionID().
Referenced by searchableSurfaces::findSurfaceRegionID(), searchableSurfaces::operator[](), searchableSurfaces::regionNames(), and searchableSurfaces::searchableSurfaces().
Foam::label findSurfaceRegionID | ( | const word & | surfaceName, |
const word & | regionName | ||
) | const |
Definition at line 305 of file searchableSurfaces.C.
References searchableSurfaces::findAnyIntersection(), Foam::findIndex(), and searchableSurfaces::findSurfaceID().
Referenced by searchableSurfaces::findSurfaceID(), and searchableSurfaces::regionNames().
void findAnyIntersection | ( | const pointField & | start, |
const pointField & | end, | ||
labelList & | surfaces, | ||
List< pointIndexHit > & | hitInfo | ||
) | const |
Find any intersection. Return hit point information and.
surface number. If multiple surfaces hit the first surface is returned, not necessarily the nearest (to start).
Definition at line 318 of file searchableSurfaces.C.
References searchableSurfaces::findAllIntersections(), and searchableSurfacesQueries::findAnyIntersection().
Referenced by searchableSurfaces::findSurfaceRegionID(), NamedEnum< Enum, nEnum >::names(), and searchableSurfaces::regionNames().
void findAllIntersections | ( | const pointField & | start, |
const pointField & | end, | ||
labelListList & | hitSurfaces, | ||
List< List< pointIndexHit > > & | hitInfo | ||
) | const |
Find all intersections in order from start to end. Returns for.
every hit the surface and the hit info.
Definition at line 340 of file searchableSurfaces.C.
References searchableSurfacesQueries::findAllIntersections(), and searchableSurfaces::findNearestIntersection().
Referenced by searchableSurfaces::findAnyIntersection(), and searchableSurfaces::regionNames().
void findNearestIntersection | ( | const pointField & | start, |
const pointField & | end, | ||
labelList & | surface1, | ||
List< pointIndexHit > & | hit1, | ||
labelList & | surface2, | ||
List< pointIndexHit > & | hit2 | ||
) | const |
Definition at line 361 of file searchableSurfaces.C.
References searchableSurfaces::findNearest(), and searchableSurfacesQueries::findNearestIntersection().
Referenced by searchableSurfaces::findAllIntersections(), and searchableSurfaces::regionNames().
void findNearest | ( | const pointField & | samples, |
const scalarField & | nearestDistSqr, | ||
labelList & | surfaces, | ||
List< pointIndexHit > & | nearestInfo | ||
) | const |
Find nearest. Return -1 (and a miss()) or surface and nearest.
point.
Definition at line 386 of file searchableSurfaces.C.
References searchableSurfacesQueries::findNearest().
Referenced by searchableSurfaces::findNearestIntersection(), NamedEnum< Enum, nEnum >::names(), and searchableSurfaces::regionNames().
void findNearest | ( | const pointField & | samples, |
const scalarField & | nearestDistSqr, | ||
const labelList & | regionIndices, | ||
labelList & | nearestSurfaces, | ||
List< pointIndexHit > & | nearestInfo | ||
) | const |
Definition at line 407 of file searchableSurfaces.C.
References searchableSurfacesQueries::findNearest().
Foam::boundBox bounds | ( | ) | const |
Calculate bounding box.
Definition at line 428 of file searchableSurfaces.C.
References searchableSurfacesQueries::bounds(), and searchableSurfaces::facesIntersection().
Referenced by searchableSurfaces::regionNames().
Foam::pointIndexHit facesIntersection | ( | const scalar | initialDistSqr, |
const scalar | convergenceDistSqr, | ||
const point & | start | ||
) | const |
Calculate point which is on a set of surfaces.
Definition at line 440 of file searchableSurfaces.C.
References searchableSurfacesQueries::facesIntersection().
Referenced by searchableSurfaces::bounds(), and searchableSurfaces::regionNames().
bool checkClosed | ( | const bool | report | ) | const |
Are all surfaces closed and manifold.
Definition at line 457 of file searchableSurfaces.C.
References PrimitivePatch< Face, FaceList, PointField, PointType >::edgeFaces(), Foam::endl(), forAll, Foam::Info, searchableSurfaces::names(), Foam::nl, searchableSurfaces::operator[](), Foam::returnReduce(), and PtrList< searchableSurface >::size().
Referenced by searchableSurfaces::checkTopology(), and searchableSurfaces::regionNames().
bool checkNormalOrientation | ( | const bool | report | ) | const |
Are all (triangulated) surfaces consistent normal orientation.
Definition at line 524 of file searchableSurfaces.C.
References PatchTools::checkOrientation(), searchableSurfaces::checkSizes(), Foam::endl(), forAll, Foam::Info, PatchTools::markZones(), searchableSurfaces::names(), searchableSurfaces::operator[](), Foam::returnReduce(), and List< T >::size().
Referenced by searchableSurfaces::checkTopology(), and searchableSurfaces::regionNames().
bool checkSizes | ( | const scalar | maxRatio, |
const bool | report | ||
) | const |
Are all bounding boxes of similar size.
Definition at line 571 of file searchableSurfaces.C.
References searchableSurface::bounds(), searchableSurfaces::checkIntersection(), Foam::endl(), forAll, Foam::Info, boundBox::mag(), searchableSurfaces::names(), Foam::nl, searchableSurfaces::operator[](), Foam::returnReduce(), and PtrList< searchableSurface >::size().
Referenced by searchableSurfaces::checkGeometry(), searchableSurfaces::checkNormalOrientation(), and searchableSurfaces::regionNames().
bool checkIntersection | ( | const scalar | tol, |
const autoPtr< writer< scalar > > & | setWriter, | ||
const bool | report | ||
) | const |
Do surfaces self-intersect or intersect others.
Definition at line 619 of file searchableSurfaces.C.
References searchableSurfaces::checkQuality(), PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), PtrList< searchableSurface >::end(), Foam::endl(), searchableSurface::findLineAny(), forAll, Foam::Info, PrimitivePatch< Face, FaceList, PointField, PointType >::localPoints(), Foam::mag(), Foam::max(), searchableSurfaces::names(), searchableSurfaces::operator[](), IOobject::path(), Foam::returnReduce(), List< T >::size(), triSurfaceSearch::tolerance(), OSstream::write(), and List< T >::xfer().
Referenced by searchableSurfaces::checkGeometry(), searchableSurfaces::checkSizes(), and searchableSurfaces::regionNames().
bool checkQuality | ( | const scalar | minQuality, |
const bool | report | ||
) | const |
Check triangle quality.
Definition at line 761 of file searchableSurfaces.C.
References searchableSurfaces::checkTopology(), Foam::endl(), f(), forAll, Foam::Info, searchableSurfaces::names(), searchableSurfaces::operator[](), PrimitivePatch< Face, FaceList, PointField, PointType >::points(), and Foam::returnReduce().
Referenced by searchableSurfaces::checkGeometry(), searchableSurfaces::checkIntersection(), and searchableSurfaces::regionNames().
Foam::label checkTopology | ( | const bool | report | ) | const |
All topological checks. Return number of failed checks.
Definition at line 826 of file searchableSurfaces.C.
References searchableSurfaces::checkClosed(), searchableSurfaces::checkGeometry(), and searchableSurfaces::checkNormalOrientation().
Referenced by searchableSurfaces::checkQuality(), and searchableSurfaces::regionNames().
Foam::label checkGeometry | ( | const scalar | maxRatio, |
const scalar | tolerance, | ||
const autoPtr< writer< scalar > > & | setWriter, | ||
const scalar | minQuality, | ||
const bool | report | ||
) | const |
All geometric checks. Return number of failed checks.
Definition at line 846 of file searchableSurfaces.C.
References searchableSurfaces::checkIntersection(), searchableSurfaces::checkQuality(), searchableSurfaces::checkSizes(), and searchableSurfaces::writeStats().
Referenced by searchableSurfaces::checkTopology(), and searchableSurfaces::regionNames().
Write some stats.
Definition at line 876 of file searchableSurfaces.C.
References searchableSurface::bounds(), Foam::endl(), forAll, searchableSurface::globalSize(), searchableSurface::hasVolumeType(), Foam::Info, searchableSurfaces::names(), PrimitivePatch< Face, FaceList, PointField, PointType >::nEdges(), Foam::nl, PtrList< searchableSurface >::operator, searchableSurfaces::operator[](), triSurfaceMesh::points(), s(), List< T >::size(), and PtrList< searchableSurface >::size().
Referenced by searchableSurfaces::checkGeometry(), and searchableSurfaces::regionNames().
const Foam::searchableSurface & operator[] | ( | const word & | surfName | ) | const |
Return const reference to searchableSurface by name.
Definition at line 921 of file searchableSurfaces.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorIn, searchableSurfaces::findSurfaceID(), Foam::nl, and PtrList< searchableSurface >::operator.
Referenced by searchableSurfaces::checkClosed(), searchableSurfaces::checkIntersection(), searchableSurfaces::checkNormalOrientation(), searchableSurfaces::checkQuality(), searchableSurfaces::checkSizes(), searchableSurfaces::operator[](), searchableSurfaces::regionNames(), searchableSurfaces::searchableSurfaces(), and searchableSurfaces::writeStats().
Foam::searchableSurface & operator[] | ( | const word & | surfName | ) |
Return reference to searchableSurface by name.
Definition at line 942 of file searchableSurfaces.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorIn, searchableSurfaces::findSurfaceID(), Foam::nl, and searchableSurfaces::operator[]().