Reference documentation for deal.II version GIT 9465d3a511 2022-11-30 23: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 
32 
33 #include <map>
34 #include <ostream>
35 #include <set>
36 #include <vector>
37 
38 
40 
41 // Forward declarations
42 #ifndef DOXYGEN
43 class BlockMask;
44 template <int dim, typename RangeNumberType>
45 class Function;
46 template <int dim, int spacedim>
47 class FiniteElement;
48 namespace hp
49 {
50  template <int dim, int spacedim>
51  class MappingCollection;
52  template <int dim, int spacedim>
53  class FECollection;
54 } // namespace hp
55 template <class MeshType>
56 class InterGridMap;
57 template <int dim, int spacedim>
58 class Mapping;
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, int spacedim, typename number = double>
409  void
411  const DoFHandler<dim, spacedim> &dof_handler,
412  SparsityPatternBase & sparsity_pattern,
414  const bool keep_constrained_dofs = true,
416 
482  template <int dim, int spacedim, typename number = double>
483  void
485  const DoFHandler<dim, spacedim> &dof_handler,
486  const Table<2, Coupling> & coupling,
487  SparsityPatternBase & sparsity_pattern,
489  const bool keep_constrained_dofs = true,
491 
512  template <int dim, int spacedim>
513  void
515  const DoFHandler<dim, spacedim> &dof_col,
516  SparsityPatternBase & sparsity);
517 
563  template <int dim, int spacedim>
564  void
566  SparsityPatternBase & sparsity_pattern);
567 
576  template <int dim, int spacedim, typename number>
577  void
579  const DoFHandler<dim, spacedim> &dof_handler,
580  SparsityPatternBase & sparsity_pattern,
581  const AffineConstraints<number> &constraints,
582  const bool keep_constrained_dofs = true,
584 
585 
605  template <int dim, int spacedim>
606  void
608  const DoFHandler<dim, spacedim> &dof,
609  SparsityPatternBase & sparsity,
610  const Table<2, Coupling> & cell_integrals_mask,
611  const Table<2, Coupling> & face_integrals_mask,
613 
614 
641  template <int dim, int spacedim, typename number>
642  void
644  const DoFHandler<dim, spacedim> &dof,
645  SparsityPatternBase & sparsity,
646  const AffineConstraints<number> &constraints,
647  const bool keep_constrained_dofs,
648  const Table<2, Coupling> & couplings,
649  const Table<2, Coupling> & face_couplings,
651  const std::function<
653  const unsigned int)> &face_has_flux_coupling =
654  &internal::always_couple_on_faces<dim, spacedim>);
655 
665  template <int dim, int spacedim>
666  void
668  const DoFHandler<dim, spacedim> & dof,
669  const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
670  SparsityPatternBase & sparsity_pattern);
671 
689  template <int dim, int spacedim, typename number>
690  void
692  const DoFHandler<dim, spacedim> &dof,
693  const std::map<types::boundary_id, const Function<spacedim, number> *>
694  & boundary_ids,
695  const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
696  SparsityPatternBase & sparsity);
697 
745  template <int dim, int spacedim, typename number>
746  void
748  AffineConstraints<number> & constraints);
749 
817  template <int dim, int spacedim>
818  void
820  const DoFHandler<dim, spacedim> & coarse_grid,
821  const unsigned int coarse_component,
822  const DoFHandler<dim, spacedim> & fine_grid,
823  const unsigned int fine_component,
824  const InterGridMap<DoFHandler<dim, spacedim>> &coarse_to_fine_grid_map,
825  AffineConstraints<double> & constraints);
826 
827 
844  template <int dim, int spacedim>
845  void
847  const DoFHandler<dim, spacedim> & coarse_grid,
848  const unsigned int coarse_component,
849  const DoFHandler<dim, spacedim> & fine_grid,
850  const unsigned int fine_component,
851  const InterGridMap<DoFHandler<dim, spacedim>> &coarse_to_fine_grid_map,
852  std::vector<std::map<types::global_dof_index, float>>
853  &transfer_representation);
854 
1029  template <typename FaceIterator, typename number>
1030  void
1032  const FaceIterator & face_1,
1033  const typename identity<FaceIterator>::type &face_2,
1034  AffineConstraints<number> & constraints,
1035  const ComponentMask & component_mask = ComponentMask(),
1036  const bool face_orientation = true,
1037  const bool face_flip = false,
1038  const bool face_rotation = false,
1040  const std::vector<unsigned int> &first_vector_components =
1041  std::vector<unsigned int>(),
1042  const number periodicity_factor = 1.);
1043 
1044 
1064  template <int dim, int spacedim, typename number>
1065  void
1067  const std::vector<GridTools::PeriodicFacePair<
1068  typename DoFHandler<dim, spacedim>::cell_iterator>> &periodic_faces,
1069  AffineConstraints<number> & constraints,
1070  const ComponentMask & component_mask = ComponentMask(),
1071  const std::vector<unsigned int> &first_vector_components =
1072  std::vector<unsigned int>(),
1073  const number periodicity_factor = 1.);
1074 
1075 
1076 
1106  template <int dim, int spacedim, typename number>
1107  void
1109  const DoFHandler<dim, spacedim> &dof_handler,
1110  const types::boundary_id b_id1,
1111  const types::boundary_id b_id2,
1112  const unsigned int direction,
1113  AffineConstraints<number> & constraints,
1114  const ComponentMask & component_mask = ComponentMask(),
1115  const number periodicity_factor = 1.);
1116 
1117 
1118 
1144  template <int dim, int spacedim, typename number>
1145  void
1147  const DoFHandler<dim, spacedim> &dof_handler,
1148  const types::boundary_id b_id,
1149  const unsigned int direction,
1150  AffineConstraints<number> & constraints,
1151  const ComponentMask & component_mask = ComponentMask(),
1152  const number periodicity_factor = 1.);
1153 
1171  template <int dim, int spacedim>
1172  IndexSet
1174 
1207  template <int dim, int spacedim>
1208  IndexSet
1209  extract_dofs(const DoFHandler<dim, spacedim> &dof_handler,
1210  const ComponentMask & component_mask);
1211 
1235  template <int dim, int spacedim>
1236  IndexSet
1237  extract_dofs(const DoFHandler<dim, spacedim> &dof_handler,
1238  const BlockMask & block_mask);
1239 
1244  template <int dim, int spacedim>
1245  void
1246  extract_level_dofs(const unsigned int level,
1247  const DoFHandler<dim, spacedim> &dof,
1248  const ComponentMask & component_mask,
1249  std::vector<bool> & selected_dofs);
1250 
1255  template <int dim, int spacedim>
1256  void
1257  extract_level_dofs(const unsigned int level,
1258  const DoFHandler<dim, spacedim> &dof,
1259  const BlockMask & component_mask,
1260  std::vector<bool> & selected_dofs);
1261 
1316  template <int dim, int spacedim>
1317  DEAL_II_DEPRECATED void
1319  const ComponentMask & component_mask,
1320  std::vector<bool> & selected_dofs,
1321  const std::set<types::boundary_id> &boundary_ids = {});
1322 
1365  template <int dim, int spacedim>
1366  IndexSet
1368  const ComponentMask &component_mask = ComponentMask(),
1369  const std::set<types::boundary_id> &boundary_ids = {});
1370 
1377  template <int dim, int spacedim>
1378  DEAL_II_DEPRECATED void
1380  const ComponentMask & component_mask,
1381  IndexSet & selected_dofs,
1382  const std::set<types::boundary_id> &boundary_ids = {});
1383 
1400  template <int dim, int spacedim>
1401  void
1403  const DoFHandler<dim, spacedim> & dof_handler,
1404  const ComponentMask & component_mask,
1405  std::vector<bool> & selected_dofs,
1406  const std::set<types::boundary_id> &boundary_ids =
1407  std::set<types::boundary_id>());
1408 
1436  template <int dim, int spacedim, typename number = double>
1437  IndexSet
1439  const DoFHandler<dim, spacedim> &dof_handler,
1440  const std::function<
1441  bool(const typename DoFHandler<dim, spacedim>::active_cell_iterator &)>
1442  & predicate,
1443  const AffineConstraints<number> &constraints = AffineConstraints<number>());
1444 
1480  template <int dim, int spacedim>
1481  void
1483  const ComponentMask & component_mask,
1484  std::vector<std::vector<bool>> & constant_modes);
1500  template <int dim, int spacedim>
1501  void
1504  std::vector<bool> & selected_dofs);
1505 
1520  template <int dim, int spacedim>
1521  IndexSet
1523 
1540  template <int dim, int spacedim>
1541  void
1543  IndexSet & dof_set);
1544 
1551  template <int dim, int spacedim>
1552  IndexSet
1554  const DoFHandler<dim, spacedim> &dof_handler,
1555  const unsigned int level);
1556 
1565  template <int dim, int spacedim>
1566  void
1568  const DoFHandler<dim, spacedim> &dof_handler,
1569  IndexSet & dof_set,
1570  const unsigned int level);
1571 
1581  template <int dim, int spacedim>
1582  IndexSet
1584 
1595  template <int dim, int spacedim>
1596  void
1598  IndexSet & dof_set);
1599 
1609  template <int dim, int spacedim>
1610  std::vector<IndexSet>
1612  const DoFHandler<dim, spacedim> &dof_handler,
1613  const ComponentMask & components = ComponentMask());
1614 
1628  template <int dim, int spacedim>
1629  std::vector<IndexSet>
1631  const DoFHandler<dim, spacedim> &dof_handler);
1632 
1647  template <int dim, int spacedim>
1648  std::vector<IndexSet>
1650  const DoFHandler<dim, spacedim> &dof_handler);
1651 
1656  template <int dim, int spacedim>
1657  IndexSet
1659  const DoFHandler<dim, spacedim> &dof_handler,
1660  const unsigned int level);
1661 
1668  template <int dim, int spacedim>
1669  void
1671  const DoFHandler<dim, spacedim> &dof_handler,
1672  const unsigned int level,
1673  IndexSet & dof_set);
1674 
1675 
1706  template <int dim, int spacedim>
1707  void
1709  std::vector<types::subdomain_id> &subdomain);
1710 
1736  template <int dim, int spacedim>
1737  unsigned int
1739  const DoFHandler<dim, spacedim> &dof_handler,
1740  const types::subdomain_id subdomain);
1741 
1761  template <int dim, int spacedim>
1762  void
1764  const DoFHandler<dim, spacedim> &dof_handler,
1765  const types::subdomain_id subdomain,
1766  std::vector<unsigned int> & n_dofs_on_subdomain);
1767 
1789  template <int dim, int spacedim>
1790  IndexSet
1792  const DoFHandler<dim, spacedim> &dof_handler,
1793  const types::subdomain_id subdomain);
1850  template <int dim, int spacedim>
1851  std::vector<types::global_dof_index>
1853  const std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
1854  &patch);
1855 
1876  template <int dim, int spacedim>
1877  void
1878  make_cell_patches(SparsityPattern & block_list,
1879  const DoFHandler<dim, spacedim> &dof_handler,
1880  const unsigned int level,
1881  const std::vector<bool> & selected_dofs = {},
1882  const types::global_dof_index offset = 0);
1883 
1935  template <int dim, int spacedim>
1936  std::vector<unsigned int>
1937  make_vertex_patches(SparsityPattern & block_list,
1938  const DoFHandler<dim, spacedim> &dof_handler,
1939  const unsigned int level,
1940  const bool interior_dofs_only,
1941  const bool boundary_patches = false,
1942  const bool level_boundary_patches = false,
1943  const bool single_cell_patches = false,
1944  const bool invert_vertex_mapping = false);
1945 
1960  template <int dim, int spacedim>
1961  std::vector<unsigned int>
1962  make_vertex_patches(SparsityPattern & block_list,
1963  const DoFHandler<dim, spacedim> &dof_handler,
1964  const unsigned int level,
1965  const BlockMask &exclude_boundary_dofs = BlockMask(),
1966  const bool boundary_patches = false,
1967  const bool level_boundary_patches = false,
1968  const bool single_cell_patches = false,
1969  const bool invert_vertex_mapping = false);
1970 
2008  template <int dim, int spacedim>
2009  void
2010  make_child_patches(SparsityPattern & block_list,
2011  const DoFHandler<dim, spacedim> &dof_handler,
2012  const unsigned int level,
2013  const bool interior_dofs_only,
2014  const bool boundary_dofs = false);
2015 
2035  template <int dim, int spacedim>
2036  void
2037  make_single_patch(SparsityPattern & block_list,
2038  const DoFHandler<dim, spacedim> &dof_handler,
2039  const unsigned int level,
2040  const bool interior_dofs_only = false);
2041 
2084  template <int dim, int spacedim>
2085  std::vector<types::global_dof_index>
2087  const DoFHandler<dim, spacedim> &dof_handler,
2088  const bool vector_valued_once = false,
2089  const std::vector<unsigned int> &target_component = {});
2090 
2107  template <int dim, int spacedim>
2108  std::vector<types::global_dof_index>
2110  const std::vector<unsigned int> &target_block =
2111  std::vector<unsigned int>());
2112 
2128  template <int dim, int spacedim>
2129  DEAL_II_DEPRECATED_EARLY void
2131  std::vector<unsigned int> & active_fe_indices);
2132 
2160  template <int dim, int spacedim>
2161  unsigned int
2163  const std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
2164  &patch);
2165 
2188  template <int dim, int spacedim>
2189  void
2191  std::vector<types::global_dof_index> &mapping);
2192 
2203  template <int dim, int spacedim>
2204  void
2206  const std::set<types::boundary_id> &boundary_ids,
2207  std::vector<types::global_dof_index> &mapping);
2208 
2237  template <int dim, int spacedim>
2238  void
2240  const DoFHandler<dim, spacedim> &dof_handler,
2241  std::vector<Point<spacedim>> & support_points,
2242  const ComponentMask &mask = ComponentMask());
2243 
2247  template <int dim, int spacedim>
2248  void
2250  const ::hp::MappingCollection<dim, spacedim> &mapping,
2251  const DoFHandler<dim, spacedim> & dof_handler,
2252  std::vector<Point<spacedim>> & support_points,
2253  const ComponentMask & mask = ComponentMask());
2254 
2285  template <int dim, int spacedim>
2286  void
2288  const Mapping<dim, spacedim> & mapping,
2289  const DoFHandler<dim, spacedim> & dof_handler,
2290  std::map<types::global_dof_index, Point<spacedim>> &support_points,
2291  const ComponentMask & mask = ComponentMask());
2292 
2296  template <int dim, int spacedim>
2297  void
2299  const ::hp::MappingCollection<dim, spacedim> &mapping,
2300  const DoFHandler<dim, spacedim> & dof_handler,
2301  std::map<types::global_dof_index, Point<spacedim>> &support_points,
2302  const ComponentMask & mask = ComponentMask());
2303 
2304 
2325  template <int dim, int spacedim, class Comp>
2326  void
2328  const Mapping<dim, spacedim> & mapping,
2329  const DoFHandler<dim, spacedim> &dof_handler,
2330  std::map<Point<spacedim>, types::global_dof_index, Comp>
2331  &point_to_index_map);
2369  template <int dim, int spacedim, typename Number>
2370  void
2372  const Vector<Number> & cell_data,
2373  Vector<double> & dof_data,
2374  const unsigned int component = 0);
2375 
2376 
2453  template <int spacedim>
2454  void
2456  std::ostream & out,
2457  const std::map<types::global_dof_index, Point<spacedim>> &support_points);
2458 
2459 
2500  template <int dim, int spacedim, typename number>
2501  void
2503  const DoFHandler<dim, spacedim> &dof,
2505  AffineConstraints<number> & zero_boundary_constraints,
2506  const ComponentMask & component_mask = ComponentMask());
2507 
2518  template <int dim, int spacedim, typename number>
2519  void
2521  const DoFHandler<dim, spacedim> &dof,
2522  AffineConstraints<number> & zero_boundary_constraints,
2523  const ComponentMask & component_mask = ComponentMask());
2524 
2569 } // namespace DoFTools
2570 
2571 
2572 
2573 /* ------------------------- inline functions -------------- */
2574 
2575 #ifndef DOXYGEN
2576 
2577 namespace DoFTools
2578 {
2584  inline Coupling
2585  operator|=(Coupling &c1, const Coupling c2)
2586  {
2587  if (c2 == always)
2588  c1 = always;
2589  else if (c1 != always && c2 == nonzero)
2590  return c1 = nonzero;
2591  return c1;
2592  }
2593 
2594 
2600  inline Coupling
2601  operator|(const Coupling c1, const Coupling c2)
2602  {
2603  if (c1 == always || c2 == always)
2604  return always;
2605  if (c1 == nonzero || c2 == nonzero)
2606  return nonzero;
2607  return none;
2608  }
2609 
2610 
2611  // ---------------------- inline and template functions --------------------
2612 
2613  template <int dim, int spacedim, class Comp>
2614  void
2616  const Mapping<dim, spacedim> & mapping,
2617  const DoFHandler<dim, spacedim> &dof_handler,
2618  std::map<Point<spacedim>, types::global_dof_index, Comp>
2619  &point_to_index_map)
2620  {
2621  // let the checking of arguments be
2622  // done by the function first
2623  // called
2624  std::vector<Point<spacedim>> support_points(dof_handler.n_dofs());
2625  map_dofs_to_support_points(mapping, dof_handler, support_points);
2626  // now copy over the results of the
2627  // previous function into the
2628  // output arg
2629  point_to_index_map.clear();
2630  for (types::global_dof_index i = 0; i < dof_handler.n_dofs(); ++i)
2631  point_to_index_map[support_points[i]] = i;
2632  }
2633 } // namespace DoFTools
2634 
2635 #endif
2636 
2638 
2639 #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:458
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:459
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 compute_intergrid_constraints(const DoFHandler< dim, spacedim > &coarse_grid, const unsigned int coarse_component, const DoFHandler< dim, spacedim > &fine_grid, const unsigned int fine_component, const InterGridMap< DoFHandler< dim, spacedim >> &coarse_to_fine_grid_map, AffineConstraints< double > &constraints)
void make_flux_sparsity_pattern(const DoFHandler< dim, spacedim > &dof_handler, 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)
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, SparsityPatternBase &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:1551
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:545
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:796
IndexSet dof_indices_with_subdomain_association(const DoFHandler< dim, spacedim > &dof_handler, const types::subdomain_id subdomain)
Definition: dof_tools.cc:1658
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:2338
std::vector< IndexSet > locally_owned_dofs_per_subdomain(const DoFHandler< dim, spacedim > &dof_handler)
Definition: dof_tools.cc:1380
IndexSet extract_locally_relevant_dofs(const DoFHandler< dim, spacedim > &dof_handler)
Definition: dof_tools.cc:1140
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:1367
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:2430
IndexSet extract_dofs(const DoFHandler< dim, spacedim > &dof_handler, const ComponentMask &component_mask)
Definition: dof_tools.cc:386
IndexSet extract_locally_active_dofs(const DoFHandler< dim, spacedim > &dof_handler)
Definition: dof_tools.cc:1048
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:2377
IndexSet extract_locally_relevant_level_dofs(const DoFHandler< dim, spacedim > &dof_handler, const unsigned int level)
Definition: dof_tools.cc:1190
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:2248
std::vector< IndexSet > locally_owned_dofs_per_component(const DoFHandler< dim, spacedim > &dof_handler, const ComponentMask &components=ComponentMask())
Definition: dof_tools.cc:439
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:1017
IndexSet extract_locally_active_level_dofs(const DoFHandler< dim, spacedim > &dof_handler, const unsigned int level)
Definition: dof_tools.cc:1091
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:2578
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:1977
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:473
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:714
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:302
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:1885
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:2515
void map_dof_to_boundary_indices(const DoFHandler< dim, spacedim > &dof_handler, std::vector< types::global_dof_index > &mapping)
Definition: dof_tools.cc:2066
std::vector< IndexSet > locally_relevant_dofs_per_subdomain(const DoFHandler< dim, spacedim > &dof_handler)
Definition: dof_tools.cc:1475
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:2473
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:2779
unsigned int count_dofs_with_subdomain_association(const DoFHandler< dim, spacedim > &dof_handler, const types::subdomain_id subdomain)
Definition: dof_tools.cc:1641
unsigned int count_dofs_on_patch(const std::vector< typename DoFHandler< dim, spacedim >::active_cell_iterator > &patch)
Definition: dof_tools.cc:2748
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:1008
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:1251
@ matrix
Contents is actually a matrix.
Definition: hp.h:118
const types::subdomain_id invalid_subdomain_id
Definition: types.h:291
unsigned int global_dof_index
Definition: types.h:81
unsigned int subdomain_id
Definition: types.h:43
unsigned int boundary_id
Definition: types.h:134
ParameterHandler::OutputStyle operator|(const ParameterHandler::OutputStyle f1, const ParameterHandler::OutputStyle f2)