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 (lineUniformSet) or directly specified (pointsSet) More...

Inheritance diagram for sampledSet:
Collaboration diagram for sampledSet:

Classes

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

Public Member Functions

 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< sampledSetclone () const
 Clone. More...
 
virtual ~sampledSet ()
 Destructor. More...
 
const wordname () const
 Access the name. More...
 
const polyMeshmesh () const
 Access the mesh. More...
 
const meshSearchsearchEngine () const
 Access the search engine. More...
 
const pointFieldpositions () const
 Access the positions. More...
 
const labelListcells () const
 Access the cells. More...
 
const labelListfaces () const
 Access the faces. More...
 
- Public Member Functions inherited from coordSet
 coordSet ()
 Construct null. More...
 
 coordSet (const labelList &segments, const word &positionName=word::null, const pointField &positions=pointField::null(), const word &distanceName=word::null, const scalarField &distances=scalarField::null(), const word &axis=axisTypeNames_[axisType::DEFAULT])
 Construct from components. More...
 
 coordSet (const bool contiguous, const word &positionName, const pointField &positions, const word &axis=axisTypeNames_[axisType::DEFAULT])
 Construct from positions. More...
 
 coordSet (const bool contiguous, const word &distanceName, const scalarField &distances, const word &axis=axisTypeNames_[axisType::DEFAULT])
 Construct from distances. More...
 
label size () const
 Return the size. More...
 
const labelListsegments () const
 Return the segments. More...
 
word axis () const
 Return the axis name. More...
 
bool hasScalarAxis () const
 Is the coordinate axis a scalar? More...
 
bool hasPointAxis () const
 Is the coordinate axis a point? More...
 
scalar scalarCoord (const label index) const
 Get scalar coordinate (axis is x, y, z or distance) More...
 
tmp< scalarFieldscalarCoords () const
 Get scalar coordinates (axis is x, y, z or distance) More...
 
word scalarName () const
 Return the name of the scalar coordinates. More...
 
point pointCoord (const label index) const
 Get vector coordinate (axis is xyz) More...
 
tmp< pointFieldpointCoords () const
 Get vector coordinate (axis is xyz) More...
 
word pointName () const
 Return the name of the point coordinates. More...
 
labelList vertices () const
 Return a list of isolated vertices. These are the points that are. More...
 
labelPairList edges () const
 Return a list of edges. These are adjacent pairs of points which. More...
 
labelListList lines () const
 Return a list of lines. These are lists of points which are in the. More...
 
Tuple2< coordSet, labelListgather () const
 Combine coordinate sets onto the master. Return both the combined. More...
 
template<class Type >
Foam::tmp< Foam::Field< Type > > gather (const Field< Type > &values, const labelList &order)
 

Static Public Member Functions

static autoPtr< sampledSetNew (const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const dictionary &dict)
 Return a reference to the selected sampledSet. More...
 
- Static Public Member Functions inherited from coordSet
template<class Type >
static tmp< Field< Type > > gather (const Field< Type > &values, const labelList &order)
 Combine a field using the ordering obtained from the coordinate set. More...
 

Protected Member Functions

void setSamples (const List< point > &samplingPositions, const labelList &samplingSegments, const labelList &samplingCells, const labelList &samplingFaces)
 Sets sample data. More...
 
void setSamples (const List< point > &samplingPositions, const List< scalar > &samplingDistances, const labelList &samplingSegments, const labelList &samplingCells, const labelList &samplingFaces)
 Sets sample data. More...
 

Protected Attributes

labelList cells_
 Cell numbers. More...
 
labelList faces_
 Face numbers (-1 if not known) More...
 
- Protected Attributes inherited from coordSet
labelList segments_
 Connected segments. More...
 
word positionName_
 Name of the positions. More...
 
autoPtr< pointFieldpositions_
 Point positions. More...
 
word distanceName_
 Name of the distances. More...
 
