Holds list of sampling positions. More...
Public Types | |
enum class | axisType { XYZ , X , Y , Z , DISTANCE , DEFAULT } |
Enumeration defining the output format for coordinates. More... | |
Public Member Functions | |
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 labelList & | segments () 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< scalarField > | scalarCoords () 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< pointField > | pointCoords () 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, labelList > | gather () 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 | |
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... | |
Static Public Attributes | |
static const NamedEnum< axisType, 6 > | axisTypeNames_ |
String representation of axis enums. More... | |
Protected Attributes | |
labelList | segments_ |
Connected segments. More... | |
word | positionName_ |
Name of the positions. More... | |
autoPtr< pointField > | positions_ |
Point positions. More... | |
word | distanceName_ |
Name of the distances. More... | |
autoPtr< scalarField > | distances_ |
Scalar distances. More... | |
axisType | axis_ |
Axis. More... | |
|
strong |
Enumeration defining the output format for coordinates.
Enumerator | |
---|---|
XYZ | |
X | |
Y | |
Z | |
DISTANCE | |
DEFAULT |
Definition at line 57 of file coordSet.H.
coordSet | ( | ) |
Construct null.
Definition at line 52 of file coordSet.C.
Referenced by sampledSet::setSamples().
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.
Definition at line 63 of file coordSet.C.
coordSet | ( | const bool | contiguous, |
const word & | positionName, | ||
const pointField & | positions, | ||
const word & | axis = axisTypeNames_[axisType::DEFAULT] |
||
) |
Construct from positions.
Definition at line 92 of file coordSet.C.
coordSet | ( | const bool | contiguous, |
const word & | distanceName, | ||
const scalarField & | distances, | ||
const word & | axis = axisTypeNames_[axisType::DEFAULT] |
||
) |
Construct from distances.
Definition at line 114 of file coordSet.C.
|
inline |
Return the size.
Definition at line 135 of file coordSet.H.
References coordSet::segments_, and List< T >::size().
Referenced by points::calcSamples(), ensightSetWriter::write(), and rawSetWriter::write().
|
inline |
Return the segments.
Definition at line 141 of file coordSet.H.
References coordSet::segments_.
Referenced by gnuplotSetWriter::write(), rawSetWriter::write(), and setWriter::writeTable().
|
inline |
Return the axis name.
Definition at line 147 of file coordSet.H.
References coordSet::axis_, and coordSet::axisTypeNames_.
Referenced by sampledSet::sampledSet(), and gnuplotSetWriter::write().
bool hasScalarAxis | ( | ) | const |
Is the coordinate axis a scalar?
Definition at line 138 of file coordSet.C.
References Y.
Referenced by gnuplotSetWriter::write(), setWriter::writeTable(), and setWriter::writeTableHeader().
bool hasPointAxis | ( | ) | const |
Is the coordinate axis a point?
Definition at line 152 of file coordSet.C.
Referenced by ensightSetWriter::write(), vtkSetWriter::write(), setWriter::writeTable(), and setWriter::writeTableHeader().
Foam::scalar scalarCoord | ( | const label | index | ) | const |
Get scalar coordinate (axis is x, y, z or distance)
Definition at line 163 of file coordSet.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::patchToPatchTools::NaN(), and Y.
Referenced by setWriter::writeTable().
Foam::tmp< Foam::scalarField > scalarCoords | ( | ) | const |
Get scalar coordinates (axis is x, y, z or distance)
Definition at line 193 of file coordSet.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Field< scalar >::null(), Vector< scalar >::X, Y, Vector< scalar >::Y, and Vector< scalar >::Z.
Referenced by gnuplotSetWriter::write().
Foam::word scalarName | ( | ) | const |
Return the name of the scalar coordinates.
Definition at line 223 of file coordSet.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, word::null, and Y.
Referenced by gnuplotSetWriter::write(), and setWriter::writeTableHeader().
Foam::point pointCoord | ( | const label | index | ) | const |
Get vector coordinate (axis is xyz)
Definition at line 254 of file coordSet.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::patchToPatchTools::NaN(), VectorSpace< Form, Cmpt, Ncmpts >::uniform(), and Y.
Referenced by setWriter::writeTable().
Foam::tmp< Foam::pointField > pointCoords | ( | ) | const |
Get vector coordinate (axis is xyz)
Definition at line 281 of file coordSet.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Field< vector >::null(), and Y.
Referenced by ensightSetWriter::write(), and vtkSetWriter::write().
Foam::word pointName | ( | ) | const |
Return the name of the point coordinates.
Definition at line 308 of file coordSet.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, word::null, and Y.
Referenced by setWriter::writeTableHeader().
Foam::labelList vertices | ( | ) | const |
Return a list of isolated vertices. These are the points that are.
not adjacent to any points in the same segment.
Definition at line 335 of file coordSet.C.
References forAll, List< T >::resize(), s(), and Foam::vertices().
Referenced by ensightSetWriter::write(), and vtkSetWriter::write().
Foam::labelPairList edges | ( | ) | const |
Return a list of edges. These are adjacent pairs of points which.
are in the same segment.
Definition at line 359 of file coordSet.C.
References List< T >::resize().
Referenced by ensightSetWriter::write().
Foam::labelListList lines | ( | ) | const |
Return a list of lines. These are lists of points which are in the.
same segment.
Definition at line 378 of file coordSet.C.
References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), forAll, and List< T >::transfer().
Referenced by vtkSetWriter::write().
Foam::Tuple2< Foam::coordSet, Foam::labelList > gather | ( | ) | const |
Combine coordinate sets onto the master. Return both the combined.
coordinate set, and an ordering to be used for gathering associated fields
Definition at line 409 of file coordSet.C.
References coordSet::axis_, b, coordSet::distanceName_, coordSet::distances_, Tuple2< Type1, Type2 >::first(), Pstream::gatherList(), Foam::identityMap(), UPstream::myProcNo(), UPstream::nProcs(), Foam::order(), coordSet::positionName_, coordSet::positions_, List< T >::resize(), Tuple2< Type1, Type2 >::second(), coordSet::segments_, List< T >::size(), and Foam::stableSort().
Referenced by sampledSets::sampleType().
Combine a field using the ordering obtained from the coordinate set.
gather operation
Foam::tmp<Foam::Field<Type> > gather | ( | const Field< Type > & | values, |
const labelList & | order | ||
) |
Definition at line 32 of file coordSetTemplates.C.
References Foam::ListListOps::combine(), Pstream::gatherList(), UPstream::myProcNo(), UPstream::nProcs(), and Foam::order().
|
static |
String representation of axis enums.
Definition at line 69 of file coordSet.H.
Referenced by coordSet::axis(), Foam::functionObjects::layerAverage::symmetricCoeff< Foam::vector >(), layerAverage::read(), patchCutLayerAverage::read(), sampledSet::sampledSet(), sampledSet::setSamples(), layerAverage::write(), patchCutLayerAverage::write(), and gnuplotSetWriter::write().
|
protected |
Connected segments.
Definition at line 77 of file coordSet.H.
Referenced by coordSet::gather(), coordSet::segments(), and coordSet::size().
|
protected |
|
protected |
Point positions.
Definition at line 83 of file coordSet.H.
Referenced by coordSet::gather(), and sampledSet::positions().
|
protected |
|
protected |
|
protected |
Axis.
Definition at line 92 of file coordSet.H.
Referenced by coordSet::axis(), coordSet::gather(), sampledSet::sampledSet(), and sampledSet::setSamples().