32bool OMBuf::multiOutput = 0;
35 : output(nullptr), text(
"")
42 : output(rhs.output), text(rhs.text)
54 : output(&str), text(classname)
59 (*this).multiOutput = b;
64#ifdef PARALLEL_MODE_MPI
65 #ifdef PARALLEL_MODE_OMP
66 if (multiOutput==
true) {
74 *output <<
"[" << text <<
"] " << str();
78 if (multiOutput==
true) {
85 *output <<
"[" << text <<
"] " << str();
89#elif PARALLEL_MODE_OMP
90 if (multiOutput==
true) {
97 *output <<
"[" << text <<
"] " << str();
101 *output <<
"[" << text <<
"] " << str();
111 : std::ostream(&buffer), buffer(std::cout, classname)
115 : std::ostream(&buffer), buffer(str, classname)
119 : std::ostream(&buffer), buffer(rhs.buffer)
userdefined stream buffer for OstreamManager
void setMultiOutput(bool b)
OMBuf & operator=(const OMBuf &rhs)
int sync() override
sync the stream with the output:
class for marking output with some text
OstreamManager & operator=(const OstreamManager &rhs)
OstreamManager(std::string classname)
constructor that uses std::cout by default
void setMultiOutput(bool b)
enable message output for all MPI processes, disabled by default
int getRank() const
Returns the process ID.
Wrapper functions that simplify the use of MPI.
Top level namespace for all of OpenLB.
Definition of singletons: global, publicly available information.