Reference documentation for deal.II version 9.5.0
\(\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\}}\)
Loading...
Searching...
No Matches
dof_handler_policy.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 1998 - 2023 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
25
28
29#include <vector>
30
32
33// Forward declaration
34#ifndef DOXYGEN
35template <int dim, int spacedim>
37class DoFHandler;
38#endif
39
40namespace internal
41{
42 namespace DoFHandlerImplementation
43 {
44 struct NumberCache;
45
50 namespace Policy
51 {
52 struct Implementation;
53
59 template <int dim, int spacedim>
61 {
62 public:
66 virtual ~PolicyBase() = default;
67
76 virtual NumberCache
77 distribute_dofs() const = 0;
78
84 virtual std::vector<NumberCache>
85 distribute_mg_dofs() const = 0;
86
92 virtual NumberCache
94 const std::vector<types::global_dof_index> &new_numbers) const = 0;
95
104 virtual NumberCache
106 const unsigned int level,
107 const std::vector<types::global_dof_index> &new_numbers) const = 0;
108 };
109
110
115 template <int dim, int spacedim>
116 class Sequential : public PolicyBase<dim, spacedim>
117 {
118 public:
125
126 // documentation is inherited
127 virtual NumberCache
128 distribute_dofs() const override;
129
130 // documentation is inherited
131 virtual std::vector<NumberCache>
132 distribute_mg_dofs() const override;
133
134 // documentation is inherited
135 virtual NumberCache
136 renumber_dofs(const std::vector<types::global_dof_index> &new_numbers)
137 const override;
138
139 // documentation is inherited
140 virtual NumberCache
141 renumber_mg_dofs(const unsigned int level,
142 const std::vector<types::global_dof_index>
143 &new_numbers) const override;
144
145 protected:
150 };
151
152
153
158 template <int dim, int spacedim>
159 class ParallelShared : public PolicyBase<dim, spacedim>
160 {
161 public:
168
177 virtual NumberCache
178 distribute_dofs() const override;
179
183 virtual std::vector<NumberCache>
184 distribute_mg_dofs() const override;
185
195 virtual NumberCache
196 renumber_dofs(const std::vector<types::global_dof_index> &new_numbers)
197 const override;
198
199 // documentation is inherited
200 virtual NumberCache
201 renumber_mg_dofs(const unsigned int level,
202 const std::vector<types::global_dof_index>
203 &new_numbers) const override;
204
205 private:
210 };
211
212
217 template <int dim, int spacedim>
218 class ParallelDistributed : public PolicyBase<dim, spacedim>
219 {
220 public:
227
228 // documentation is inherited
229 virtual NumberCache
230 distribute_dofs() const override;
231
232 // documentation is inherited
233 virtual std::vector<NumberCache>
234 distribute_mg_dofs() const override;
235
236 // documentation is inherited
237 virtual NumberCache
238 renumber_dofs(const std::vector<types::global_dof_index> &new_numbers)
239 const override;
240
241 // documentation is inherited
242 virtual NumberCache
243 renumber_mg_dofs(const unsigned int level,
244 const std::vector<types::global_dof_index>
245 &new_numbers) const override;
246
247 private:
252 };
253 } // namespace Policy
254 } // namespace DoFHandlerImplementation
255} // namespace internal
256
257
258
260
261#endif
virtual NumberCache renumber_dofs(const std::vector< types::global_dof_index > &new_numbers) const override
virtual std::vector< NumberCache > distribute_mg_dofs() const override
virtual NumberCache renumber_mg_dofs(const unsigned int level, const std::vector< types::global_dof_index > &new_numbers) const override
virtual std::vector< NumberCache > distribute_mg_dofs() const override
virtual NumberCache renumber_mg_dofs(const unsigned int level, const std::vector< types::global_dof_index > &new_numbers) const override
virtual NumberCache renumber_dofs(const std::vector< types::global_dof_index > &new_numbers) const override
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
virtual NumberCache renumber_dofs(const std::vector< types::global_dof_index > &new_numbers) const =0
virtual std::vector< NumberCache > distribute_mg_dofs() const =0
virtual std::vector< NumberCache > distribute_mg_dofs() const override
virtual NumberCache renumber_dofs(const std::vector< types::global_dof_index > &new_numbers) const override
virtual NumberCache renumber_mg_dofs(const unsigned int level, const std::vector< types::global_dof_index > &new_numbers) const override
SmartPointer< DoFHandler< dim, spacedim > > dof_handler
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:472
#define DEAL_II_CXX20_REQUIRES(condition)
Definition config.h:160
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:473
unsigned int level
Definition grid_out.cc:4618