autoPtr< scalarFielddistances_
 Scalar distances. More...
 
axisType axis_
 Axis. More...
 

Additional Inherited Members

- Public Types inherited from coordSet
enum  axisType {
  XYZ, X, Y, Z,
  DISTANCE, DEFAULT
}
 Enumeration defining the output format for coordinates. More...
 
- Static Public Attributes inherited from coordSet
static const NamedEnum< axisType, 6 > axisTypeNames_
 String representation of axis enums. More...
 

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 (lineUniformSet) or directly specified (pointsSet)

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 61 of file sampledSet.H.

Constructor & Destructor Documentation

◆ sampledSet() [1/2]

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

Construct from components.

Definition at line 136 of file sampledSet.C.

Referenced by sampledSet::iNew::operator()(), and sampledSet::setSamples().

Here is the caller graph for this function:

◆ sampledSet() [2/2]

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

Construct from dictionary.

Definition at line 155 of file sampledSet.C.

References dictionary::lookupOrDefault().

Here is the call graph for this function:

◆ ~sampledSet()

~sampledSet ( )
virtual

Destructor.

Definition at line 183 of file sampledSet.C.

References sampledSet::New().

Referenced by sampledSet::clone().

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

Member Function Documentation

◆ setSamples() [1/2]

void setSamples ( const List< point > &  samplingPositions,
const labelList samplingSegments,
const labelList samplingCells,
const labelList samplingFaces 
)
protected

Sets sample data.

Definition at line 47 of file sampledSet.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, word::null, Field< scalar >::null(), and List< T >::size().

Here is the call graph for this function:

◆ setSamples() [2/2]

void setSamples ( const List< point > &  samplingPositions,
const List< scalar > &  samplingDistances,
const labelList samplingSegments,
const labelList samplingCells,
const labelList samplingFaces 
)
protected

Sets sample data.

Definition at line 89 of file sampledSet.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, word::null, sampledSet::sampledSet(), and List< T >::size().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "sampledSet"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

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

◆ clone()

autoPtr<sampledSet> clone ( ) const
inline

Clone.

Definition at line 178 of file sampledSet.H.

References sampledSet::New(), NotImplemented, and sampledSet::~sampledSet().

Here is the call graph for this function:

◆ New()

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

Return a reference to the selected sampledSet.

Definition at line 190 of file sampledSet.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, dictionary::lookup(), mesh, dictionaryName::name(), Foam::name(), Foam::nl, and dictionary::optionalSubDict().

Referenced by sampledSet::clone(), sampledSet::iNew::operator()(), streamlines::read(), and sampledSet::~sampledSet().

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

◆ name()

const word& name ( ) const
inline

Access the name.

Definition at line 204 of file sampledSet.H.

Referenced by sampledSet::iNew::operator()().

Here is the caller graph for this function:

◆ mesh()

const polyMesh& mesh ( ) const
inline

Access the mesh.

Definition at line 210 of file sampledSet.H.

◆ searchEngine()

const meshSearch& searchEngine ( ) const
inline

Access the search engine.

Definition at line 216 of file sampledSet.H.

◆ positions()

const pointField& positions ( ) const
inline

Access the positions.

Definition at line 222 of file sampledSet.H.

References coordSet::positions_.

◆ cells()

const labelList& cells ( ) const
inline

Access the cells.

Definition at line 228 of file sampledSet.H.

References sampledSet::cells_.

◆ faces()

const labelList& faces ( ) const
inline

Access the faces.

Definition at line 234 of file sampledSet.H.

References sampledSet::faces_.

Member Data Documentation

◆ cells_

labelList cells_
protected

Cell numbers.

Definition at line 82 of file sampledSet.H.

Referenced by sampledSet::cells().

◆ faces_

labelList faces_
protected

Face numbers (-1 if not known)

Definition at line 85 of file sampledSet.H.

Referenced by sampledSet::faces().


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