Encapsulates queries for features. More...
Public Member Functions | |
refinementFeatures (const objectRegistry &io, const PtrList< dictionary > &featDicts) | |
Construct from description. More... | |
const labelListList & | levels () 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... | |
![]() | |
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... | |
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 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< T > | set (const label, T *) |
Set element. Return old element (can be NULL). More... | |
autoPtr< T > | set (const label, const autoPtr< T > &) |
autoPtr< T > | set (const label, const tmp< T > &) |
void | reorder (const labelUList &) |
Reorders elements. Ordering does not have to be done in. 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... | |
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 |
![]() | |
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< scalarField > | distances_ |
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 | |
![]() | |
typedef T | value_type |
Type of values the PtrList contains. More... | |
typedef T & | reference |
Type that can be used for storing into PtrList::value_type objects. More... | |
![]() | |
const typedef T & | const_reference |
Type that can be used for storing into constant PtrList::value_type. More... | |
refinementFeatures | ( | const objectRegistry & | io, |
const PtrList< dictionary > & | featDicts | ||
) |
Construct from description.
Definition at line 430 of file refinementFeatures.C.
References forAll, and Foam::read().
|
private |
Read set of feature edge meshes.
Definition at line 34 of file refinementFeatures.C.
References DynamicField::append(), TimePaths::constant(), Foam::decrIndent(), dict, Foam::constant::electromagnetic::e, edgeMesh::edges(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::FatalIOError, FatalIOErrorInFunction, IOobject::filePath(), forAll, Foam::identity(), Foam::incrIndent(), Foam::Info, IOobject::name(), Foam::compressible::New(), Foam::nl, IOobject::objectPath(), edgeMesh::pointEdges(), edgeMesh::points(), Foam::readLabel(), scalarField(), List::size(), objectRegistry::time(), vectorField(), and edgeMesh::writeStats().
|
private |
Build edge tree and feature point tree.
Definition at line 246 of file refinementFeatures.C.
References Foam::e, edgeMesh::edges(), refinementFeatures::edgeTrees_, treeBoundBox::extend(), Foam::identity(), boundBox::max(), boundBox::min(), extendedEdgeMesh::nonFeatureStart(), PtrList< extendedFeatureEdgeMesh >::operator[](), points, edgeMesh::points(), refinementFeatures::pointTrees_, rndGen(), and List::size().
|
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().
|
inlineprotected |
Definition at line 95 of file refinementFeatures.H.
References refinementFeatures::edgeTrees_.
|
inlineprotected |
Definition at line 100 of file refinementFeatures.H.
References refinementFeatures::pointTrees_.
|
protected |
Definition at line 302 of file refinementFeatures.C.
References Foam::e, edgeMesh::edges(), treeBoundBox::extend(), forAll, boundBox::max(), boundBox::min(), points, edgeMesh::points(), extendedEdgeMesh::regionEdges(), rndGen(), and PtrList::set().
|
inline |
Per featureEdgeMesh the list of level.
Definition at line 125 of file refinementFeatures.H.
References refinementFeatures::levels_.
|
inline |
Per featureEdgeMesh the list of ranges.
Definition at line 131 of file refinementFeatures.H.
References refinementFeatures::distances_.
Foam::scalar maxDistance | ( | ) | const |
Highest distance of all features.
Definition at line 766 of file refinementFeatures.C.
References forAll, and Foam::max().
void findNearestEdge | ( | const pointField & | samples, |
const scalarField & | nearestDistSqr, | ||
labelList & | nearFeature, | ||
List< pointIndexHit > & | nearInfo, | ||
vectorField & | nearNormal | ||
) | const |
Find nearest point on nearest feature edge. Sets.
nearInfo : location on feature edge and edge index (note: not feature edge index but index into edges() directly)
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().
void findNearestRegionEdge | ( | const pointField & | samples, |
const scalarField & | nearestDistSqr, | ||
labelList & | nearFeature, | ||
List< pointIndexHit > & | nearInfo, | ||
vectorField & | nearNormal | ||
) | const |
Find nearest point on nearest region edge. Sets.
nearInfo : location on feature edge and edge index (note: not feature edge index but index into edges() directly)
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().
void findNearestPoint | ( | const pointField & | samples, |
const scalarField & | nearestDistSqr, | ||
labelList & | nearFeature, | ||
List< pointIndexHit > & | nearInfo | ||
) | const |
Find nearest feature point. Sets.
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().
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.
|
private |
Per shell the list of ranges.
Definition at line 60 of file refinementFeatures.H.
Referenced by refinementFeatures::distances().
|
private |
Per shell per distance the refinement level.
Definition at line 63 of file refinementFeatures.H.
Referenced by refinementFeatures::levels().
|
private |
Edge.
Definition at line 66 of file refinementFeatures.H.
Referenced by refinementFeatures::buildTrees(), and refinementFeatures::edgeTrees().
|
private |
Features points.
Definition at line 69 of file refinementFeatures.H.
Referenced by refinementFeatures::buildTrees(), and refinementFeatures::pointTrees().
|
mutableprivate |
Region edge trees (demand driven)
Definition at line 73 of file refinementFeatures.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.