Sample along poly line defined by a list of points (knots) More...
Public Member Functions | |
TypeName ("polyLine") | |
Runtime type information. More... | |
polyLineSet (const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const word &axis, const List< point > &samplePoints) | |
Construct from components. More... | |
polyLineSet (const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const dictionary &dict) | |
Construct from dictionary. More... | |
virtual | ~polyLineSet () |
Destructor. More... | |
![]() | |
TypeName ("sampledSet") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, sampledSet, word,(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const dictionary &dict),(name, mesh, searchEngine, dict)) | |
sampledSet (const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const word &axis) | |
Construct from components. More... | |
sampledSet (const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const dictionary &dict) | |
Construct from dictionary. More... | |
autoPtr< sampledSet > | clone () const |
Clone. More... | |
virtual | ~sampledSet () |
Destructor. More... | |
const polyMesh & | mesh () const |
const meshSearch & | searchEngine () const |
const labelList & | segments () const |
const labelList & | cells () const |
const labelList & | faces () const |
Ostream & | write (Ostream &) const |
Output for debugging. More... | |
![]() | |
coordSet (const word &name, const word &axis) | |
Construct from components. More... | |
coordSet (const word &name, const word &axis, const List< point > &points, const scalarList &curveDist) | |
Construct from components. More... | |
const word & | name () const |
word | axis () const |
const scalarList & | curveDist () const |
Cumulative distance. More... | |
bool | hasVectorAxis () const |
Is axis specification a vector. More... | |
scalar | scalarCoord (const label index) const |
Get coordinate of point according to axis specification. More... | |
vector | vectorCoord (const label index) const |
Get point according to axis="xyz" specification. More... | |
Ostream & | write (Ostream &os) const |
![]() | |
Field () | |
Construct null. More... | |
Field (const label) | |
Construct given size. More... | |
Field (const label, const Type &) | |
Construct given size and initial value. More... | |
Field (const UList< Type > &) | |
Construct as copy of a UList<Type> More... | |
Field (const Xfer< List< Type > > &) | |
Construct by transferring the List contents. More... | |
Field (const UList< Type > &mapF, const labelUList &mapAddressing) | |
Construct by 1 to 1 mapping from the given field. More... | |
Field (const tmp< Field< Type > > &tmapF, const labelUList &mapAddressing) | |
Construct by 1 to 1 mapping from the given tmp field. More... | |
Field (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights) | |
Construct by interpolative mapping from the given field. More... | |
Field (const tmp< Field< Type > > &tmapF, const labelListList &mapAddressing, const scalarListList &weights) | |
Construct by interpolative mapping from the given tmp field. More... | |
Field (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true) | |
Construct by mapping from the given field. More... | |
Field (const UList< Type > &mapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true) | |
Construct by mapping from the given field. More... | |
Field (const UList< Type > &mapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true) | |
Construct by mapping from the given field. More... | |
Field (const tmp< Field< Type > > &tmapF, const FieldMapper &map, const bool applyFlip=true) | |
Construct by mapping from the given tmp field. More... | |
Field (const tmp< Field< Type > > &tmapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true) | |
Construct by mapping from the given tmp field. Supplied uniform. More... | |
Field (const tmp< Field< Type > > &tmapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true) | |
Construct by mapping from the given tmp field. Supplied values. More... | |
Field (const Field< Type > &) | |
Construct as copy. More... | |
Field (Field< Type > &, bool reUse) | |
Construct as copy or re-use as specified. More... | |
Field (const Xfer< Field< Type > > &) | |
Construct by transferring the Field contents. More... | |
Field (const tmp< Field< Type > > &) | |
Construct as copy of tmp<Field> More... | |
Field (Istream &) | |
Construct from Istream. More... | |
Field (const word &keyword, const dictionary &, const label size) | |
Construct from a dictionary entry. More... | |
tmp< Field< Type > > | clone () const |
Clone. More... | |
void | map (const UList< Type > &mapF, const labelUList &mapAddressing) |
1 to 1 map from the given field More... | |
void | map (const tmp< Field< Type > > &tmapF, const labelUList &mapAddressing) |
1 to 1 map from the given tmp field More... | |
void | map (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights) |
Interpolative map from the given field. More... | |
void | map (const tmp< Field< Type > > &tmapF, const labelListList &mapAddressing, const scalarListList &weights) |
Interpolative map from the given tmp field. More... | |
void | map (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true) |
Map from the given field. More... | |
void | map (const tmp< Field< Type > > &tmapF, const FieldMapper &map, const bool applyFlip=true) |
Map from the given tmp field. More... | |
void | autoMap (const FieldMapper &map, const bool applyFlip=true) |
Map from self. More... | |
void | rmap (const UList< Type > &mapF, const labelUList &mapAddressing) |
1 to 1 reverse-map from the given field More... | |
void | rmap (const tmp< Field< Type > > &tmapF, const labelUList &mapAddressing) |
1 to 1 reverse-map from the given tmp field More... | |
void | rmap (const UList< Type > &mapF, const labelUList &mapAddressing, const UList< scalar > &weights) |
Interpolative reverse map from the given field. More... | |
void | rmap (const tmp< Field< Type > > &tmapF, const labelUList &mapAddressing, const UList< scalar > &weights) |
Interpolative reverse map from the given tmp field. More... | |
void | negate () |
Negate this field. More... | |
tmp< Field< cmptType > > | component (const direction) const |
Return a component field of the field. More... | |
void | replace (const direction, const UList< cmptType > &) |
Replace a component field of the field. More... | |
void | replace (const direction, const tmp< Field< cmptType > > &) |
Replace a component field of the field. More... | |
void | replace (const direction, const cmptType &) |
Replace a component field of the field. More... | |
tmp< Field< Type > > | T () const |
Return the field transpose (only defined for second rank tensors) More... | |
void | writeEntry (const word &keyword, Ostream &os) const |
Write the field as a dictionary entry. More... | |
void | operator= (const Field< Type > &) |
void | operator= (const UList< Type > &) |
void | operator= (const SubField< Type > &) |
void | operator= (const tmp< Field< Type > > &) |
void | operator= (const Type &) |
template<class Form , class Cmpt , int nCmpt> | |
void | operator= (const VectorSpace< Form, Cmpt, nCmpt > &) |
void | operator+= (const UList< Type > &) |
void | operator+= (const tmp< Field< Type > > &) |
void | operator-= (const UList< Type > &) |
void | operator-= (const tmp< Field< Type > > &) |
void | operator*= (const UList< scalar > &) |
void | operator*= (const tmp< Field< scalar > > &) |
void | operator/= (const UList< scalar > &) |
void | operator/= (const tmp< Field< scalar > > &) |
void | operator+= (const Type &) |
void | operator-= (const Type &) |
void | operator*= (const scalar &) |
void | operator/= (const scalar &) |
template<class Type > | |
void | operator= (const Field< Type > &rhs) |
template<class Type > | |
void | operator= (const SubField< Type > &rhs) |
template<class Type > | |
void | operator= (const UList< Type > &rhs) |
template<class Type > | |
void | operator= (const tmp< Field > &rhs) |
template<class Type > | |
void | operator= (const Type &t) |
Private Member Functions | |
bool | trackToBoundary (passiveParticleCloud &particleCloud, passiveParticle &singleParticle, label &sampleI, DynamicList< point > &samplingPts, DynamicList< label > &samplingCells, DynamicList< label > &samplingFaces, DynamicList< scalar > &samplingCurveDist) const |
Sample till hits boundary. Called with singleParticle at position. More... | |
void | calcSamples (DynamicList< point > &samplingPts, DynamicList< label > &samplingCells, DynamicList< label > &samplingFaces, DynamicList< label > &samplingSegments, DynamicList< scalar > &samplingCurveDist) const |
Samples all point in sampleCoords_. More... | |
void | genSamples () |
Uses calcSamples to obtain samples. Copies them into *this. More... | |
Private Attributes | |
List< point > | sampleCoords_ |
Sampling points. More... | |
Additional Inherited Members | |
![]() | |
enum | coordFormat { XYZ, X, Y, Z, DISTANCE } |
Enumeration defining the output format for coordinates. More... | |
![]() | |
typedef pTraits< Type >::cmptType | cmptType |
Component type. More... | |
typedef SubField< Type > | subField |
Declare type of subField. More... | |
![]() | |
static autoPtr< sampledSet > | New (const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const dictionary &dict) |
Return a reference to the selected sampledSet. More... | |
![]() | |
static const Field< Type > & | null () |
Return a null field. More... | |
template<class Type2 > | |
static tmp< Field< Type > > | NewCalculatedType (const Field< Type2 > &f) |
Return a pointer to a new calculatedFvPatchFieldField created on. More... | |
![]() | |
static const scalar | tol = 1e-6 |
Tolerance when comparing points. Usually relative to difference. More... | |
![]() | |
static const char *const | typeName |
![]() | |
label | getBoundaryCell (const label) const |
Returns cell next to boundary face. More... | |
label | getCell (const label faceI, const point &sample) const |
Returns cell using face and containing sample. More... | |
scalar | calcSign (const label faceI, const point &sample) const |
Calculates inproduct of face normal and vector sample-face centre. More... | |
label | findNearFace (const label cellI, const point &sample, const scalar smallDist) const |
Returns face label (or -1) of face which is close to sample. More... | |
point | pushIn (const point &sample, const label faceI) const |
Moves sample in direction of -n to it is 'inside' of faceI. More... | |
bool | getTrackingPoint (const vector &offset, const point &samplePt, const point &bPoint, const label bFaceI, point &trackPt, label &trackCellI, label &trackFaceI) const |
Calculates start of tracking given samplePt and first boundary. More... | |
void | setSamples (const List< point > &samplingPts, const labelList &samplingCells, const labelList &samplingFaces, const labelList &samplingSegments, const scalarList &samplingCurveDist) |
Sets sample data. More... | |
![]() | |
labelList | segments_ |
Segment numbers. More... | |
labelList | cells_ |
Cell numbers. More... | |
labelList | faces_ |
Face numbers (-1 if not known) More... | |
![]() | |
const word | name_ |
Name. More... | |
const coordFormat | axis_ |
Axis write type. More... | |
scalarList | curveDist_ |
Cumulative distance "distance" write specifier. More... | |
Sample along poly line defined by a list of points (knots)
Definition at line 50 of file polyLineSet.H.
polyLineSet | ( | const word & | name, |
const polyMesh & | mesh, | ||
const meshSearch & | searchEngine, | ||
const word & | axis, | ||
const List< point > & | samplePoints | ||
) |
Construct from components.
Definition at line 354 of file polyLineSet.C.
References Foam::Info, and write().
polyLineSet | ( | const word & | name, |
const polyMesh & | mesh, | ||
const meshSearch & | searchEngine, | ||
const dictionary & | dict | ||
) |
Construct from dictionary.
Definition at line 375 of file polyLineSet.C.
References Foam::Info, and write().
|
virtual |
Destructor.
Definition at line 396 of file polyLineSet.C.
|
private |
Sample till hits boundary. Called with singleParticle at position.
inbetween sampleCoords_[sampleI] and sampleCoords_[sampleI+1]. Returns false if end of samples reached.
Definition at line 45 of file polyLineSet.C.
References DynamicList::append(), particle< Type >::cell(), Foam::mag(), particle< Type >::onBoundary(), particle< Type >::position(), particle< Type >::stepFraction(), and particle< Type >::track().
|
private |
Samples all point in sampleCoords_.
samplingSegments contains segmentNo for each sample.
Definition at line 129 of file polyLineSet.C.
References DynamicList::append(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::mag(), mesh, particle< Type >::position(), and List::size().
Referenced by polyLineSet::genSamples().
|
private |
Uses calcSamples to obtain samples. Copies them into *this.
Definition at line 316 of file polyLineSet.C.
References polyLineSet::calcSamples(), sampledSet::setSamples(), and DynamicList::shrink().
TypeName | ( | "polyLine" | ) |
Runtime type information.
Sampling points.
Definition at line 57 of file polyLineSet.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.