Loading [MathJax]/extensions/TeX/newcommand.js
deal.II version GIT relicensing-3110-g10dd77059b 2025-04-22 10:30:00+00:00
\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}
\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}
\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}
\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}
Toggle main menu visibility
Main Page
Tutorial
Code gallery
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Variables
a
b
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
w
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
v
Enumerations
a
b
c
d
e
f
g
h
i
l
n
o
p
r
s
v
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
b
c
d
e
f
g
i
m
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Related Symbols
:
a
b
c
d
f
g
i
l
m
n
o
p
r
s
t
u
v
Related Pages
Files
File List
File Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
Variables
a
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
Typedefs
Enumerations
Enumerator
m
u
Macros
a
b
d
e
f
h
i
m
p
s
t
dealii.org
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
Loading...
Searching...
No Matches
source
base
job_identifier.cc
Go to the documentation of this file.
1
// ------------------------------------------------------------------------
2
//
3
// SPDX-License-Identifier: LGPL-2.1-or-later
4
// Copyright (C) 1998 - 2023 by the deal.II authors
5
//
6
// This file is part of the deal.II library.
7
//
8
// Part of the source code is dual licensed under Apache-2.0 WITH
9
// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10
// governing the source code and code contributions can be found in
11
// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12
//
13
// ------------------------------------------------------------------------
14
15
#include <
deal.II/base/job_identifier.h
>
16
17
#include <ctime>
18
#include <string>
19
20
21
#ifdef DEAL_II_HAVE_UNISTD_H
22
# include <unistd.h>
23
#endif
24
25
DEAL_II_NAMESPACE_OPEN
26
27
28
const
JobIdentifier
&
29
JobIdentifier::get_dealjobid
()
30
{
31
static
JobIdentifier
dealjobid;
32
return
dealjobid;
33
}
29
JobIdentifier::get_dealjobid
() {
…
}
34
35
36
37
JobIdentifier::JobIdentifier
()
38
{
39
std::time_t t = std::time(
nullptr
);
40
id
=
"JobId "
;
41
42
#if defined(DEAL_II_HAVE_UNISTD_H) && defined(DEAL_II_HAVE_GETHOSTNAME)
43
char
name[100];
44
gethostname(name, 99);
45
id
+= std::string(name) +
" "
;
46
#else
47
id
+=
"unknown "
;
48
#endif
49
50
id
+= std::string(std::ctime(&t));
51
}
37
JobIdentifier::JobIdentifier
() {
…
}
52
53
54
std::string
55
JobIdentifier::operator()
()
const
56
{
57
return
id
;
58
}
55
JobIdentifier::operator()
()
const
{
…
}
59
60
61
std::string
62
JobIdentifier::base_name
(
const
std::string &filename)
63
{
64
std::string name(filename);
65
std::string::size_type pos;
66
pos = name.rfind(
'/'
);
67
if
(pos != std::string::npos)
68
name.erase(0, pos + 1);
69
pos = name.rfind(
'.'
);
70
if
(pos != std::string::npos)
71
name.erase(pos, name.size());
72
return
name;
73
}
62
JobIdentifier::base_name
(
const
std::string &filename) {
…
}
74
75
76
77
DEAL_II_NAMESPACE_CLOSE
JobIdentifier
Definition
job_identifier.h:33
JobIdentifier::get_dealjobid
static const JobIdentifier & get_dealjobid()
Definition
job_identifier.cc:29
JobIdentifier::id
std::string id
Definition
job_identifier.h:78
JobIdentifier::base_name
static std::string base_name(const std::string &filename)
Definition
job_identifier.cc:62
JobIdentifier::JobIdentifier
JobIdentifier()
Definition
job_identifier.cc:37
JobIdentifier::operator()
std::string operator()() const
Definition
job_identifier.cc:55
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition
config.h:35
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition
config.h:36
job_identifier.h
Generated by
1.9.8