55 positionName_(
word::null),
57 distanceName_(
word::null),
66 const word& positionName,
68 const word& distanceName,
74 positionName_(positionName),
81 distanceName_(distanceName),
88 axis_(axisTypeNames_[axis])
95 const word& positionName,
117 const word& distanceName,
144 (axis_ == axisType::X && positions_.valid())
146 || (axis_ == axisType::Z && positions_.valid())
147 || (axis_ == axisType::DISTANCE && distances_.valid())
148 || (axis_ == axisType::DEFAULT && distances_.valid());
158 (axis_ == axisType::XYZ && positions_.valid())
159 || (axis_ == axisType::DEFAULT && positions_.valid());
169 <<
"Scalar coordinate requested from coordinate set with "
173 return positions_()[index].x();
175 return positions_()[index].y();
177 return positions_()[index].z();
178 case axisType::DISTANCE:
179 return distances_()[index];
180 case axisType::DEFAULT:
181 if (distances_.valid())
return distances_()[index];
183 <<
"Scalar coordinate requested from coordinate set with "
184 << axisTypeNames_[axis_] <<
" axis, but with no valid distances"
199 <<
"Scalar coordinate requested from coordinate set with "
203 return positions_().component(
point::X);
205 return positions_().component(
point::Y);
207 return positions_().component(
point::Z);
208 case axisType::DISTANCE:
210 case axisType::DEFAULT:
211 if (distances_.valid())
return distances_();
213 <<
"Scalar coordinate requested from coordinate set with "
214 << axisTypeNames_[axis_] <<
" axis, but with no valid distances"
229 <<
"Scalar name requested from coordinate set with "
239 case axisType::DISTANCE:
240 return distanceName_;
241 case axisType::DEFAULT:
242 if (distances_.valid())
return distanceName_;
244 <<
"Scalar coordinate requested from coordinate set with "
245 << axisTypeNames_[axis_] <<
" axis, but with no valid distances"
259 return positions_()[index];
263 case axisType::DISTANCE:
265 <<
"Point coordinate requested from coordinate set with "
268 case axisType::DEFAULT:
269 if (positions_.valid())
return positions_()[index];
271 <<
"Point coordinate requested from coordinate set with "
272 << axisTypeNames_[axis_] <<
" axis, but with no valid point"
290 case axisType::DISTANCE:
292 <<
"Point coordinate requested from coordinate set with "
295 case axisType::DEFAULT:
296 if (positions_.valid())
return positions_();
298 <<
"Point coordinate requested from coordinate set with "
299 << axisTypeNames_[axis_] <<
" axis, but with no valid point"
313 return positionName_;
317 case axisType::DISTANCE:
319 <<
"Point name requested from coordinate set with "
322 case axisType::DEFAULT:
323 if (positions_.valid())
return positionName_;
325 <<
"Point name requested from coordinate set with "
326 << axisTypeNames_[axis_] <<
" axis, but with no valid point"
342 const label s = segments_[pointi];
345 (pointi == 0 ||
s != segments_[pointi - 1])
346 && (pointi == size() - 1 ||
s != segments_[pointi + 1])
364 for (
label pointi = 0; pointi < size() - 1; ++ pointi)
366 if (segments_[pointi] == segments_[pointi + 1])
368 edges[nEdges ++] =
labelPair(pointi, pointi + 1);
390 || segments_[pointi] != segments_[pointi + 1]
405 return linesNonDynamic;
413 if (positions_.valid())
421 if (distances_.valid())
434 if (positions_.valid())
437 ListListOps::combine<List<point>>
445 if (distances_.valid())
448 ListListOps::combine<scalarList>
457 ListListOps::combine<labelList>
474 if (distances_.valid())
482 allSegments[a] < allSegments[
b] ? true
483 : allSegments[a] > allSegments[
b] ? false
484 : allDistances[a] < allDistances[
b];
495 return allSegments[a] < allSegments[
b];
503 if (positions_.valid())
508 if (distances_.valid())
#define forAll(list, i)
Loop across all elements in list.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
static const Field< scalar > & null()
Return a null field.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
void resize(const label)
Alias for setSize(const label)
void size(const label)
Override size to be inconsistent with allocated storage.
Initialise the NamedEnum HashTable from the static list of names.
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Gather data but keep individual values separate.
A 2-tuple for storing two objects of different types.
const Type2 & second() const
Return second.
const Type1 & first() const
Return first.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
static Form uniform(const Cmpt &s)
Return a VectorSpace with all elements = s.
Holds list of sampling positions.
word distanceName_
Name of the distances.
bool hasPointAxis() const
Is the coordinate axis a point?
labelListList lines() const
Return a list of lines. These are lists of points which are in the.
labelList vertices() const
Return a list of isolated vertices. These are the points that are.
Tuple2< coordSet, labelList > gather() const
Combine coordinate sets onto the master. Return both the combined.
labelPairList edges() const
Return a list of edges. These are adjacent pairs of points which.
autoPtr< pointField > positions_
Point positions.
static const NamedEnum< axisType, 6 > axisTypeNames_
String representation of axis enums.
axisType
Enumeration defining the output format for coordinates.
labelList segments_
Connected segments.
word positionName_
Name of the positions.
coordSet()
Construct null.
tmp< scalarField > scalarCoords() const
Get scalar coordinates (axis is x, y, z or distance)
point pointCoord(const label index) const
Get vector coordinate (axis is xyz)
word scalarName() const
Return the name of the scalar coordinates.
autoPtr< scalarField > distances_
Scalar distances.
word pointName() const
Return the name of the point coordinates.
tmp< pointField > pointCoords() const
Get vector coordinate (axis is xyz)
bool hasScalarAxis() const
Is the coordinate axis a scalar?
scalar scalarCoord(const label index) const
Get scalar coordinate (axis is x, y, z or distance)
A class for managing temporary objects.
A class for handling words, derived from string.
static const word null
An empty word.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
errorManipArg< error, int > exit(error &err, const int errNo=1)
Pair< label > labelPair
Label pair.
pointField vertices(const blockVertexList &bvl)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
int order(const scalar s)
vectorField pointField
pointField is a vectorField.
bool contiguous()
contiguous
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Field< label > labelField
Specialisation of Field<T> for label.
bool isNull(const T &t)
Return true if t is a reference to the nullObject of type T.
void stableSort(UList< T > &)
labelList identityMap(const label len)
Create identity map (map[i] == i) of given length.
PtrList< volScalarField > & Y