Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
refinementFeatures Class Reference

Encapsulates queries for features. More...

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

Public Member Functions

 refinementFeatures (const objectRegistry &io, const PtrList< dictionary > &featDicts)
 Construct from description. More...
 
const labelListListlevels () const
 Per featureEdgeMesh the list of level. More...
 
const List< scalarField > & distances () const
 Per featureEdgeMesh the list of ranges. More...
 
scalar maxDistance () const
 Highest distance of all features. More...
 
void findNearestEdge (const pointField &samples, const scalarField &nearestDistSqr, labelList &nearFeature, List< pointIndexHit > &nearInfo, vectorField &nearNormal) const
 Find nearest point on nearest feature edge. Sets. More...
 
void findNearestRegionEdge (const pointField &samples, const scalarField &nearestDistSqr, labelList &nearFeature, List< pointIndexHit > &nearInfo, vectorField &nearNormal) const
 Find nearest point on nearest region edge. Sets. More...
 
void findNearestPoint (const pointField &samples, const scalarField &nearestDistSqr, labelList &nearFeature, List< pointIndexHit > &nearInfo) const
 Find nearest feature point. Sets. More...
 
void findHigherLevel (const pointField &pt, const labelList &ptLevel, labelList &maxLevel) const
 Find shell level higher than ptLevel. More...
 
- Public Member Functions inherited from PtrList< extendedFeatureEdgeMesh >
 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...
 

Protected Member Functions

const PtrList< indexedOctree< treeDataEdge > > & edgeTrees () const
 
const PtrList< indexedOctree< treeDataPoint > > & pointTrees () const
 
const PtrList< indexedOctree< treeDataEdge > > & regionEdgeTrees () const
 
- Protected Member Functions inherited from PtrList< extendedFeatureEdgeMesh >
void read (Istream &, const INew &inewt)
 Read from Istream using given Istream constructor class. More...
 

Private Member Functions

void read (const objectRegistry &, const PtrList< dictionary > &)
 Read set of feature edge meshes. More...
 
void buildTrees (const label)
 Build edge tree and feature point tree. More...
 
void findHigherLevel (const pointField &pt, const label featI, labelList &maxLevel) const
 Find shell level higher than ptLevel. More...
 

Private Attributes

List< scalarFielddistances_
 Per shell the list of ranges. More...
 
labelListList levels_
 Per shell per distance the refinement level. More...
 
PtrList< indexedOctree< treeDataEdge > > edgeTrees_
 Edge. More...
 
PtrList< indexedOctree< treeDataPoint > > pointTrees_
 Features points. More...
 
autoPtr< PtrList< indexedOctree< treeDataEdge > > > regionEdgeTreesPtr_
 Region edge trees (demand driven) More...
 

Additional Inherited Members

- Public Types inherited from PtrList< extendedFeatureEdgeMesh >
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< extendedFeatureEdgeMesh >
const typedef Tconst_reference
 Type that can be used for storing into constant PtrList::value_type. More...
 

Detailed Description

Encapsulates queries for features.

Source files

Definition at line 51 of file refinementFeatures.H.

Constructor & Destructor Documentation

◆ refinementFeatures()

refinementFeatures ( const objectRegistry io,
const PtrList< dictionary > &  featDicts 
)

Construct from description.

Definition at line 430 of file refinementFeatures.C.

References forAll, and Foam::read().

Here is the call graph for this function:

Member Function Documentation

◆ read()

void read ( const objectRegistry io,
const PtrList< dictionary > &  featDicts 
)
private

◆ buildTrees()

void buildTrees ( const label  featI)
private

◆ findHigherLevel() [1/2]

void findHigherLevel ( const pointField pt,
const label  featI,
labelList maxLevel 
) const
private

Find shell level higher than ptLevel.

Definition at line 356 of file refinementFeatures.C.

References Foam::findLower(), indexedOctree::findNearest(), forAll, forAllReverse, Foam::mag(), List::setSize(), and Foam::sqr().

Here is the call graph for this function:

◆ edgeTrees()

const PtrList<indexedOctree<treeDataEdge> >& edgeTrees ( ) const
inlineprotected

Definition at line 95 of file refinementFeatures.H.

References refinementFeatures::edgeTrees_.

◆ pointTrees()

const PtrList<indexedOctree<treeDataPoint> >& pointTrees ( ) const
inlineprotected

Definition at line 100 of file refinementFeatures.H.

References refinementFeatures::pointTrees_.

◆ regionEdgeTrees()

const Foam::PtrList< Foam::indexedOctree< Foam::treeDataEdge > > & regionEdgeTrees ( ) const
protected

◆ levels()

const labelListList& levels ( ) const
inline

