Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
searchableSurfaces Class Reference

Container for searchableSurfaces. More...

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

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 wordListnames () const
 
wordListnames ()
 
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 &regionName) 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 labelListList &regionIndices, const pointField &samples, const scalarField &nearestDistSqr, 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 searchableSurfaceoperator[] (const word &) const
 Return const reference to searchableSurface by name. More...
 
searchableSurfaceoperator[] (const word &)
 Return reference to searchableSurface by name. More...
 
- Public Member Functions inherited from PtrList< searchableSurface >
 PtrList ()
 Null Constructor. More...
 
 PtrList (const label)
 Construct with size specified. More...
 
 PtrList (const PtrList< T > &)
 Copy constructor. More...
 
 PtrList (const PtrList< T > &, const CloneArg &)
 Copy constructor with additional argument for clone. More...
 
 PtrList (const Xfer< PtrList< T > > &)
 Construct by transferring the parameter contents. More...
 
 PtrList (PtrList< T > &, bool reUse)
 Construct as copy or re-use as specified. More...
 
 PtrList (const SLPtrList< T > &)
 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 ()
 
 PtrList (const label s)
 
 PtrList (const PtrList< T > &a)
 
 PtrList (const Xfer< PtrList< T > > &lst)
 
 PtrList (PtrList< T > &a, bool reUse)
 
 PtrList (const SLPtrList< T > &sll)
 
 PtrList (Istream &is)
 
 ~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...
 
Tfirst ()
 Return reference to the first element of the list. More...
 
const Tfirst () const
 Return reference to first element of the list. More...
 
Tlast ()
 Return reference to the last element of the list. More...
 
const Tlast () 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 (T *)
 Append an element at the end of the list. More...
 
void append (const autoPtr< T > &)
 
void append (const tmp< T > &)
 
void transfer (PtrList< T > &)
 Transfer the contents of the argument PtrList into this PtrList. More...
 
Xfer< PtrList< T > > xfer ()
 Transfer contents to the Xfer container. More...
 
bool set (const label) const
 Is element set. More...
 
autoPtr< Tset (const label, T *)
 Set element. Return old element (can be NULL). More...
 
autoPtr< Tset (const label, const autoPtr< T > &)
 
autoPtr< Tset (const label, const tmp< T > &)
 
void reorder (const labelUList &)
 Reorders elements. Ordering does not have to be done in. More...
 
const Toperator[] (const label) const
 Return element const reference. More...
 
Toperator[] (const label)
 Return element reference. More...
 
const Toperator() (const label) const
 Return element const pointer. More...
 
PtrList< T > & operator= (const PtrList< T > &)
 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...
 

Private Member Functions

 searchableSurfaces (const searchableSurfaces &)
 Disallow default bitwise copy construct. More...
 
void operator= (const searchableSurfaces &)
 Disallow default bitwise assignment. More...
 

Static Private Member Functions

static bool connected (const triSurface &s, const label edgeI, const pointIndexHit &hit)
 Is edge on face. More...
 

Private Attributes

wordList names_
 Surface names. More...
 
List< wordListregionNames_
 Region names per surface. More...
 
labelList allSurfaces_
 Indices of all surfaces. Precalculated and stored. More...
 

Additional Inherited Members

- Public Types inherited from PtrList< searchableSurface >
typedef T value_type
 Type of values the PtrList contains. More...
 
typedef Treference
 Type that can be used for storing into PtrList::value_type objects. More...
 
- Data Fields inherited from PtrList< searchableSurface >
const typedef Tconst_reference
 Type that can be used for storing into constant PtrList::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...
 

Detailed Description

Container for searchableSurfaces.

Source files

Definition at line 53 of file searchableSurfaces.H.

Constructor & Destructor Documentation

◆ searchableSurfaces() [1/3]

searchableSurfaces ( const searchableSurfaces )
private

Disallow default bitwise copy construct.

◆ searchableSurfaces() [2/3]

searchableSurfaces ( const label  size)
explicit

Construct with length specified. Fill later.

Definition at line 70 of file searchableSurfaces.C.

◆ searchableSurfaces() [3/3]

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 171 of file searchableSurfaces.C.

References IOobject::clone(), dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::findIndex(), forAll, forAllConstIter(), dictionary::found(), dictionary::isDict(), dictionary::lookup(), searchableSurface::New(), dictionary::readIfPresent(), s(), List::setSize(), PtrList::setSize(), List::size(), and dictionary::subDict().

Here is the call graph for this function:

Member Function Documentation

◆ connected()

bool connected ( const triSurface s,
const label  edgeI,
const pointIndexHit hit 
)
staticprivate

Is edge on face.

Is edge connected to triangle.

Definition at line 46 of file searchableSurfaces.C.

References Foam::constant::electromagnetic::e, forAll, PointIndexHit< Point >::index(), and s().

Here is the call graph for this function:

◆ operator=()

void operator= ( const searchableSurfaces )
private

Disallow default bitwise assignment.

◆ ClassName()

ClassName ( "searchableSurfaces"  )

◆ names() [1/2]

const wordList& names ( ) const
inline

Definition at line 117 of file searchableSurfaces.H.

References searchableSurfaces::names_.

Referenced by createRefinementSurfaces(), and shellSurfaces::shellSurfaces().

Here is the caller graph for this function:

◆ names() [2/2]

wordList& names ( )
inline

Definition at line 121 of file searchableSurfaces.H.

References searchableSurfaces::names_.

◆ regionNames() [1/2]

const List<wordList>& regionNames ( ) const
inline

Definition at line 126 of file searchableSurfaces.H.

