38 const UList<Type>&
field,
43 for (Type val :
field)
50 for (
direction d=0; d < pTraits<Type>::nComponents; ++d)
52 const direction cmpt = ensightPTraits<Type>::componentOrder[d];
82 const globalIndex
procAddr(globalIndex::gatherOnly{},
field.size());
84 if (Pstream::master())
98 DynamicList<Type> recvData(
procAddr.maxNonLocalSize());
100 for (
const label proci :
procAddr.subProcs())
102 const label procSize =
procAddr.localSize(proci);
106 recvData.resize_nocopy(procSize);
110 UPstream::commsTypes::scheduled,
112 recvData.data_bytes(),
113 recvData.size_bytes()
137 UPstream::commsTypes::scheduled,
138 UPstream::masterNo(),
164 io.readOpt(IOobject::READ_IF_PRESENT);
Ensight output with specialized write() for strings, integers and floats. Correctly handles binary wr...
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A collection of functions for writing clouds as ensight file content.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
bool returnReduceAnd(const bool value, const label comm=UPstream::worldComm)
Perform logical (and) MPI Allreduce on a copy. Uses UPstream::reduceAnd.
const dimensionedScalar e
Elementary charge.
bool readWriteCloudField(ensightFile &os, const IOobject &fieldObject, bool existsAny)
Read cloud field from IOobject (if exists == true) and write, always returning true.
OBJstream os(runTime.globalPath()/outputName)
bool writeCloudField(ensightFile &os, const IOField< Type > &field)
Write cloud field, returning true if the field is non-empty.
globalIndex procAddr(aMesh.nFaces())
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
Defines the attributes of an object for which implicit objectRegistry management is supported...
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
A primitive field of type <T> with automated input and output.
label writeCloudFieldContent(ensightFile &os, const UList< Type > &fld, label count=0)
Write cloud field data (serial) with rounding and newlines.
static constexpr const zero Zero
Global zero (0)