Holds list of sampling positions. More...
Public Types | |
enum | 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 coordSet::coordSet(), and coordSet::gather().
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 64 of file coordSet.C.
References coordSet::coordSet().
coordSet | ( | const bool | contiguous, |
const word & | positionName, | ||
const pointField & | positions, | ||
const word & | axis = axisTypeNames_[axisType::DEFAULT] |
||
) |
Construct from positions.
Definition at line 93 of file coordSet.C.
References coordSet::coordSet().
coordSet | ( | const bool | contiguous, |
const word & | distanceName, | ||
const scalarField & | distances, | ||
const word & | axis = axisTypeNames_[axisType::DEFAULT] |
||
) |
Construct from distances.
Definition at line 115 of file coordSet.C.
|
inline |
Return the size.
Definition at line 135 of file coordSet.H.
References List< T >::size().
Referenced by coordSet::edges(), coordSet::lines(), and coordSet::vertices().
|
inline |
|
inline |
Return the axis name.
Definition at line 147 of file coordSet.H.
References coordSet::axis_, coordSet::edges(), coordSet::gather(), coordSet::hasPointAxis(), coordSet::hasScalarAxis(), coordSet::lines(), coordSet::pointCoord(), coordSet::pointCoords(), coordSet::pointName(), coordSet::scalarCoord(), coordSet::scalarCoords(), coordSet::scalarName(), and coordSet::vertices().
Referenced by sampledSet::iNew::operator()(), and coordSet::scalarName().
bool hasScalarAxis | ( | ) | const |
Is the coordinate axis a scalar?
Definition at line 138 of file coordSet.C.
References coordSet::axis_, coordSet::DEFAULT, coordSet::DISTANCE, coordSet::distances_, coordSet::positions_, coordSet::X, coordSet::Y, and coordSet::Z.
Referenced by coordSet::axis().
bool hasPointAxis | ( | ) | const |
Is the coordinate axis a point?
Definition at line 152 of file coordSet.C.
References coordSet::axis_, coordSet::DEFAULT, coordSet::positions_, and coordSet::XYZ.
Referenced by coordSet::axis().
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 coordSet::axis_, coordSet::axisTypeNames_, coordSet::DEFAULT, coordSet::DISTANCE, coordSet::distances_, Foam::exit(), Foam::FatalError, FatalErrorInFunction, coordSet::positions_, coordSet::X, coordSet::XYZ, coordSet::Y, and coordSet::Z.
Referenced by coordSet::axis().
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 coordSet::axis_, coordSet::axisTypeNames_, coordSet::DEFAULT, coordSet::DISTANCE, coordSet::distances_, Foam::exit(), Foam::FatalError, FatalErrorInFunction, Field< scalar >::null(), coordSet::positions_, coordSet::X, Vector< scalar >::X, coordSet::XYZ, coordSet::Y, Vector< scalar >::Y, coordSet::Z, and Vector< scalar >::Z.
Referenced by coordSet::axis().
Foam::word scalarName | ( | ) | const |
Return the name of the scalar coordinates.
Definition at line 223 of file coordSet.C.
References coordSet::axis(), coordSet::axis_, coordSet::axisTypeNames_, coordSet::DEFAULT, coordSet::DISTANCE, coordSet::distanceName_, coordSet::distances_, Foam::exit(), Foam::FatalError, FatalErrorInFunction, word::null, coordSet::positionName_, coordSet::X, coordSet::XYZ, coordSet::Y, and coordSet::Z.
Referenced by coordSet::axis().
Foam::point pointCoord | ( | const label | index | ) | const |
Get vector coordinate (axis is xyz)
Definition at line 254 of file coordSet.C.
References coordSet::axis_, coordSet::axisTypeNames_, coordSet::DEFAULT, coordSet::DISTANCE, Foam::exit(), Foam::FatalError, FatalErrorInFunction, coordSet::positions_, VectorSpace< Vector< scalar >, scalar, 3 >::uniform(), coordSet::X, coordSet::XYZ, coordSet::Y, and coordSet::Z.
Referenced by coordSet::axis().
Foam::tmp< Foam::pointField > pointCoords | ( | ) | const |
Get vector coordinate (axis is xyz)
Definition at line 281 of file coordSet.C.
References coordSet::axis_, coordSet::axisTypeNames_, coordSet::DEFAULT, coordSet::DISTANCE, Foam::exit(), Foam::FatalError, FatalErrorInFunction, Field< Type >::null(), coordSet::positions_, coordSet::X, coordSet::XYZ, coordSet::Y, and coordSet::Z.
Referenced by coordSet::axis().
Foam::word pointName | ( | ) | const |
Return the name of the point coordinates.
Definition at line 308 of file coordSet.C.
References coordSet::axis_, coordSet::axisTypeNames_, coordSet::DEFAULT, coordSet::DISTANCE, Foam::exit(), Foam::FatalError, FatalErrorInFunction, word::null, coordSet::positionName_, coordSet::positions_, coordSet::X, coordSet::XYZ, coordSet::Y, and coordSet::Z.
Referenced by coordSet::axis().
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(), coordSet::segments_, and coordSet::size().
Referenced by coordSet::axis().
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(), coordSet::segments_, and coordSet::size().
Referenced by coordSet::axis().
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(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::clear(), forAll, coordSet::segments_, List< T >::size(), coordSet::size(), and List< T >::transfer().
Referenced by coordSet::axis().
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_, Foam::constant::physicoChemical::b, coordSet::coordSet(), coordSet::distanceName_, coordSet::distances_, Tuple2< Type1, Type2 >::first(), Pstream::gatherList(), Foam::identity(), UPstream::myProcNo(), UPstream::nProcs(), coordSet::positionName_, coordSet::positions_, List< T >::resize(), Tuple2< Type1, Type2 >::second(), coordSet::segments_, List< T >::size(), and Foam::stableSort().
Referenced by coordSet::axis().
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 33 of file coordSetTemplates.C.
References Foam::combine().
|
static |
String representation of axis enums.
Definition at line 69 of file coordSet.H.
Referenced by Foam::functionObjects::layerAverage::symmetricCoeff< Foam::vector >(), NamedEnum< compressibleField, 8 >::names(), coordSet::pointCoord(), coordSet::pointCoords(), coordSet::pointName(), layerAverage::read(), coordSet::scalarCoord(), coordSet::scalarCoords(), coordSet::scalarName(), gnuplotSetWriter::write(), and layerAverage::write().
|
protected |
Connected segments.
Definition at line 77 of file coordSet.H.
Referenced by coordSet::edges(), coordSet::gather(), coordSet::lines(), coordSet::segments(), and coordSet::vertices().
|
protected |
Name of the positions.
Definition at line 80 of file coordSet.H.
Referenced by coordSet::gather(), coordSet::pointName(), and coordSet::scalarName().
|
protected |
Point positions.
Definition at line 83 of file coordSet.H.
Referenced by coordSet::gather(), coordSet::hasPointAxis(), coordSet::hasScalarAxis(), coordSet::pointCoord(), coordSet::pointCoords(), coordSet::pointName(), sampledSet::positions(), coordSet::scalarCoord(), and coordSet::scalarCoords().
|
protected |
Name of the distances.
Definition at line 86 of file coordSet.H.
Referenced by coordSet::gather(), and coordSet::scalarName().
|
protected |
Scalar distances.
Definition at line 89 of file coordSet.H.
Referenced by coordSet::gather(), coordSet::hasScalarAxis(), coordSet::scalarCoord(), coordSet::scalarCoords(), and coordSet::scalarName().
|
protected |
Axis.
Definition at line 92 of file coordSet.H.
Referenced by coordSet::axis(), coordSet::gather(), coordSet::hasPointAxis(), coordSet::hasScalarAxis(), coordSet::pointCoord(), coordSet::pointCoords(), coordSet::pointName(), coordSet::scalarCoord(), coordSet::scalarCoords(), and coordSet::scalarName().