Reference documentation for deal.II version 9.6.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// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2010 - 2023 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_dof_handler_policy_h
16#define dealii_dof_handler_policy_h
17
18
19
20#include <deal.II/base/config.h>
21
24
27
28#include <vector>
29
31
32// Forward declaration
33#ifndef DOXYGEN
34template <int dim, int spacedim>
36class DoFHandler;
37#endif
38
39namespace internal
40{
41 namespace DoFHandlerImplementation
42 {
43 struct NumberCache;
44
49 namespace Policy
50 {
51 struct Implementation;
52
58 template <int dim, int spacedim>
60 {
61 public:
65 virtual ~PolicyBase() = default;
66
75 virtual NumberCache
76 distribute_dofs() const = 0;
77
83 virtual std::vector<NumberCache>
84 distribute_mg_dofs() const = 0;
85
91 virtual NumberCache
93 const std::vector<types::global_dof_index> &new_numbers) const = 0;
94
103 virtual NumberCache
105 const unsigned int level,
106 const std::vector<types::global_dof_index> &new_numbers) const = 0;
107 };
108
109
114 template <int dim, int spacedim>
115 class Sequential : public PolicyBase<dim, spacedim>
116 {
117 public:
124
125 // documentation is inherited
126 virtual NumberCache
127 distribute_dofs() const override;
128
129 // documentation is inherited
130 virtual std::vector<NumberCache>
131 distribute_mg_dofs() const override;
132
133 // documentation is inherited
134 virtual NumberCache
135 renumber_dofs(const std::vector<types::global_dof_index> &new_numbers)
136 const override;
137
138 // documentation is inherited
139 virtual NumberCache
140 renumber_mg_dofs(const unsigned int level,
141 const std::vector<types::global_dof_index>
142 &new_numbers) const override;
143
144 protected:
149 };
150
151
152
157 template <int dim, int spacedim>
158 class ParallelShared : public PolicyBase<dim, spacedim>
159 {
160 public:
167
176 virtual NumberCache
177 distribute_dofs() const override;
178
182 virtual std::vector<NumberCache>
183 distribute_mg_dofs() const override;
184
194 virtual NumberCache
195 renumber_dofs(const std::vector<types::global_dof_index> &new_numbers)
196 const override;
197
198 // documentation is inherited
199 virtual NumberCache
200 renumber_mg_dofs(const unsigned int level,
201 const std::vector<types::global_dof_index>
202 &new_numbers) const override;
203
204 private:
209 };
210
211
216 template <int dim, int spacedim>
217 class ParallelDistributed : public PolicyBase<dim, spacedim>
218 {
219 public:
226
227 // documentation is inherited
228 virtual NumberCache
229 distribute_dofs() const override;
230
231 // documentation is inherited
232 virtual std::vector<NumberCache>
233 distribute_mg_dofs() const override;
234
235 // documentation is inherited
236 virtual NumberCache
237 renumber_dofs(const std::vector<types::global_dof_index> &new_numbers)
238 const override;
239
240 // documentation is inherited
241 virtual NumberCache
242 renumber_mg_dofs(const unsigned int level,
243 const std::vector<types::global_dof_index>
244 &new_numbers) const override;
245
246 private:
251 };
252 } // namespace Policy
253 } // namespace DoFHandlerImplementation
254} // namespace internal
255
256
257
259
260#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
ParallelShared(DoFHandler< dim, spacedim > &dof_handler)
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
Sequential(DoFHandler< dim, spacedim > &dof_handler)
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:503
#define DEAL_II_CXX20_REQUIRES(condition)
Definition config.h:177
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:504
unsigned int level
Definition grid_out.cc:4626