12 #ifndef MFEM_GLOBALS_HPP
13 #define MFEM_GLOBALS_HPP
15 #include "../config/config.hpp"
59 bool IsEnabled()
const {
return (rdbuf() != NULL); }
85 const std::string suffix =
"",
const int width = 6);
114 #define MFEM_THREAD_LOCAL thread_local
119 #if defined(__GNUC__) || defined(__clang__)
120 #define MFEM_DEPRECATED __attribute__((deprecated))
121 #elif defined(_MSC_VER)
122 #define MFEM_DEPRECATED __declspec(deprecated)
124 #pragma message("WARNING: You need to implement MFEM_DEPRECATED for this compiler")
125 #define MFEM_DEPRECATED
std::string MakeParFilename(const std::string &prefix, const int myid, const std::string suffix, const int width)
Construct a string of the form "<prefix><myid><suffix>" where the integer myid is padded with leading...
Simple extension of std::ostream.
void SetStream(std::ostream &os)
Replace the rdbuf() and tie() of the OutStream with that of os, enabling output.
bool IsEnabled() const
Check if output is enabled.
OutStream err(std::cerr)
Global stream used by the library for standard error output. Initially it uses the same std::streambu...
void Disable()
Disable output.
OutStream(std::ostream &os)
Construct an OutStream from the given stream os, by using its rdbuf().
void Enable()
Enable output.
OutStream out(std::cout)
Global stream used by the library for standard output. Initially it uses the same std::streambuf as s...
void SetGlobalMPI_Comm(MPI_Comm comm)
Set MFEM's "global" MPI communicator.
MPI_Comm GetGlobalMPI_Comm()
Get MFEM's "global" MPI communicator.