Reference documentation for deal.II version GIT dad323def1 2022-06-25 19:00: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);
410  template <int dim,
411  int spacedim,
412  typename SparsityPatternType,
413  typename number = double>
414  void
416  const DoFHandler<dim, spacedim> &dof_handler,
417  SparsityPatternType & sparsity_pattern,
419  const bool keep_constrained_dofs = true,
421 
487  template <int dim,
488  int spacedim,
489  typename SparsityPatternType,
490  typename number = double>
491  void
493  const DoFHandler<dim, spacedim> &dof_handler,
494  const Table<2, Coupling> & coupling,
495  SparsityPatternType & sparsity_pattern,
497  const bool keep_constrained_dofs = true,
499 
520  template <int dim, int spacedim, typename SparsityPatternType>
521  void
523  const DoFHandler<dim, spacedim> &dof_col,
524  SparsityPatternType & sparsity);
525 
571  template <int dim, int spacedim, typename SparsityPatternType>
572  void
574  SparsityPatternType & sparsity_pattern);
575 
584  template <int dim,
585  int spacedim,
586  typename SparsityPatternType,
587  typename number>
588  void
590  const DoFHandler<dim, spacedim> &dof_handler,
591  SparsityPatternType & sparsity_pattern,
592  const AffineConstraints<number> &constraints,
593  const bool keep_constrained_dofs = true,
595 
596 
616  template <int dim, int spacedim, typename SparsityPatternType>
617  void
619  const DoFHandler<dim, spacedim> &dof,
620  SparsityPatternType & sparsity,
621  const Table<2, Coupling> & cell_integrals_mask,
622  const Table<2, Coupling> & face_integrals_mask,
624 
625 
652  template <int dim,
653  int spacedim,
654  typename SparsityPatternType,
655  typename number>
656  void
658  const DoFHandler<dim, spacedim> &dof,
659  SparsityPatternType & 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,
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, typename SparsityPatternType>
680  void
682  const DoFHandler<dim, spacedim> & dof,
683  const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
684  SparsityPatternType & sparsity_pattern);
685 
703  template <int dim,
704  int spacedim,
705  typename SparsityPatternType,
706  typename number>
707  void
709  const DoFHandler<dim, spacedim> &dof,
710  const std::map<types::boundary_id, const Function<spacedim, number> *>
711  & boundary_ids,
712  const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
713  SparsityPatternType & sparsity);
714 
762  template <int dim, int spacedim, typename number>
763  void
765  AffineConstraints<number> & constraints);
766 
834  template <int dim, int spacedim>
835  void
837  const DoFHandler<dim, spacedim> & coarse_grid,
838  const unsigned int coarse_component,
839  const DoFHandler<dim, spacedim> & fine_grid,
840  const unsigned int fine_component,
841  const InterGridMap<DoFHandler<dim, spacedim>> &coarse_to_fine_grid_map,
842  AffineConstraints<double> & constraints);
843 
844 
861  template <int dim, int spacedim>
862  void
864  const DoFHandler<dim, spacedim> & coarse_grid,
865  const unsigned int coarse_component,
866  const DoFHandler<dim, spacedim> & fine_grid,
867  const unsigned int fine_component,
868  const InterGridMap<DoFHandler<dim, spacedim>> &coarse_to_fine_grid_map,
869  std::vector<std::map<types::global_dof_index, float>>
870  &transfer_representation);
871 
1046  template <typename FaceIterator, typename number>
1047  void
1049  const FaceIterator & face_1,
1050  const typename identity<FaceIterator>::type &face_2,
1051  AffineConstraints<number> & constraints,
1052  const ComponentMask & component_mask = ComponentMask(),
1053  const bool face_orientation = true,
1054  const bool face_flip = false,
1055  const bool face_rotation = false,
1057  const std::vector<unsigned int> &first_vector_components =
1058  std::vector<unsigned int>(),
1059  const number periodicity_factor = 1.);
1060 
1061 
1081  template <int dim, int spacedim, typename number>
1082  void
1084  const std::vector<GridTools::PeriodicFacePair<
1085  typename DoFHandler<dim, spacedim>::cell_iterator>> &periodic_faces,
1086  AffineConstraints<number> & constraints,
1087  const ComponentMask & component_mask = ComponentMask(),
1088  const std::vector<unsigned int> &first_vector_components =
1089  std::vector<unsigned int>(),
1090  const number periodicity_factor = 1.);
1091 
1092 
1093 
1123  template <int dim, int spacedim, typename number>
1124  void
1126  const DoFHandler<dim, spacedim> &dof_handler,
1127  const types::boundary_id b_id1,
1128  const types::boundary_id b_id2,
1129  const unsigned int direction,
1130  AffineConstraints<number> & constraints,
1131  const ComponentMask & component_mask = ComponentMask(),
1132  const number periodicity_factor = 1.);
1133 
1134 
1135 
1161  template <int dim, int spacedim, typename number>
1162  void
1164  const DoFHandler<dim, spacedim> &dof_handler,
1165  const types::boundary_id b_id,
1166  const unsigned int direction,
1167  AffineConstraints<number> & constraints,
1168  const ComponentMask & component_mask = ComponentMask(),
1169  const number periodicity_factor = 1.);
1170 
1188  template <int dim, int spacedim>
1189  IndexSet
1191 
1224  template <int dim, int spacedim>
1225  IndexSet
1226  extract_dofs(const DoFHandler<dim, spacedim> &dof_handler,
1227  const ComponentMask & component_mask);
1228 
1252  template <int dim, int spacedim>
1253  IndexSet
1254  extract_dofs(const DoFHandler<dim, spacedim> &dof_handler,
1255  const BlockMask & block_mask);
1256 
1261  template <int dim, int spacedim>
1262  void
1263  extract_level_dofs(const unsigned int level,
1264  const DoFHandler<dim, spacedim> &dof,
1265  const ComponentMask & component_mask,
1266  std::vector<bool> & selected_dofs);
1267 
1272  template <int dim, int spacedim>
1273  void
1274  extract_level_dofs(const unsigned int level,
1275  const DoFHandler<dim, spacedim> &dof,
1276  const BlockMask & component_mask,
1277  std::vector<bool> & selected_dofs);
1278 
1333  template <int dim, int spacedim>
1334  DEAL_II_DEPRECATED void
1336  const ComponentMask & component_mask,
1337  std::vector<bool> & selected_dofs,
1338  const std::set<types::boundary_id> &boundary_ids = {});
1339 
1382  template <int dim, int spacedim>
1383  IndexSet
1385  const ComponentMask &component_mask = ComponentMask(),
1386  const std::set<types::boundary_id> &boundary_ids = {});
1387 
1394  template <int dim, int spacedim>
1395  DEAL_II_DEPRECATED void
1397  const ComponentMask & component_mask,
1398  IndexSet & selected_dofs,
1399  const std::set<types::boundary_id> &boundary_ids = {});
1400 
1417  template <int dim, int spacedim>
1418  void
1420  const DoFHandler<dim, spacedim> & dof_handler,
1421  const ComponentMask & component_mask,
1422  std::vector<bool> & selected_dofs,
1423  const std::set<types::boundary_id> &boundary_ids =
1424  std::set<types::boundary_id>());
1425 
1453  template <int dim, int spacedim, typename number = double>
1454  IndexSet
1456  const DoFHandler<dim, spacedim> &dof_handler,
1457  const std::function<
1458  bool(const typename DoFHandler<dim, spacedim>::active_cell_iterator &)>
1459  & predicate,
1460  const AffineConstraints<number> &constraints = AffineConstraints<number>());
1461 
1497  template <int dim, int spacedim>
1498  void
1500  const ComponentMask & component_mask,
1501  std::vector<std::vector<bool>> & constant_modes);
1503 
1517  template <int dim, int spacedim>
1518  void
1521  std::vector<bool> & selected_dofs);
1522 
1537  template <int dim, int spacedim>
1538  IndexSet
1540 
1557  template <int dim, int spacedim>
1558  void
1560  IndexSet & dof_set);
1561 
1568  template <int dim, int spacedim>
1569  IndexSet
1571  const DoFHandler<dim, spacedim> &dof_handler,
1572  const unsigned int level);
1573 
1582  template <int dim, int spacedim>
1583  void
1585  const DoFHandler<dim, spacedim> &dof_handler,
1586  IndexSet & dof_set,
1587  const unsigned int level);
1588 
1598  template <int dim, int spacedim>
1599  IndexSet
1601 
1612  template <int dim, int spacedim>
1613  void
1615  IndexSet & dof_set);
1616 
1626  template <int dim, int spacedim>
1627  std::vector<IndexSet>
1629  const DoFHandler<dim, spacedim> &dof_handler,
1630  const ComponentMask & components = ComponentMask());
1631 
1645  template <int dim, int spacedim>
1646  std::vector<IndexSet>
1648  const DoFHandler<dim, spacedim> &dof_handler);
1649 
1664  template <int dim, int spacedim>
1665  std::vector<IndexSet>
1667  const DoFHandler<dim, spacedim> &dof_handler);
1668 
1673  template <int dim, int spacedim>
1674  IndexSet
1676  const DoFHandler<dim, spacedim> &dof_handler,
1677  const unsigned int level);
1678 
1685  template <int dim, int spacedim>
1686  void
1688  const DoFHandler<dim, spacedim> &dof_handler,
1689  const unsigned int level,
1690  IndexSet & dof_set);
1691 
1692 
1723  template <int dim, int spacedim>
1724  void
1726  std::vector<types::subdomain_id> &subdomain);
1727 
1753  template <int dim, int spacedim>
1754  unsigned int
1756  const DoFHandler<dim, spacedim> &dof_handler,
1757  const types::subdomain_id subdomain);
1758 
1778  template <int dim, int spacedim>
1779  void
1781  const DoFHandler<dim, spacedim> &dof_handler,
1782  const types::subdomain_id subdomain,
1783  std::vector<unsigned int> & n_dofs_on_subdomain);
1784 
1806  template <int dim, int spacedim>
1807  IndexSet
1809  const DoFHandler<dim, spacedim> &dof_handler,
1810  const types::subdomain_id subdomain);
1811  // @}
1821 
1866  template <int dim, int spacedim>
1867  std::vector<types::global_dof_index>
1869  const std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
1870  &patch);
1871 
1892  template <int dim, int spacedim>
1893  void
1894  make_cell_patches(SparsityPattern & block_list,
1895  const DoFHandler<dim, spacedim> &dof_handler,
1896  const unsigned int level,
1897  const std::vector<bool> & selected_dofs = {},
1898  const types::global_dof_index offset = 0);
1899 
1951  template <int dim, int spacedim>
1952  std::vector<unsigned int>
1953  make_vertex_patches(SparsityPattern & block_list,
1954  const DoFHandler<dim, spacedim> &dof_handler,
1955  const unsigned int level,
1956  const bool interior_dofs_only,
1957  const bool boundary_patches = false,
1958  const bool level_boundary_patches = false,
1959  const bool single_cell_patches = false,
1960  const bool invert_vertex_mapping = false);
1961 
1976  template <int dim, int spacedim>
1977  std::vector<unsigned int>
1978  make_vertex_patches(SparsityPattern & block_list,
1979  const DoFHandler<dim, spacedim> &dof_handler,
1980  const unsigned int level,
1981  const BlockMask &exclude_boundary_dofs = BlockMask(),
1982  const bool boundary_patches = false,
1983  const bool level_boundary_patches = false,
1984  const bool single_cell_patches = false,
1985  const bool invert_vertex_mapping = false);
1986 
2024  template <int dim, int spacedim>
2025  void
2026  make_child_patches(SparsityPattern & block_list,
2027  const DoFHandler<dim, spacedim> &dof_handler,
2028  const unsigned int level,
2029  const bool interior_dofs_only,
2030  const bool boundary_dofs = false);
2031 
2051  template <int dim, int spacedim>
2052  void
2053  make_single_patch(SparsityPattern & block_list,
2054  const DoFHandler<dim, spacedim> &dof_handler,
2055  const unsigned int level,
2056  const bool interior_dofs_only = false);
2057 
2100  template <int dim, int spacedim>
2101  std::vector<types::global_dof_index>
2103  const DoFHandler<dim, spacedim> &dof_handler,
2104  const bool vector_valued_once = false,
2105  const std::vector<unsigned int> &target_component = {});
2106 
2123  template <int dim, int spacedim>
2124  std::vector<types::global_dof_index>
2126  const std::vector<unsigned int> &target_block =
2127  std::vector<unsigned int>());
2128 
2138  template <int dim, int spacedim>
2139  void
2141  std::vector<unsigned int> & active_fe_indices);
2142 
2170  template <int dim, int spacedim>
2171  unsigned int
2173  const std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
2174  &patch);
2175 
2198  template <int dim, int spacedim>
2199  void
2201  std::vector<types::global_dof_index> &mapping);
2202 
2213  template <int dim, int spacedim>
2214  void
2216  const std::set<types::boundary_id> &boundary_ids,
2217  std::vector<types::global_dof_index> &mapping);
2218 
2247  template <int dim, int spacedim>
2248  void
2250  const DoFHandler<dim, spacedim> &dof_handler,
2251  std::vector<Point<spacedim>> & support_points,
2252  const ComponentMask &mask = ComponentMask());
2253 
2257  template <int dim, int spacedim>
2258  void
2260  const ::hp::MappingCollection<dim, spacedim> &mapping,
2261  const DoFHandler<dim, spacedim> & dof_handler,
2262  std::vector<Point<spacedim>> & support_points,
2263  const ComponentMask & mask = ComponentMask());
2264 
2295  template <int dim, int spacedim>
2296  void
2298  const Mapping<dim, spacedim> & mapping,
2299  const DoFHandler<dim, spacedim> & dof_handler,
2300  std::map<types::global_dof_index, Point<spacedim>> &support_points,
2301  const ComponentMask & mask = ComponentMask());
2302 
2306  template <int dim, int spacedim>
2307  void
2309  const ::hp::MappingCollection<dim, spacedim> &mapping,
2310  const DoFHandler<dim, spacedim> & dof_handler,
2311  std::map<types::global_dof_index, Point<spacedim>> &support_points,
2312  const ComponentMask & mask = ComponentMask());
2313 
2314 
2335  template <int dim, int spacedim, class Comp>
2336  void
2338  const Mapping<dim, spacedim> & mapping,
2339  const DoFHandler<dim, spacedim> &dof_handler,
2340  std::map<Point<spacedim>, types::global_dof_index, Comp>
2341  &point_to_index_map);
2379  template <int dim, int spacedim, typename Number>
2380  void
2382  const Vector<Number> & cell_data,
2383  Vector<double> & dof_data,
2384  const unsigned int component = 0);
2385 
2386 
2463  template <int spacedim>
2464  void
2466  std::ostream & out,
2467  const std::map<types::global_dof_index, Point<spacedim>> &support_points);
2468 
2469 
2510  template <int dim, int spacedim, typename number>
2511  void
2513  const DoFHandler<dim, spacedim> &dof,
2515  AffineConstraints<number> & zero_boundary_constraints,
2516  const ComponentMask & component_mask = ComponentMask());
2517 
2528  template <int dim, int spacedim, typename number>
2529  void
2531  const DoFHandler<dim, spacedim> &dof,
2532  AffineConstraints<number> & zero_boundary_constraints,
2533  const ComponentMask & component_mask = ComponentMask());
2534 
2579 } // namespace DoFTools
2580 
2581 
2582 
2583 /* ------------------------- inline functions -------------- */
2584 
2585 #ifndef DOXYGEN
2586 
2587 namespace DoFTools
2588 {
2594  inline Coupling
2595  operator|=(Coupling &c1, const Coupling c2)
2596  {
2597  if (c2 == always)
2598  c1 = always;
2599  else if (c1 != always && c2 == nonzero)
2600  return c1 = nonzero;
2601  return c1;
2602  }
2603 
2604 
2610  inline Coupling
2611  operator|(const Coupling c1, const Coupling c2)
2612  {
2613  if (c1 == always || c2 == always)
2614  return always;
2615  if (c1 == nonzero || c2 == nonzero)
2616  return nonzero;
2617  return none;
2618  }
2619 
2620 
2621  // ---------------------- inline and template functions --------------------
2622 
2623  template <int dim, int spacedim, class Comp>
2624  void
2626  const Mapping<dim, spacedim> & mapping,
2627  const DoFHandler<dim, spacedim> &dof_handler,
2628  std::map<Point<spacedim>, types::global_dof_index, Comp>
2629  &point_to_index_map)
2630  {
2631  // let the checking of arguments be
2632  // done by the function first
2633  // called
2634  std::vector<Point<spacedim>> support_points(dof_handler.n_dofs());
2635  map_dofs_to_support_points(mapping, dof_handler, support_points);
2636  // now copy over the results of the
2637  // previous function into the
2638  // output arg
2639  point_to_index_map.clear();
2640  for (types::global_dof_index i = 0; i < dof_handler.n_dofs(); ++i)
2641  point_to_index_map[support_points[i]] = i;
2642  }
2643 } // namespace DoFTools
2644 
2645 #endif
2646 
2648 
2649 #endif
types::global_dof_index n_dofs() const
Abstract base class for mapping classes.
Definition: mapping.h:311
Definition: vector.h:109
#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
UpdateFlags & operator|=(UpdateFlags &f1, const UpdateFlags f2)
unsigned int level
Definition: grid_out.cc:4607
#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)
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)