Per featureEdgeMesh the list of level.

Definition at line 125 of file refinementFeatures.H.

References refinementFeatures::levels_.

◆ distances()

const List<scalarField>& distances ( ) const
inline

Per featureEdgeMesh the list of ranges.

Definition at line 131 of file refinementFeatures.H.

References refinementFeatures::distances_.

◆ maxDistance()

Foam::scalar maxDistance ( ) const

Highest distance of all features.

Definition at line 766 of file refinementFeatures.C.

References forAll, and Foam::max().

Here is the call graph for this function:

◆ findNearestEdge()

void findNearestEdge ( const pointField samples,
const scalarField nearestDistSqr,
labelList nearFeature,
List< pointIndexHit > &  nearInfo,
vectorField nearNormal 
) const

Find nearest point on nearest feature edge. Sets.

  • nearFeature: index of feature mesh

nearInfo : location on feature edge and edge index (note: not feature edge index but index into edges() directly)

  • nearNormal : local feature edge normal

Definition at line 525 of file refinementFeatures.C.

References Foam::e, treeDataEdge::edges(), indexedOctree::findNearest(), forAll, PointIndexHit< Point >::hit(), PointIndexHit< Point >::hitPoint(), PointIndexHit< Point >::index(), Foam::mag(), Foam::magSqr(), treeDataEdge::points(), samples(), List::setSize(), indexedOctree::shapes(), and Vector< scalar >::zero.

Referenced by autoSnapDriver::findNearFeatureEdge().

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

◆ findNearestRegionEdge()

void findNearestRegionEdge ( const pointField samples,
const scalarField nearestDistSqr,
labelList nearFeature,
List< pointIndexHit > &  nearInfo,
vectorField nearNormal 
) const

Find nearest point on nearest region edge. Sets.

  • nearFeature: index of feature mesh

nearInfo : location on feature edge and edge index (note: not feature edge index but index into edges() directly)

  • nearNormal : local feature edge normal

Definition at line 584 of file refinementFeatures.C.

References Foam::e, treeDataEdge::edges(), indexedOctree::findNearest(), forAll, PointIndexHit< Point >::hit(), PointIndexHit< Point >::hitPoint(), PointIndexHit< Point >::index(), Foam::mag(), Foam::magSqr(), treeDataEdge::points(), samples(), List::setSize(), indexedOctree::shapes(), and Vector< scalar >::zero.

Referenced by autoSnapDriver::findNearFeatureEdge().

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

◆ findNearestPoint()

void findNearestPoint ( const pointField samples,
const scalarField nearestDistSqr,
labelList nearFeature,
List< pointIndexHit > &  nearInfo 
) const

Find nearest feature point. Sets.

  • nearFeature: index of feature mesh

nearInfo : location on feature point and point index. (note: not index into shapes().pointLabels() but index into points() directly)

Definition at line 699 of file refinementFeatures.C.

References indexedOctree::findNearest(), forAll, PointIndexHit< Point >::hit(), PointIndexHit< Point >::hitPoint(), PointIndexHit< Point >::index(), Foam::magSqr(), samples(), List::setSize(), and indexedOctree::shapes().

Referenced by autoSnapDriver::determineBaffleFeatures(), and autoSnapDriver::findNearFeaturePoint().

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

◆ findHigherLevel() [2/2]

void findHigherLevel ( const pointField pt,
const labelList ptLevel,
labelList maxLevel 
) const

Find shell level higher than ptLevel.

Definition at line 750 of file refinementFeatures.C.

References forAll.

Field Documentation

◆ distances_

List<scalarField> distances_
private

Per shell the list of ranges.

Definition at line 60 of file refinementFeatures.H.

Referenced by refinementFeatures::distances().

◆ levels_

labelListList levels_
private

Per shell per distance the refinement level.

Definition at line 63 of file refinementFeatures.H.

Referenced by refinementFeatures::levels().

◆ edgeTrees_

PtrList<indexedOctree<treeDataEdge> > edgeTrees_
private

Edge.

Definition at line 66 of file refinementFeatures.H.

Referenced by refinementFeatures::buildTrees(), and refinementFeatures::edgeTrees().

◆ pointTrees_

PtrList<indexedOctree<treeDataPoint> > pointTrees_
private

Features points.

Definition at line 69 of file refinementFeatures.H.

Referenced by refinementFeatures::buildTrees(), and refinementFeatures::pointTrees().

◆ regionEdgeTreesPtr_

autoPtr<PtrList<indexedOctree<treeDataEdge> > > regionEdgeTreesPtr_
mutableprivate

Region edge trees (demand driven)

Definition at line 73 of file refinementFeatures.H.


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