Loading [MathJax]/extensions/TeX/newcommand.js
Reference documentation for deal.II version 9.6.0
\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
c
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
z
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
s
t
u
v
Variables
a
c
d
e
f
g
h
i
k
l
m
n
o
p
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
19
#ifdef DEAL_II_HAVE_UNISTD_H
20
# include <unistd.h>
21
#endif
22
23
DEAL_II_NAMESPACE_OPEN
24
25
26
const
JobIdentifier
&
27
JobIdentifier::get_dealjobid
()
28
{
29
static
JobIdentifier
dealjobid;
30
return
dealjobid;
31
}
27
JobIdentifier::get_dealjobid
() {
…
}
32
33
34
35
JobIdentifier::JobIdentifier
()
36
{
37
time_t t = std::time(
nullptr
);
38
id
= std::string(
"JobId "
);
39
40
#if defined(DEAL_II_HAVE_UNISTD_H) && defined(DEAL_II_HAVE_GETHOSTNAME)
41
char
name[100];
42
gethostname(name, 99);
43
id
+= std::string(name) + std::string(
" "
);
44
#else
45
id
+= std::string(
"unknown "
);
46
#endif
47
48
id
+= std::string(std::ctime(&t));
49
}
35
JobIdentifier::JobIdentifier
() {
…
}
50
51
52
std::string
53
JobIdentifier::operator()
()
const
54
{
55
return
id
;
56
}
53
JobIdentifier::operator()
()
const
{
…
}
57
58
59
std::string
60
JobIdentifier::base_name
(
const
std::string &filename)
61
{
62
std::string name(filename);
63
std::string::size_type pos;
64
pos = name.rfind(
'/'
);
65
if
(pos != std::string::npos)
66
name.erase(0, pos + 1);
67
pos = name.rfind(
'.'
);
68
if
(pos != std::string::npos)
69
name.erase(pos, name.size());
70
return
name;
71
}
60
JobIdentifier::base_name
(
const
std::string &filename) {
…
}
72
73
74
75
DEAL_II_NAMESPACE_CLOSE
JobIdentifier
Definition
job_identifier.h:33
JobIdentifier::get_dealjobid
static const JobIdentifier & get_dealjobid()
Definition
job_identifier.cc:27
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:60
JobIdentifier::JobIdentifier
JobIdentifier()
Definition
job_identifier.cc:35
JobIdentifier::operator()
std::string operator()() const
Definition
job_identifier.cc:53
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition
config.h:503
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition
config.h:504
job_identifier.h
Generated by
1.11.0