Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
deal.II
lac
swappable_vector.h
1
// ---------------------------------------------------------------------
2
//
3
// Copyright (C) 2000 - 2018 by the deal.II authors
4
//
5
// This file is part of the deal.II library.
6
//
7
// The deal.II library is free software; you can use it, redistribute
8
// it, and/or modify it under the terms of the GNU Lesser General
9
// Public License as published by the Free Software Foundation; either
10
// version 2.1 of the License, or (at your option) any later version.
11
// The full text of the license can be found in the file LICENSE.md at
12
// the top level directory of deal.II.
13
//
14
// ---------------------------------------------------------------------
15
16
#ifndef dealii_swappable_vector_h
17
# define dealii_swappable_vector_h
18
19
20
# include <deal.II/base/config.h>
21
22
# include <deal.II/base/thread_management.h>
23
24
# include <deal.II/lac/vector.h>
25
26
# include <string>
27
28
DEAL_II_NAMESPACE_OPEN
29
60
template
<
typename
number>
61
class
DEAL_II_DEPRECATED
SwappableVector
:
public
Vector
<number>
62
{
63
public
:
68
SwappableVector
();
69
76
SwappableVector
(
const
SwappableVector
&v);
77
82
virtual
~
SwappableVector
()
override
;
83
88
SwappableVector
&
89
operator=
(
const
SwappableVector
&);
90
102
void
103
swap_out(
const
std::string &filename);
104
114
void
115
reload();
116
133
void
134
alert();
135
136
149
void
150
kill_file();
151
157
const
std::string &
158
get_filename()
const
;
159
164
std::size_t
165
memory_consumption
()
const
;
166
174
DeclException0
(ExcSizeZero);
178
DeclException0
(ExcSizeNonzero);
182
DeclException1
(ExcInvalidFilename,
183
std::string,
184
<<
"The filename <"
<< arg1 <<
"> is not a valid one here."
);
188
DeclException0
(ExcInvalidCopyOperation);
190
private
:
196
std::string
filename
;
197
206
Threads::Mutex
lock
;
207
212
bool
data_is_preloaded
;
213
223
void
224
reload_vector(
const
bool
set_flag);
225
};
226
228
DEAL_II_NAMESPACE_CLOSE
229
230
#endif // dealii_swappable_vector_h
231
/*--------------------------- swappable_vector.h --------------------------*/
SwappableVector::data_is_preloaded
bool data_is_preloaded
Definition:
swappable_vector.h:212
Threads::Mutex
Definition:
thread_management.h:88
DeclException1
#define DeclException1(Exception1, type1, outsequence)
Definition:
exceptions.h:518
SwappableVector::filename
std::string filename
Definition:
swappable_vector.h:196
Vector::operator=
Vector< Number > & operator=(const Number s)
SwappableVector::lock
Threads::Mutex lock
Definition:
swappable_vector.h:206
DeclException0
#define DeclException0(Exception0)
Definition:
exceptions.h:473
SwappableVector
Definition:
swappable_vector.h:61
Vector::memory_consumption
std::size_t memory_consumption() const
Vector
Definition:
function.h:36
Generated by
1.8.16