Go to the documentation of this file.
53 #ifndef OFstreamCollator_H
54 #define OFstreamCollator_H
112 compression_(compression),
119 off_t sz = data_.size();
122 if (slaveData_.
set(i))
124 sz += slaveData_[i].size();
135 const off_t maxBufferSize_;
137 mutable std::mutex mutex_;
157 static bool writeFile
160 const word& typeName,
162 const string& masterData,
172 static void* writeAll(
void *threadarg);
176 void waitForBufferSpace(
const off_t wantedSize)
const;
205 const word& typeName,
212 const bool useThread =
true
A class for handling words, derived from Foam::string.
A class for handling file names.
A List obtained as a section of another List.
OFstreamCollator(const off_t maxBufferSize)
Construct from buffer size. 0 = do not use thread.
const T * set(const label i) const
Return const pointer to element (can be nullptr),.
rAUs append(new volScalarField(IOobject::groupName("rAU", phase1.name()), 1.0/(U1Eqn.A()+byDt(max(phase1.residualAlpha() - alpha1, scalar(0)) *rho1))))
bool write(const word &typeName, const fileName &, const string &data, IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType, const bool append, const bool useThread=true)
Write file with contents. Blocks until writethread has space.
#define forAll(list, i)
Loop across all elements in list.
TypeName("OFstreamCollator")
word format(conversionProperties.get< word >("format"))
Representation of a major/minor version number.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
static void writeData(Ostream &os, const Type &val)
streamFormat
Data format (ascii | binary)
void waitAll()
Wait for all thread actions to have finished.
const std::string version
OpenFOAM version (name or stringified number) as a std::string.
compressionType
Compression treatment (UNCOMPRESSED | COMPRESSED)
Database for solution data, solver performance and other reduced data.
virtual ~OFstreamCollator()
Destructor.