25 #include <sys/types.h> 29 #ifdef LIBMESH_HAVE_SYS_UTSNAME_H 30 #include <sys/utsname.h> 33 #ifdef LIBMESH_HAVE_PWD_H 37 #ifdef LIBMESH_HAVE_DIRECT_H 59 std::ostringstream oss;
63 #ifdef LIBMESH_HAVE_SYS_UTSNAME_H 65 struct utsname sysInfo;
70 #ifdef LIBMESH_HAVE_GETPWUID 71 struct passwd * p = getpwuid(getuid());
76 <<
" ---------------------------------------------------------------------\n" 77 <<
"| Time: " << date <<
'\n' 78 #ifdef LIBMESH_HAVE_SYS_UTSNAME_H 79 <<
"| OS: " << sysInfo.sysname <<
'\n' 80 <<
"| HostName: " << sysInfo.nodename <<
'\n' 81 <<
"| OS Release " << sysInfo.release <<
'\n' 82 <<
"| OS Version: " << sysInfo.version <<
'\n' 83 <<
"| Machine: " << sysInfo.machine <<
'\n' 85 <<
"| OS: " <<
"Unknown" <<
'\n' 86 <<
"| HostName: " <<
"Unknown" <<
'\n' 87 <<
"| OS Release " <<
"Unknown" <<
'\n' 88 <<
"| OS Version: " <<
"Unknown" <<
'\n' 89 <<
"| Machine: " <<
"Unknown" <<
'\n' 91 #ifdef LIBMESH_HAVE_GETPWUID 92 <<
"| Username: " << p->pw_name <<
'\n' 94 <<
"| Username: " <<
"Unknown" <<
'\n' 96 <<
" ---------------------------------------------------------------------\n";
103 #ifdef LIBMESH_USE_COMPLEX_NUMBERS 106 const unsigned int r_o_c)
108 std::string
name(basename);
111 name.append(
".real");
114 name.append(
".imag");
122 std::vector<Real> & real_part,
123 std::vector<Real> & imag_part)
125 const unsigned int len = source.size();
127 real_part.resize(len);
128 imag_part.resize(len);
130 for (
unsigned int i=0; i<len; i++)
132 real_part[i] = source[i].real();
133 imag_part[i] = source[i].imag();
137 #endif // #ifdef LIBMESH_USE_COMPLEX_NUMBERS 141 #if defined(LIBMESH_HAVE_MKDIR) 143 #elif LIBMESH_HAVE_DECL__MKDIR 144 return _mkdir(pathname);
146 libmesh_error_msg(
"Function mkdir not available on this system.");
std::string name(const ElemQuality q)
std::string complex_filename(const std::string &basename, unsigned int r_o_c=0)
std::string get_timestamp()
int mkdir(const char *pathname)
std::string system_info()
void prepare_complex_data(const std::vector< Complex > &source, std::vector< Real > &real_part, std::vector< Real > &imag_part)