16 #include <deal.II/base/job_identifier.h> 20 #ifdef DEAL_II_HAVE_UNISTD_H 24 DEAL_II_NAMESPACE_OPEN
38 time_t t = std::time(
nullptr);
39 id = std::string(
"JobId ");
41 #if defined(DEAL_II_HAVE_UNISTD_H) && defined(DEAL_II_HAVE_GETHOSTNAME) 43 gethostname(name, 99);
44 id += std::string(name) + std::string(
" ");
46 id += std::string(
"unknown ");
49 id += std::string(std::ctime(&t));
63 std::string name(filename);
64 std::string::size_type pos;
65 pos = name.rfind(
'/');
66 if (pos != std::string::npos)
67 name.erase(0, pos + 1);
68 pos = name.rfind(
'.');
69 if (pos != std::string::npos)
70 name.erase(pos, name.size());
76 DEAL_II_NAMESPACE_CLOSE
const std::string operator()() const
static const JobIdentifier & get_dealjobid()
static std::string base_name(const std::string &filename)