OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

sampledSet Class Reference

Holds list of sampling points which is filled at construction time. Various implementations of this base class to e.g. get sampling points at uniform distance along a line (uniformSet) or directly specified (cloudSet). More...

Inheritance diagram for sampledSet:
Collaboration diagram for sampledSet:

List of all members.


Classes

class  iNew
 Class used for the read-construction of. More...

Public Member Functions

 TypeName ("sampledSet")
 Runtime type information.
 declareRunTimeSelectionTable (autoPtr, sampledSet, word,(const word &name, const polyMesh &mesh, meshSearch &searchEngine, const dictionary &dict),(name, mesh, searchEngine, dict))
 sampledSet (const word &name, const polyMesh &mesh, meshSearch &searchEngine, const word &axis)
 Construct from components.
 sampledSet (const word &name, const polyMesh &mesh, meshSearch &searchEngine, const dictionary &dict)
 Construct from dictionary.
autoPtr< sampledSetclone () const
 Clone.
virtual ~sampledSet ()
const polyMeshmesh () const
meshSearchsearchEngine () const
const labelListsegments () const
const scalarListcurveDist () const
const labelListcells () const
const labelListfaces () const
virtual point getRefPoint (const List< point > &) const =0
 Given all sampling points (on all processors) return reference point.
Ostreamwrite (Ostream &) const
 Output for debugging.

Static Public Member Functions

static autoPtr< sampledSetNew (const word &name, const polyMesh &mesh, meshSearch &searchEngine, const dictionary &dict)
 Return a reference to the selected sampledSet.

Static Public Attributes

static const scalar tol = 1e-6
 Tolerance when comparing points. Usually relative to difference.

Protected Member Functions

label getBoundaryCell (const label) const
 Returns cell next to boundary face.
label getCell (const label faceI, const point &sample) const
 Returns cell using face and containing sample.
scalar calcSign (const label faceI, const point &sample) const
 Calculates inproduct of face normal and vector sample-face centre.
label findNearFace (const label cellI, const point &sample, const scalar smallDist) const
 Returns face label (or -1) of face which is close to sample.
point pushIn (const point &sample, const label faceI) const
 Moves sample in direction of -n to it is 'inside' of faceI.
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.
void setSamples (const List< point > &samplingPts, const labelList &samplingCells, const labelList &samplingFaces, const labelList &samplingSegments, const scalarList &samplingCurveDist)
 Sets sample data.

Protected Attributes

labelList segments_
 Segment numbers.
scalarList curveDist_
 Parameter along sample curve. Uniquely identifies position.
labelList cells_
 Cell numbers.
labelList faces_
 Face numbers (-1 if not known).

Detailed Description

Holds list of sampling points which is filled at construction time. Various implementations of this base class to e.g. get sampling points at uniform distance along a line (uniformSet) or directly specified (cloudSet).

Each 'sampledSet' has a name and a specifier of how the axis should be write (x/y/z component or all 3 components)

Source files

Definition at line 60 of file sampledSet.H.


Constructor & Destructor Documentation

sampledSet ( const word name,
const polyMesh mesh,
meshSearch searchEngine,
const word axis 
)

Construct from components.

Definition at line 359 of file sampledSet.C.

sampledSet ( const word name,
const polyMesh mesh,
meshSearch searchEngine,
const dictionary dict 
)

Construct from dictionary.

Definition at line 377 of file sampledSet.C.

~sampledSet (  )  [virtual]

Definition at line 396 of file sampledSet.C.


Member Function Documentation

Foam::label getBoundaryCell ( const label  faceI  )  const [protected]

Returns cell next to boundary face.

Definition at line 37 of file sampledSet.C.

Foam::label getCell ( const label  faceI,
const point sample 
) const [protected]

Returns cell using face and containing sample.

Definition at line 44 of file sampledSet.C.

References polyMesh::faceOwner(), and sampledSet::mesh().

Here is the call graph for this function:

