Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
dof_handler_policy.h
1 // ---------------------------------------------------------------------
2 // @f$Id: dof_handler_policy.h 31711 2013-11-19 16:40:27Z heister @f$
3 //
4 // Copyright (C) 1998 - 2013 by the deal.II authors
5 //
6 // This file is part of the deal.II library.
7 //
8 // The deal.II library is free software; you can use it, redistribute
9 // it, and/or modify it under the terms of the GNU Lesser General
10 // Public License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 // The full text of the license can be found in the file LICENSE at
13 // the top level of the deal.II distribution.
14 //
15 // ---------------------------------------------------------------------
16 
17 #ifndef __deal2__dof_handler_policy_h
18 #define __deal2__dof_handler_policy_h
19 
20 
21 
22 #include <deal.II/base/config.h>
24 #include <deal.II/base/template_constraints.h>
25 
26 #include <vector>
27 #include <map>
28 #include <set>
29 
30 DEAL_II_NAMESPACE_OPEN
31 
32 template <int, int> class FiniteElement;
33 template <int, int> class DoFHandler;
34 
35 
36 namespace internal
37 {
38  namespace DoFHandler
39  {
40  struct NumberCache;
41 
48  namespace Policy
49  {
50  struct Implementation;
51 
58  template <int dim, int spacedim>
59  class PolicyBase
60  {
61  public:
65  virtual ~PolicyBase ();
66 
71  virtual
72  NumberCache
73  distribute_dofs (::DoFHandler<dim,spacedim> &dof_handler) const = 0;
74 
78  virtual
79  void
81  std::vector<NumberCache> &number_caches) const = 0;
82 
87  virtual
88  NumberCache
89  renumber_dofs (const std::vector<types::global_dof_index> &new_numbers,
90  ::DoFHandler<dim,spacedim> &dof_handler) const = 0;
91  };
92 
93 
100  template <int dim, int spacedim>
101  class Sequential : public PolicyBase<dim,spacedim>
102  {
103  public:
108  virtual
110  distribute_dofs (::DoFHandler<dim,spacedim> &dof_handler) const;
111 
115  virtual
116  void
118  std::vector<NumberCache> &number_caches) const;
119 
124  virtual
126  renumber_dofs (const std::vector<types::global_dof_index> &new_numbers,
127  ::DoFHandler<dim,spacedim> &dof_handler) const;
128  };
129 
130 
138  template <int dim, int spacedim>
139  class ParallelDistributed : public PolicyBase<dim,spacedim>
140  {
141  public:
146  virtual
148  distribute_dofs (::DoFHandler<dim,spacedim> &dof_handler) const;
149 
153  virtual
154  void
156  std::vector<NumberCache> &number_caches) const;
157 
162  virtual
164  renumber_dofs (const std::vector<types::global_dof_index> &new_numbers,
165  ::DoFHandler<dim,spacedim> &dof_handler) const;
166  };
167  }
168  }
169 }
170 
171 
172 
173 DEAL_II_NAMESPACE_CLOSE
174 
175 /*---------------------------- dof_handler_policy.h ---------------------------*/
176 #endif
177 /*---------------------------- dof_handler_policy.h ---------------------------*/
virtual NumberCache renumber_dofs(const std::vector< types::global_dof_index > &new_numbers,::DoFHandler< dim, spacedim > &dof_handler) const =0
virtual void distribute_mg_dofs(::DoFHandler< dim, spacedim > &dof_handler, std::vector< NumberCache > &number_caches) const
virtual NumberCache distribute_dofs(::DoFHandler< dim, spacedim > &dof_handler) const
virtual void distribute_mg_dofs(::DoFHandler< dim, spacedim > &dof_handler, std::vector< NumberCache > &number_caches) const =0
virtual NumberCache distribute_dofs(::DoFHandler< dim, spacedim > &dof_handler) const =0
virtual NumberCache renumber_dofs(const std::vector< types::global_dof_index > &new_numbers,::DoFHandler< dim, spacedim > &dof_handler) const
virtual NumberCache distribute_dofs(::DoFHandler< dim, spacedim > &dof_handler) const
virtual NumberCache renumber_dofs(const std::vector< types::global_dof_index > &new_numbers,::DoFHandler< dim, spacedim > &dof_handler) const
virtual void distribute_mg_dofs(::DoFHandler< dim, spacedim > &dof_handler, std::vector< NumberCache > &number_caches) const