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_tools.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 1999 - 2024 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
225namespace DoFTools
226{
257
270 template <int dim, int spacedim>
271 void
273 const Table<2, Coupling> &table_by_component,
274 std::vector<Table<2, Coupling>> &tables_by_block);
275
281 template <int dim, int spacedim>
285 const Table<2, Coupling> &component_couplings);
286
294 template <int dim, int spacedim>
295 std::vector<Table<2, Coupling>>
298 const Table<2, Coupling> &component_couplings);
422 template <int dim, int spacedim, typename number = double>
423 void
425 const DoFHandler<dim, spacedim> &dof_handler,
426 SparsityPatternBase &sparsity_pattern,
427 const AffineConstraints<number> &constraints = {},
428 const bool keep_constrained_dofs = true,
430
496 template <int dim, int spacedim, typename number = double>
497 void
499 const DoFHandler<dim, spacedim> &dof_handler,
500 const Table<2, Coupling> &coupling,
501 SparsityPatternBase &sparsity_pattern,
502 const AffineConstraints<number> &constraints = {},
503 const bool keep_constrained_dofs = true,
505
526 template <int dim, int spacedim>
527 void
529 const DoFHandler<dim, spacedim> &dof_col,
530 SparsityPatternBase &sparsity);
531
577 template <int dim, int spacedim>
578 void
580 SparsityPatternBase &sparsity_pattern);
581
590 template <int dim, int spacedim, typename number>
591 void
593 const DoFHandler<dim, spacedim> &dof_handler,
594 SparsityPatternBase &sparsity_pattern,
595 const AffineConstraints<number> &constraints,
596 const bool keep_constrained_dofs = true,
598
599
619 template <int dim, int spacedim>
620 void
622 const DoFHandler<dim, spacedim> &dof,
623 SparsityPatternBase &sparsity,
624 const Table<2, Coupling> &cell_integrals_mask,
625 const Table<2, Coupling> &face_integrals_mask,
627
628
655 template <int dim, int spacedim, typename number>
656 void
658 const DoFHandler<dim, spacedim> &dof,
659 SparsityPatternBase &sparsity,
660 const AffineConstraints<number> &constraints,
661 const bool keep_constrained_dofs,
662 const Table<2, Coupling> &couplings,
663 const Table<2, Coupling> &face_couplings,
664 const types::subdomain_id subdomain_id,
665 const std::function<
667 const unsigned int)> &face_has_flux_coupling =
668 &internal::always_couple_on_faces<dim, spacedim>);
669
679 template <int dim, int spacedim>
680 void
682 const DoFHandler<dim, spacedim> &dof,
683 const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
684 SparsityPatternBase &sparsity_pattern);
685
703 template <int dim, int spacedim, typename number>
704 void
706 const DoFHandler<dim, spacedim> &dof,
707 const std::map<types::boundary_id, const Function<spacedim, number> *>
708 &boundary_ids,
709 const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
710 SparsityPatternBase &sparsity);
711
759 template <int dim, int spacedim, typename number>
760 void
762 AffineConstraints<number> &constraints);
763
831 template <int dim, int spacedim>
832 void
834 const DoFHandler<dim, spacedim> &coarse_grid,
835 const unsigned int coarse_component,
836 const DoFHandler<dim, spacedim> &fine_grid,
837 const unsigned int fine_component,
838 const InterGridMap<DoFHandler<dim, spacedim>> &coarse_to_fine_grid_map,
839 AffineConstraints<double> &constraints);
840
841
858 template <int dim, int spacedim>
859 void
861 const DoFHandler<dim, spacedim> &coarse_grid,
862 const unsigned int coarse_component,
863 const DoFHandler<dim, spacedim> &fine_grid,
864 const unsigned int fine_component,
865 const InterGridMap<DoFHandler<dim, spacedim>> &coarse_to_fine_grid_map,
866 std::vector<std::map<types::global_dof_index, float>>
867 &transfer_representation);
868
955 template <typename FaceIterator, typename number>
956 void
958 const FaceIterator &face_1,
960 AffineConstraints<number> &constraints,
961 const ComponentMask &component_mask = {},
962 const unsigned char combined_orientation =
965 const std::vector<unsigned int> &first_vector_components =
966 std::vector<unsigned int>(),
967 const number periodicity_factor = 1.);
968
969
989 template <int dim, int spacedim, typename number>
990 void
992 const std::vector<GridTools::PeriodicFacePair<
993 typename DoFHandler<dim, spacedim>::cell_iterator>> &periodic_faces,
994 AffineConstraints<number> &constraints,
995 const ComponentMask &component_mask = {},
996 const std::vector<unsigned int> &first_vector_components =
997 std::vector<unsigned int>(),
998 const number periodicity_factor = 1.);
999
1000
1001
1031 template <int dim, int spacedim, typename number>
1032 void
1034 const types::boundary_id b_id1,
1035 const types::boundary_id b_id2,
1036 const unsigned int direction,
1037 AffineConstraints<number> &constraints,
1038 const ComponentMask &component_mask = {},
1039 const number periodicity_factor = 1.);
1040
1041
1042
1068 template <int dim, int spacedim, typename number>
1069 void
1071 const types::boundary_id b_id,
1072 const unsigned int direction,
1073 AffineConstraints<number> &constraints,
1074 const ComponentMask &component_mask = {},
1075 const number periodicity_factor = 1.);
1076
1077 namespace internal
1078 {
1105 template <typename FaceIterator, typename number>
1106 void
1108 const FaceIterator &face_1,
1110 const FullMatrix<double> &transformation,
1111 AffineConstraints<number> &affine_constraints,
1112 const ComponentMask &component_mask,
1113 const unsigned char combined_orientation,
1114 const number periodicity_factor,
1115 const unsigned int level = numbers::invalid_unsigned_int);
1116 } // namespace internal
1117
1135 template <int dim, int spacedim>
1136 IndexSet
1138
1171 template <int dim, int spacedim>
1172 IndexSet
1173 extract_dofs(const DoFHandler<dim, spacedim> &dof_handler,
1174 const ComponentMask &component_mask);
1175
1199 template <int dim, int spacedim>
1200 IndexSet
1201 extract_dofs(const DoFHandler<dim, spacedim> &dof_handler,
1202 const BlockMask &block_mask);
1203
1208 template <int dim, int spacedim>
1209 void
1210 extract_level_dofs(const unsigned int level,
1211 const DoFHandler<dim, spacedim> &dof,
1212 const ComponentMask &component_mask,
1213 std::vector<bool> &selected_dofs);
1214
1219 template <int dim, int spacedim>
1220 void
1221 extract_level_dofs(const unsigned int level,
1222 const DoFHandler<dim, spacedim> &dof,
1223 const BlockMask &component_mask,
1224 std::vector<bool> &selected_dofs);
1225
1268 template <int dim, int spacedim>
1269 IndexSet
1271 const ComponentMask &component_mask = {},
1272 const std::set<types::boundary_id> &boundary_ids = {});
1273
1290 template <int dim, int spacedim>
1291 void
1293 const DoFHandler<dim, spacedim> &dof_handler,
1294 const ComponentMask &component_mask,
1295 std::vector<bool> &selected_dofs,
1296 const std::set<types::boundary_id> &boundary_ids =
1297 std::set<types::boundary_id>());
1298
1326 template <int dim, int spacedim, typename number = double>
1327 IndexSet
1329 const DoFHandler<dim, spacedim> &dof_handler,
1330 const std::function<
1332 &predicate,
1333 const AffineConstraints<number> &constraints = {});
1334
1370 template <int dim, int spacedim>
1371 void
1373 const ComponentMask &component_mask,
1374 std::vector<std::vector<bool>> &constant_modes);
1375
1379 template <int dim, int spacedim>
1380 void
1381 extract_level_constant_modes(const unsigned int level,
1382 const DoFHandler<dim, spacedim> &dof_handler,
1383 const ComponentMask &component_mask,
1384 std::vector<std::vector<bool>> &constant_modes);
1471 template <int dim, int spacedim>
1472 std::map<typename DoFHandler<dim - 1, spacedim>::active_cell_iterator,
1473 std::pair<typename DoFHandler<dim, spacedim>::active_cell_iterator,
1474 unsigned int>>
1478 &c1_to_c0,
1479 const DoFHandler<dim, spacedim> &c0_dh,
1480 const DoFHandler<dim - 1, spacedim> &c1_dh);
1481
1499 template <int dim, int spacedim>
1500 void
1502 const types::subdomain_id subdomain_id,
1503 std::vector<bool> &selected_dofs);
1504
1519 template <int dim, int spacedim>
1520 IndexSet
1522
1539 template <int dim, int spacedim>
1540 DEAL_II_DEPRECATED_EARLY void
1542 IndexSet &dof_set);
1543
1550 template <int dim, int spacedim>
1551 IndexSet
1553 const DoFHandler<dim, spacedim> &dof_handler,
1554 const unsigned int level);
1555
1564 template <int dim, int spacedim>
1565 DEAL_II_DEPRECATED_EARLY void
1567 const DoFHandler<dim, spacedim> &dof_handler,
1568 IndexSet &dof_set,
1569 const unsigned int level);
1570
1580 template <int dim, int spacedim>
1581 IndexSet
1583
1594 template <int dim, int spacedim>
1595 DEAL_II_DEPRECATED_EARLY void
1597 IndexSet &dof_set);
1598
1608 template <int dim, int spacedim>
1609 std::vector<IndexSet>
1611 const ComponentMask &components = {});
1612
1626 template <int dim, int spacedim>
1627 std::vector<IndexSet>
1629 const DoFHandler<dim, spacedim> &dof_handler);
1630
1645 template <int dim, int spacedim>
1646 std::vector<IndexSet>
1648 const DoFHandler<dim, spacedim> &dof_handler);
1649
1654 template <int dim, int spacedim>
1655 IndexSet
1657 const DoFHandler<dim, spacedim> &dof_handler,
1658 const unsigned int level);
1659
1666 template <int dim, int spacedim>
1667 DEAL_II_DEPRECATED_EARLY void
1669 const DoFHandler<dim, spacedim> &dof_handler,
1670 const unsigned int level,
1671 IndexSet &dof_set);
1672
1673
1704 template <int dim, int spacedim>
1705 void
1707 std::vector<types::subdomain_id> &subdomain);
1708
1734 template <int dim, int spacedim>
1735 unsigned int
1737 const DoFHandler<dim, spacedim> &dof_handler,
1738 const types::subdomain_id subdomain);
1739
1759 template <int dim, int spacedim>
1760 void
1762 const DoFHandler<dim, spacedim> &dof_handler,
1763 const types::subdomain_id subdomain,
1764 std::vector<unsigned int> &n_dofs_on_subdomain);
1765
1787 template <int dim, int spacedim>
1788 IndexSet
1790 const DoFHandler<dim, spacedim> &dof_handler,
1791 const types::subdomain_id subdomain);
1848 template <int dim, int spacedim>
1849 std::vector<types::global_dof_index>
1851 const std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
1852 &patch);
1853
1874 template <int dim, int spacedim>
1875 void
1877 const DoFHandler<dim, spacedim> &dof_handler,
1878 const unsigned int level,
1879 const std::vector<bool> &selected_dofs = {},
1880 const types::global_dof_index offset = 0);
1881
1933 template <int dim, int spacedim>
1934 std::vector<unsigned int>
1936 const DoFHandler<dim, spacedim> &dof_handler,
1937 const unsigned int level,
1938 const bool interior_dofs_only,
1939 const bool boundary_patches = false,
1940 const bool level_boundary_patches = false,
1941 const bool single_cell_patches = false,
1942 const bool invert_vertex_mapping = false);
1943
1958 template <int dim, int spacedim>
1959 std::vector<unsigned int>
1961 const DoFHandler<dim, spacedim> &dof_handler,
1962 const unsigned int level,
1963 const BlockMask &exclude_boundary_dofs = BlockMask(),
1964 const bool boundary_patches = false,
1965 const bool level_boundary_patches = false,
1966 const bool single_cell_patches = false,
1967 const bool invert_vertex_mapping = false);
1968
2006 template <int dim, int spacedim>
2007 void
2009 const DoFHandler<dim, spacedim> &dof_handler,
2010 const unsigned int level,
2011 const bool interior_dofs_only,
2012 const bool boundary_dofs = false);
2013
2033 template <int dim, int spacedim>
2034 void
2036 const DoFHandler<dim, spacedim> &dof_handler,
2037 const unsigned int level,
2038 const bool interior_dofs_only = false);
2039
2082 template <int dim, int spacedim>
2083 std::vector<types::global_dof_index>
2085 const DoFHandler<dim, spacedim> &dof_handler,
2086 const bool vector_valued_once = false,
2087 const std::vector<unsigned int> &target_component = {});
2088
2105 template <int dim, int spacedim>
2106 std::vector<types::global_dof_index>
2108 const std::vector<unsigned int> &target_block =
2109 std::vector<unsigned int>());
2110
2126 template <int dim, int spacedim>
2129 std::vector<unsigned int> &active_fe_indices);
2130
2158 template <int dim, int spacedim>
2159 unsigned int
2161 const std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
2162 &patch);
2163
2186 template <int dim, int spacedim>
2187 void
2189 std::vector<types::global_dof_index> &mapping);
2190
2201 template <int dim, int spacedim>
2202 void
2204 const std::set<types::boundary_id> &boundary_ids,
2205 std::vector<types::global_dof_index> &mapping);
2206
2235 template <int dim, int spacedim>
2236 void
2238 const DoFHandler<dim, spacedim> &dof_handler,
2239 std::vector<Point<spacedim>> &support_points,
2240 const ComponentMask &mask = {});
2241
2245 template <int dim, int spacedim>
2246 void
2249 const DoFHandler<dim, spacedim> &dof_handler,
2250 std::vector<Point<spacedim>> &support_points,
2251 const ComponentMask &mask = {});
2252
2282 template <int dim, int spacedim>
2283 std::map<types::global_dof_index, Point<spacedim>>
2285 const DoFHandler<dim, spacedim> &dof_handler,
2286 const ComponentMask &mask = {});
2287
2291 template <int dim, int spacedim>
2292 std::map<types::global_dof_index, Point<spacedim>>
2295 const DoFHandler<dim, spacedim> &dof_handler,
2296 const ComponentMask &mask = {});
2297
2303 template <int dim, int spacedim>
2306 const Mapping<dim, spacedim> &mapping,
2307 const DoFHandler<dim, spacedim> &dof_handler,
2308 std::map<types::global_dof_index, Point<spacedim>> &support_points,
2309 const ComponentMask &mask = {});
2310
2316 template <int dim, int spacedim>
2320 const DoFHandler<dim, spacedim> &dof_handler,
2321 std::map<types::global_dof_index, Point<spacedim>> &support_points,
2322 const ComponentMask &mask = {});
2323
2324
2345 template <int dim, int spacedim, class Comp>
2346 void
2348 const Mapping<dim, spacedim> &mapping,
2349 const DoFHandler<dim, spacedim> &dof_handler,
2351 &point_to_index_map);
2389 template <int dim, int spacedim, typename Number>
2390 void
2392 const Vector<Number> &cell_data,
2393 Vector<double> &dof_data,
2394 const unsigned int component = 0);
2395
2396
2474 template <int spacedim>
2475 void
2477 std::ostream &out,
2478 const std::map<types::global_dof_index, Point<spacedim>> &support_points);
2479
2480
2521 template <int dim, int spacedim, typename number>
2522 void
2524 const DoFHandler<dim, spacedim> &dof,
2525 const types::boundary_id boundary_id,
2526 AffineConstraints<number> &zero_boundary_constraints,
2527 const ComponentMask &component_mask = {});
2528
2539 template <int dim, int spacedim, typename number>
2540 void
2542 const DoFHandler<dim, spacedim> &dof,
2543 AffineConstraints<number> &zero_boundary_constraints,
2544 const ComponentMask &component_mask = {});
2545
2590} // namespace DoFTools
2591
2592
2593
2594/* ------------------------- inline functions -------------- */
2595
2596#ifndef DOXYGEN
2597
2598namespace DoFTools
2599{
2605 inline Coupling
2606 operator|=(Coupling &c1, const Coupling c2)
2607 {
2608 if (c2 == always)
2609 c1 = always;
2610 else if (c1 != always && c2 == nonzero)
2611 return c1 = nonzero;
2612 return c1;
2613 }
2614
2615
2621 inline Coupling
2622 operator|(const Coupling c1, const Coupling c2)
2623 {
2624 if (c1 == always || c2 == always)
2625 return always;
2626 if (c1 == nonzero || c2 == nonzero)
2627 return nonzero;
2628 return none;
2629 }
2630
2631
2632 // ---------------------- inline and template functions --------------------
2633
2634 template <int dim, int spacedim, class Comp>
2635 void
2637 const Mapping<dim, spacedim> &mapping,
2638 const DoFHandler<dim, spacedim> &dof_handler,
2640 &point_to_index_map)
2641 {
2642 // let the checking of arguments be
2643 // done by the function first
2644 // called
2645 std::vector<Point<spacedim>> support_points(dof_handler.n_dofs());
2646 map_dofs_to_support_points(mapping, dof_handler, support_points);
2647 // now copy over the results of the
2648 // previous function into the
2649 // output arg
2650 point_to_index_map.clear();
2651 for (types::global_dof_index i = 0; i < dof_handler.n_dofs(); ++i)
2652 point_to_index_map[support_points[i]] = i;
2653 }
2654} // namespace DoFTools
2655
2656#endif
2657
2659
2660#endif
types::global_dof_index n_dofs() const
Abstract base class for mapping classes.
Definition mapping.h:318
Definition point.h:111
static constexpr unsigned char default_combined_face_orientation()
#define DEAL_II_DEPRECATED
Definition config.h:207
#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
#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
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)
InitializeLibrary operator|(const InitializeLibrary f1, const InitializeLibrary 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 unsigned char combined_orientation, 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:824
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:614
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 unsigned char combined_orientation=ReferenceCell::default_combined_face_orientation(), const FullMatrix< double > &matrix=FullMatrix< double >(), const std::vector< unsigned int > &first_vector_components=std::vector< unsigned int >(), const number periodicity_factor=1.)
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:414
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:501
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:742
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:330
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:467
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 extract_level_constant_modes(const unsigned int level, const DoFHandler< dim, spacedim > &dof_handler, const ComponentMask &component_mask, std::vector< std::vector< bool > > &constant_modes)
@ 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 boundary_id
Definition types.h:144
unsigned int subdomain_id
Definition types.h:43
unsigned int global_dof_index
Definition types.h:81