Go to the documentation of this file.
38 void Foam::functionObjects::dataCloud::writePointValue
45 os << pt.x() <<
' ' << pt.y() <<
' ' << pt.z();
47 for (
direction cmpt=0; cmpt < pTraits<Type>::nComponents; ++cmpt)
56 void Foam::functionObjects::dataCloud::writeList
60 const List<Type>&
field
63 const label len =
field.size();
65 for (label pointi=0; pointi<len; ++pointi)
73 void Foam::functionObjects::dataCloud::writeListParallel
77 const List<Type>&
field
85 Field<Type> recvField;
92 fromSlave >> recvPoints >> recvField;
113 void Foam::functionObjects::dataCloud::writeList
117 const List<Type>&
field,
118 const bitSet& selected
121 for (
const label pointi : selected)
123 writePointValue(os,
points[pointi],
field[pointi]);
129 void Foam::functionObjects::dataCloud::writeListParallel
133 const List<Type>&
field,
134 const bitSet& selected
142 Field<Type> recvField;
149 fromSlave >> recvPoints >> recvField;
171 bool Foam::functionObjects::dataCloud::writeField
173 const fileName& outputName,
174 const objectRegistry& obrTmp
188 const List<Type>* fldPtr = obrTmp.findObject<IOField<Type>>(fieldName_);
189 const List<Type>&
values = (fldPtr ? *fldPtr : List<Type>());
196 autoPtr<OFstream> osPtr;
200 osPtr.reset(
new OFstream(outputName));
201 osPtr->precision(precision_);
203 *(osPtr) <<
"# x y z " << fieldName_ <<
nl;
void writeListParallel(vtk::formatter &fmt, const UList< uint8_t > &values)
Write a list of uint8_t values.
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
static constexpr int masterNo() noexcept
Process index of the master.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
List< T > subset(const BoolListType &select, const UList< T > &input, const bool invert=false)
Extract elements of the input list when select is true.
Field< vector > vectorField
Specialisation of Field<T> for vector.
void writeList(vtk::formatter &fmt, const UList< uint8_t > &values)
Write a list of uint8_t values.
Vector< scalar > vector
A scalar version of the templated Vector.
static bool master(const label communicator=0)
Am I the master process.
static const IOField< point > * findIOPosition(const objectRegistry &obr)
Locate the "position" IOField within object registry.
Various functions to operate on Lists.