47double Utils::chopVal_ = 1.0e-16;
51 if (std::fabs(x) < chopVal_)
return 0;
57 typedef std::string::size_type size_type;
58 const size_type
len =
str.length();
79 return std::string(
"");
86 std::sprintf(
s,
"%d", x);
87 return std::string(
s);
93 std::sprintf(
s,
"%lld", x);
94 return std::string(
s);
100 std::sprintf(
s,
"%d", x);
101 return std::string(
s);
107 std::sprintf(
s,
"%g", x);
108 return std::string(
s);
130 for(
int i = 0;
i < 10; ++
i,
tmp *= 0.1 ) {
A MPI utilities class, providing methods for initializing, finalizing, and querying the global MPI se...
A utilities class for Teuchos.
static int getRank()
The rank of the calling process in MPI_COMM_WORLD.
static int getNProc()
The number of processes in MPI_COMM_WORLD.
Smart reference counting pointer class for automatic garbage collection.
static std::string toString(const double &x)
Write a double as a std::string.
static std::string trimWhiteSpace(const std::string &str)
Trim whitespace from beginning and end of std::string.
static std::string getParallelExtension(int procRank=-1, int numProcs=-1)
Get a parallel file name extention .
static double chop(const double &x)
Set a number to zero if it is less than getChopVal().
static bool isWhiteSpace(const char c)
Determine if a char is whitespace or not.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...