Reference documentation for deal.II version 9.0.0
number_cache.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1998 - 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 at
12 // the top level of the deal.II distribution.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_number_cache_h
17 #define dealii_number_cache_h
18 
19 #include <deal.II/base/config.h>
20 #include <deal.II/base/index_set.h>
21 
22 #include <vector>
23 
24 
25 DEAL_II_NAMESPACE_OPEN
26 
27 namespace internal
28 {
29  namespace DoFHandlerImplementation
30  {
35  struct NumberCache
36  {
40  NumberCache ();
41 
46  NumberCache (const NumberCache &) = default;
47 
52  NumberCache (NumberCache &&) = default;
53 
64 
65 
79  NumberCache (const std::vector<IndexSet> &locally_owned_dofs_per_processor,
80  const unsigned int my_rank);
81 
86  NumberCache &operator= (const NumberCache &) = default;
87 
92  NumberCache &operator= (NumberCache &&) = default;
93 
98  std::size_t memory_consumption () const;
99 
103  void clear ();
104 
110 
120 
131 
141  std::vector<types::global_dof_index> n_locally_owned_dofs_per_processor;
142 
152  std::vector<IndexSet> locally_owned_dofs_per_processor;
153 
158  template <class Archive>
159  void serialize (Archive &ar,
160  const unsigned int version);
161  };
162 
163 
164  template <class Archive>
165  void
167  const unsigned int /*version*/)
168  {
170  ar &locally_owned_dofs;
173  }
174 
175  }
176 }
177 
178 
179 DEAL_II_NAMESPACE_CLOSE
180 
181 #endif // dealii_dof_iterator_selector_h
NumberCache & operator=(const NumberCache &)=default
unsigned int global_dof_index
Definition: types.h:88
std::vector< types::global_dof_index > n_locally_owned_dofs_per_processor
Definition: number_cache.h:141
void serialize(Archive &ar, const unsigned int version)
Definition: number_cache.h:166
std::vector< IndexSet > locally_owned_dofs_per_processor
Definition: number_cache.h:152