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
mg_tools.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2005 - 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_mg_tools_h
17#define dealii_mg_tools_h
18
19#include <deal.II/base/config.h>
20
22
25
26#include <set>
27#include <vector>
28
29
31
32// Forward declarations
33#ifndef DOXYGEN
34template <int dim, int spacedim>
36class DoFHandler;
38#endif
39
52namespace MGTools
53{
57 template <int dim, int spacedim>
58 void
60 const DoFHandler<dim, spacedim> &dofs,
61 const unsigned int level,
62 std::vector<unsigned int> & row_lengths,
63 const DoFTools::Coupling flux_couplings = DoFTools::none);
64
69 template <int dim, int spacedim>
70 void
72 const unsigned int level,
73 std::vector<unsigned int> & row_lengths,
74 const Table<2, DoFTools::Coupling> &couplings,
75 const Table<2, DoFTools::Coupling> &flux_couplings);
76
89 template <int dim, int spacedim, typename number = double>
90 void
92 const DoFHandler<dim, spacedim> &dof_handler,
93 SparsityPatternBase & sparsity,
94 const unsigned int level,
96 const bool keep_constrained_dofs = true);
97
106 template <int dim, int spacedim, typename number = double>
107 void
109 const DoFHandler<dim, spacedim> &dof_handler,
110 SparsityPatternBase & sparsity,
111 const unsigned int level,
113 const bool keep_constrained_dofs = true);
114
115
122 template <int dim, int spacedim>
123 void
125 SparsityPatternBase & sparsity,
126 const unsigned int level);
136 template <int dim, int spacedim>
137 void
139 SparsityPatternBase & sparsity,
140 const unsigned int level,
141 const Table<2, DoFTools::Coupling> &int_mask,
142 const Table<2, DoFTools::Coupling> &flux_mask);
143
152 template <int dim, int spacedim>
153 void
155 const DoFHandler<dim, spacedim> & dof_handler,
156 SparsityPatternBase & sparsity,
157 const unsigned int level,
158 const Table<2, DoFTools::Coupling> &flux_mask);
159
160
167 template <int dim, int spacedim>
168 void
170 const MGConstrainedDoFs &mg_constrained_dofs,
171 SparsityPatternBase & sparsity,
172 const unsigned int level);
173
174
181 template <int dim, int spacedim>
182 void
184 const DoFHandler<dim, spacedim> & dof_handler,
185 std::vector<std::vector<types::global_dof_index>> &dofs_per_block,
186 std::vector<unsigned int> target_block = {});
187
195 template <int dim, int spacedim>
196 void
198 const DoFHandler<dim, spacedim> & mg_dof,
199 std::vector<std::vector<types::global_dof_index>> &result,
200 const bool only_once = false,
201 std::vector<unsigned int> target_component = {});
202
222 template <int dim, int spacedim>
223 void
225 const DoFHandler<dim, spacedim> &mg_dof,
226 const std::map<types::boundary_id, const Function<spacedim> *>
227 & function_map,
228 std::vector<std::set<types::global_dof_index>> &boundary_indices,
229 const ComponentMask &component_mask = ComponentMask());
230
238 template <int dim, int spacedim>
239 void
241 const std::map<types::boundary_id,
242 const Function<spacedim> *> &function_map,
243 std::vector<IndexSet> &boundary_indices,
244 const ComponentMask & component_mask = ComponentMask());
245
253 template <int dim, int spacedim>
254 void
256 const std::set<types::boundary_id> &boundary_ids,
257 std::vector<IndexSet> & boundary_indices,
258 const ComponentMask &component_mask = ComponentMask());
259
265 template <int dim, int spacedim>
266 void
268 std::vector<IndexSet> & interface_dofs);
269
279 template <int dim, int spacedim>
280 unsigned int
282
293 template <int dim, int spacedim>
294 std::vector<types::global_dof_index>
296
304 template <int dim, int spacedim>
305 std::vector<types::global_dof_index>
307 const std::vector<std::shared_ptr<const Triangulation<dim, spacedim>>>
308 &trias);
309
328 template <int dim, int spacedim>
329 double
331
337 template <int dim, int spacedim>
338 double
340 const std::vector<std::shared_ptr<const Triangulation<dim, spacedim>>>
341 &trias);
342
350 template <int dim, int spacedim>
351 std::vector<std::pair<types::global_dof_index, types::global_dof_index>>
353
362 template <int dim, int spacedim>
363 std::vector<std::pair<types::global_dof_index, types::global_dof_index>>
365 const std::vector<std::shared_ptr<const Triangulation<dim, spacedim>>>
366 &trias);
367
379 template <int dim, int spacedim>
380 double
382
388 template <int dim, int spacedim>
389 double
391 const std::vector<std::shared_ptr<const Triangulation<dim, spacedim>>>
392 &trias);
393
394
395} // namespace MGTools
396
400
401#endif
#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
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:1055
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:1700
void make_sparsity_pattern(const DoFHandler< dim, spacedim > &dof_handler, SparsityPatternBase &sparsity, const unsigned int level, const AffineConstraints< number > &constraints=AffineConstraints< number >(), const bool keep_constrained_dofs=true)
Definition mg_tools.cc:576
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:1014
std::vector< types::global_dof_index > local_workload(const Triangulation< dim, spacedim > &tria)
Definition mg_tools.cc:1632
void make_flux_sparsity_pattern_edge(const DoFHandler< dim, spacedim > &dof_handler, SparsityPatternBase &sparsity, const unsigned int level)
Definition mg_tools.cc:680
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=ComponentMask())
Definition mg_tools.cc:1240
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:107
void extract_inner_interface_dofs(const DoFHandler< dim, spacedim > &mg_dof_handler, std::vector< IndexSet > &interface_dofs)
Definition mg_tools.cc:1446
double workload_imbalance(const Triangulation< dim, spacedim > &tria)
Definition mg_tools.cc:1678
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:1157
void make_flux_sparsity_pattern(const DoFHandler< dim, spacedim > &dof_handler, SparsityPatternBase &sparsity, const unsigned int level, const AffineConstraints< number > &constraints=AffineConstraints< number >(), const bool keep_constrained_dofs=true)
Definition mg_tools.cc:606
double vertical_communication_efficiency(const Triangulation< dim, spacedim > &tria)
Definition mg_tools.cc:1809
unsigned int max_level_for_coarse_mesh(const Triangulation< dim, spacedim > &tria)
Definition mg_tools.cc:1534
const ::Triangulation< dim, spacedim > & tria