Foam::scalar calcSign ( const label  faceI,
const point sample 
) const [protected]

Calculates inproduct of face normal and vector sample-face centre.

<0 if sample inside.

Definition at line 108 of file sampledSet.C.

Foam::label findNearFace ( const label  cellI,
const point sample,
const scalar  smallDist 
) const [protected]

Returns face label (or -1) of face which is close to sample.

Definition at line 135 of file sampledSet.C.

Foam::point pushIn ( const point sample,
const label  faceI 
) const [protected]

Moves sample in direction of -n to it is 'inside' of faceI.

Definition at line 172 of file sampledSet.C.

bool getTrackingPoint ( const vector offset,
const point samplePt,
const point bPoint,
const label  bFaceI,
point trackPt,
label trackCellI,
label trackFaceI 
) const [protected]

Calculates start of tracking given samplePt and first boundary.

intersection (bPoint, bFaceI) (bFaceI == -1 if no boundary intersection) Returns true if trackPt is valid sampling point. Sets trackPt, trackFaceI, trackCellI (-1 if no tracking point found)

Definition at line 205 of file sampledSet.C.

void setSamples ( const List< point > &  samplingPts,
const labelList samplingCells,
const labelList samplingFaces,
const labelList samplingSegments,
const scalarList samplingCurveDist 
) [protected]

Sets sample data.

Definition at line 313 of file sampledSet.C.

TypeName ( "sampledSet"   ) 

Runtime type information.

declareRunTimeSelectionTable ( autoPtr  ,
sampledSet  ,
word  ,
(const word &name, const polyMesh &mesh, meshSearch &searchEngine, const dictionary &dict)  ,
(name, mesh, searchEngine, dict)   
)

autoPtr<sampledSet> clone (  )  const [inline]

Clone.

Definition at line 233 of file sampledSet.H.

Foam::autoPtr< Foam::sampledSet > New ( const word name,
const polyMesh mesh,
meshSearch searchEngine,
const dictionary dict 
) [static]

Return a reference to the selected sampledSet.

Definition at line 403 of file sampledSet.C.

const polyMesh& mesh (  )  const [inline]

Definition at line 259 of file sampledSet.H.

Referenced by sampledSet::getCell().

Here is the caller graph for this function:

meshSearch& searchEngine (  )  const [inline]

Definition at line 264 of file sampledSet.H.

References sampledSet::segments_.

const labelList& segments (  )  const [inline]

Definition at line 269 of file sampledSet.H.

References sampledSet::curveDist_.

const scalarList& curveDist (  )  const [inline]

Definition at line 274 of file sampledSet.H.

References sampledSet::cells_.

const labelList& cells (  )  const [inline]

Definition at line 279 of file sampledSet.H.

References sampledSet::faces_.

const labelList& faces (  )  const [inline]

Definition at line 284 of file sampledSet.H.

virtual point getRefPoint ( const List< point > &   )  const [pure virtual]

Given all sampling points (on all processors) return reference point.

Implemented in cloudSet, curveSet, faceOnlySet, and uniformSet.


Member Data Documentation

labelList segments_ [protected]

Segment numbers.

Definition at line 76 of file sampledSet.H.

Referenced by sampledSet::searchEngine().

scalarList curveDist_ [protected]

Parameter along sample curve. Uniquely identifies position.

along sampling. Used for combining parallel results.

Definition at line 82 of file sampledSet.H.

Referenced by sampledSet::segments().

labelList cells_ [protected]

Cell numbers.

Definition at line 85 of file sampledSet.H.

Referenced by sampledSet::curveDist().

labelList faces_ [protected]

Face numbers (-1 if not known).

Definition at line 88 of file sampledSet.H.

Referenced by sampledSet::cells().

const scalar tol = 1e-6 [static]

Tolerance when comparing points. Usually relative to difference.

between start_ and end_

Definition at line 209 of file sampledSet.H.


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd