Reference documentation for deal.II version Git fe553f7db3 2020-12-03 08:11:48 +0100
\(\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\}}\)
dof_handler_policy.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1998 - 2019 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_dof_handler_policy_h
17 # define dealii_dof_handler_policy_h
18 
19 
20 
21 # include <deal.II/base/config.h>
22 
23 # include <deal.II/base/exceptions.h>
25 
27 # include <deal.II/dofs/dof_tools.h>
28 
29 # include <map>
30 # include <set>
31 # include <vector>
32 
34 
35 // Forward declaration
36 # ifndef DOXYGEN
37 template <int, int>
38 class DoFHandler;
39 # endif
40 
41 namespace internal
42 {
43  namespace DoFHandlerImplementation
44  {
45  struct NumberCache;
46 
51  namespace Policy
52  {
53  struct Implementation;
54 
60  template <int dim, int spacedim>
61  class PolicyBase
62  {
63  public:
67  virtual ~PolicyBase() = default;
68 
77  virtual NumberCache
78  distribute_dofs() const = 0;
79 
85  virtual std::vector<NumberCache>
86  distribute_mg_dofs() const = 0;
87 
93  virtual NumberCache
95  const std::vector<types::global_dof_index> &new_numbers) const = 0;
96 
105  virtual NumberCache
107  const unsigned int level,
108  const std::vector<types::global_dof_index> &new_numbers) const = 0;
109  };
110 
111 
116  template <int dim, int spacedim>
117  class Sequential : public PolicyBase<dim, spacedim>
118  {
119  public:
126 
127  // documentation is inherited
128  virtual NumberCache
129  distribute_dofs() const override;
130 
131  // documentation is inherited
132  virtual std::vector<NumberCache>
133  distribute_mg_dofs() const override;
134 
135  // documentation is inherited
136  virtual NumberCache
137  renumber_dofs(const std::vector<types::global_dof_index> &new_numbers)
138  const override;
139 
140  // documentation is inherited
141  virtual NumberCache
142  renumber_mg_dofs(const unsigned int level,
143  const std::vector<types::global_dof_index>
144  &new_numbers) const override;
145 
146  protected:
151  };
152 
153 
154 
159  template <int dim, int spacedim>
160  class ParallelShared : public PolicyBase<dim, spacedim>
161  {
162  public:
169 
178  virtual NumberCache
179  distribute_dofs() const override;
180 
184  virtual std::vector<NumberCache>
185  distribute_mg_dofs() const override;
186 
196  virtual NumberCache
197  renumber_dofs(const std::vector<types::global_dof_index> &new_numbers)
198  const override;
199 
200  // documentation is inherited
201  virtual NumberCache
202  renumber_mg_dofs(const unsigned int level,
203  const std::vector<types::global_dof_index>
204  &new_numbers) const override;
205 
206  private:
211  };
212 
213 
218  template <int dim, int spacedim>
219  class ParallelDistributed : public PolicyBase<dim, spacedim>
220  {
221  public:
228 
229  // documentation is inherited
230  virtual NumberCache
231  distribute_dofs() const override;
232 
233  // documentation is inherited
234  virtual std::vector<NumberCache>
235  distribute_mg_dofs() const override;
236 
237  // documentation is inherited
238  virtual NumberCache
239  renumber_dofs(const std::vector<types::global_dof_index> &new_numbers)
240  const override;
241 
242  // documentation is inherited
243  virtual NumberCache
244  renumber_mg_dofs(const unsigned int level,
245  const std::vector<types::global_dof_index>
246  &new_numbers) const override;
247 
248  private:
253  };
254  } // namespace Policy
255  } // namespace DoFHandlerImplementation
256 } // namespace internal
257 
258 
259 
261 
262 #endif
263 /*-------------------------- dof_handler_policy.h -------------------------*/
virtual std::vector< NumberCache > distribute_mg_dofs() const =0
virtual NumberCache renumber_dofs(const std::vector< types::global_dof_index > &new_numbers) const =0
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:372
unsigned int level
Definition: grid_out.cc:4343
SmartPointer< DoFHandler< dim, spacedim > > dof_handler
SmartPointer< DoFHandler< dim, spacedim > > dof_handler
virtual NumberCache renumber_mg_dofs(const unsigned int level, const std::vector< types::global_dof_index > &new_numbers) const =0
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:371
SmartPointer< DoFHandler< dim, spacedim > > dof_handler