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
mg_tools.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2005 - 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_mg_tools_h
16#define dealii_mg_tools_h
17
18#include <deal.II/base/config.h>
19
21
24
25#include <set>
26#include <vector>
27
28
30
31// Forward declarations
32#ifndef DOXYGEN
33template <int dim, int spacedim>
35class DoFHandler;
37#endif
38
51namespace MGTools
52{
56 template <int dim, int spacedim>
57 void
59 const DoFHandler<dim, spacedim> &dofs,
60 const unsigned int level,
61 std::vector<unsigned int> &row_lengths,
62 const DoFTools::Coupling flux_couplings = DoFTools::none);
63
68 template <int dim, int spacedim>
69 void
71 const unsigned int level,
72 std::vector<unsigned int> &row_lengths,
73 const Table<2, DoFTools::Coupling> &couplings,
74 const Table<2, DoFTools::Coupling> &flux_couplings);
75
88 template <int dim, int spacedim, typename number = double>
89 void
91 SparsityPatternBase &sparsity,
92 const unsigned int level,
93 const AffineConstraints<number> &constraints = {},
94 const bool keep_constrained_dofs = true);
95
104 template <int dim, int spacedim, typename number = double>
105 void
107 SparsityPatternBase &sparsity,
108 const unsigned int level,
109 const AffineConstraints<number> &constraints = {},
110 const bool keep_constrained_dofs = true);
111
112
119 template <int dim, int spacedim>
120 void
122 SparsityPatternBase &sparsity,
123 const unsigned int level);
133 template <int dim, int spacedim>
134 void
136 SparsityPatternBase &sparsity,
137 const unsigned int level,
138 const Table<2, DoFTools::Coupling> &int_mask,
139 const Table<2, DoFTools::Coupling> &flux_mask);
140
149 template <int dim, int spacedim>
150 void
152 const DoFHandler<dim, spacedim> &dof_handler,
153 SparsityPatternBase &sparsity,
154 const unsigned int level,
155 const Table<2, DoFTools::Coupling> &flux_mask);
156
157
164 template <int dim, int spacedim>
165 void
167 const MGConstrainedDoFs &mg_constrained_dofs,
168 SparsityPatternBase &sparsity,
169 const unsigned int level);
170
171
178 template <int dim, int spacedim>
179 void
181 const DoFHandler<dim, spacedim> &dof_handler,
182 std::vector<std::vector<types::global_dof_index>> &dofs_per_block,
183 std::vector<unsigned int> target_block = {});
184
192 template <int dim, int spacedim>
193 void
195 const DoFHandler<dim, spacedim> &mg_dof,
196 std::vector<std::vector<types::global_dof_index>> &result,
197 const bool only_once = false,
198 std::vector<unsigned int> target_component = {});
199
219 template <int dim, int spacedim>
220 void
222 const DoFHandler<dim, spacedim> &mg_dof,
223 const std::map<types::boundary_id, const Function<spacedim> *>
224 &function_map,
225 std::vector<std::set<types::global_dof_index>> &boundary_indices,
226 const ComponentMask &component_mask = {});
227
235 template <int dim, int spacedim>
236 void
238 const std::map<types::boundary_id,
239 const Function<spacedim> *> &function_map,
240 std::vector<IndexSet> &boundary_indices,
241 const ComponentMask &component_mask = {});
242
250 template <int dim, int spacedim>
251 void
253 const std::set<types::boundary_id> &boundary_ids,
254 std::vector<IndexSet> &boundary_indices,
255 const ComponentMask &component_mask = {});
256
262 template <int dim, int spacedim>
263 void
265 std::vector<IndexSet> &interface_dofs);
266
276 template <int dim, int spacedim>
277 unsigned int
279
290 template <int dim, int spacedim>
291 std::vector<types::global_dof_index>
293
301 template <int dim, int spacedim>
302 std::vector<types::global_dof_index>
304 const std::vector<std::shared_ptr<const Triangulation<dim, spacedim>>>
305 &trias);
306
325 template <int dim, int spacedim>
326 double
328
334 template <int dim, int spacedim>
335 double
337 const std::vector<std::shared_ptr<const Triangulation<dim, spacedim>>>
338 &trias);
339
347 template <int dim, int spacedim>
348 std::vector<std::pair<types::global_dof_index, types::global_dof_index>>
350
359 template <int dim, int spacedim>
360 std::vector<std::pair<types::global_dof_index, types::global_dof_index>>
362 const std::vector<std::shared_ptr<const Triangulation<dim, spacedim>>>
363 &trias);
364
376 template <int dim, int spacedim>
377 double
379
385 template <int dim, int spacedim>
386 double
388 const std::vector<std::shared_ptr<const Triangulation<dim, spacedim>>>
389 &trias);
390
391
392} // namespace MGTools
393
397
398#endif
#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
void make_flux_sparsity_pattern(const DoFHandler< dim, spacedim > &dof_handler, SparsityPatternBase &sparsity, const unsigned int level, const AffineConstraints< number > &constraints={}, const bool keep_constrained_dofs=true)
Definition mg_tools.cc:605
void count_dofs_per_component(const DoFHandler< dim, spacedim > &mg_dof, std::vector< std::vector< types::global_dof_index > > &result, const bool only_once=false, std::vector< unsigned int > target_component={})
Definition mg_tools.cc:1054
std::vector< std::pair< types::global_dof_index, types::global_dof_index > > local_vertical_communication_cost(const Triangulation< dim, spacedim > &tria)
Definition mg_tools.cc:1696
void make_boundary_list(const DoFHandler< dim, spacedim > &mg_dof, const std::map< types::boundary_id, const Function< spacedim > * > &function_map, std::vector< std::set< types::global_dof_index > > &boundary_indices, const ComponentMask &component_mask={})
Definition mg_tools.cc:1239
void make_interface_sparsity_pattern(const DoFHandler< dim, spacedim > &dof_handler, const MGConstrainedDoFs &mg_constrained_dofs, SparsityPatternBase &sparsity, const unsigned int level)
Definition mg_tools.cc:1013
std::vector< types::global_dof_index > local_workload(const Triangulation< dim, spacedim > &tria)
Definition mg_tools.cc:1628
void make_flux_sparsity_pattern_edge(const DoFHandler< dim, spacedim > &dof_handler, SparsityPatternBase &sparsity, const unsigned int level)
Definition mg_tools.cc:679
void compute_row_length_vector(const DoFHandler< dim, spacedim > &dofs, const unsigned int level, std::vector< unsigned int > &row_lengths, const DoFTools::Coupling flux_couplings=DoFTools::none)
Definition mg_tools.cc:106
void extract_inner_interface_dofs(const DoFHandler< dim, spacedim > &mg_dof_handler, std::vector< IndexSet > &interface_dofs)
Definition mg_tools.cc:1443
double workload_imbalance(const Triangulation< dim, spacedim > &tria)
Definition mg_tools.cc:1674
void count_dofs_per_block(const DoFHandler< dim, spacedim > &dof_handler, std::vector< std::vector< types::global_dof_index > > &dofs_per_block, std::vector< unsigned int > target_block={})
Definition mg_tools.cc:1156
double vertical_communication_efficiency(const Triangulation< dim, spacedim > &tria)
Definition mg_tools.cc:1805
void make_sparsity_pattern(const DoFHandler< dim, spacedim > &dof_handler, SparsityPatternBase &sparsity, const unsigned int level, const AffineConstraints< number > &constraints={}, const bool keep_constrained_dofs=true)
Definition mg_tools.cc:575
unsigned int max_level_for_coarse_mesh(const Triangulation< dim, spacedim > &tria)
Definition mg_tools.cc:1530