Reference documentation for deal.II version 8.1.0
dof_tools.h
1 // ---------------------------------------------------------------------
2 // @f$Id: dof_tools.h 31932 2013-12-08 02:15:54Z heister @f$
3 //
4 // Copyright (C) 1999 - 2013 by the deal.II authors
5 //
6 // This file is part of the deal.II library.
7 //
8 // The deal.II library is free software; you can use it, redistribute
9 // it, and/or modify it under the terms of the GNU Lesser General
10 // Public License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 // The full text of the license can be found in the file LICENSE at
13 // the top level of the deal.II distribution.
14 //
15 // ---------------------------------------------------------------------
16 
17 #ifndef __deal2__dof_tools_h
18 #define __deal2__dof_tools_h
19 
20 
21 #include <deal.II/base/config.h>
23 #include <deal.II/base/table.h>
24 #include <deal.II/base/index_set.h>
25 #include <deal.II/base/point.h>
26 #include <deal.II/lac/constraint_matrix.h>
27 #include <deal.II/lac/sparsity_pattern.h>
28 #include <deal.II/dofs/function_map.h>
29 #include <deal.II/dofs/dof_handler.h>
30 #include <deal.II/fe/fe.h>
31 #include <deal.II/fe/component_mask.h>
32 #include <deal.II/hp/mapping_collection.h>
33 
34 #include <vector>
35 #include <set>
36 #include <map>
37 
39 
40 template<int dim, class T> class Table;
41 class SparsityPattern;
42 template <typename number> class Vector;
43 template <int dim> class Function;
44 template <int dim, int spacedim> class FiniteElement;
45 template <int dim, int spacedim> class DoFHandler;
46 namespace hp
47 {
48  template <int dim, int spacedim> class DoFHandler;
49  template <int dim, int spacedim> class MappingCollection;
50 }
51 template <int dim, int spacedim> class MGDoFHandler;
52 class ConstraintMatrix;
53 template <class GridClass> class InterGridMap;
54 template <int dim, int spacedim> class Mapping;
55 
56 namespace GridTools
57 {
58  template <typename CellIterator> struct PeriodicFacePair;
59 }
60 
61 //TODO: map_support_points_to_dofs should generate a multimap, rather than just a map, since several dofs may be located at the same support point
62 
188 namespace DoFTools
189 {
203  enum Coupling
204  {
208  none,
219  };
220 
230  template <int dim, int spacedim>
231  unsigned int
232  max_dofs_per_cell (const DoFHandler<dim,spacedim> &dh);
233 
239  template <int dim, int spacedim>
240  unsigned int
241  max_dofs_per_cell (const hp::DoFHandler<dim,spacedim> &dh);
242 
243 
252  template <int dim, int spacedim>
253  unsigned int
254  max_dofs_per_face (const DoFHandler<dim,spacedim> &dh);
255 
264  template <int dim, int spacedim>
265  unsigned int
266  max_dofs_per_face (const hp::DoFHandler<dim,spacedim> &dh);
267 
276  template <int dim, int spacedim>
277  unsigned int
278  max_dofs_per_vertex (const DoFHandler<dim,spacedim> &dh);
279 
288  template <int dim, int spacedim>
289  unsigned int
290  max_dofs_per_vertex (const hp::DoFHandler<dim,spacedim> &dh);
291 
301  template <int dim, int spacedim>
302  unsigned int
303  n_components (const DoFHandler<dim,spacedim> &dh);
304 
314  template <int dim, int spacedim>
315  unsigned int
316  n_components (const hp::DoFHandler<dim,spacedim> &dh);
317 
327  template <int dim, int spacedim>
328  bool
329  fe_is_primitive (const DoFHandler<dim,spacedim> &dh);
330 
340  template <int dim, int spacedim>
341  bool
342  fe_is_primitive (const hp::DoFHandler<dim,spacedim> &dh);
343 
416  template <class DH, class SparsityPattern>
417  void
418  make_sparsity_pattern (const DH &dof,
419  SparsityPattern &sparsity_pattern,
420  const ConstraintMatrix &constraints = ConstraintMatrix(),
421  const bool keep_constrained_dofs = true,
423 
514  template <class DH, class SparsityPattern>
515  void
516  make_sparsity_pattern (const DH &dof,
517  const Table<2, Coupling> &coupling,
518  SparsityPattern &sparsity_pattern,
519  const ConstraintMatrix &constraints = ConstraintMatrix(),
520  const bool keep_constrained_dofs = true,
522 
530  template <class DH, class SparsityPattern>
531  void
532  make_sparsity_pattern (const DH &dof,
533  const std::vector<std::vector<bool> > &mask,
534  SparsityPattern &sparsity_pattern) DEAL_II_DEPRECATED;
535 
557  template <class DH, class SparsityPattern>
558  void
559  make_sparsity_pattern (const DH &dof_row,
560  const DH &dof_col,
561  SparsityPattern &sparsity);
562 
574  template <class DH, class SparsityPattern>
575  void
576  make_boundary_sparsity_pattern (const DH &dof,
577  const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
578  SparsityPattern &sparsity_pattern);
579 
598  template <class DH, class SparsityPattern>
599  void
600  make_boundary_sparsity_pattern (const DH &dof,
601  const typename FunctionMap<DH::space_dimension>::type &boundary_indicators,
602  const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
603  SparsityPattern &sparsity);
604 
613  template<class DH, class SparsityPattern>
614  void
615  make_flux_sparsity_pattern (const DH &dof_handler,
616  SparsityPattern &sparsity_pattern);
617 
625  template<class DH, class SparsityPattern>
626  void
627  make_flux_sparsity_pattern (const DH &dof_handler,
628  SparsityPattern &sparsity_pattern,
629  const ConstraintMatrix &constraints,
630  const bool keep_constrained_dofs = true,
632 
645  template <class DH, class SparsityPattern>
646  void
647  make_flux_sparsity_pattern (const DH &dof,
648  SparsityPattern &sparsity,
649  const Table<2,Coupling> &int_mask,
650  const Table<2,Coupling> &flux_mask);
651 
653 
699  template <class DH>
700  void
701  make_hanging_node_constraints (const DH &dof_handler,
702  ConstraintMatrix &constraints);
704 
705 
856  template<typename FaceIterator>
857  void
859  (const FaceIterator &face_1,
860  const typename identity<FaceIterator>::type &face_2,
861  ::ConstraintMatrix &constraint_matrix,
862  const ComponentMask &component_mask = ComponentMask(),
863  const bool face_orientation = true,
864  const bool face_flip = false,
865  const bool face_rotation = false);
866 
867 
868 
914  template<typename DH>
915  void
917  (const DH &dof_handler,
918  const types::boundary_id b_id1,
919  const types::boundary_id b_id2,
920  const int direction,
921  ::ConstraintMatrix &constraint_matrix,
922  const ComponentMask &component_mask = ComponentMask());
923 
924 
943  template<typename DH>
944  void
946  (const DH &dof_handler,
947  const types::boundary_id b_id1,
948  const types::boundary_id b_id2,
949  const int direction,
951  ::ConstraintMatrix &constraint_matrix,
952  const ComponentMask &component_mask = ComponentMask());
953 
954 
977  template<typename DH>
978  void
980  (const DH &dof_handler,
981  const types::boundary_id b_id,
982  const int direction,
983  ::ConstraintMatrix &constraint_matrix,
984  const ComponentMask &component_mask = ComponentMask());
985 
986 
1007  template<typename DH>
1008  void
1010  (const DH &dof_handler,
1011  const types::boundary_id b_id,
1012  const int direction,
1014  ::ConstraintMatrix &constraint_matrix,
1015  const ComponentMask &component_mask = ComponentMask());
1016 
1027  template<typename DH>
1028  void
1031  &periodic_faces,
1032  ::ConstraintMatrix &constraint_matrix,
1033  const ComponentMask &component_mask = ComponentMask());
1034 
1035 
1037 
1038 
1070  template <class DH, typename Number>
1071  void
1072  distribute_cell_to_dof_vector (const DH &dof_handler,
1073  const Vector<Number> &cell_data,
1074  Vector<double> &dof_data,
1075  const unsigned int component = 0);
1076 
1103  template <int dim, int spacedim>
1104  void
1105  extract_dofs (const DoFHandler<dim,spacedim> &dof_handler,
1106  const ComponentMask &component_mask,
1107  std::vector<bool> &selected_dofs);
1108 
1112  template <int dim, int spacedim>
1113  void
1114  extract_dofs (const hp::DoFHandler<dim,spacedim> &dof_handler,
1115  const ComponentMask &component_mask,
1116  std::vector<bool> &selected_dofs);
1117 
1131  template <int dim, int spacedim>
1132  void
1133  extract_dofs (const DoFHandler<dim,spacedim> &dof_handler,
1134  const BlockMask &block_mask,
1135  std::vector<bool> &selected_dofs);
1136 
1140  template <int dim, int spacedim>
1141  void
1142  extract_dofs (const hp::DoFHandler<dim,spacedim> &dof_handler,
1143  const BlockMask &block_mask,
1144  std::vector<bool> &selected_dofs);
1145 
1150  template <class DH>
1151  void
1152  extract_level_dofs (const unsigned int level,
1153  const DH &dof,
1154  const ComponentMask &component_mask,
1155  std::vector<bool> &selected_dofs);
1156 
1161  template <class DH>
1162  void
1163  extract_level_dofs (const unsigned int level,
1164  const DH &dof,
1165  const BlockMask &component_mask,
1166  std::vector<bool> &selected_dofs);
1167 
1221  template <class DH>
1222  void
1223  extract_boundary_dofs (const DH &dof_handler,
1224  const ComponentMask &component_mask,
1225  std::vector<bool> &selected_dofs,
1226  const std::set<types::boundary_id> &boundary_indicators = std::set<types::boundary_id>());
1227 
1259  template <class DH>
1260  void
1261  extract_boundary_dofs (const DH &dof_handler,
1262  const ComponentMask &component_mask,
1263  IndexSet &selected_dofs,
1264  const std::set<types::boundary_id> &boundary_indicators = std::set<types::boundary_id>());
1265 
1283  template <class DH>
1284  void
1285  extract_dofs_with_support_on_boundary (const DH &dof_handler,
1286  const ComponentMask &component_mask,
1287  std::vector<bool> &selected_dofs,
1288  const std::set<types::boundary_id> &boundary_indicators = std::set<types::boundary_id>());
1289 
1303  template <int dim, int spacedim>
1304  void
1306  std::vector<bool> &selected_dofs);
1308 
1322  template <class DH>
1323  void
1324  extract_subdomain_dofs (const DH &dof_handler,
1325  const types::subdomain_id subdomain_id,
1326  std::vector<bool> &selected_dofs);
1327 
1328 
1335  template <class DH>
1336  void
1337  extract_locally_owned_dofs (const DH &dof_handler,
1338  IndexSet &dof_set);
1339 
1340 
1356  template <class DH>
1357  void
1358  extract_locally_active_dofs (const DH &dof_handler,
1359  IndexSet &dof_set);
1360 
1370  template <class DH>
1371  void
1372  extract_locally_relevant_dofs (const DH &dof_handler,
1373  IndexSet &dof_set);
1374 
1407  template <class DH>
1408  void
1409  get_subdomain_association (const DH &dof_handler,
1410  std::vector<types::subdomain_id> &subdomain);
1411 
1439  template <class DH>
1440  unsigned int
1441  count_dofs_with_subdomain_association (const DH &dof_handler,
1442  const types::subdomain_id subdomain);
1443 
1464  template <class DH>
1465  void
1466  count_dofs_with_subdomain_association (const DH &dof_handler,
1467  const types::subdomain_id subdomain,
1468  std::vector<unsigned int> &n_dofs_on_subdomain);
1469 
1492  template <class DH>
1493  IndexSet
1494  dof_indices_with_subdomain_association (const DH &dof_handler,
1495  const types::subdomain_id subdomain);
1496  // @}
1519  template <class DH, class Sparsity>
1520  void make_cell_patches(Sparsity &block_list,
1521  const DH &dof_handler,
1522  const unsigned int level,
1523  const std::vector<bool> &selected_dofs = std::vector<bool>(),
1524  types::global_dof_index offset = 0);
1525 
1567  template <class DH>
1568  void make_vertex_patches(SparsityPattern &block_list,
1569  const DH &dof_handler,
1570  const unsigned int level,
1571  const bool interior_dofs_only,
1572  const bool boundary_patches = false,
1573  const bool level_boundary_patches = false,
1574  const bool single_cell_patches = false);
1575 
1614  template <class DH>
1615  void make_child_patches(SparsityPattern &block_list,
1616  const DH &dof_handler,
1617  const unsigned int level,
1618  const bool interior_dofs_only,
1619  const bool boundary_dofs = false);
1620 
1640  template <class DH>
1641  void make_single_patch(SparsityPattern &block_list,
1642  const DH &dof_handler,
1643  const unsigned int level,
1644  const bool interior_dofs_only = false);
1645 
1647 
1675  template <class DH>
1676  void
1677  extract_constant_modes (const DH &dof_handler,
1678  const ComponentMask &component_mask,
1679  std::vector<std::vector<bool> > &constant_modes);
1680 
1692  template <class DH>
1693  void
1694  get_active_fe_indices (const DH &dof_handler,
1695  std::vector<unsigned int> &active_fe_indices);
1696 
1735  template <class DH>
1736  void
1737  count_dofs_per_component (const DH &dof_handler,
1738  std::vector<types::global_dof_index> &dofs_per_component,
1739  const bool vector_valued_once = false,
1740  std::vector<unsigned int> target_component
1741  = std::vector<unsigned int>());
1742 
1759  template <class DH>
1760  void
1761  count_dofs_per_block (const DH &dof,
1762  std::vector<types::global_dof_index> &dofs_per_block,
1763  const std::vector<unsigned int> &target_block
1764  = std::vector<unsigned int>());
1765 
1771  template <int dim, int spacedim>
1772  void
1773  count_dofs_per_component (const DoFHandler<dim,spacedim> &dof_handler,
1774  std::vector<types::global_dof_index> &dofs_per_component,
1775  std::vector<unsigned int> target_component) DEAL_II_DEPRECATED;
1776 
1875  template <int dim, int spacedim>
1876  void
1878  const unsigned int coarse_component,
1879  const DoFHandler<dim,spacedim> &fine_grid,
1880  const unsigned int fine_component,
1881  const InterGridMap<DoFHandler<dim,spacedim> > &coarse_to_fine_grid_map,
1882  ConstraintMatrix &constraints);
1883 
1884 
1898  template <int dim, int spacedim>
1899  void
1901  const unsigned int coarse_component,
1902  const DoFHandler<dim,spacedim> &fine_grid,
1903  const unsigned int fine_component,
1904  const InterGridMap<DoFHandler<dim,spacedim> > &coarse_to_fine_grid_map,
1905  std::vector<std::map<types::global_dof_index, float> > &transfer_representation);
1906 
1921  template <class DH>
1922  void
1923  map_dof_to_boundary_indices (const DH &dof_handler,
1924  std::vector<types::global_dof_index> &mapping);
1925 
1935  template <class DH>
1936  void
1937  map_dof_to_boundary_indices (const DH &dof_handler,
1938  const std::set<types::boundary_id> &boundary_indicators,
1939  std::vector<types::global_dof_index> &mapping);
1940 
1959  template <int dim, int spacedim>
1960  void
1962  const DoFHandler<dim,spacedim> &dof_handler,
1963  std::vector<Point<spacedim> > &support_points);
1964 
1969  template <int dim, int spacedim>
1970  void
1971  map_dofs_to_support_points (const ::hp::MappingCollection<dim,spacedim> &mapping,
1972  const hp::DoFHandler<dim,spacedim> &dof_handler,
1973  std::vector<Point<spacedim> > &support_points);
1974 
2002  template <int dim, int spacedim>
2003  void
2005  const DoFHandler<dim,spacedim> &dof_handler,
2006  std::map<types::global_dof_index, Point<spacedim> > &support_points);
2007 
2011  template <int dim, int spacedim>
2012  void
2013  map_dofs_to_support_points (const ::hp::MappingCollection<dim,spacedim> &mapping,
2014  const hp::DoFHandler<dim,spacedim> &dof_handler,
2015  std::map<types::global_dof_index, Point<spacedim> > &support_points);
2016 
2017 
2034  template <class DH, class Comp>
2035  void
2037  const DH &dof_handler,
2038  std::map<Point<DH::space_dimension>, types::global_dof_index, Comp> &point_to_index_map);
2039 
2049  template <int dim, int spacedim>
2050  void
2052  const Table<2, Coupling> &table_by_component,
2053  std::vector<Table<2,Coupling> > &tables_by_block);
2054 
2095  template <int dim, int spacedim, template <int, int> class DH>
2096  void
2097  make_zero_boundary_constraints (const DH<dim,spacedim> &dof,
2098  const types::boundary_id boundary_indicator,
2099  ConstraintMatrix &zero_boundary_constraints,
2100  const ComponentMask &component_mask = ComponentMask());
2101 
2112  template <int dim, int spacedim, template <int, int> class DH>
2113  void
2114  make_zero_boundary_constraints (const DH<dim,spacedim> &dof,
2115  ConstraintMatrix &zero_boundary_constraints,
2116  const ComponentMask &component_mask = ComponentMask());
2117 
2118 
2128  template <int dim, int spacedim>
2129  void
2131  const Table<2, Coupling> &table_by_component,
2132  std::vector<Table<2,Coupling> > &tables_by_block);
2133 
2140  template <int dim, int spacedim>
2143  const Table<2,Coupling> &component_couplings);
2144 
2152  template <int dim, int spacedim>
2153  std::vector<Table<2,Coupling> >
2155  const Table<2,Coupling> &component_couplings);
2161  DeclException0 (ExcFiniteElementsDontMatch);
2167  DeclException0 (ExcGridNotCoarser);
2174  DeclException0 (ExcGridsDontMatch);
2181  DeclException0 (ExcNoFESelected);
2187  DeclException0 (ExcInvalidBoundaryIndicator);
2188 }
2189 
2190 
2191 
2192 /* ------------------------- inline functions -------------- */
2193 
2194 #ifndef DOXYGEN
2195 
2196 namespace DoFTools
2197 {
2203  inline
2205  const Coupling c2)
2206  {
2207  if (c2 == always)
2208  c1 = always;
2209  else if (c1 != always && c2 == nonzero)
2210  return c1 = nonzero;
2211  return c1;
2212  }
2213 
2214 
2220  inline
2221  Coupling operator | (const Coupling c1,
2222  const Coupling c2)
2223  {
2224  if (c1 == always || c2 == always)
2225  return always;
2226  if (c1 == nonzero || c2 == nonzero)
2227  return nonzero;
2228  return none;
2229  }
2230 
2231 
2232 // ---------------------- inline and template functions --------------------
2233 
2234  template <int dim, int spacedim>
2235  inline
2236  unsigned int
2237  max_dofs_per_cell (const DoFHandler<dim,spacedim> &dh)
2238  {
2239  return dh.get_fe().dofs_per_cell;
2240  }
2241 
2242 
2243  template <int dim, int spacedim>
2244  inline
2245  unsigned int
2246  max_dofs_per_face (const DoFHandler<dim,spacedim> &dh)
2247  {
2248  return dh.get_fe().dofs_per_face;
2249  }
2250 
2251 
2252  template <int dim, int spacedim>
2253  inline
2254  unsigned int
2255  max_dofs_per_vertex (const DoFHandler<dim,spacedim> &dh)
2256  {
2257  return dh.get_fe().dofs_per_vertex;
2258  }
2259 
2260 
2261  template <int dim, int spacedim>
2262  inline
2263  unsigned int
2264  n_components (const DoFHandler<dim,spacedim> &dh)
2265  {
2266  return dh.get_fe().n_components();
2267  }
2268 
2269 
2270 
2271  template <int dim, int spacedim>
2272  inline
2273  bool
2274  fe_is_primitive (const DoFHandler<dim,spacedim> &dh)
2275  {
2276  return dh.get_fe().is_primitive();
2277  }
2278 
2279 
2280  template <int dim, int spacedim>
2281  inline
2282  unsigned int
2283  max_dofs_per_cell (const hp::DoFHandler<dim,spacedim> &dh)
2284  {
2285  return dh.get_fe().max_dofs_per_cell ();
2286  }
2287 
2288 
2289  template <int dim, int spacedim>
2290  inline
2291  unsigned int
2292  max_dofs_per_face (const hp::DoFHandler<dim,spacedim> &dh)
2293  {
2294  return dh.get_fe().max_dofs_per_face ();
2295  }
2296 
2297 
2298  template <int dim, int spacedim>
2299  inline
2300  unsigned int
2301  max_dofs_per_vertex (const hp::DoFHandler<dim,spacedim> &dh)
2302  {
2303  return dh.get_fe().max_dofs_per_vertex ();
2304  }
2305 
2306 
2307  template <int dim, int spacedim>
2308  inline
2309  unsigned int
2310  n_components (const hp::DoFHandler<dim,spacedim> &dh)
2311  {
2312  return dh.get_fe()[0].n_components();
2313  }
2314 
2315 
2316  template <int dim, int spacedim>
2317  inline
2318  bool
2319  fe_is_primitive (const hp::DoFHandler<dim,spacedim> &dh)
2320  {
2321  return dh.get_fe()[0].is_primitive();
2322  }
2323 
2324 
2325  template <class DH, class SparsityPattern>
2326  inline
2327  void
2328  make_sparsity_pattern (const DH &dof,
2329  const std::vector<std::vector<bool> > &mask,
2330  SparsityPattern &sparsity_pattern)
2331  {
2332  const unsigned int ncomp = dof.get_fe().n_components();
2333 
2334  Assert (mask.size() == ncomp,
2335  ExcDimensionMismatch(mask.size(), ncomp));
2336  for (unsigned int i=0; i<mask.size(); ++i)
2337  Assert (mask[i].size() == ncomp,
2338  ExcDimensionMismatch(mask[i].size(), ncomp));
2339  // Create a coupling table out of the mask
2340  Table<2,DoFTools::Coupling> couplings(ncomp, ncomp);
2341  for (unsigned int i=0; i<ncomp; ++i)
2342  for (unsigned int j=0; j<ncomp; ++j)
2343  if (mask[i][j])
2344  couplings(i,j) = always;
2345  else
2346  couplings(i,j) = none;
2347 
2348  // Call the new function
2349  make_sparsity_pattern(dof, couplings, sparsity_pattern);
2350  }
2351 
2352 
2353  template <class DH, class Comp>
2354  void
2357  const DH &dof_handler,
2358  std::map<Point<DH::space_dimension>, types::global_dof_index, Comp> &point_to_index_map)
2359  {
2360  // let the checking of arguments be
2361  // done by the function first
2362  // called
2363  std::vector<Point<DH::space_dimension> > support_points (dof_handler.n_dofs());
2364  map_dofs_to_support_points (mapping, dof_handler, support_points);
2365  // now copy over the results of the
2366  // previous function into the
2367  // output arg
2368  point_to_index_map.clear ();
2369  for (types::global_dof_index i=0; i<dof_handler.n_dofs(); ++i)
2370  point_to_index_map[support_points[i]] = i;
2371  }
2372 }
2373 
2374 #endif
2375 
2376 DEAL_II_NAMESPACE_CLOSE
2377 
2378 #endif
static const unsigned int invalid_unsigned_int
Definition: types.h:191
const types::subdomain_id invalid_subdomain_id
Definition: types.h:267
void map_dof_to_boundary_indices(const DH &dof_handler, std::vector< types::global_dof_index > &mapping)
std::map< types::boundary_id, const Function< dim > * > type
Definition: function_map.h:56
void map_dofs_to_support_points(const Mapping< dim, spacedim > &mapping, const DoFHandler< dim, spacedim > &dof_handler, std::vector< Point< spacedim > > &support_points)
void make_sparsity_pattern(const DH &dof_row, const DH &dof_col, SparsityPattern &sparsity)
unsigned int count_dofs_with_subdomain_association(const DH &dof_handler, const types::subdomain_id subdomain)
void make_boundary_sparsity_pattern(const DH &dof, const typename FunctionMap< DH::space_dimension >::type &boundary_indicators, const std::vector< types::global_dof_index > &dof_to_boundary_mapping, SparsityPattern &sparsity)
void make_cell_patches(Sparsity &block_list, const DH &dof_handler, const unsigned int level, const std::vector< bool > &selected_dofs=std::vector< bool >(), types::global_dof_index offset=0)
void extract_hanging_node_dofs(const DoFHandler< dim, spacedim > &dof_handler, std::vector< bool > &selected_dofs)
void make_hanging_node_constraints(const DH &dof_handler, ConstraintMatrix &constraints)
void make_flux_sparsity_pattern(const DH &dof, SparsityPattern &sparsity, const Table< 2, Coupling > &int_mask, const Table< 2, Coupling > &flux_mask)
const hp::FECollection< dim, spacedim > & get_fe() const
void extract_locally_active_dofs(const DH &dof_handler, IndexSet &dof_set)
void make_periodicity_constraints(const FaceIterator &face_1, const typename identity< FaceIterator >::type &face_2,::ConstraintMatrix &constraint_matrix, const ComponentMask &component_mask=ComponentMask(), const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false)
unsigned int global_dof_index
Definition: types.h:100
#define Assert(cond, exc)
Definition: exceptions.h:299
void extract_subdomain_dofs(const DH &dof_handler, const types::subdomain_id subdomain_id, std::vector< bool > &selected_dofs)
void extract_boundary_dofs(const DH &dof_handler, const ComponentMask &component_mask, std::vector< bool > &selected_dofs, const std::set< types::boundary_id > &boundary_indicators=std::set< types::boundary_id >())
#define DeclException0(Exception0)
Definition: exceptions.h:505
UpdateFlags operator|(UpdateFlags f1, UpdateFlags f2)
void extract_constant_modes(const DH &dof_handler, const ComponentMask &component_mask, std::vector< std::vector< bool > > &constant_modes)
BlockCompressedSparsityPattern CompressedBlockSparsityPattern DEAL_II_DEPRECATED
unsigned int subdomain_id
Definition: types.h:43
void extract_dofs_with_support_on_boundary(const DH &dof_handler, const ComponentMask &component_mask, std::vector< bool > &selected_dofs, const std::set< types::boundary_id > &boundary_indicators=std::set< types::boundary_id >())
void map_support_points_to_dofs(const Mapping< DH::dimension, DH::space_dimension > &mapping, const DH &dof_handler, std::map< Point< DH::space_dimension >, types::global_dof_index, Comp > &point_to_index_map)
Definition: hp.h:103
void distribute_cell_to_dof_vector(const DH &dof_handler, const Vector< Number > &cell_data, Vector< double > &dof_data, const unsigned int component=0)
void convert_couplings_to_blocks(const hp::DoFHandler< dim, spacedim > &dof_handler, const Table< 2, Coupling > &table_by_component, std::vector< Table< 2, Coupling > > &tables_by_block)
IndexSet dof_indices_with_subdomain_association(const DH &dof_handler, const types::subdomain_id subdomain)
void get_active_fe_indices(const DH &dof_handler, std::vector< unsigned int > &active_fe_indices)
void extract_dofs(const DoFHandler< dim, spacedim > &dof_handler, const ComponentMask &component_mask, std::vector< bool > &selected_dofs)
Table< 2, Coupling > dof_couplings_from_component_couplings(const FiniteElement< dim, spacedim > &fe, const Table< 2, Coupling > &component_couplings)
void extract_locally_owned_dofs(const DH &dof_handler, IndexSet &dof_set)
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 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, ConstraintMatrix &constraints)
void make_vertex_patches(SparsityPattern &block_list, const DH &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)
UpdateFlags & operator|=(UpdateFlags &f1, UpdateFlags f2)
void extract_level_dofs(const unsigned int level, const DH &dof, const ComponentMask &component_mask, std::vector< bool > &selected_dofs)
void make_single_patch(SparsityPattern &block_list, const DH &dof_handler, const unsigned int level, const bool interior_dofs_only=false)
void make_zero_boundary_constraints(const DH< dim, spacedim > &dof, ConstraintMatrix &zero_boundary_constraints, const ComponentMask &component_mask=ComponentMask())
::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
unsigned char boundary_id
Definition: types.h:128
void extract_locally_relevant_dofs(const DH &dof_handler, IndexSet &dof_set)
void make_child_patches(SparsityPattern &block_list, const DH &dof_handler, const unsigned int level, const bool interior_dofs_only, const bool boundary_dofs=false)
const FiniteElement< dim, spacedim > & get_fe() const