12#ifndef MFEM_GLOBALS_HPP
13#define MFEM_GLOBALS_HPP
59 bool IsEnabled()
const {
return (rdbuf() != NULL); }
85 const std::string suffix =
"",
const int width = 6);
114const char *
GetEnv(
const char *name);
118inline MFEM_HOST_DEVICE
int UnsignIndex(
int i) {
return i < 0 ? -1 - i : i; }
Simple extension of std::ostream.
void SetStream(std::ostream &os)
Replace the rdbuf() and tie() of the OutStream with that of os, enabling output.
void Enable()
Enable output.
OutStream(std::ostream &os)
Construct an OutStream from the given stream os, by using its rdbuf().
void Disable()
Disable output.
bool IsEnabled() const
Check if output is enabled.
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...
const char * GetEnv(const char *name)
Wrapper for std::getenv.
OutStream out(std::cout)
Global stream used by the library for standard output. Initially it uses the same std::streambuf as s...
MFEM_HOST_DEVICE int FlipIndexSign(int i)
Signed indices i -> -1 - i are used as a convention to encode orientation.
MFEM_HOST_DEVICE int UnsignIndex(int i)
OutStream err(std::cerr)
Global stream used by the library for standard error output. Initially it uses the same std::streambu...
void SetGlobalMPI_Comm(MPI_Comm comm)
Set MFEM's "global" MPI communicator.
MPI_Comm GetGlobalMPI_Comm()
Get MFEM's "global" MPI communicator.