Reference documentation for deal.II version GIT relicensing-891-g13379fae33 2024-06-22 22:40: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
954 template <typename FaceIterator, typename number>
955 void
957 const FaceIterator &face_1,
959 AffineConstraints<number> &constraints,
960 const ComponentMask &component_mask = {},
961 const unsigned char combined_orientation =
964 const std::vector<unsigned int> &first_vector_components =
965 std::vector<unsigned int>(),
966 const number periodicity_factor = 1.);
967
968
988 template <int dim, int spacedim, typename number>
989 void
991 const std::vector<GridTools::PeriodicFacePair<
992 typename DoFHandler<dim, spacedim>::cell_iterator>> &periodic_faces,
993 AffineConstraints<number> &constraints,
994 const ComponentMask &component_mask = {},
995 const std::vector<unsigned int> &first_vector_components =
996 std::vector<unsigned int>(),
997 const number periodicity_factor = 1.);
998
999
1000
1030 template <int dim, int spacedim, typename number>
1031 void
1033 const types::boundary_id b_id1,
1034 const types::boundary_id b_id2,
1035 const unsigned int direction,
1036 AffineConstraints<number> &constraints,
1037 const ComponentMask &component_mask = {},
1038 const number periodicity_factor = 1.);
1039
1040
1041
1067 template <int dim, int spacedim, typename number>
1068 void
1070 const types::boundary_id b_id,
1071 const unsigned int direction,
1072 AffineConstraints<number> &constraints,
1073 const ComponentMask &component_mask = {},
1074 const number periodicity_factor = 1.);
1075
1076 namespace internal
1077 {
1104 template <typename FaceIterator, typename number>
1105 void
1107 const FaceIterator &face_1,
1109 const FullMatrix<double> &transformation,
1110 AffineConstraints<number> &affine_constraints,
1111 const ComponentMask &component_mask,
1112 const unsigned char combined_orientation,
1113 const number periodicity_factor,
1114 const unsigned int level = numbers::invalid_unsigned_int);
1115 } // namespace internal
1116
1134 template <int dim, int spacedim>
1135 IndexSet
1137
1170 template <int dim, int spacedim>
1171 IndexSet
1172 extract_dofs(const DoFHandler<dim, spacedim> &dof_handler,
1173 const ComponentMask &component_mask);
1174
1198 template <int dim, int spacedim>
1199 IndexSet
1200 extract_dofs(const DoFHandler<dim, spacedim> &dof_handler,
1201 const BlockMask &block_mask);
1202
1207 template <int dim, int spacedim>
1208 void
1209 extract_level_dofs(const unsigned int level,
1210 const DoFHandler<dim, spacedim> &dof,
1211 const ComponentMask &component_mask,
1212 std::vector<bool> &selected_dofs);
1213
1218 template <int dim, int spacedim>
1219 void
1220 extract_level_dofs(const unsigned int level,
1221 const DoFHandler<dim, spacedim> &dof,
1222 const BlockMask &component_mask,
1223 std::vector<bool> &selected_dofs);
1224
1267 template <int dim, int spacedim>
1268 IndexSet
1270 const ComponentMask &component_mask = {},
1271 const std::set<types::boundary_id> &boundary_ids = {});
1272
1289 template <int dim, int spacedim>
1290 void
1292 const DoFHandler<dim, spacedim> &dof_handler,
1293 const ComponentMask &component_mask,
1294 std::vector<bool> &selected_dofs,
1295 const std::set<types::boundary_id> &boundary_ids =
1296 std::set<types::boundary_id>());
1297
1325 template <int dim, int spacedim, typename number = double>
1326 IndexSet
1328 const DoFHandler<dim, spacedim> &dof_handler,
1329 const std::function<
1331 &predicate,
1332 const AffineConstraints<number> &constraints = {});
1333
1369 template <int dim, int spacedim>
1370 void
1372 const ComponentMask &component_mask,
1373 std::vector<std::vector<bool>> &constant_modes);
1374
1378 template <int dim, int spacedim>
1379 void
1380 extract_level_constant_modes(const unsigned int level,
1381 const DoFHandler<dim, spacedim> &dof_handler,
1382 const ComponentMask &component_mask,
1383 std::vector<std::vector<bool>> &constant_modes);
1470 template <int dim, int spacedim>
1471 std::map<typename DoFHandler<dim - 1, spacedim>::active_cell_iterator,
1472 std::pair<typename DoFHandler<dim, spacedim>::active_cell_iterator,
1473 unsigned int>>
1477 &c1_to_c0,
1478 const DoFHandler<dim, spacedim> &c0_dh,
1479 const DoFHandler<dim - 1, spacedim> &c1_dh);
1480
1498 template <int dim, int spacedim>
1499 void
1501 const types::subdomain_id subdomain_id,
1502 std::vector<bool> &selected_dofs);
1503
1518 template <int dim, int spacedim>
1519 IndexSet
1521
1538 template <int dim, int spacedim>
1539 DEAL_II_DEPRECATED_EARLY void
1541 IndexSet &dof_set);
1542
1549 template <int dim, int spacedim>
1550 IndexSet
1552 const DoFHandler<dim, spacedim> &dof_handler,
1553 const unsigned int level);
1554
1563 template <int dim, int spacedim>
1564 DEAL_II_DEPRECATED_EARLY void
1566 const DoFHandler<dim, spacedim> &dof_handler,
1567 IndexSet &dof_set,
1568 const unsigned int level);
1569
1579 template <int dim, int spacedim>
1580 IndexSet
1582
1593 template <int dim, int spacedim>
1594 DEAL_II_DEPRECATED_EARLY void
1596 IndexSet &dof_set);
1597
1607 template <int dim, int spacedim>
1608 std::vector<IndexSet>
1610 const ComponentMask &components = {});
1611
1625 template <int dim, int spacedim>
1626 std::vector<IndexSet>
1628 const DoFHandler<dim, spacedim> &dof_handler);
1629
1644 template <int dim, int spacedim>
1645 std::vector<IndexSet>
1647 const DoFHandler<dim, spacedim> &dof_handler);
1648
1653 template <int dim, int spacedim>
1654 IndexSet
1656 const DoFHandler<dim, spacedim> &dof_handler,
1657 const unsigned int level);
1658
1665 template <int dim, int spacedim>
1666 DEAL_II_DEPRECATED_EARLY void
1668 const DoFHandler<dim, spacedim> &dof_handler,
1669 const unsigned int level,
1670 IndexSet &dof_set);
1671
1672
1703 template <int dim, int spacedim>
1704 void
1706 std::vector<types::subdomain_id> &subdomain);
1707
1733 template <int dim, int spacedim>
1734 unsigned int
1736 const DoFHandler<dim, spacedim> &dof_handler,
1737 const types::subdomain_id subdomain);
1738
1758 template <int dim, int spacedim>
1759 void
1761 const DoFHandler<dim, spacedim> &dof_handler,
1762 const types::subdomain_id subdomain,
1763 std::vector<unsigned int> &n_dofs_on_subdomain);
1764
1786 template <int dim, int spacedim>
1787 IndexSet
1789 const DoFHandler<dim, spacedim> &dof_handler,
1790 const types::subdomain_id subdomain);
1847 template <int dim, int spacedim>
1848 std::vector<types::global_dof_index>
1850 const std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
1851 &patch);
1852
1873 template <int dim, int spacedim>
1874 void
1876 const DoFHandler<dim, spacedim> &dof_handler,
1877 const unsigned int level,
1878 const std::vector<bool> &selected_dofs = {},
1879 const types::global_dof_index offset = 0);
1880
1932 template <int dim, int spacedim>
1933 std::vector<unsigned int>
1935 const DoFHandler<dim, spacedim> &dof_handler,
1936 const unsigned int level,
1937 const bool interior_dofs_only,
1938 const bool boundary_patches = false,
1939 const bool level_boundary_patches = false,
1940 const bool single_cell_patches = false,
1941 const bool invert_vertex_mapping = false);
1942
1957 template <int dim, int spacedim>
1958 std::vector<unsigned int>
1960 const DoFHandler<dim, spacedim> &dof_handler,
1961 const unsigned int level,
1962 const BlockMask &exclude_boundary_dofs = BlockMask(),
1963 const bool boundary_patches = false,
1964 const bool level_boundary_patches = false,
1965 const bool single_cell_patches = false,
1966 const bool invert_vertex_mapping = false);
1967
2005 template <int dim, int spacedim>
2006 void
2008 const DoFHandler<dim, spacedim> &dof_handler,
2009 const unsigned int level,
2010 const bool interior_dofs_only,
2011 const bool boundary_dofs = false);
2012
2032 template <int dim, int spacedim>
2033 void
2035 const DoFHandler<dim, spacedim> &dof_handler,
2036 const unsigned int level,
2037 const bool interior_dofs_only = false);
2038
2081 template <int dim, int spacedim>
2082 std::vector<types::global_dof_index>
2084 const DoFHandler<dim, spacedim> &dof_handler,
2085 const bool vector_valued_once = false,
2086 const std::vector<unsigned int> &target_component = {});
2087
2104 template <int dim, int spacedim>
2105 std::vector<types::global_dof_index>
2107 const std::vector<unsigned int> &target_block =
2108 std::vector<unsigned int>());
2109
2125 template <int dim, int spacedim>
2128 std::vector<unsigned int> &active_fe_indices);
2129
2157 template <int dim, int spacedim>
2158 unsigned int
2160 const std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
2161 &patch);
2162
2185 template <int dim, int spacedim>
2186 void
2188 std::vector<types::global_dof_index> &mapping);
2189
2200 template <int dim, int spacedim>
2201 void
2203 const std::set<types::boundary_id> &boundary_ids,
2204 std::vector<types::global_dof_index> &mapping);
2205
2234 template <int dim, int spacedim>
2235 void
2237 const DoFHandler<dim, spacedim> &dof_handler,
2238 std::vector<Point<spacedim>> &support_points,
2239 const ComponentMask &mask = {});
2240
2244 template <int dim, int spacedim>
2245 void
2248 const DoFHandler<dim, spacedim> &dof_handler,
2249 std::vector<Point<spacedim>> &support_points,
2250 const ComponentMask &mask = {});
2251
2281 template <int dim, int spacedim>
2282 std::map<types::global_dof_index, Point<spacedim>>
2284 const DoFHandler<dim, spacedim> &dof_handler,
2285 const ComponentMask &mask = {});
2286
2290 template <int dim, int spacedim>
2291 std::map<types::global_dof_index, Point<spacedim>>
2294 const DoFHandler<dim, spacedim> &dof_handler,
2295 const ComponentMask &mask = {});
2296
2302 template <int dim, int spacedim>
2305 const Mapping<dim, spacedim> &mapping,
2306 const DoFHandler<dim, spacedim> &dof_handler,
2307 std::map<types::global_dof_index, Point<spacedim>> &support_points,
2308 const ComponentMask &mask = {});
2309
2315 template <int dim, int spacedim>
2319 const DoFHandler<dim, spacedim> &dof_handler,
2320 std::map<types::global_dof_index, Point<spacedim>> &support_points,
2321 const ComponentMask &mask = {});
2322
2323
2344 template <int dim, int spacedim, class Comp>
2345 void
2347 const Mapping<dim, spacedim> &mapping,
2348 const DoFHandler<dim, spacedim> &dof_handler,
2350 &point_to_index_map);
2388 template <int dim, int spacedim, typename Number>
2389 void
2391 const Vector<Number> &cell_data,
2392 Vector<double> &dof_data,
2393 const unsigned int component = 0);
2394
2395
2473 template <int spacedim>
2474 void
2476 std::ostream &out,
2477 const std::map<types::global_dof_index, Point<spacedim>> &support_points);
2478
2479
2520 template <int dim, int spacedim, typename number>
2521 void
2523 const DoFHandler<dim, spacedim> &dof,
2524 const types::boundary_id boundary_id,
2525 AffineConstraints<number> &zero_boundary_constraints,
2526 const ComponentMask &component_mask = {});
2527
2538 template <int dim, int spacedim, typename number>
2539 void
2541 const DoFHandler<dim, spacedim> &dof,
2542 AffineConstraints<number> &zero_boundary_constraints,
2543 const ComponentMask &component_mask = {});
2544
2589} // namespace DoFTools
2590
2591
2592
2593/* ------------------------- inline functions -------------- */
2594
2595#ifndef DOXYGEN
2596
2597namespace DoFTools
2598{
2604 inline Coupling
2605 operator|=(Coupling &c1, const Coupling c2)
2606 {
2607 if (c2 == always)
2608 c1 = always;
2609 else if (c1 != always && c2 == nonzero)
2610 return c1 = nonzero;
2611 return c1;
2612 }
2613
2614
2620 inline Coupling
2621 operator|(const Coupling c1, const Coupling c2)
2622 {
2623 if (c1 == always || c2 == always)
2624 return always;
2625 if (c1 == nonzero || c2 == nonzero)
2626 return nonzero;
2627 return none;
2628 }
2629
2630
2631 // ---------------------- inline and template functions --------------------
2632
2633 template <int dim, int spacedim, class Comp>
2634 void
2636 const Mapping<dim, spacedim> &mapping,
2637 const DoFHandler<dim, spacedim> &dof_handler,
2639 &point_to_index_map)
2640 {
2641 // let the checking of arguments be
2642 // done by the function first
2643 // called
2644 std::vector<Point<spacedim>> support_points(dof_handler.n_dofs());
2645 map_dofs_to_support_points(mapping, dof_handler, support_points);
2646 // now copy over the results of the
2647 // previous function into the
2648 // output arg
2649 point_to_index_map.clear();
2650 for (types::global_dof_index i = 0; i < dof_handler.n_dofs(); ++i)
2651 point_to_index_map[support_points[i]] = i;
2652 }
2653} // namespace DoFTools
2654
2655#endif
2656
2658
2659#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: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: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 subdomain_id
Definition types.h:43