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
event.cc
Go to the documentation of this file.
1
// ------------------------------------------------------------------------
2
//
3
// SPDX-License-Identifier: LGPL-2.1-or-later
4
// Copyright (C) 2010 - 2018 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
16
#include <
deal.II/base/event.h
>
17
18
DEAL_II_NAMESPACE_OPEN
19
20
// TODO: Thread safety
21
22
namespace
Algorithms
23
{
24
std::vector<std::string>
Event::names
;
25
26
Event
27
Event::assign
(
const
std::string &name)
28
{
29
unsigned
int
index =
names
.size();
30
names
.emplace_back(name);
31
32
Event
result;
33
// The constructor generated an
34
// object with all flags equal
35
// zero. Now we set the new one.
36
result.
flags
[index] =
true
;
37
38
return
result;
39
}
27
Event::assign
(
const
std::string &name) {
…
}
40
41
42
Event::Event
()
43
: all_true(false)
44
, flags(names.size(), false)
45
{}
42
Event::Event
() {
…
}
46
47
48
void
49
Event::clear
()
50
{
51
all_true
=
false
;
52
std::fill(
flags
.begin(),
flags
.end(),
false
);
53
}
49
Event::clear
() {
…
}
54
55
56
void
57
Event::all
()
58
{
59
all_true
=
true
;
60
}
57
Event::all
() {
…
}
61
62
namespace
Events
63
{
64
const
Event
initial
=
Event::assign
(
"Initial"
);
65
const
Event
remesh
=
Event::assign
(
"Remesh"
);
66
const
Event
bad_derivative
=
Event::assign
(
"Bad Derivative"
);
67
const
Event
new_time
=
Event::assign
(
"New Time"
);
68
const
Event
new_timestep_size
=
Event::assign
(
"New Time Step Size"
);
69
}
// namespace Events
70
}
// namespace Algorithms
71
72
DEAL_II_NAMESPACE_CLOSE
Algorithms::Event
Definition
event.h:49
Algorithms::Event::all_true
bool all_true
Definition
event.h:126
Algorithms::Event::names
static std::vector< std::string > names
Definition
event.h:137
Algorithms::Event::clear
void clear()
Definition
event.cc:49
Algorithms::Event::Event
Event()
Definition
event.cc:42
Algorithms::Event::flags
std::vector< bool > flags
Definition
event.h:131
Algorithms::Event::assign
static Event assign(const std::string &name)
Definition
event.cc:27
Algorithms::Event::all
void all()
Definition
event.cc:57
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
event.h
Algorithms::Events::initial
const Event initial
Definition
event.cc:64
Algorithms::Events::new_time
const Event new_time
Definition
event.cc:67
Algorithms::Events::new_timestep_size
const Event new_timestep_size
Definition
event.cc:68
Algorithms::Events::remesh
const Event remesh
Definition
event.cc:65
Algorithms::Events::bad_derivative
const Event bad_derivative
Definition
event.cc:66
Algorithms
Definition
newton.h:36
Generated by
1.11.0