Reference documentation for deal.II version 9.3.3
\(\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\}}\)
dof_tools.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 1999 - 2021 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_tools_h
17#define dealii_dof_tools_h
18
19
20#include <deal.II/base/config.h>
21
24#include <deal.II/base/point.h>
25
27
29
31
33
34#include <map>
35#include <ostream>
36#include <set>
37#include <vector>
38
39
41
42// Forward declarations
43#ifndef DOXYGEN
44class BlockMask;
45template <int dim, typename RangeNumberType>
46class Function;
47template <int dim, int spacedim>
48class FiniteElement;
49namespace hp
50{
51 template <int dim, int spacedim>
52 class MappingCollection;
53 template <int dim, int spacedim>
54 class FECollection;
55} // namespace hp
56template <class MeshType>
57class InterGridMap;
58template <int dim, int spacedim>
59class Mapping;
60class SparsityPattern;
61template <int dim, class T>
62class Table;
63template <typename Number>
64class Vector;
65
66namespace GridTools
67{
68 template <typename CellIterator>
69 struct PeriodicFacePair;
70}
71
72namespace DoFTools
73{
74 namespace internal
75 {
76 /*
77 * Default value of the face_has_flux_coupling parameter of
78 * make_flux_sparsity_pattern. Defined here (instead of using a default
79 * lambda in the parameter list) to avoid a bug in gcc where the same lambda
80 * gets defined multiple times.
81 */
82 template <int dim, int spacedim>
83 inline bool
84 always_couple_on_faces(
86 const unsigned int)
87 {
88 return true;
89 }
90 } // namespace internal
91} // namespace DoFTools
92
93#endif
94
213namespace DoFTools
214{
227 {
243 nonzero
244 };
245
258 template <int dim, int spacedim>
259 void
261 const Table<2, Coupling> &table_by_component,
262 std::vector<Table<2, Coupling>> &tables_by_block);
263
269 template <int dim, int spacedim>
273 const Table<2, Coupling> & component_couplings);
274
282 template <int dim, int spacedim>
283 std::vector<Table<2, Coupling>>
286 const Table<2, Coupling> & component_couplings);
412 template <int dim,
413 int spacedim,
414 typename SparsityPatternType,
415 typename number = double>
416 void
418 const DoFHandler<dim, spacedim> &dof_handler,
419 SparsityPatternType & sparsity_pattern,
421 const bool keep_constrained_dofs = true,
423
489 template <int dim,
490 int spacedim,
491 typename SparsityPatternType,
492 typename number = double>
493 void
495 const DoFHandler<dim, spacedim> &dof_handler,
496 const Table<2, Coupling> & coupling,
497 SparsityPatternType & sparsity_pattern,
499 const bool keep_constrained_dofs = true,
501
522 template <int dim, int spacedim, typename SparsityPatternType>
523 void
525 const DoFHandler<dim, spacedim> &dof_col,
526 SparsityPatternType & sparsity);
527
573 template <int dim, int spacedim, typename SparsityPatternType>
574 void
576 SparsityPatternType & sparsity_pattern);
577
586 template <int dim,
587 int spacedim,
588 typename SparsityPatternType,
589 typename number>
590 void
592 const DoFHandler<dim, spacedim> &dof_handler,
593 SparsityPatternType & sparsity_pattern,
594 const AffineConstraints<number> &constraints,
595 const bool keep_constrained_dofs = true,
597
598
618 template <int dim, int spacedim, typename SparsityPatternType>
619 void
621 const DoFHandler<dim, spacedim> &dof,
622 SparsityPatternType & sparsity,
623 const Table<2, Coupling> & cell_integrals_mask,
624 const Table<2, Coupling> & face_integrals_mask,
626
627
654 template <int dim,
655 int spacedim,
656 typename SparsityPatternType,
657 typename number>
658 void
660 const DoFHandler<dim, spacedim> &dof,
661 SparsityPatternType & sparsity,
662 const AffineConstraints<number> &constraints,
663 const bool keep_constrained_dofs,
664 const Table<2, Coupling> & couplings,
665 const Table<2, Coupling> & face_couplings,
667 const std::function<
669 const unsigned int)> &face_has_flux_coupling =
670 &internal::always_couple_on_faces<dim, spacedim>);
671
681 template <int dim, int spacedim, typename SparsityPatternType>
682 void
684 const DoFHandler<dim, spacedim> & dof,
685 const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
686 SparsityPatternType & sparsity_pattern);
687
705 template <int dim,
706 int spacedim,
707 typename SparsityPatternType,
708 typename number>
709 void
711 const DoFHandler<dim, spacedim> &dof,
712 const std::map<types::boundary_id, const Function<spacedim, number> *>
713 & boundary_ids,
714 const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
715 SparsityPatternType & sparsity);
716
764 template <int dim, int spacedim, typename number>
765 void
767 AffineConstraints<number> & constraints);
768
836 template <int dim, int spacedim>
837 void
839 const DoFHandler<dim, spacedim> & coarse_grid,
840 const unsigned int coarse_component,
841 const DoFHandler<dim, spacedim> & fine_grid,
842 const unsigned int fine_component,
843 const InterGridMap<DoFHandler<dim, spacedim>> &coarse_to_fine_grid_map,
844 AffineConstraints<double> & constraints);
845
846
863 template <int dim, int spacedim>
864 void
866 const DoFHandler<dim, spacedim> & coarse_grid,
867 const unsigned int coarse_component,
868 const DoFHandler<dim, spacedim> & fine_grid,
869 const unsigned int fine_component,
870 const InterGridMap<DoFHandler<dim, spacedim>> &coarse_to_fine_grid_map,
871 std::vector<std::map<types::global_dof_index, float>>
872 &transfer_representation);
873
1048 template <typename FaceIterator, typename number>
1049 void
1051 const FaceIterator & face_1,
1052 const typename identity<FaceIterator>::type &face_2,
1053 AffineConstraints<number> & constraints,
1054 const ComponentMask & component_mask = ComponentMask(),
1055 const bool face_orientation = true,
1056 const bool face_flip = false,
1057 const bool face_rotation = false,
1059 const std::vector<unsigned int> &first_vector_components =
1060 std::vector<unsigned int>(),
1061 const number periodicity_factor = 1.);
1062
1063
1064
1084 template <int dim, int spacedim, typename number>
1085 void
1087 const std::vector<GridTools::PeriodicFacePair<
1088 typename DoFHandler<dim, spacedim>::cell_iterator>> &periodic_faces,
1089 AffineConstraints<number> & constraints,
1090 const ComponentMask & component_mask = ComponentMask(),
1091 const std::vector<unsigned int> &first_vector_components =
1092 std::vector<unsigned int>(),
1093 const number periodicity_factor = 1.);
1094
1101 template <typename DoFHandlerType, typename number>
1104 const std::vector<
1106 & periodic_faces,
1107 AffineConstraints<number> & constraints,
1108 const ComponentMask & component_mask = ComponentMask(),
1109 const std::vector<unsigned int> &first_vector_components =
1110 std::vector<unsigned int>(),
1111 const number periodicity_factor = 1.);
1112
1113
1114
1144 template <int dim, int spacedim, typename number>
1145 void
1147 const DoFHandler<dim, spacedim> &dof_handler,
1148 const types::boundary_id b_id1,
1149 const types::boundary_id b_id2,
1150 const unsigned int direction,
1151 AffineConstraints<number> & constraints,
1152 const ComponentMask & component_mask = ComponentMask(),
1153 const number periodicity_factor = 1.);
1154
1155
1156
1182 template <int dim, int spacedim, typename number>
1183 void
1185 const DoFHandler<dim, spacedim> &dof_handler,
1186 const types::boundary_id b_id,
1187 const unsigned int direction,
1188 AffineConstraints<number> & constraints,
1189 const ComponentMask & component_mask = ComponentMask(),
1190 const number periodicity_factor = 1.);
1191
1219 template <int dim, int spacedim>
1222 std::vector<bool> & selected_dofs);
1223
1228 template <int dim, int spacedim>
1229 IndexSet
1231
1274 template <int dim, int spacedim>
1276 extract_dofs(const DoFHandler<dim, spacedim> &dof_handler,
1277 const ComponentMask & component_mask,
1278 std::vector<bool> & selected_dofs);
1279
1312 template <int dim, int spacedim>
1313 IndexSet
1314 extract_dofs(const DoFHandler<dim, spacedim> &dof_handler,
1315 const ComponentMask & component_mask);
1316
1347 template <int dim, int spacedim>
1349 extract_dofs(const DoFHandler<dim, spacedim> &dof_handler,
1350 const BlockMask & block_mask,
1351 std::vector<bool> & selected_dofs);
1352
1376 template <int dim, int spacedim>
1377 IndexSet
1378 extract_dofs(const DoFHandler<dim, spacedim> &dof_handler,
1379 const BlockMask & block_mask);
1380
1385 template <int dim, int spacedim>
1386 void
1387 extract_level_dofs(const unsigned int level,
1388 const DoFHandler<dim, spacedim> &dof,
1389 const ComponentMask & component_mask,
1390 std::vector<bool> & selected_dofs);
1391
1396 template <int dim, int spacedim>
1397 void
1398 extract_level_dofs(const unsigned int level,
1399 const DoFHandler<dim, spacedim> &dof,
1400 const BlockMask & component_mask,
1401 std::vector<bool> & selected_dofs);
1402
1457 template <int dim, int spacedim>
1460 const ComponentMask & component_mask,
1461 std::vector<bool> & selected_dofs,
1462 const std::set<types::boundary_id> &boundary_ids = {});
1463
1506 template <int dim, int spacedim>
1507 IndexSet
1509 const ComponentMask &component_mask = ComponentMask(),
1510 const std::set<types::boundary_id> &boundary_ids = {});
1511
1518 template <int dim, int spacedim>
1521 const ComponentMask & component_mask,
1522 IndexSet & selected_dofs,
1523 const std::set<types::boundary_id> &boundary_ids = {});
1524
1541 template <int dim, int spacedim>
1542 void
1544 const DoFHandler<dim, spacedim> & dof_handler,
1545 const ComponentMask & component_mask,
1546 std::vector<bool> & selected_dofs,
1547 const std::set<types::boundary_id> &boundary_ids =
1548 std::set<types::boundary_id>());
1549
1577 template <int dim, int spacedim, typename number = double>
1578 IndexSet
1580 const DoFHandler<dim, spacedim> &dof_handler,
1581 const std::function<
1583 & predicate,
1585
1619 template <int dim, int spacedim>
1620 void
1622 const ComponentMask & component_mask,
1623 std::vector<std::vector<bool>> & constant_modes);
1625
1639 template <int dim, int spacedim>
1640 void
1643 std::vector<bool> & selected_dofs);
1644
1659 template <int dim, int spacedim>
1660 void
1662 IndexSet & dof_set);
1663
1670 template <int dim, int spacedim>
1671 void
1673 const DoFHandler<dim, spacedim> &dof_handler,
1674 IndexSet & dof_set,
1675 const unsigned int level);
1676
1686 template <int dim, int spacedim>
1687 void
1689 IndexSet & dof_set);
1690
1691
1701 template <int dim, int spacedim>
1702 std::vector<IndexSet>
1704 const DoFHandler<dim, spacedim> &dof_handler,
1705 const ComponentMask & components = ComponentMask());
1706
1720 template <int dim, int spacedim>
1721 std::vector<IndexSet>
1723 const DoFHandler<dim, spacedim> &dof_handler);
1724
1739 template <int dim, int spacedim>
1740 std::vector<IndexSet>
1742 const DoFHandler<dim, spacedim> &dof_handler);
1743
1744
1749 template <int dim, int spacedim>
1750 void
1752 const DoFHandler<dim, spacedim> &dof_handler,
1753 const unsigned int level,
1754 IndexSet & dof_set);
1755
1756
1787 template <int dim, int spacedim>
1788 void
1790 std::vector<types::subdomain_id> &subdomain);
1791
1817 template <int dim, int spacedim>
1818 unsigned int
1820 const DoFHandler<dim, spacedim> &dof_handler,
1821 const types::subdomain_id subdomain);
1822
1842 template <int dim, int spacedim>
1843 void
1845 const DoFHandler<dim, spacedim> &dof_handler,
1846 const types::subdomain_id subdomain,
1847 std::vector<unsigned int> & n_dofs_on_subdomain);
1848
1870 template <int dim, int spacedim>
1871 IndexSet
1873 const DoFHandler<dim, spacedim> &dof_handler,
1874 const types::subdomain_id subdomain);
1875 // @}
1885
1930 template <int dim, int spacedim>
1931 std::vector<types::global_dof_index>
1933 const std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
1934 &patch);
1935
1942 template <typename DoFHandlerType>
1943 DEAL_II_DEPRECATED std::vector<types::global_dof_index>
1945 const std::vector<typename DoFHandlerType::active_cell_iterator> &patch);
1946
1967 template <int dim, int spacedim>
1968 void
1970 const DoFHandler<dim, spacedim> &dof_handler,
1971 const unsigned int level,
1972 const std::vector<bool> & selected_dofs = {},
1973 const types::global_dof_index offset = 0);
1974
2026 template <int dim, int spacedim>
2027 std::vector<unsigned int>
2029 const DoFHandler<dim, spacedim> &dof_handler,
2030 const unsigned int level,
2031 const bool interior_dofs_only,
2032 const bool boundary_patches = false,
2033 const bool level_boundary_patches = false,
2034 const bool single_cell_patches = false,
2035 const bool invert_vertex_mapping = false);
2036
2051 template <int dim, int spacedim>
2052 std::vector<unsigned int>
2054 const DoFHandler<dim, spacedim> &dof_handler,
2055 const unsigned int level,
2056 const BlockMask &exclude_boundary_dofs = BlockMask(),
2057 const bool boundary_patches = false,
2058 const bool level_boundary_patches = false,
2059 const bool single_cell_patches = false,
2060 const bool invert_vertex_mapping = false);
2061
2099 template <int dim, int spacedim>
2100 void
2102 const DoFHandler<dim, spacedim> &dof_handler,
2103 const unsigned int level,
2104 const bool interior_dofs_only,
2105 const bool boundary_dofs = false);
2106
2126 template <int dim, int spacedim>
2127 void
2129 const DoFHandler<dim, spacedim> &dof_handler,
2130 const unsigned int level,
2131 const bool interior_dofs_only = false);
2132
2175 template <int dim, int spacedim>
2176 std::vector<types::global_dof_index>
2178 const DoFHandler<dim, spacedim> &dof_handler,
2179 const bool vector_valued_once = false,
2180 const std::vector<unsigned int> &target_component = {});
2181
2186 template <int dim, int spacedim>
2189 const DoFHandler<dim, spacedim> & dof_handler,
2190 std::vector<types::global_dof_index> &dofs_per_component,
2191 const bool vector_valued_once = false,
2192 const std::vector<unsigned int> & target_component = {});
2193
2210 template <int dim, int spacedim>
2211 std::vector<types::global_dof_index>
2213 const std::vector<unsigned int> &target_block =
2214 std::vector<unsigned int>());
2215
2220 template <int dim, int spacedim>
2223 std::vector<types::global_dof_index> &dofs_per_block,
2224 const std::vector<unsigned int> & target_block =
2225 std::vector<unsigned int>());
2226
2236 template <int dim, int spacedim>
2237 void
2239 std::vector<unsigned int> & active_fe_indices);
2240
2268 template <int dim, int spacedim>
2269 unsigned int
2271 const std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
2272 &patch);
2273
2280 template <typename DoFHandlerType>
2281 DEAL_II_DEPRECATED unsigned int
2283 const std::vector<typename DoFHandlerType::active_cell_iterator> &patch);
2284
2307 template <int dim, int spacedim>
2308 void
2310 std::vector<types::global_dof_index> &mapping);
2311
2322 template <int dim, int spacedim>
2323 void
2325 const std::set<types::boundary_id> &boundary_ids,
2326 std::vector<types::global_dof_index> &mapping);
2327
2356 template <int dim, int spacedim>
2357 void
2359 const DoFHandler<dim, spacedim> &dof_handler,
2360 std::vector<Point<spacedim>> & support_points,
2361 const ComponentMask &mask = ComponentMask());
2362
2366 template <int dim, int spacedim>
2367 void
2369 const ::hp::MappingCollection<dim, spacedim> &mapping,
2370 const DoFHandler<dim, spacedim> & dof_handler,
2371 std::vector<Point<spacedim>> & support_points,
2372 const ComponentMask & mask = ComponentMask());
2373
2404 template <int dim, int spacedim>
2405 void
2407 const Mapping<dim, spacedim> & mapping,
2408 const DoFHandler<dim, spacedim> & dof_handler,
2409 std::map<types::global_dof_index, Point<spacedim>> &support_points,
2410 const ComponentMask & mask = ComponentMask());
2411
2415 template <int dim, int spacedim>
2416 void
2418 const ::hp::MappingCollection<dim, spacedim> &mapping,
2419 const DoFHandler<dim, spacedim> & dof_handler,
2420 std::map<types::global_dof_index, Point<spacedim>> &support_points,
2421 const ComponentMask & mask = ComponentMask());
2422
2423
2444 template <int dim, int spacedim, class Comp>
2445 void
2447 const Mapping<dim, spacedim> & mapping,
2448 const DoFHandler<dim, spacedim> &dof_handler,
2450 &point_to_index_map);
2488 template <int dim, int spacedim, typename Number>
2489 void
2491 const Vector<Number> & cell_data,
2492 Vector<double> & dof_data,
2493 const unsigned int component = 0);
2494
2495
2572 template <int spacedim>
2573 void
2575 std::ostream & out,
2576 const std::map<types::global_dof_index, Point<spacedim>> &support_points);
2577
2578
2619 template <int dim, int spacedim, typename number>
2620 void
2622 const DoFHandler<dim, spacedim> &dof,
2624 AffineConstraints<number> & zero_boundary_constraints,
2625 const ComponentMask & component_mask = ComponentMask());
2626
2637 template <int dim, int spacedim, typename number>
2638 void
2640 const DoFHandler<dim, spacedim> &dof,
2641 AffineConstraints<number> & zero_boundary_constraints,
2642 const ComponentMask & component_mask = ComponentMask());
2643
2688} // namespace DoFTools
2689
2690
2691
2692/* ------------------------- inline functions -------------- */
2693
2694#ifndef DOXYGEN
2695
2696namespace DoFTools
2697{
2703 inline Coupling
2704 operator|=(Coupling &c1, const Coupling c2)
2705 {
2706 if (c2 == always)
2707 c1 = always;
2708 else if (c1 != always && c2 == nonzero)
2709 return c1 = nonzero;
2710 return c1;
2711 }
2712
2713
2719 inline Coupling
2720 operator|(const Coupling c1, const Coupling c2)
2721 {
2722 if (c1 == always || c2 == always)
2723 return always;
2724 if (c1 == nonzero || c2 == nonzero)
2725 return nonzero;
2726 return none;
2727 }
2728
2729
2730 // ---------------------- inline and template functions --------------------
2731
2732 template <int dim, int spacedim, class Comp>
2733 void
2735 const Mapping<dim, spacedim> & mapping,
2736 const DoFHandler<dim, spacedim> &dof_handler,
2738 &point_to_index_map)
2739 {
2740 // let the checking of arguments be
2741 // done by the function first
2742 // called
2743 std::vector<Point<spacedim>> support_points(dof_handler.n_dofs());
2744 map_dofs_to_support_points(mapping, dof_handler, support_points);
2745 // now copy over the results of the
2746 // previous function into the
2747 // output arg
2748 point_to_index_map.clear();
2749 for (types::global_dof_index i = 0; i < dof_handler.n_dofs(); ++i)
2750 point_to_index_map[support_points[i]] = i;
2751 }
2752
2753
2754
2755 template <typename DoFHandlerType, typename number>
2756 inline void
2758 const std::vector<
2760 & periodic_faces,
2761 AffineConstraints<number> & constraints,
2762 const ComponentMask & component_mask,
2763 const std::vector<unsigned int> &first_vector_components,
2764 const number periodicity_factor)
2765 {
2766 make_periodicity_constraints<DoFHandlerType::dimension,
2767 DoFHandlerType::space_dimension>(
2768 periodic_faces,
2769 constraints,
2770 component_mask,
2771 first_vector_components,
2772 periodicity_factor);
2773 }
2774
2775
2776
2777 template <typename DoFHandlerType>
2778 inline std::vector<types::global_dof_index>
2780 const std::vector<typename DoFHandlerType::active_cell_iterator> &patch)
2781 {
2782 return get_dofs_on_patch<DoFHandlerType::dimension,
2783 DoFHandlerType::space_dimension>(patch);
2784 }
2785
2786
2787
2788 template <typename DoFHandlerType>
2789 inline unsigned int
2791 const std::vector<typename DoFHandlerType::active_cell_iterator> &patch)
2792 {
2793 return count_dofs_on_patch<DoFHandlerType::dimension,
2794 DoFHandlerType::space_dimension>(patch);
2795 }
2796} // namespace DoFTools
2797
2798#endif
2799
2801
2802#endif
types::global_dof_index n_dofs() const
Abstract base class for mapping classes.
Definition: mapping.h:304
Definition: vector.h:110
#define DEAL_II_DEPRECATED
Definition: config.h:162
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:402
#define DEAL_II_DEPRECATED_EARLY
Definition: config.h:170
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:403
UpdateFlags & operator|=(UpdateFlags &f1, const UpdateFlags f2)
unsigned int level
Definition: grid_out.cc:4590
#define DeclException0(Exception0)
Definition: exceptions.h:470
static ::ExceptionBase & ExcGridNotCoarser()
static ::ExceptionBase & ExcInvalidBoundaryIndicator()
static ::ExceptionBase & ExcFiniteElementsDontMatch()
static ::ExceptionBase & ExcNoFESelected()
static ::ExceptionBase & ExcGridsDontMatch()
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_zero_boundary_constraints(const DoFHandler< dim, spacedim > &dof, const types::boundary_id boundary_id, AffineConstraints< number > &zero_boundary_constraints, const ComponentMask &component_mask=ComponentMask())
void make_hanging_node_constraints(const DoFHandler< dim, spacedim > &dof_handler, AffineConstraints< number > &constraints)
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_flux_sparsity_pattern(const DoFHandler< dim, spacedim > &dof_handler, SparsityPatternType &sparsity_pattern)
void make_boundary_sparsity_pattern(const DoFHandler< dim, spacedim > &dof, const std::vector< types::global_dof_index > &dof_to_boundary_mapping, SparsityPatternType &sparsity_pattern)
void make_sparsity_pattern(const DoFHandler< dim, spacedim > &dof_handler, SparsityPatternType &sparsity_pattern, const AffineConstraints< number > &constraints=AffineConstraints< number >(), const bool keep_constrained_dofs=true, const types::subdomain_id subdomain_id=numbers::invalid_subdomain_id)
void get_subdomain_association(const DoFHandler< dim, spacedim > &dof_handler, std::vector< types::subdomain_id > &subdomain)
Definition: dof_tools.cc:1585
void extract_boundary_dofs(const DoFHandler< dim, spacedim > &dof_handler, const ComponentMask &component_mask, std::vector< bool > &selected_dofs, const std::set< types::boundary_id > &boundary_ids={})
Definition: dof_tools.cc:613
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=AffineConstraints< number >())
Definition: dof_tools.cc:864
IndexSet dof_indices_with_subdomain_association(const DoFHandler< dim, spacedim > &dof_handler, const types::subdomain_id subdomain)
Definition: dof_tools.cc:1698
std::vector< IndexSet > locally_owned_dofs_per_subdomain(const DoFHandler< dim, spacedim > &dof_handler)
Definition: dof_tools.cc:1414
void count_dofs_per_component(const DoFHandler< dim, spacedim > &dof_handler, std::vector< types::global_dof_index > &dofs_per_component, const bool vector_valued_once=false, const std::vector< unsigned int > &target_component={})
Definition: dof_tools.cc:1929
void extract_locally_relevant_level_dofs(const DoFHandler< dim, spacedim > &dof_handler, const unsigned int level, IndexSet &dof_set)
Definition: dof_tools.cc:1252
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=ComponentMask())
Definition: dof_tools.cc:2326
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)
void get_active_fe_indices(const DoFHandler< dim, spacedim > &dof_handler, std::vector< unsigned int > &active_fe_indices)
Definition: dof_tools.cc:1399
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)
Definition: dof_tools.cc:2515
void extract_locally_active_dofs(const DoFHandler< dim, spacedim > &dof_handler, IndexSet &dof_set)
Definition: dof_tools.cc:1139
std::vector< IndexSet > locally_owned_dofs_per_component(const DoFHandler< dim, spacedim > &dof_handler, const ComponentMask &components=ComponentMask())
Definition: dof_tools.cc:506
void write_gnuplot_dof_support_point_info(std::ostream &out, const std::map< types::global_dof_index, Point< spacedim > > &support_points)
Definition: dof_tools.cc:2416
void extract_subdomain_dofs(const DoFHandler< dim, spacedim > &dof_handler, const types::subdomain_id subdomain_id, std::vector< bool > &selected_dofs)
Definition: dof_tools.cc:1105
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)
Definition: dof_tools.cc:2674
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 >())
Definition: dof_tools.cc:2047
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:540
void extract_hanging_node_dofs(const DoFHandler< dim, spacedim > &dof_handler, std::vector< bool > &selected_dofs)
Definition: dof_tools.cc:1079
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:782
void make_periodicity_constraints(const FaceIterator &face_1, const typename identity< FaceIterator >::type &face_2, AffineConstraints< number > &constraints, const ComponentMask &component_mask=ComponentMask(), 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.)
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:306
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={})
Definition: dof_tools.cc:1943
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)
Definition: dof_tools.cc:2606
void map_dof_to_boundary_indices(const DoFHandler< dim, spacedim > &dof_handler, std::vector< types::global_dof_index > &mapping)
Definition: dof_tools.cc:2136
std::vector< IndexSet > locally_relevant_dofs_per_subdomain(const DoFHandler< dim, spacedim > &dof_handler)
Definition: dof_tools.cc:1509
void make_single_patch(SparsityPattern &block_list, const DoFHandler< dim, spacedim > &dof_handler, const unsigned int level, const bool interior_dofs_only=false)
Definition: dof_tools.cc:2561
std::vector< types::global_dof_index > get_dofs_on_patch(const std::vector< typename DoFHandler< dim, spacedim >::active_cell_iterator > &patch)
Definition: dof_tools.cc:2879
void extract_dofs(const DoFHandler< dim, spacedim > &dof_handler, const ComponentMask &component_mask, std::vector< bool > &selected_dofs)
Definition: dof_tools.cc:393
unsigned int count_dofs_with_subdomain_association(const DoFHandler< dim, spacedim > &dof_handler, const types::subdomain_id subdomain)
Definition: dof_tools.cc:1681
void extract_locally_relevant_dofs(const DoFHandler< dim, spacedim > &dof_handler, IndexSet &dof_set)
Definition: dof_tools.cc:1210
unsigned int count_dofs_on_patch(const std::vector< typename DoFHandler< dim, spacedim >::active_cell_iterator > &patch)
Definition: dof_tools.cc:2848
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)
Definition: dof_tools.cc:2462
void extract_constant_modes(const DoFHandler< dim, spacedim > &dof_handler, const ComponentMask &component_mask, std::vector< std::vector< bool > > &constant_modes)
Definition: dof_tools.cc:1304
Table< 2, Coupling > dof_couplings_from_component_couplings(const FiniteElement< dim, spacedim > &fe, const Table< 2, Coupling > &component_couplings)
void count_dofs_per_block(const DoFHandler< dim, spacedim > &dof, std::vector< types::global_dof_index > &dofs_per_block, const std::vector< unsigned int > &target_block=std::vector< unsigned int >())
Definition: dof_tools.cc:2036
void extract_locally_active_level_dofs(const DoFHandler< dim, spacedim > &dof_handler, IndexSet &dof_set, const unsigned int level)
Definition: dof_tools.cc:1174
@ matrix
Contents is actually a matrix.
Definition: hp.h:118
const types::subdomain_id invalid_subdomain_id
Definition: types.h:276
unsigned int global_dof_index
Definition: types.h:76
unsigned int subdomain_id
Definition: types.h:43
unsigned int boundary_id
Definition: types.h:129
ParameterHandler::OutputStyle operator|(const ParameterHandler::OutputStyle f1, const ParameterHandler::OutputStyle f2)