36 const word& fieldName,
37 const IOobjectList& cloudObjects
40 const IOobject*
io = cloudObjects.cfindObject<IOField<Type>>(fieldName);
43 return tmp<IOField<Type>>
::New(*
io);
47 <<
"Cloud field name " << fieldName
48 <<
" not found or the incorrect type" 70 const IOField<Type>&
field,
71 const List<labelList>& addr
79 <<
field.size() <<
" float" <<
nl;
84 List<Type> data(UIndirectList<Type>(
field, ids));
85 label nData = data.size() - 1;
88 writeVTK<Type>(
os, data[i]);
89 if (((i + 1) % step == 0) || (i == nData))
107 const List<labelList>& addr,
108 const IOobjectList& cloudObjects
111 for (
const IOobject&
io : cloudObjects.csorted<IOField<Type>>())
113 Info<<
" reading field " <<
io.name() <<
endl;
116 writeVTKField<Type>(
os,
field, addr);
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
constexpr char nl
The newline '\n' character (0x0a)
void writeVTKField(OFstream &os, const IOField< Type > &field, const List< labelList > &addr)
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
::Foam::direction nComponents(const expressions::valueTypeCode) noexcept
The number of components associated with given valueTypeCode.
void processFields(OFstream &os, const List< labelList > &addr, const IOobjectList &cloudObjects)
#define forAll(list, i)
Loop across all elements in list.
errorManip< error > abort(error &err)
OBJstream os(runTime.globalPath()/outputName)
messageStream Info
Information stream (stdout output on master, null elsewhere)
tmp< IOField< Type > > readParticleField(const word &fieldName, const IOobjectList &cloudObjects)
void writeVTK(OFstream &os, const Type &value)
List< label > labelList
A List of labels.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
A class for managing temporary objects.
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)