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... | |
searchableSurfaces (const searchableSurfaces &)=delete | |
Disallow default bitwise copy construction. 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... | |
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 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 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... | |
void | operator= (const searchableSurfaces &)=delete |
Disallow default bitwise assignment. More... | |
Public Member Functions inherited from PtrList< searchableSurface > | |
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 (PtrList< searchableSurface > &&) | |
Move constructor. More... | |
PtrList (PtrList< searchableSurface > &, bool reuse) | |
Construct as copy or reuse 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... | |
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 | shrink () |
Shrink the allocated space to the number of elements used. 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 > &) |
Append an element at the end of the list. More... | |
void | append (const tmp< searchableSurface > &) |
Append an element at the end of the list. More... | |
void | transfer (PtrList< searchableSurface > &) |
Transfer the contents of the argument PtrList into this PtrList. More... | |
bool | set (const label) const |
Is element set. More... | |
autoPtr< searchableSurface > | set (const label, searchableSurface *) |
Set element to given T* and return old element (can be nullptr) More... | |
autoPtr< searchableSurface > | set (const label, const autoPtr< searchableSurface > &) |
Set element to given autoPtr<T> and return old element. More... | |
autoPtr< searchableSurface > | set (const label, const tmp< searchableSurface > &) |
Set element to given tmp<T> and return old element. More... | |
void | reorder (const labelUList &oldToNew) |
Reorders elements. Ordering does not have to be done in. More... | |
void | shuffle (const labelUList &newToOld) |
Reorders elements. Ordering does not have to be done in. More... | |
void | operator= (const PtrList< searchableSurface > &) |
Assignment operator. More... | |
void | operator= (PtrList< searchableSurface > &&) |
Move assignment operator. More... | |
Public Member Functions inherited from UPtrList< T > | |
UPtrList () | |
Null Constructor. More... | |
UPtrList (const label) | |
Construct with size specified. More... | |
UPtrList (UPtrList< T > &, bool reuse) | |
Construct as copy or reuse as specified. More... | |
label | size () const |
Return the number of elements in the UPtrList. More... | |
bool | empty () const |
Return true if the UPtrList is empty (ie, size() is zero) More... | |
T & | first () |
Return reference to the first element of the list. More... | |
const T & | first () const |
Return reference to first element of the list. More... | |
T & | last () |
Return reference to the last element of the list. More... | |
const T & | last () const |
Return reference to the last element of the list. More... | |
void | setSize (const label) |
Reset size of UPtrList. This can only be used to set the size. More... | |
void | resize (const label) |
Reset size of UPtrList. This can only be used to set the size. More... | |
void | clear () |
Clear the UPtrList, i.e. set size to zero. More... | |
void | append (T *) |
Append an element at the end of the list. More... | |
void | transfer (UPtrList< T > &) |
Transfer the contents of the argument UPtrList into this. More... | |
bool | set (const label) const |
Is element set. More... | |
T * | set (const label, T *) |
Set element. Return old element (can be nullptr). More... | |
void | reorder (const labelUList &oldToNew) |
Reorders elements. Ordering does not have to be done in. More... | |
void | shuffle (const labelUList &newToOld) |
Reorders elements. Ordering does not have to be done in. More... | |
template<class T2 > | |
UPtrList< T2 > | convert () |
Convert to list of different pointer type. More... | |
template<class T2 > | |
UPtrList< const T2 > | convert () const |
Convert to list of different pointer type. More... | |
const T & | operator[] (const label) const |
Return element const reference. More... | |
T & | operator[] (const label) |
Return element reference. More... | |
const T * | operator() (const label) const |
Return element const pointer. More... | |
T * | operator() (const label) |
Return element const pointer. More... | |
iterator | begin () |
Return an iterator to begin traversing the UPtrList. More... | |
iterator | end () |
Return an iterator to end traversing the UPtrList. More... | |
const_iterator | cbegin () const |
Return an const_iterator to begin traversing the UPtrList. More... | |
const_iterator | cend () const |
Return an const_iterator to end traversing the UPtrList. More... | |
const_iterator | begin () const |
Return an const_iterator to begin traversing the UPtrList. More... | |
const_iterator | end () const |
Return an const_iterator to end traversing the UPtrList. More... | |
template<class T2 > | |
Foam::UPtrList< T2 > | convert () |
template<class T2 > | |
Foam::UPtrList< const T2 > | convert () const |
Additional Inherited Members | |
Public Types inherited from UPtrList< T > | |
typedef T | value_type |
Type of values the UPtrList contains. More... | |
typedef T & | reference |
Type that can be used for storing into UPtrList::value_type objects. More... | |
typedef const T & | const_reference |
Type that can be used for storing into constant UPtrList::value_type. More... | |
Protected Member Functions inherited from PtrList< searchableSurface > | |
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 69 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 77 of file searchableSurfaces.C.
References IOobject::clone(), dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::findIndex(), forAll, forAllConstIter, dictionary::isDict(), dictionary::lookup(), searchableSurface::New(), searchableSurfaces::operator[](), s(), PtrList< searchableSurface >::set(), List< T >::setSize(), PtrList< T >::setSize(), List< T >::size(), and dictionary::subDict().
|
delete |
Disallow default bitwise copy construction.
ClassName | ( | "searchableSurfaces" | ) |
|
inline |
Definition at line 113 of file searchableSurfaces.H.
Referenced by refinementRegions::refinementRegions(), and refinementSurfaces::refinementSurfaces().
|
inline |
Definition at line 118 of file searchableSurfaces.H.
Definition at line 123 of file searchableSurfaces.H.
Definition at line 128 of file searchableSurfaces.H.
Foam::label findSurfaceID | ( | const word & | name | ) | const |
Find index of surface. Return -1 if not found.
Definition at line 191 of file searchableSurfaces.C.
References Foam::findIndex().
Referenced by projectCurveEdge::projectCurveEdge(), projectEdge::projectEdge(), and projectVertex::projectVertex().
Foam::label findSurfaceRegionID | ( | const word & | surfaceName, |
const word & | regionName | ||
) | const |
Definition at line 200 of file searchableSurfaces.C.
References Foam::findIndex(), and Foam::regionName().
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 213 of file searchableSurfaces.C.
References searchableSurfacesQueries::findAnyIntersection().
void findAllIntersections | ( | const pointField & | start, |
const pointField & | end, | ||
labelListList & | surfaces, | ||
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 233 of file searchableSurfaces.C.
References searchableSurfacesQueries::findAllIntersections().
void findNearestIntersection | ( | const pointField & | start, |
const pointField & | end, | ||
labelList & | surface1, | ||
List< pointIndexHit > & | hit1, | ||
labelList & | surface2, | ||
List< pointIndexHit > & | hit2 | ||
) | const |
Definition at line 254 of file searchableSurfaces.C.
References searchableSurfacesQueries::findNearestIntersection().
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 278 of file searchableSurfaces.C.
References searchableSurfacesQueries::findNearest(), and samples().
void findNearest | ( | const pointField & | samples, |
const scalarField & | nearestDistSqr, | ||
const labelList & | regionIndices, | ||
labelList & | nearestSurfaces, | ||
List< pointIndexHit > & | nearestInfo | ||
) | const |
Definition at line 298 of file searchableSurfaces.C.
References searchableSurfacesQueries::findNearest(), and samples().
Foam::boundBox bounds | ( | ) | const |
Calculate bounding box.
Definition at line 320 of file searchableSurfaces.C.
References searchableSurfacesQueries::bounds().
bool checkClosed | ( | const bool | report | ) | const |
Are all surfaces closed and manifold.
Definition at line 330 of file searchableSurfaces.C.
References Foam::endl(), forAll, Foam::Info, Foam::nl, Foam::returnReduce(), and s().
bool checkNormalOrientation | ( | const bool | report | ) | const |
Are all (triangulated) surfaces consistent normal orientation.
Definition at line 397 of file searchableSurfaces.C.
References PatchTools::checkOrientation(), Foam::endl(), forAll, Foam::Info, PatchTools::markZones(), Foam::returnReduce(), and s().
bool checkSizes | ( | const scalar | maxRatio, |
const bool | report | ||
) | const |
Are all bounding boxes of similar size.
Definition at line 443 of file searchableSurfaces.C.
References Foam::endl(), forAll, Foam::Info, boundBox::mag(), Foam::nl, and Foam::returnReduce().
bool checkIntersection | ( | const scalar | tol, |
const bool | report | ||
) | const |
Do surfaces self-intersect or intersect others.
Definition at line 491 of file searchableSurfaces.C.
References DynamicField< T, SizeInc, SizeMult, SizeDiv >::append(), DynamicField< T, SizeInc, SizeMult, SizeDiv >::capacity(), Foam::e, PrimitivePatch< FaceList, PointField >::edges(), Foam::endl(), forAll, Foam::identityMap(), Foam::Info, PrimitivePatch< FaceList, PointField >::localPoints(), Foam::max(), Foam::returnReduce(), List< T >::size(), triSurfaceSearch::tolerance(), and Foam::vtkWritePolyData::write().
bool checkQuality | ( | const scalar | minQuality, |
const bool | report | ||
) | const |
Check triangle quality.
Definition at line 616 of file searchableSurfaces.C.
References Foam::endl(), f(), forAll, Foam::Info, Foam::returnReduce(), and s().
Foam::label checkTopology | ( | const bool | report | ) | const |
All topological checks. Return number of failed checks.
Definition at line 681 of file searchableSurfaces.C.
Foam::label checkGeometry | ( | const scalar | maxRatio, |
const scalar | tolerance, | ||
const scalar | minQuality, | ||
const bool | report | ||
) | const |
All geometric checks. Return number of failed checks.
Definition at line 701 of file searchableSurfaces.C.
Write some stats.
Definition at line 730 of file searchableSurfaces.C.
References Foam::endl(), forAll, Foam::Info, PrimitivePatch< FaceList, PointField >::nEdges(), Foam::nl, patchTypes(), triSurfaceMesh::points(), s(), and List< T >::size().
const Foam::searchableSurface & operator[] | ( | const word & | surfName | ) | const |
Return const reference to searchableSurface by name.
Definition at line 775 of file searchableSurfaces.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.
Referenced by searchableSurfaces::searchableSurfaces().
Foam::searchableSurface & operator[] | ( | const word & | surfName | ) |
Return reference to searchableSurface by name.
Definition at line 794 of file searchableSurfaces.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.
|
delete |
Disallow default bitwise assignment.