Reference documentation for deal.II version GIT relicensing-31-gf283a0fc39 2024-02-29 06:50:02+00:00
\(\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_tools.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 1999 - 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_tools_h
16#define dealii_dof_tools_h
17
18
19#include <deal.II/base/config.h>
20
23#include <deal.II/base/point.h>
24
26
28
31
32#include <map>
33#include <ostream>
34#include <set>
35#include <vector>
36
37
39
40// Forward declarations
41#ifndef DOXYGEN
42class BlockMask;
43template <int dim, typename RangeNumberType>
44class Function;
45template <int dim, int spacedim>
46class FiniteElement;
47namespace hp
48{
49 template <int dim, int spacedim>
50 class MappingCollection;
51 template <int dim, int spacedim>
52 class FECollection;
53} // namespace hp
54template <typename MeshType>
56class InterGridMap;
57template <int dim, int spacedim>
58class Mapping;
59template <int dim, class T>
60class Table;
61template <typename Number>
62class Vector;
63
64namespace GridTools
65{
66 template <typename CellIterator>
67 struct PeriodicFacePair;
68}
69
70namespace DoFTools
71{
72 namespace internal
73 {
74 /*
75 * Default value of the face_has_flux_coupling parameter of
76 * make_flux_sparsity_pattern. Defined here (instead of using a default
77 * lambda in the parameter list) to avoid a bug in gcc where the same lambda
78 * gets defined multiple times.
79 */
80 template <int dim, int spacedim>
81 inline bool
82 always_couple_on_faces(
84 const unsigned int)
85 {
86 return true;
87 }
88 } // namespace internal
89} // namespace DoFTools
90
91#endif
92
224namespace DoFTools
225{
256
269 template <int dim, int spacedim>
270 void
272 const Table<2, Coupling> &table_by_component,
273 std::vector<Table<2, Coupling>> &tables_by_block);
274
280 template <int dim, int spacedim>
284 const Table<2, Coupling> &component_couplings);
285
293 template <int dim, int spacedim>
294 std::vector<Table<2, Coupling>>
297 const Table<2, Coupling> &component_couplings);
421 template <int dim, int spacedim, typename number = double>
422 void
424 const DoFHandler<dim, spacedim> &dof_handler,
425 SparsityPatternBase &sparsity_pattern,
426 const AffineConstraints<number> &constraints = {},
427 const bool keep_constrained_dofs = true,
429
495 template <int dim, int spacedim, typename number = double>
496 void
498 const DoFHandler<dim, spacedim> &dof_handler,
499 const Table<2, Coupling> &coupling,
500 SparsityPatternBase &sparsity_pattern,
501 const AffineConstraints<number> &constraints = {},
502 const bool keep_constrained_dofs = true,
504
525 template <int dim, int spacedim>
526 void
528 const DoFHandler<dim, spacedim> &dof_col,
529 SparsityPatternBase &sparsity);
530
576 template <int dim, int spacedim>
577 void
579 SparsityPatternBase &sparsity_pattern);
580
589 template <int dim, int spacedim, typename number>
590 void
592 const DoFHandler<dim, spacedim> &dof_handler,
593 SparsityPatternBase &sparsity_pattern,
594 const AffineConstraints<number> &constraints,
595 const bool keep_constrained_dofs = true,
597
598
618 template <int dim, int spacedim>
619 void
621 const DoFHandler<dim, spacedim> &dof,
622 SparsityPatternBase &sparsity,
623 const Table<2, Coupling> &cell_integrals_mask,
624 const Table<2, Coupling> &face_integrals_mask,
626
627
654 template <int dim, int spacedim, typename number>
655 void
657 const DoFHandler<dim, spacedim> &dof,
658 SparsityPatternBase &sparsity,
659 const AffineConstraints<number> &constraints,
660 const bool keep_constrained_dofs,
661 const Table<2, Coupling> &couplings,
662 const Table<2, Coupling> &face_couplings,
663 const types::subdomain_id subdomain_id,
664 const std::function<
666 const unsigned int)> &face_has_flux_coupling =
667 &internal::always_couple_on_faces<dim, spacedim>);
668
678 template <int dim, int spacedim>
679 void
681 const DoFHandler<dim, spacedim> &dof,
682 const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
683 SparsityPatternBase &sparsity_pattern);
684
702 template <int dim, int spacedim, typename number>
703 void
705 const DoFHandler<dim, spacedim> &dof,
706 const std::map<types::boundary_id, const Function<spacedim, number> *>
707 &boundary_ids,
708 const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
709 SparsityPatternBase &sparsity);
710
758 template <int dim, int spacedim, typename number>
759 void
761 AffineConstraints<number> &constraints);
762
830 template <int dim, int spacedim>
831 void
833 const DoFHandler<dim, spacedim> &coarse_grid,
834 const unsigned int coarse_component,
835 const DoFHandler<dim, spacedim> &fine_grid,
836 const unsigned int fine_component,
837 const InterGridMap<DoFHandler<dim, spacedim>> &coarse_to_fine_grid_map,
838 AffineConstraints<double> &constraints);
839
840
857 template <int dim, int spacedim>
858 void
860 const DoFHandler<dim, spacedim> &coarse_grid,
861 const unsigned int coarse_component,
862 const DoFHandler<dim, spacedim> &fine_grid,
863 const unsigned int fine_component,
864 const InterGridMap<DoFHandler<dim, spacedim>> &coarse_to_fine_grid_map,
865 std::vector<std::map<types::global_dof_index, float>>
866 &transfer_representation);
867
1042 template <typename FaceIterator, typename number>
1043 void
1045 const FaceIterator &face_1,
1047 AffineConstraints<number> &constraints,
1048 const ComponentMask &component_mask = {},
1049 const bool face_orientation = true,
1050 const bool face_flip = false,
1051 const bool face_rotation = false,
1053 const std::vector<unsigned int> &first_vector_components =
1054 std::vector<unsigned int>(),
1055 const number periodicity_factor = 1.);
1056
1057
1077 template <int dim, int spacedim, typename number>
1078 void
1080 const std::vector<GridTools::PeriodicFacePair<
1081 typename DoFHandler<dim, spacedim>::cell_iterator>> &periodic_faces,
1082 AffineConstraints<number> &constraints,
1083 const ComponentMask &component_mask = {},
1084 const std::vector<unsigned int> &first_vector_components =
1085 std::vector<unsigned int>(),
1086 const number periodicity_factor = 1.);
1087
1088
1089
1119 template <int dim, int spacedim, typename number>
1120 void
1122 const types::boundary_id b_id1,
1123 const types::boundary_id b_id2,
1124 const unsigned int direction,
1125 AffineConstraints<number> &constraints,
1126 const ComponentMask &component_mask = {},
1127 const number periodicity_factor = 1.);
1128
1129
1130
1156 template <int dim, int spacedim, typename number>
1157 void
1159 const types::boundary_id b_id,
1160 const unsigned int direction,
1161 AffineConstraints<number> &constraints,
1162 const ComponentMask &component_mask = {},
1163 const number periodicity_factor = 1.);
1164
1165 namespace internal
1166 {
1193 template <typename FaceIterator, typename number>
1194 void
1196 const FaceIterator &face_1,
1198 const FullMatrix<double> &transformation,
1199 AffineConstraints<number> &affine_constraints,
1200 const ComponentMask &component_mask,
1201 const bool face_orientation,
1202 const bool face_flip,
1203 const bool face_rotation,
1204 const number periodicity_factor,
1205 const unsigned int level = numbers::invalid_unsigned_int);
1206 } // namespace internal
1207
1225 template <int dim, int spacedim>
1226 IndexSet
1228
1261 template <int dim, int spacedim>
1262 IndexSet
1263 extract_dofs(const DoFHandler<dim, spacedim> &dof_handler,
1264 const ComponentMask &component_mask);
1265
1289 template <int dim, int spacedim>
1290 IndexSet
1291 extract_dofs(const DoFHandler<dim, spacedim> &dof_handler,
1292 const BlockMask &block_mask);
1293
1298 template <int dim, int spacedim>
1299 void
1300 extract_level_dofs(const unsigned int level,
1301 const DoFHandler<dim, spacedim> &dof,
1302 const ComponentMask &component_mask,
1303 std::vector<bool> &selected_dofs);
1304
1309 template <int dim, int spacedim>
1310 void
1311 extract_level_dofs(const unsigned int level,
1312 const DoFHandler<dim, spacedim> &dof,
1313 const BlockMask &component_mask,
1314 std::vector<bool> &selected_dofs);
1315
1358 template <int dim, int spacedim>
1359 IndexSet
1361 const ComponentMask &component_mask = {},
1362 const std::set<types::boundary_id> &boundary_ids = {});
1363
1380 template <int dim, int spacedim>
1381 void
1383 const DoFHandler<dim, spacedim> &dof_handler,
1384 const ComponentMask &component_mask,
1385 std::vector<bool> &selected_dofs,
1386 const std::set<types::boundary_id> &boundary_ids =
1387 std::set<types::boundary_id>());
1388
1416 template <int dim, int spacedim, typename number = double>
1417 IndexSet
1419 const DoFHandler<dim, spacedim> &dof_handler,
1420 const std::function<
1422 &predicate,
1423 const AffineConstraints<number> &constraints = {});
1424
1460 template <int dim, int spacedim>
1461 void
1463 const ComponentMask &component_mask,
1464 std::vector<std::vector<bool>> &constant_modes);
1551 template <int dim, int spacedim>
1552 std::map<typename DoFHandler<dim - 1, spacedim>::active_cell_iterator,
1553 std::pair<typename DoFHandler<dim, spacedim>::active_cell_iterator,
1554 unsigned int>>
1558 &c1_to_c0,
1559 const DoFHandler<dim, spacedim> &c0_dh,
1560 const DoFHandler<dim - 1, spacedim> &c1_dh);
1561
1579 template <int dim, int spacedim>
1580 void
1582 const types::subdomain_id subdomain_id,
1583 std::vector<bool> &selected_dofs);
1584
1599 template <int dim, int spacedim>
1600 IndexSet
1602
1619 template <int dim, int spacedim>
1620 DEAL_II_DEPRECATED_EARLY void
1622 IndexSet &dof_set);
1623
1630 template <int dim, int spacedim>
1631 IndexSet
1633 const DoFHandler<dim, spacedim> &dof_handler,
1634 const unsigned int level);
1635
1644 template <int dim, int spacedim>
1645 DEAL_II_DEPRECATED_EARLY void
1647 const DoFHandler<dim, spacedim> &dof_handler,
1648 IndexSet &dof_set,
1649 const unsigned int level);
1650
1660 template <int dim, int spacedim>
1661 IndexSet
1663
1674 template <int dim, int spacedim>
1675 DEAL_II_DEPRECATED_EARLY void
1677 IndexSet &dof_set);
1678
1688 template <int dim, int spacedim>
1689 std::vector<IndexSet>
1691 const ComponentMask &components = {});
1692
1706 template <int dim, int spacedim>
1707 std::vector<IndexSet>
1709 const DoFHandler<dim, spacedim> &dof_handler);
1710
1725 template <int dim, int spacedim>
1726 std::vector<IndexSet>
1728 const DoFHandler<dim, spacedim> &dof_handler);
1729
1734 template <int dim, int spacedim>
1735 IndexSet
1737 const DoFHandler<dim, spacedim> &dof_handler,
1738 const unsigned int level);
1739
1746 template <int dim, int spacedim>
1747 DEAL_II_DEPRECATED_EARLY void
1749 const DoFHandler<dim, spacedim> &dof_handler,
1750 const unsigned int level,
1751 IndexSet &dof_set);
1752
1753
1784 template <int dim, int spacedim>
1785 void
1787 std::vector<types::subdomain_id> &subdomain);
1788
1814 template <int dim, int spacedim>
1815 unsigned int
1817 const DoFHandler<dim, spacedim> &dof_handler,
1818 const types::subdomain_id subdomain);
1819
1839 template <int dim, int spacedim>
1840 void
1842 const DoFHandler<dim, spacedim> &dof_handler,
1843 const types::subdomain_id subdomain,
1844 std::vector<unsigned int> &n_dofs_on_subdomain);
1845
1867 template <int dim, int spacedim>
1868 IndexSet
1870 const DoFHandler<dim, spacedim> &dof_handler,
1871 const types::subdomain_id subdomain);
1928 template <int dim, int spacedim>
1929 std::vector<types::global_dof_index>
1931 const std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
1932 &patch);
1933
1954 template <int dim, int spacedim>
1955 void
1957 const DoFHandler<dim, spacedim> &dof_handler,
1958 const unsigned int level,
1959 const std::vector<bool> &selected_dofs = {},
1960 const types::global_dof_index offset = 0);
1961
2013 template <int dim, int spacedim>
2014 std::vector<unsigned int>
2016 const DoFHandler<dim, spacedim> &dof_handler,
2017 const unsigned int level,
2018 const bool interior_dofs_only,
2019 const bool boundary_patches = false,
2020 const bool level_boundary_patches = false,
2021 const bool single_cell_patches = false,
2022 const bool invert_vertex_mapping = false);
2023
2038 template <int dim, int spacedim>
2039 std::vector<unsigned int>
2041 const DoFHandler<dim, spacedim> &dof_handler,
2042 const unsigned int level,
2043 const BlockMask &exclude_boundary_dofs = BlockMask(),
2044 const bool boundary_patches = false,
2045 const bool level_boundary_patches = false,
2046 const bool single_cell_patches = false,
2047 const bool invert_vertex_mapping = false);
2048
2086 template <int dim, int spacedim>
2087 void
2089 const DoFHandler<dim, spacedim> &dof_handler,
2090 const unsigned int level,
2091 const bool interior_dofs_only,
2092 const bool boundary_dofs = false);
2093
2113 template <int dim, int spacedim>
2114 void
2116 const DoFHandler<dim, spacedim> &dof_handler,
2117 const unsigned int level,
2118 const bool interior_dofs_only = false);
2119
2162 template <int dim, int spacedim>
2163 std::vector<types::global_dof_index>
2165 const DoFHandler<dim, spacedim> &dof_handler,
2166 const bool vector_valued_once = false,
2167 const std::vector<unsigned int> &target_component = {});
2168
2185 template <int dim, int spacedim>
2186 std::vector<types::global_dof_index>
2188 const std::vector<unsigned int> &target_block =
2189 std::vector<unsigned int>());
2190
2206 template <int dim, int spacedim>
2209 std::vector<unsigned int> &active_fe_indices);
2210
2238 template <int dim, int spacedim>
2239 unsigned int
2241 const std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
2242 &patch);
2243
2266 template <int dim, int spacedim>
2267 void
2269 std::vector<types::global_dof_index> &mapping);
2270
2281 template <int dim, int spacedim>
2282 void
2284 const std::set<types::boundary_id> &boundary_ids,
2285 std::vector<types::global_dof_index> &mapping);
2286
2315 template <int dim, int spacedim>
2316 void
2318 const DoFHandler<dim, spacedim> &dof_handler,
2319 std::vector<Point<spacedim>> &support_points,
2320 const ComponentMask &mask = {});
2321
2325 template <int dim, int spacedim>
2326 void
2329 const DoFHandler<dim, spacedim> &dof_handler,
2330 std::vector<Point<spacedim>> &support_points,
2331 const ComponentMask &mask = {});
2332
2362 template <int dim, int spacedim>
2363 std::map<types::global_dof_index, Point<spacedim>>
2365 const DoFHandler<dim, spacedim> &dof_handler,
2366 const ComponentMask &mask = {});
2367
2371 template <int dim, int spacedim>
2372 std::map<types::global_dof_index, Point<spacedim>>
2375 const DoFHandler<dim, spacedim> &dof_handler,
2376 const ComponentMask &mask = {});
2377
2383 template <int dim, int spacedim>
2386 const Mapping<dim, spacedim> &mapping,
2387 const DoFHandler<dim, spacedim> &dof_handler,
2388 std::map<types::global_dof_index, Point<spacedim>> &support_points,
2389 const ComponentMask &mask = {});
2390
2396 template <int dim, int spacedim>
2400 const DoFHandler<dim, spacedim> &dof_handler,
2401 std::map<types::global_dof_index, Point<spacedim>> &support_points,
2402 const ComponentMask &mask = {});
2403
2404
2425 template <int dim, int spacedim, class Comp>
2426 void
2428 const Mapping<dim, spacedim> &mapping,
2429 const DoFHandler<dim, spacedim> &dof_handler,
2431 &point_to_index_map);
2469 template <int dim, int spacedim, typename Number>
2470 void
2472 const Vector<Number> &cell_data,
2473 Vector<double> &dof_data,
2474 const unsigned int component = 0);
2475
2476
2554 template <int spacedim>
2555 void
2557 std::ostream &out,
2558 const std::map<types::global_dof_index, Point<spacedim>> &support_points);
2559
2560
2601 template <int dim, int spacedim, typename number>
2602 void
2604 const DoFHandler<dim, spacedim> &dof,
2605 const types::boundary_id boundary_id,
2606 AffineConstraints<number> &zero_boundary_constraints,
2607 const ComponentMask &component_mask = {});
2608
2619 template <int dim, int spacedim, typename number>
2620 void
2622 const DoFHandler<dim, spacedim> &dof,
2623 AffineConstraints<number> &zero_boundary_constraints,
2624 const ComponentMask &component_mask = {});
2625
2670} // namespace DoFTools
2671
2672
2673
2674/* ------------------------- inline functions -------------- */
2675
2676#ifndef DOXYGEN
2677
2678namespace DoFTools
2679{
2685 inline Coupling
2686 operator|=(Coupling &c1, const Coupling c2)
2687 {
2688 if (c2 == always)
2689 c1 = always;
2690 else if (c1 != always && c2 == nonzero)
2691 return c1 = nonzero;
2692 return c1;
2693 }
2694
2695
2701 inline Coupling
2702 operator|(const Coupling c1, const Coupling c2)
2703 {
2704 if (c1 == always || c2 == always)
2705 return always;
2706 if (c1 == nonzero || c2 == nonzero)
2707 return nonzero;
2708 return none;
2709 }
2710
2711
2712 // ---------------------- inline and template functions --------------------
2713
2714 template <int dim, int spacedim, class Comp>
2715 void
2717 const Mapping<dim, spacedim> &mapping,
2718 const DoFHandler<dim, spacedim> &dof_handler,
2720 &point_to_index_map)
2721 {
2722 // let the checking of arguments be
2723 // done by the function first
2724 // called
2725 std::vector<Point<spacedim>> support_points(dof_handler.n_dofs());
2726 map_dofs_to_support_points(mapping, dof_handler, support_points);
2727 // now copy over the results of the
2728 // previous function into the
2729 // output arg
2730 point_to_index_map.clear();
2731 for (types::global_dof_index i = 0; i < dof_handler.n_dofs(); ++i)
2732 point_to_index_map[support_points[i]] = i;
2733 }
2734} // namespace DoFTools
2735
2736#endif
2737
2739
2740#endif
types::global_dof_index n_dofs() const
Abstract base class for mapping classes.
Definition mapping.h:316
Definition point.h:111
#define DEAL_II_DEPRECATED
Definition config.h:207
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:502
#define DEAL_II_CXX20_REQUIRES(condition)
Definition config.h:177
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:503
unsigned int level
Definition grid_out.cc:4616
#define DeclException0(Exception0)
Definition exceptions.h:471
static ::ExceptionBase & ExcGridNotCoarser()
static ::ExceptionBase & ExcInvalidBoundaryIndicator()
static ::ExceptionBase & ExcFiniteElementsDontMatch()
static ::ExceptionBase & ExcNoFESelected()
static ::ExceptionBase & ExcGridsDontMatch()
typename ActiveSelector::cell_iterator cell_iterator
TriaIterator< TriaAccessor< dim - 1, dim, spacedim > > face_iterator
Definition tria.h:1609
typename ActiveSelector::active_cell_iterator active_cell_iterator
void compute_intergrid_transfer_representation(const DoFHandler< dim, spacedim > &coarse_grid, const unsigned int coarse_component, const DoFHandler< dim, spacedim > &fine_grid, const unsigned int fine_component, const InterGridMap< DoFHandler< dim, spacedim > > &coarse_to_fine_grid_map, std::vector< std::map< types::global_dof_index, float > > &transfer_representation)
void make_hanging_node_constraints(const DoFHandler< dim, spacedim > &dof_handler, AffineConstraints< number > &constraints)
void make_sparsity_pattern(const DoFHandler< dim, spacedim > &dof_handler, SparsityPatternBase &sparsity_pattern, const AffineConstraints< number > &constraints={}, const bool keep_constrained_dofs=true, const types::subdomain_id subdomain_id=numbers::invalid_subdomain_id)
void compute_intergrid_constraints(const DoFHandler< dim, spacedim > &coarse_grid, const unsigned int coarse_component, const DoFHandler< dim, spacedim > &fine_grid, const unsigned int fine_component, const InterGridMap< DoFHandler< dim, spacedim > > &coarse_to_fine_grid_map, AffineConstraints< double > &constraints)
void make_zero_boundary_constraints(const DoFHandler< dim, spacedim > &dof, const types::boundary_id boundary_id, AffineConstraints< number > &zero_boundary_constraints, const ComponentMask &component_mask={})
void make_flux_sparsity_pattern(const DoFHandler< dim, spacedim > &dof_handler, SparsityPatternBase &sparsity_pattern)
void make_boundary_sparsity_pattern(const DoFHandler< dim, spacedim > &dof, const std::vector< types::global_dof_index > &dof_to_boundary_mapping, SparsityPatternBase &sparsity_pattern)
UpdateFlags & operator|=(UpdateFlags &f1, const UpdateFlags f2)
void set_periodicity_constraints(const FaceIterator &face_1, const std_cxx20::type_identity_t< FaceIterator > &face_2, const FullMatrix< double > &transformation, AffineConstraints< number > &affine_constraints, const ComponentMask &component_mask, const bool face_orientation, const bool face_flip, const bool face_rotation, const number periodicity_factor, const unsigned int level=numbers::invalid_unsigned_int)
void get_subdomain_association(const DoFHandler< dim, spacedim > &dof_handler, std::vector< types::subdomain_id > &subdomain)
IndexSet dof_indices_with_subdomain_association(const DoFHandler< dim, spacedim > &dof_handler, const types::subdomain_id subdomain)
IndexSet extract_dofs_with_support_contained_within(const DoFHandler< dim, spacedim > &dof_handler, const std::function< bool(const typename DoFHandler< dim, spacedim >::active_cell_iterator &)> &predicate, const AffineConstraints< number > &constraints={})
Definition dof_tools.cc:795
std::vector< IndexSet > locally_owned_dofs_per_subdomain(const DoFHandler< dim, spacedim > &dof_handler)
IndexSet extract_boundary_dofs(const DoFHandler< dim, spacedim > &dof_handler, const ComponentMask &component_mask={}, const std::set< types::boundary_id > &boundary_ids={})
Definition dof_tools.cc:585
IndexSet extract_locally_relevant_dofs(const DoFHandler< dim, spacedim > &dof_handler)
void map_support_points_to_dofs(const Mapping< dim, spacedim > &mapping, const DoFHandler< dim, spacedim > &dof_handler, std::map< Point< spacedim >, types::global_dof_index, Comp > &point_to_index_map)
std::map< typename DoFHandler< dim - 1, spacedim >::active_cell_iterator, std::pair< typename DoFHandler< dim, spacedim >::active_cell_iterator, unsigned int > > map_boundary_to_bulk_dof_iterators(const std::map< typename Triangulation< dim - 1, spacedim >::cell_iterator, typename Triangulation< dim, spacedim >::face_iterator > &c1_to_c0, const DoFHandler< dim, spacedim > &c0_dh, const DoFHandler< dim - 1, spacedim > &c1_dh)
void get_active_fe_indices(const DoFHandler< dim, spacedim > &dof_handler, std::vector< unsigned int > &active_fe_indices)
void make_cell_patches(SparsityPattern &block_list, const DoFHandler< dim, spacedim > &dof_handler, const unsigned int level, const std::vector< bool > &selected_dofs={}, const types::global_dof_index offset=0)
IndexSet extract_dofs(const DoFHandler< dim, spacedim > &dof_handler, const ComponentMask &component_mask)
Definition dof_tools.cc:385
IndexSet extract_locally_active_dofs(const DoFHandler< dim, spacedim > &dof_handler)
IndexSet extract_locally_relevant_level_dofs(const DoFHandler< dim, spacedim > &dof_handler, const unsigned int level)
void map_dofs_to_support_points(const Mapping< dim, spacedim > &mapping, const DoFHandler< dim, spacedim > &dof_handler, std::vector< Point< spacedim > > &support_points, const ComponentMask &mask={})
void write_gnuplot_dof_support_point_info(std::ostream &out, const std::map< types::global_dof_index, Point< spacedim > > &support_points)
void extract_subdomain_dofs(const DoFHandler< dim, spacedim > &dof_handler, const types::subdomain_id subdomain_id, std::vector< bool > &selected_dofs)
IndexSet extract_locally_active_level_dofs(const DoFHandler< dim, spacedim > &dof_handler, const unsigned int level)
std::vector< unsigned int > make_vertex_patches(SparsityPattern &block_list, const DoFHandler< dim, spacedim > &dof_handler, const unsigned int level, const bool interior_dofs_only, const bool boundary_patches=false, const bool level_boundary_patches=false, const bool single_cell_patches=false, const bool invert_vertex_mapping=false)
std::vector< types::global_dof_index > count_dofs_per_fe_block(const DoFHandler< dim, spacedim > &dof, const std::vector< unsigned int > &target_block=std::vector< unsigned int >())
void extract_level_dofs(const unsigned int level, const DoFHandler< dim, spacedim > &dof, const ComponentMask &component_mask, std::vector< bool > &selected_dofs)
Definition dof_tools.cc:472
void extract_dofs_with_support_on_boundary(const DoFHandler< dim, spacedim > &dof_handler, const ComponentMask &component_mask, std::vector< bool > &selected_dofs, const std::set< types::boundary_id > &boundary_ids=std::set< types::boundary_id >())
Definition dof_tools.cc:713
void distribute_cell_to_dof_vector(const DoFHandler< dim, spacedim > &dof_handler, const Vector< Number > &cell_data, Vector< double > &dof_data, const unsigned int component=0)
Definition dof_tools.cc:301
std::vector< types::global_dof_index > count_dofs_per_fe_component(const DoFHandler< dim, spacedim > &dof_handler, const bool vector_valued_once=false, const std::vector< unsigned int > &target_component={})
void make_child_patches(SparsityPattern &block_list, const DoFHandler< dim, spacedim > &dof_handler, const unsigned int level, const bool interior_dofs_only, const bool boundary_dofs=false)
void map_dof_to_boundary_indices(const DoFHandler< dim, spacedim > &dof_handler, std::vector< types::global_dof_index > &mapping)
std::vector< IndexSet > locally_relevant_dofs_per_subdomain(const DoFHandler< dim, spacedim > &dof_handler)
void make_single_patch(SparsityPattern &block_list, const DoFHandler< dim, spacedim > &dof_handler, const unsigned int level, const bool interior_dofs_only=false)
std::vector< types::global_dof_index > get_dofs_on_patch(const std::vector< typename DoFHandler< dim, spacedim >::active_cell_iterator > &patch)
std::vector< IndexSet > locally_owned_dofs_per_component(const DoFHandler< dim, spacedim > &dof_handler, const ComponentMask &components={})
Definition dof_tools.cc:438
unsigned int count_dofs_with_subdomain_association(const DoFHandler< dim, spacedim > &dof_handler, const types::subdomain_id subdomain)
unsigned int count_dofs_on_patch(const std::vector< typename DoFHandler< dim, spacedim >::active_cell_iterator > &patch)
void convert_couplings_to_blocks(const DoFHandler< dim, spacedim > &dof_handler, const Table< 2, Coupling > &table_by_component, std::vector< Table< 2, Coupling > > &tables_by_block)
void extract_constant_modes(const DoFHandler< dim, spacedim > &dof_handler, const ComponentMask &component_mask, std::vector< std::vector< bool > > &constant_modes)
Table< 2, Coupling > dof_couplings_from_component_couplings(const FiniteElement< dim, spacedim > &fe, const Table< 2, Coupling > &component_couplings)
IndexSet extract_hanging_node_dofs(const DoFHandler< dim, spacedim > &dof_handler)
void make_periodicity_constraints(const FaceIterator &face_1, const std_cxx20::type_identity_t< FaceIterator > &face_2, AffineConstraints< number > &constraints, const ComponentMask &component_mask={}, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false, const FullMatrix< double > &matrix=FullMatrix< double >(), const std::vector< unsigned int > &first_vector_components=std::vector< unsigned int >(), const number periodicity_factor=1.)
@ matrix
Contents is actually a matrix.
Definition hp.h:117
const types::subdomain_id invalid_subdomain_id
Definition types.h:341
static const unsigned int invalid_unsigned_int
Definition types.h:220
typename type_identity< T >::type type_identity_t
Definition type_traits.h:95
unsigned int subdomain_id
Definition types.h:43
ParameterHandler::OutputStyle operator|(const ParameterHandler::OutputStyle f1, const ParameterHandler::OutputStyle f2)