Reference documentation for deal.II version GIT d9d8a449a2 2022-08-17 08:45: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\}}\)
dof_tools.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1999 - 2022 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 
23 #include <deal.II/base/index_set.h>
24 #include <deal.II/base/point.h>
25 
27 
29 
31 
32 #include <map>
33 #include <ostream>
34 #include <set>
35 #include <vector>
36 
37 
39 
40 // Forward declarations
41 #ifndef DOXYGEN
42 class BlockMask;
43 template <int dim, typename RangeNumberType>
44 class Function;
45 template <int dim, int spacedim>
46 class FiniteElement;
47 namespace hp
48 {
49  template <int dim, int spacedim>
50  class MappingCollection;
51  template <int dim, int spacedim>
52  class FECollection;
53 } // namespace hp
54 template <class MeshType>
55 class InterGridMap;
56 template <int dim, int spacedim>
57 class Mapping;
58 class SparsityPattern;
59 template <int dim, class T>
60 class Table;
61 template <typename Number>
62 class Vector;
63 
64 namespace GridTools
65 {
66  template <typename CellIterator>
67  struct PeriodicFacePair;
68 }
69 
70 namespace 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 
211 namespace DoFTools
212 {
224  enum Coupling
225  {
241  nonzero
242  };
243 
256  template <int dim, int spacedim>
257  void
259  const Table<2, Coupling> &table_by_component,
260  std::vector<Table<2, Coupling>> &tables_by_block);
261 
267  template <int dim, int spacedim>
271  const Table<2, Coupling> & component_couplings);
272 
280  template <int dim, int spacedim>
281  std::vector<Table<2, Coupling>>
284  const Table<2, Coupling> & component_couplings);
408  template <int dim,
409  int spacedim,
410  typename SparsityPatternType,
411  typename number = double>
412  void
414  const DoFHandler<dim, spacedim> &dof_handler,
415  SparsityPatternType & sparsity_pattern,
417  const bool keep_constrained_dofs = true,
419 
485  template <int dim,
486  int spacedim,
487  typename SparsityPatternType,
488  typename number = double>
489  void
491  const DoFHandler<dim, spacedim> &dof_handler,
492  const Table<2, Coupling> & coupling,
493  SparsityPatternType & sparsity_pattern,
495  const bool keep_constrained_dofs = true,
497 
518  template <int dim, int spacedim, typename SparsityPatternType>
519  void
521  const DoFHandler<dim, spacedim> &dof_col,
522  SparsityPatternType & sparsity);
523 
569  template <int dim, int spacedim, typename SparsityPatternType>
570  void
572  SparsityPatternType & sparsity_pattern);
573 
582  template <int dim,
583  int spacedim,
584  typename SparsityPatternType,
585  typename number>
586  void
588  const DoFHandler<dim, spacedim> &dof_handler,
589  SparsityPatternType & sparsity_pattern,
590  const AffineConstraints<number> &constraints,
591  const bool keep_constrained_dofs = true,
593 
594 
614  template <int dim, int spacedim, typename SparsityPatternType>
615  void
617  const DoFHandler<dim, spacedim> &dof,
618  SparsityPatternType & sparsity,
619  const Table<2, Coupling> & cell_integrals_mask,
620  const Table<2, Coupling> & face_integrals_mask,
622 
623 
650  template <int dim,
651  int spacedim,
652  typename SparsityPatternType,
653  typename number>
654  void
656  const DoFHandler<dim, spacedim> &dof,
657  SparsityPatternType & sparsity,
658  const AffineConstraints<number> &constraints,
659  const bool keep_constrained_dofs,
660  const Table<2, Coupling> & couplings,
661  const Table<2, Coupling> & face_couplings,
663  const std::function<
665  const unsigned int)> &face_has_flux_coupling =
666  &internal::always_couple_on_faces<dim, spacedim>);
667 
677  template <int dim, int spacedim, typename SparsityPatternType>
678  void
680  const DoFHandler<dim, spacedim> & dof,
681  const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
682  SparsityPatternType & sparsity_pattern);
683 
701  template <int dim,
702  int spacedim,
703  typename SparsityPatternType,
704  typename number>
705  void
707  const DoFHandler<dim, spacedim> &dof,
708  const std::map<types::boundary_id, const Function<spacedim, number> *>
709  & boundary_ids,
710  const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
711  SparsityPatternType & sparsity);
712 
760  template <int dim, int spacedim, typename number>
761  void
763  AffineConstraints<number> & constraints);
764 
832  template <int dim, int spacedim>
833  void
835  const DoFHandler<dim, spacedim> & coarse_grid,
836  const unsigned int coarse_component,
837  const DoFHandler<dim, spacedim> & fine_grid,
838  const unsigned int fine_component,
839  const InterGridMap<DoFHandler<dim, spacedim>> &coarse_to_fine_grid_map,
840  AffineConstraints<double> & constraints);
841 
842 
859  template <int dim, int spacedim>
860  void
862  const DoFHandler<dim, spacedim> & coarse_grid,
863  const unsigned int coarse_component,
864  const DoFHandler<dim, spacedim> & fine_grid,
865  const unsigned int fine_component,
866  const InterGridMap<DoFHandler<dim, spacedim>> &coarse_to_fine_grid_map,
867  std::vector<std::map<types::global_dof_index, float>>
868  &transfer_representation);
869 
1044  template <typename FaceIterator, typename number>
1045  void
1047  const FaceIterator & face_1,
1048  const typename identity<FaceIterator>::type &face_2,
1049  AffineConstraints<number> & constraints,
1050  const ComponentMask & component_mask = ComponentMask(),
1051  const bool face_orientation = true,
1052  const bool face_flip = false,
1053  const bool face_rotation = false,
1055  const std::vector<unsigned int> &first_vector_components =
1056  std::vector<unsigned int>(),
1057  const number periodicity_factor = 1.);
1058 
1059 
1079  template <int dim, int spacedim, typename number>
1080  void
1082  const std::vector<GridTools::PeriodicFacePair<
1083  typename DoFHandler<dim, spacedim>::cell_iterator>> &periodic_faces,
1084  AffineConstraints<number> & constraints,
1085  const ComponentMask & component_mask = ComponentMask(),
1086  const std::vector<unsigned int> &first_vector_components =
1087  std::vector<unsigned int>(),
1088  const number periodicity_factor = 1.);
1089 
1090 
1091 
1121  template <int dim, int spacedim, typename number>
1122  void
1124  const DoFHandler<dim, spacedim> &dof_handler,
1125  const types::boundary_id b_id1,
1126  const types::boundary_id b_id2,
1127  const unsigned int direction,
1128  AffineConstraints<number> & constraints,
1129  const ComponentMask & component_mask = ComponentMask(),
1130  const number periodicity_factor = 1.);
1131 
1132 
1133 
1159  template <int dim, int spacedim, typename number>
1160  void
1162  const DoFHandler<dim, spacedim> &dof_handler,
1163  const types::boundary_id b_id,
1164  const unsigned int direction,
1165  AffineConstraints<number> & constraints,
1166  const ComponentMask & component_mask = ComponentMask(),
1167  const number periodicity_factor = 1.);
1168 
1186  template <int dim, int spacedim>
1187  IndexSet
1189 
1222  template <int dim, int spacedim>
1223  IndexSet
1224  extract_dofs(const DoFHandler<dim, spacedim> &dof_handler,
1225  const ComponentMask & component_mask);
1226 
1250  template <int dim, int spacedim>
1251  IndexSet
1252  extract_dofs(const DoFHandler<dim, spacedim> &dof_handler,
1253  const BlockMask & block_mask);
1254 
1259  template <int dim, int spacedim>
1260  void
1261  extract_level_dofs(const unsigned int level,
1262  const DoFHandler<dim, spacedim> &dof,
1263  const ComponentMask & component_mask,
1264  std::vector<bool> & selected_dofs);
1265 
1270  template <int dim, int spacedim>
1271  void
1272  extract_level_dofs(const unsigned int level,
1273  const DoFHandler<dim, spacedim> &dof,
1274  const BlockMask & component_mask,
1275  std::vector<bool> & selected_dofs);
1276 
1331  template <int dim, int spacedim>
1332  DEAL_II_DEPRECATED void
1334  const ComponentMask & component_mask,
1335  std::vector<bool> & selected_dofs,
1336  const std::set<types::boundary_id> &boundary_ids = {});
1337 
1380  template <int dim, int spacedim>
1381  IndexSet
1383  const ComponentMask &component_mask = ComponentMask(),
1384  const std::set<types::boundary_id> &boundary_ids = {});
1385 
1392  template <int dim, int spacedim>
1393  DEAL_II_DEPRECATED void
1395  const ComponentMask & component_mask,
1396  IndexSet & selected_dofs,
1397  const std::set<types::boundary_id> &boundary_ids = {});
1398 
1415  template <int dim, int spacedim>
1416  void
1418  const DoFHandler<dim, spacedim> & dof_handler,
1419  const ComponentMask & component_mask,
1420  std::vector<bool> & selected_dofs,
1421  const std::set<types::boundary_id> &boundary_ids =
1422  std::set<types::boundary_id>());
1423 
1451  template <int dim, int spacedim, typename number = double>
1452  IndexSet
1454  const DoFHandler<dim, spacedim> &dof_handler,
1455  const std::function<
1456  bool(const typename DoFHandler<dim, spacedim>::active_cell_iterator &)>
1457  & predicate,
1458  const AffineConstraints<number> &constraints = AffineConstraints<number>());
1459 
1495  template <int dim, int spacedim>
1496  void
1498  const ComponentMask & component_mask,
1499  std::vector<std::vector<bool>> & constant_modes);
1515  template <int dim, int spacedim>
1516  void
1519  std::vector<bool> & selected_dofs);
1520 
1535  template <int dim, int spacedim>
1536  IndexSet
1538 
1555  template <int dim, int spacedim>
1556  void
1558  IndexSet & dof_set);
1559 
1566  template <int dim, int spacedim>
1567  IndexSet
1569  const DoFHandler<dim, spacedim> &dof_handler,
1570  const unsigned int level);
1571 
1580  template <int dim, int spacedim>
1581  void
1583  const DoFHandler<dim, spacedim> &dof_handler,
1584  IndexSet & dof_set,
1585  const unsigned int level);
1586 
1596  template <int dim, int spacedim>
1597  IndexSet
1599 
1610  template <int dim, int spacedim>
1611  void
1613  IndexSet & dof_set);
1614 
1624  template <int dim, int spacedim>
1625  std::vector<IndexSet>
1627  const DoFHandler<dim, spacedim> &dof_handler,
1628  const ComponentMask & components = ComponentMask());
1629 
1643  template <int dim, int spacedim>
1644  std::vector<IndexSet>
1646  const DoFHandler<dim, spacedim> &dof_handler);
1647 
1662  template <int dim, int spacedim>
1663  std::vector<IndexSet>
1665  const DoFHandler<dim, spacedim> &dof_handler);
1666 
1671  template <int dim, int spacedim>
1672  IndexSet
1674  const DoFHandler<dim, spacedim> &dof_handler,
1675  const unsigned int level);
1676 
1683  template <int dim, int spacedim>
1684  void
1686  const DoFHandler<dim, spacedim> &dof_handler,
1687  const unsigned int level,
1688  IndexSet & dof_set);
1689 
1690 
1721  template <int dim, int spacedim>
1722  void
1724  std::vector<types::subdomain_id> &subdomain);
1725 
1751  template <int dim, int spacedim>
1752  unsigned int
1754  const DoFHandler<dim, spacedim> &dof_handler,
1755  const types::subdomain_id subdomain);
1756 
1776  template <int dim, int spacedim>
1777  void
1779  const DoFHandler<dim, spacedim> &dof_handler,
1780  const types::subdomain_id subdomain,
1781  std::vector<unsigned int> & n_dofs_on_subdomain);
1782 
1804  template <int dim, int spacedim>
1805  IndexSet
1807  const DoFHandler<dim, spacedim> &dof_handler,
1808  const types::subdomain_id subdomain);
1865  template <int dim, int spacedim>
1866  std::vector<types::global_dof_index>
1868  const std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
1869  &patch);
1870 
1891  template <int dim, int spacedim>
1892  void
1893  make_cell_patches(SparsityPattern & block_list,
1894  const DoFHandler<dim, spacedim> &dof_handler,
1895  const unsigned int level,
1896  const std::vector<bool> & selected_dofs = {},
1897  const types::global_dof_index offset = 0);
1898 
1950  template <int dim, int spacedim>
1951  std::vector<unsigned int>
1952  make_vertex_patches(SparsityPattern & block_list,
1953  const DoFHandler<dim, spacedim> &dof_handler,
1954  const unsigned int level,
1955  const bool interior_dofs_only,
1956  const bool boundary_patches = false,
1957  const bool level_boundary_patches = false,
1958  const bool single_cell_patches = false,
1959  const bool invert_vertex_mapping = false);
1960 
1975  template <int dim, int spacedim>
1976  std::vector<unsigned int>
1977  make_vertex_patches(SparsityPattern & block_list,
1978  const DoFHandler<dim, spacedim> &dof_handler,
1979  const unsigned int level,
1980  const BlockMask &exclude_boundary_dofs = BlockMask(),
1981  const bool boundary_patches = false,
1982  const bool level_boundary_patches = false,
1983  const bool single_cell_patches = false,
1984  const bool invert_vertex_mapping = false);
1985 
2023  template <int dim, int spacedim>
2024  void
2025  make_child_patches(SparsityPattern & block_list,
2026  const DoFHandler<dim, spacedim> &dof_handler,
2027  const unsigned int level,
2028  const bool interior_dofs_only,
2029  const bool boundary_dofs = false);
2030 
2050  template <int dim, int spacedim>
2051  void
2052  make_single_patch(SparsityPattern & block_list,
2053  const DoFHandler<dim, spacedim> &dof_handler,
2054  const unsigned int level,
2055  const bool interior_dofs_only = false);
2056 
2099  template <int dim, int spacedim>
2100  std::vector<types::global_dof_index>
2102  const DoFHandler<dim, spacedim> &dof_handler,
2103  const bool vector_valued_once = false,
2104  const std::vector<unsigned int> &target_component = {});
2105 
2122  template <int dim, int spacedim>
2123  std::vector<types::global_dof_index>
2125  const std::vector<unsigned int> &target_block =
2126  std::vector<unsigned int>());
2127 
2137  template <int dim, int spacedim>
2138  void
2140  std::vector<unsigned int> & active_fe_indices);
2141 
2169  template <int dim, int spacedim>
2170  unsigned int
2172  const std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
2173  &patch);
2174 
2197  template <int dim, int spacedim>
2198  void
2200  std::vector<types::global_dof_index> &mapping);
2201 
2212  template <int dim, int spacedim>
2213  void
2215  const std::set<types::boundary_id> &boundary_ids,
2216  std::vector<types::global_dof_index> &mapping);
2217 
2246  template <int dim, int spacedim>
2247  void
2249  const DoFHandler<dim, spacedim> &dof_handler,
2250  std::vector<Point<spacedim>> & support_points,
2251  const ComponentMask &mask = ComponentMask());
2252 
2256  template <int dim, int spacedim>
2257  void
2259  const ::hp::MappingCollection<dim, spacedim> &mapping,
2260  const DoFHandler<dim, spacedim> & dof_handler,
2261  std::vector<Point<spacedim>> & support_points,
2262  const ComponentMask & mask = ComponentMask());
2263 
2294  template <int dim, int spacedim>
2295  void
2297  const Mapping<dim, spacedim> & mapping,
2298  const DoFHandler<dim, spacedim> & dof_handler,
2299  std::map<types::global_dof_index, Point<spacedim>> &support_points,
2300  const ComponentMask & mask = ComponentMask());
2301 
2305  template <int dim, int spacedim>
2306  void
2308  const ::hp::MappingCollection<dim, spacedim> &mapping,
2309  const DoFHandler<dim, spacedim> & dof_handler,
2310  std::map<types::global_dof_index, Point<spacedim>> &support_points,
2311  const ComponentMask & mask = ComponentMask());
2312 
2313 
2334  template <int dim, int spacedim, class Comp>
2335  void
2337  const Mapping<dim, spacedim> & mapping,
2338  const DoFHandler<dim, spacedim> &dof_handler,
2339  std::map<Point<spacedim>, types::global_dof_index, Comp>
2340  &point_to_index_map);
2378  template <int dim, int spacedim, typename Number>
2379  void
2381  const Vector<Number> & cell_data,
2382  Vector<double> & dof_data,
2383  const unsigned int component = 0);
2384 
2385 
2462  template <int spacedim>
2463  void
2465  std::ostream & out,
2466  const std::map<types::global_dof_index, Point<spacedim>> &support_points);
2467 
2468 
2509  template <int dim, int spacedim, typename number>
2510  void
2512  const DoFHandler<dim, spacedim> &dof,
2514  AffineConstraints<number> & zero_boundary_constraints,
2515  const ComponentMask & component_mask = ComponentMask());
2516 
2527  template <int dim, int spacedim, typename number>
2528  void
2530  const DoFHandler<dim, spacedim> &dof,
2531  AffineConstraints<number> & zero_boundary_constraints,
2532  const ComponentMask & component_mask = ComponentMask());
2533 
2578 } // namespace DoFTools
2579 
2580 
2581 
2582 /* ------------------------- inline functions -------------- */
2583 
2584 #ifndef DOXYGEN
2585 
2586 namespace DoFTools
2587 {
2593  inline Coupling
2594  operator|=(Coupling &c1, const Coupling c2)
2595  {
2596  if (c2 == always)
2597  c1 = always;
2598  else if (c1 != always && c2 == nonzero)
2599  return c1 = nonzero;
2600  return c1;
2601  }
2602 
2603 
2609  inline Coupling
2610  operator|(const Coupling c1, const Coupling c2)
2611  {
2612  if (c1 == always || c2 == always)
2613  return always;
2614  if (c1 == nonzero || c2 == nonzero)
2615  return nonzero;
2616  return none;
2617  }
2618 
2619 
2620  // ---------------------- inline and template functions --------------------
2621 
2622  template <int dim, int spacedim, class Comp>
2623  void
2625  const Mapping<dim, spacedim> & mapping,
2626  const DoFHandler<dim, spacedim> &dof_handler,
2627  std::map<Point<spacedim>, types::global_dof_index, Comp>
2628  &point_to_index_map)
2629  {
2630  // let the checking of arguments be
2631  // done by the function first
2632  // called
2633  std::vector<Point<spacedim>> support_points(dof_handler.n_dofs());
2634  map_dofs_to_support_points(mapping, dof_handler, support_points);
2635  // now copy over the results of the
2636  // previous function into the
2637  // output arg
2638  point_to_index_map.clear();
2639  for (types::global_dof_index i = 0; i < dof_handler.n_dofs(); ++i)
2640  point_to_index_map[support_points[i]] = i;
2641  }
2642 } // namespace DoFTools
2643 
2644 #endif
2645 
2647 
2648 #endif
types::global_dof_index n_dofs() const
Abstract base class for mapping classes.
Definition: mapping.h:311
Definition: vector.h:110
#define DEAL_II_DEPRECATED
Definition: config.h:164
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:442
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:443
unsigned int level
Definition: grid_out.cc:4608
#define DeclException0(Exception0)
Definition: exceptions.h:464
static ::ExceptionBase & ExcGridsDontMatch()
static ::ExceptionBase & ExcGridNotCoarser()
static ::ExceptionBase & ExcNoFESelected()
static ::ExceptionBase & ExcInvalidBoundaryIndicator()
static ::ExceptionBase & ExcFiniteElementsDontMatch()
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 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 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 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_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)
UpdateFlags & operator|=(UpdateFlags &f1, const UpdateFlags f2)
void get_subdomain_association(const DoFHandler< dim, spacedim > &dof_handler, std::vector< types::subdomain_id > &subdomain)
Definition: dof_tools.cc:1553
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:548
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:799
IndexSet dof_indices_with_subdomain_association(const DoFHandler< dim, spacedim > &dof_handler, const types::subdomain_id subdomain)
Definition: dof_tools.cc:1660
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:2340
std::vector< IndexSet > locally_owned_dofs_per_subdomain(const DoFHandler< dim, spacedim > &dof_handler)
Definition: dof_tools.cc:1382
IndexSet extract_locally_relevant_dofs(const DoFHandler< dim, spacedim > &dof_handler)
Definition: dof_tools.cc:1143
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:1370
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:2432
IndexSet extract_dofs(const DoFHandler< dim, spacedim > &dof_handler, const ComponentMask &component_mask)
Definition: dof_tools.cc:389
IndexSet extract_locally_active_dofs(const DoFHandler< dim, spacedim > &dof_handler)
Definition: dof_tools.cc:1051
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:2379
IndexSet extract_locally_relevant_level_dofs(const DoFHandler< dim, spacedim > &dof_handler, const unsigned int level)
Definition: dof_tools.cc:1193
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:2250
std::vector< IndexSet > locally_owned_dofs_per_component(const DoFHandler< dim, spacedim > &dof_handler, const ComponentMask &components=ComponentMask())
Definition: dof_tools.cc:442
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:1020
IndexSet extract_locally_active_level_dofs(const DoFHandler< dim, spacedim > &dof_handler, const unsigned int level)
Definition: dof_tools.cc:1094
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:2580
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:1979
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:476
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:717
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:305
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:1887
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:2517
void map_dof_to_boundary_indices(const DoFHandler< dim, spacedim > &dof_handler, std::vector< types::global_dof_index > &mapping)
Definition: dof_tools.cc:2068
std::vector< IndexSet > locally_relevant_dofs_per_subdomain(const DoFHandler< dim, spacedim > &dof_handler)
Definition: dof_tools.cc:1477
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:2475
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:2781
unsigned int count_dofs_with_subdomain_association(const DoFHandler< dim, spacedim > &dof_handler, const types::subdomain_id subdomain)
Definition: dof_tools.cc:1643
unsigned int count_dofs_on_patch(const std::vector< typename DoFHandler< dim, spacedim >::active_cell_iterator > &patch)
Definition: dof_tools.cc:2750
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)
Definition: dof_tools.cc:1011
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:1254
@ matrix
Contents is actually a matrix.
Definition: hp.h:118
const types::subdomain_id invalid_subdomain_id
Definition: types.h:281
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)