38 const UList<Type>&
field,
42 for (Type val :
field)
51 const direction cmpt = ensightPTraits<Type>::componentOrder[d];
76 bool allEmpty(!
procAddr.totalSize());
77 Pstream::broadcast(allEmpty);
85 if (UPstream::master())
99 DynamicList<Type> recvData(
procAddr.maxNonLocalSize());
101 for (
const label proci :
procAddr.subProcs())
103 const label procSize =
procAddr.localSize(proci);
107 recvData.resize_nocopy(procSize);
111 UPstream::commsTypes::scheduled,
113 recvData.data_bytes(),
114 recvData.size_bytes()
132 else if (UPstream::is_subrank())
138 UPstream::commsTypes::scheduled,
139 UPstream::masterNo(),
171 const IOobject& fieldObject,
181 IOobject
io(fieldObject);
182 io.readOpt(IOobject::READ_IF_PRESENT);
183 io.registerObject(IOobject::NO_REGISTER);
A variant of OFstream with specialised handling for Ensight writing of strings, integers and floats (...
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Dispatch tag: Construct 'one-sided' from local sizes, using gather but no broadcast.
::Foam::direction nComponents(const expressions::valueTypeCode) noexcept
The number of components associated with given valueTypeCode.
A collection of functions for writing clouds as ensight file content.
bool writeCloudField(ensightFile &os, const UList< Type > &field, const globalIndex &procAddr)
Write cloud field, returning true if the field is non-empty.
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.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
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)
globalIndex procAddr(aMesh.nFaces())
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
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)