References searchableSurfaces::regionNames_.

Referenced by createRefinementSurfaces(), and main().

Here is the caller graph for this function:

◆ regionNames() [2/2]

List<wordList>& regionNames ( )
inline

Definition at line 130 of file searchableSurfaces.H.

References searchableSurfaces::regionNames_.

◆ findSurfaceID()

Foam::label findSurfaceID ( const word name) const

Find index of surface. Return -1 if not found.

Definition at line 285 of file searchableSurfaces.C.

References Foam::findIndex().

Here is the call graph for this function:

◆ findSurfaceRegionID()

Foam::label findSurfaceRegionID ( const word surfaceName,
const word regionName 
) const

Definition at line 294 of file searchableSurfaces.C.

References Foam::findIndex(), and regionName.

Here is the call graph for this function:

◆ findAnyIntersection()

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 307 of file searchableSurfaces.C.

References searchableSurfacesQueries::findAnyIntersection().

Here is the call graph for this function:

◆ findAllIntersections()

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 329 of file searchableSurfaces.C.

References searchableSurfacesQueries::findAllIntersections().

Here is the call graph for this function:

◆ findNearestIntersection()

void findNearestIntersection ( const pointField start,
const pointField end,
labelList surface1,
List< pointIndexHit > &  hit1,
labelList surface2,
List< pointIndexHit > &  hit2 
) const

Definition at line 350 of file searchableSurfaces.C.

References searchableSurfacesQueries::findNearestIntersection().

Here is the call graph for this function:

◆ findNearest() [1/2]

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 375 of file searchableSurfaces.C.

References searchableSurfacesQueries::findNearest(), and samples().

Here is the call graph for this function:

◆ findNearest() [2/2]

void findNearest ( const labelListList regionIndices,
const pointField samples,
const scalarField nearestDistSqr,
labelList nearestSurfaces,
List< pointIndexHit > &  nearestInfo 
) const

Definition at line 396 of file searchableSurfaces.C.

References searchableSurfacesQueries::findNearest(), and samples().

Here is the call graph for this function:

◆ bounds()

Foam::boundBox bounds ( ) const

Calculate bounding box.

Definition at line 419 of file searchableSurfaces.C.

References searchableSurfacesQueries::bounds().

Here is the call graph for this function:

◆ facesIntersection()

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 431 of file searchableSurfaces.C.

References searchableSurfacesQueries::facesIntersection().

Here is the call graph for this function:

◆ checkClosed()

bool checkClosed ( const bool  report) const

Are all surfaces closed and manifold.

Definition at line 448 of file searchableSurfaces.C.

References Foam::endl(), forAll, Foam::Info, Foam::nl, Foam::returnReduce(), and s().

Here is the call graph for this function:

◆ checkNormalOrientation()

bool checkNormalOrientation ( const bool  report) const

Are all (triangulated) surfaces consistent normal orientation.

Definition at line 515 of file searchableSurfaces.C.

References PatchTools::checkOrientation(), Foam::endl(), forAll, Foam::Info, PatchTools::markZones(), Foam::returnReduce(), and s().

Here is the call graph for this function:

◆ checkSizes()

bool checkSizes ( const scalar  maxRatio,
const bool  report 
) const

Are all bounding boxes of similar size.

Definition at line 562 of file searchableSurfaces.C.

References Foam::endl(), forAll, Foam::Info, boundBox::mag(), Foam::nl, and Foam::returnReduce().

Here is the call graph for this function:

◆ checkIntersection()

bool checkIntersection ( const scalar  tol,
const autoPtr< writer< scalar > > &  setWriter,
const bool  report 
) const

◆ checkQuality()

bool checkQuality ( const scalar  minQuality,
const bool  report 
) const

Check triangle quality.

Definition at line 752 of file searchableSurfaces.C.

References Foam::endl(), f(), forAll, Foam::Info, Foam::returnReduce(), and s().

Here is the call graph for this function:

◆ checkTopology()

Foam::label checkTopology ( const bool  report) const

All topological checks. Return number of failed checks.

Definition at line 817 of file searchableSurfaces.C.

Referenced by main().

Here is the caller graph for this function:

◆ checkGeometry()

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 837 of file searchableSurfaces.C.

Referenced by main().

Here is the caller graph for this function:

◆ writeStats()

void writeStats ( const List< wordList > &  patchTypes,
Ostream os 
) const

Write some stats.

Definition at line 867 of file searchableSurfaces.C.

References Foam::endl(), forAll, Foam::Info, PrimitivePatch< Face, FaceList, PointField, PointType >::nEdges(), Foam::nl, patchTypes(), triSurfaceMesh::points(), s(), and List::size().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator[]() [1/2]

const Foam::searchableSurface & operator[] ( const word surfName) const

Return const reference to searchableSurface by name.

Definition at line 912 of file searchableSurfaces.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.

Here is the call graph for this function:

◆ operator[]() [2/2]

Foam::searchableSurface & operator[] ( const word surfName)

Return reference to searchableSurface by name.

Definition at line 931 of file searchableSurfaces.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.

Here is the call graph for this function:

Field Documentation

◆ names_

wordList names_
private

Surface names.

Definition at line 60 of file searchableSurfaces.H.

Referenced by searchableSurfaces::names().

◆ regionNames_

List<wordList> regionNames_
private

Region names per surface.

Definition at line 63 of file searchableSurfaces.H.

Referenced by searchableSurfaces::regionNames().

◆ allSurfaces_

labelList allSurfaces_
private

Indices of all surfaces. Precalculated and stored.

Definition at line 69 of file searchableSurfaces.H.


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