Reference documentation for deal.II version 8.5.1
swappable_vector.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2000 - 2017 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 at
12 // the top level of the deal.II distribution.
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 #include <deal.II/base/thread_management.h>
22 #include <deal.II/lac/vector.h>
23 #include <string>
24 
25 DEAL_II_NAMESPACE_OPEN
26 
57 template <typename number>
58 class SwappableVector : public Vector<number>
59 {
60 public:
65  SwappableVector ();
66 
74 
79  virtual ~SwappableVector ();
80 
86 
98  void swap_out (const std::string &filename);
99 
109  void reload ();
110 
127  void alert ();
128 
129 
142  void kill_file ();
143 
149  const std::string &get_filename () const;
150 
155  std::size_t memory_consumption () const;
156 
173  std::string,
174  << "The filename <" << arg1
175  << "> is not a valid one here.");
181 private:
187  std::string filename;
188 
198 
204 
214  void reload_vector (const bool set_flag);
215 } DEAL_II_DEPRECATED;
216 
218 /*---------------------------- swappable_vector.h ---------------------------*/
219 /* end of #ifndef dealii__swappable_vector_h */
220 DEAL_II_NAMESPACE_CLOSE
221 
222 #endif
223 /*---------------------------- swappable_vector.h ---------------------------*/
static ::ExceptionBase & ExcSizeZero()
const std::string & get_filename() const
std::size_t memory_consumption() const
Threads::Mutex lock
SwappableVector & operator=(const SwappableVector &)
static ::ExceptionBase & ExcSizeNonzero()
void reload_vector(const bool set_flag)
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:564
std::string filename
static ::ExceptionBase & ExcInvalidCopyOperation()
#define DeclException0(Exception0)
Definition: exceptions.h:541
virtual ~SwappableVector()
void swap_out(const std::string &filename)
static ::ExceptionBase & ExcInvalidFilename(std::string arg1)