Reference documentation for deal.II version 8.5.1
dof_handler_policy.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1998 - 2016 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__dof_handler_policy_h
17 #define dealii__dof_handler_policy_h
18 
19 
20 
21 #include <deal.II/base/config.h>
22 #include <deal.II/base/exceptions.h>
23 #include <deal.II/base/template_constraints.h>
24 #include <deal.II/dofs/dof_tools.h>
25 #include <deal.II/dofs/dof_renumbering.h>
26 
27 #include <vector>
28 #include <map>
29 #include <set>
30 
31 DEAL_II_NAMESPACE_OPEN
32 
33 template <int, int> class DoFHandler;
34 
35 
36 namespace internal
37 {
38  namespace DoFHandler
39  {
40  struct NumberCache;
41 
46  namespace Policy
47  {
48  struct Implementation;
49 
55  template <int dim, int spacedim>
56  class PolicyBase
57  {
58  public:
62  virtual ~PolicyBase ();
63 
72  virtual
73  void
75  NumberCache &number_cache) const = 0;
76 
80  virtual
81  void
83  std::vector<NumberCache> &number_caches) const = 0;
84 
93  virtual
94  void
95  renumber_dofs (const std::vector<types::global_dof_index> &new_numbers,
96  ::DoFHandler<dim,spacedim> &dof_handler,
97  NumberCache &number_cache) const = 0;
98  };
99 
100 
105  template <int dim, int spacedim>
106  class Sequential : public PolicyBase<dim,spacedim>
107  {
108  public:
112  virtual
113  void
115  NumberCache &number_cache) const;
116 
120  virtual
121  void
123  std::vector<NumberCache> &number_caches) const;
124 
128  virtual
129  void
130  renumber_dofs (const std::vector<types::global_dof_index> &new_numbers,
131  ::DoFHandler<dim,spacedim> &dof_handler,
132  NumberCache &number_cache) const;
133  };
134 
139  template <int dim, int spacedim>
140  class ParallelShared : public Sequential<dim,spacedim>
141  {
142  public:
143 
152  virtual
153  void
155  NumberCache &number_cache) const;
156 
160  virtual
161  void
163  std::vector<NumberCache> &number_caches) const;
164 
174  virtual
175  void
176  renumber_dofs (const std::vector<types::global_dof_index> &new_numbers,
177  ::DoFHandler<dim,spacedim> &dof_handler,
178  NumberCache &number_cache) const;
179  private:
180 
181  };
182 
183 
188  template <int dim, int spacedim>
189  class ParallelDistributed : public PolicyBase<dim,spacedim>
190  {
191  public:
195  virtual
196  void
198  NumberCache &number_cache) const;
199 
203  virtual
204  void
206  std::vector<NumberCache> &number_caches) const;
207 
211  virtual
212  void
213  renumber_dofs (const std::vector<types::global_dof_index> &new_numbers,
214  ::DoFHandler<dim,spacedim> &dof_handler,
215  NumberCache &number_cache) const;
216  };
217  }
218  }
219 }
220 
221 
222 
223 DEAL_II_NAMESPACE_CLOSE
224 
225 /*---------------------------- dof_handler_policy.h ---------------------------*/
226 #endif
227 /*---------------------------- dof_handler_policy.h ---------------------------*/
virtual void distribute_dofs(::DoFHandler< dim, spacedim > &dof_handler, NumberCache &number_cache) const
virtual void renumber_dofs(const std::vector< types::global_dof_index > &new_numbers, ::DoFHandler< dim, spacedim > &dof_handler, NumberCache &number_cache) const
virtual void distribute_dofs(::DoFHandler< dim, spacedim > &dof_handler, NumberCache &number_cache) const
virtual void distribute_mg_dofs(::DoFHandler< dim, spacedim > &dof_handler, std::vector< NumberCache > &number_caches) const =0
virtual void renumber_dofs(const std::vector< types::global_dof_index > &new_numbers, ::DoFHandler< dim, spacedim > &dof_handler, NumberCache &number_cache) const
virtual void distribute_mg_dofs(::DoFHandler< dim, spacedim > &dof_handler, std::vector< NumberCache > &number_caches) const
virtual void renumber_dofs(const std::vector< types::global_dof_index > &new_numbers, ::DoFHandler< dim, spacedim > &dof_handler, NumberCache &number_cache) const =0
virtual void distribute_dofs(::DoFHandler< dim, spacedim > &dof_handler, NumberCache &number_cache) const =0
virtual void distribute_dofs(::DoFHandler< dim, spacedim > &dof_handler, NumberCache &number_cache) const
virtual void distribute_mg_dofs(::DoFHandler< dim, spacedim > &dof_handler, std::vector< NumberCache > &number_caches) const
virtual void distribute_mg_dofs(::DoFHandler< dim, spacedim > &dof_handler, std::vector< NumberCache > &number_caches) const
virtual void renumber_dofs(const std::vector< types::global_dof_index > &new_numbers, ::DoFHandler< dim, spacedim > &dof_handler, NumberCache &number_cache) const