Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
dof_handler.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1998 - 2019 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_handler_h
17 #define dealii_dof_handler_h
18 
19 
20 
21 #include <deal.II/base/config.h>
22 
23 #include <deal.II/base/exceptions.h>
24 #include <deal.II/base/function.h>
25 #include <deal.II/base/index_set.h>
26 #include <deal.II/base/iterator_range.h>
27 #include <deal.II/base/smartpointer.h>
28 
29 #include <deal.II/dofs/block_info.h>
30 #include <deal.II/dofs/deprecated_function_map.h>
31 #include <deal.II/dofs/dof_faces.h>
32 #include <deal.II/dofs/dof_iterator_selector.h>
33 #include <deal.II/dofs/dof_levels.h>
34 #include <deal.II/dofs/number_cache.h>
35 
36 #include <deal.II/hp/fe_collection.h>
37 
38 #include <boost/serialization/split_member.hpp>
39 
40 #include <map>
41 #include <memory>
42 #include <set>
43 #include <vector>
44 
45 DEAL_II_NAMESPACE_OPEN
46 
47 template <int dim, int spacedim>
48 class FiniteElement;
49 template <int dim, int spacedim>
51 
52 namespace internal
53 {
54  namespace DoFHandlerImplementation
55  {
56  struct Implementation;
57 
58  namespace Policy
59  {
60  template <int dim, int spacedim>
61  class PolicyBase;
62  struct Implementation;
63  } // namespace Policy
64  } // namespace DoFHandlerImplementation
65 
66  namespace DoFAccessorImplementation
67  {
68  struct Implementation;
69  }
70 
71  namespace DoFCellAccessorImplementation
72  {
73  struct Implementation;
74  }
75 } // namespace internal
76 
77 
199 template <int dim, int spacedim = dim>
200 class DoFHandler : public Subscriptor
201 {
202  using ActiveSelector = ::internal::DoFHandlerImplementation::
203  Iterators<DoFHandler<dim, spacedim>, false>;
204  using LevelSelector = ::internal::DoFHandlerImplementation::
205  Iterators<DoFHandler<dim, spacedim>, true>;
206 
207 public:
220  using cell_accessor = typename ActiveSelector::CellAccessor;
221 
234  using face_accessor = typename ActiveSelector::FaceAccessor;
235 
243  using line_iterator = typename ActiveSelector::line_iterator;
244 
258  using active_line_iterator = typename ActiveSelector::active_line_iterator;
259 
267  using quad_iterator = typename ActiveSelector::quad_iterator;
268 
282  using active_quad_iterator = typename ActiveSelector::active_quad_iterator;
283 
291  using hex_iterator = typename ActiveSelector::hex_iterator;
292 
302  using active_hex_iterator = typename ActiveSelector::active_hex_iterator;
303 
324  using active_cell_iterator = typename ActiveSelector::active_cell_iterator;
325 
352  using cell_iterator = typename ActiveSelector::cell_iterator;
353 
370  using face_iterator = typename ActiveSelector::face_iterator;
371 
383  using active_face_iterator = typename ActiveSelector::active_face_iterator;
384 
385  using level_cell_accessor = typename LevelSelector::CellAccessor;
386  using level_face_accessor = typename LevelSelector::FaceAccessor;
387 
388  using level_cell_iterator = typename LevelSelector::cell_iterator;
389  using level_face_iterator = typename LevelSelector::face_iterator;
390 
391 
395  static const unsigned int dimension = dim;
396 
400  static const unsigned int space_dimension = spacedim;
401 
405  static const bool is_hp_dof_handler = false;
406 
418  DEAL_II_DEPRECATED
421 
431  static const unsigned int default_fe_index = 0;
432 
438  DoFHandler();
439 
444 
451  DoFHandler(const DoFHandler &) = delete;
452 
456  virtual ~DoFHandler() override;
457 
464  DoFHandler &
465  operator=(const DoFHandler &) = delete;
466 
471  void
473  const FiniteElement<dim, spacedim> &fe);
474 
496  virtual void
498 
528  virtual void
530 
539  DEAL_II_DEPRECATED
540  virtual void
542 
548  virtual void
550 
556  bool
557  has_level_dofs() const;
558 
573  bool
574  has_active_dofs() const;
575 
582  void
584 
588  virtual void
589  clear();
590 
643  void
644  renumber_dofs(const std::vector<types::global_dof_index> &new_numbers);
645 
650  void
651  renumber_dofs(const unsigned int level,
652  const std::vector<types::global_dof_index> &new_numbers);
653 
682  unsigned int
684 
697  unsigned int
699 
700  /*--------------------------------------*/
701 
706  /*
707  * @{
708  */
709 
714  begin(const unsigned int level = 0) const;
715 
733  begin_active(const unsigned int level = 0) const;
734 
740  end() const;
741 
747  end(const unsigned int level) const;
748 
755  end_active(const unsigned int level) const;
756 
757 
762  level_cell_iterator
763  begin_mg(const unsigned int level = 0) const;
764 
769  level_cell_iterator
770  end_mg(const unsigned int level) const;
771 
776  level_cell_iterator
777  end_mg() const;
778 
794  cell_iterators() const;
795 
837  active_cell_iterators() const;
838 
851  mg_cell_iterators() const;
852 
869  cell_iterators_on_level(const unsigned int level) const;
870 
887  active_cell_iterators_on_level(const unsigned int level) const;
888 
906  mg_cell_iterators_on_level(const unsigned int level) const;
907 
908  /*
909  * @}
910  */
911 
912 
913  /*---------------------------------------*/
914 
915 
940  n_dofs() const;
941 
950  n_dofs(const unsigned int level) const;
951 
956  n_boundary_dofs() const;
957 
968  template <typename number>
971  const std::map<types::boundary_id, const Function<spacedim, number> *>
972  &boundary_ids) const;
973 
979  n_boundary_dofs(const std::set<types::boundary_id> &boundary_ids) const;
980 
996  const BlockInfo &
997  block_info() const;
998 
999 
1019  unsigned int
1020  n_locally_owned_dofs() const;
1021 
1027  const IndexSet &
1028  locally_owned_dofs() const;
1029 
1034  const IndexSet &
1035  locally_owned_mg_dofs(const unsigned int level) const;
1036 
1049  const std::vector<IndexSet> &
1051 
1068  const std::vector<types::global_dof_index> &
1070 
1082  const std::vector<IndexSet> &
1083  locally_owned_mg_dofs_per_processor(const unsigned int level) const;
1084 
1091  get_fe(const unsigned int index = 0) const;
1092 
1100  get_fe_collection() const;
1101 
1106  get_triangulation() const;
1107 
1116  virtual std::size_t
1117  memory_consumption() const;
1118 
1123  template <class Archive>
1124  void
1125  save(Archive &ar, const unsigned int version) const;
1126 
1131  template <class Archive>
1132  void
1133  load(Archive &ar, const unsigned int version);
1134 
1135  BOOST_SERIALIZATION_SPLIT_MEMBER()
1136 
1137 
1152  types::global_dof_index,
1153  << "The given list of new dof indices is not consecutive: "
1154  << "the index " << arg1 << " does not exist.");
1160  int,
1161  << "The given level " << arg1
1162  << " is not in the valid range!");
1173  int,
1174  << "You tried to do something on level " << arg1
1175  << ", but this level is empty.");
1176 
1177 
1178 private:
1183 
1187  SmartPointer<const Triangulation<dim, spacedim>, DoFHandler<dim, spacedim>>
1189 
1190 
1195  hp::FECollection<dim, spacedim> fe_collection;
1196 
1201  std::unique_ptr<::internal::DoFHandlerImplementation::Policy::
1202  PolicyBase<dim, spacedim>>
1204 
1212  ::internal::DoFHandlerImplementation::NumberCache number_cache;
1213 
1217  std::vector<::internal::DoFHandlerImplementation::NumberCache>
1219 
1227  {
1228  public:
1232  MGVertexDoFs();
1233 
1239  void
1240  init(const unsigned int coarsest_level,
1241  const unsigned int finest_level,
1242  const unsigned int dofs_per_vertex);
1243 
1247  unsigned int
1248  get_coarsest_level() const;
1249 
1253  unsigned int
1254  get_finest_level() const;
1255 
1261  get_index(const unsigned int level,
1262  const unsigned int dof_number,
1263  const unsigned int dofs_per_vertex) const;
1264 
1269  void
1270  set_index(const unsigned int level,
1271  const unsigned int dof_number,
1272  const unsigned int dofs_per_vertex,
1273  const types::global_dof_index index);
1274 
1275  private:
1279  unsigned int coarsest_level;
1280 
1284  unsigned int finest_level;
1285 
1295  std::unique_ptr<types::global_dof_index[]> indices;
1296  };
1297 
1301  void
1302  clear_space();
1303 
1307  void
1308  clear_mg_space();
1309 
1310  template <int structdim>
1312  get_dof_index(const unsigned int obj_level,
1313  const unsigned int obj_index,
1314  const unsigned int fe_index,
1315  const unsigned int local_index) const;
1316 
1317  template <int structdim>
1318  void
1319  set_dof_index(const unsigned int obj_level,
1320  const unsigned int obj_index,
1321  const unsigned int fe_index,
1322  const unsigned int local_index,
1323  const types::global_dof_index global_index) const;
1324 
1328  std::vector<types::global_dof_index> vertex_dofs;
1329 
1334  std::vector<MGVertexDoFs> mg_vertex_dofs;
1335 
1340  std::vector<
1341  std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel<dim>>>
1343 
1344  std::vector<
1345  std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel<dim>>>
1346  mg_levels;
1347 
1353  std::unique_ptr<::internal::DoFHandlerImplementation::DoFFaces<dim>>
1355 
1356  std::unique_ptr<::internal::DoFHandlerImplementation::DoFFaces<dim>>
1357  mg_faces;
1358 
1362  template <int, class, bool>
1363  friend class DoFAccessor;
1364  template <class, bool>
1365  friend class DoFCellAccessor;
1366  friend struct ::internal::DoFAccessorImplementation::Implementation;
1367  friend struct ::internal::DoFCellAccessorImplementation::Implementation;
1368 
1369  friend struct ::internal::DoFHandlerImplementation::Implementation;
1370  friend struct ::internal::DoFHandlerImplementation::Policy::
1371  Implementation;
1372 
1373  // explicitly check for sensible template arguments, but not on windows
1374  // because MSVC creates bogus warnings during normal compilation
1375 #ifndef DEAL_II_MSVC
1376  static_assert(dim <= spacedim,
1377  "The dimension <dim> of a DoFHandler must be less than or "
1378  "equal to the space dimension <spacedim> in which it lives.");
1379 #endif
1380 };
1381 
1382 
1383 
1384 #ifndef DOXYGEN
1385 
1386 /* ----------------------- Inline functions ----------------------------------
1387  */
1388 
1389 
1390 template <int dim, int spacedim>
1391 inline bool
1393 {
1394  return mg_number_cache.size() > 0;
1395 }
1396 
1397 
1398 
1399 template <int dim, int spacedim>
1400 inline bool
1402 {
1403  return number_cache.n_global_dofs > 0;
1404 }
1405 
1406 
1407 
1408 template <int dim, int spacedim>
1411 {
1412  return number_cache.n_global_dofs;
1413 }
1414 
1415 
1416 
1417 template <int dim, int spacedim>
1419 DoFHandler<dim, spacedim>::n_dofs(const unsigned int level) const
1420 {
1421  Assert(has_level_dofs(),
1422  ExcMessage(
1423  "n_dofs(level) can only be called after distribute_mg_dofs()"));
1424  Assert(level < mg_number_cache.size(), ExcInvalidLevel(level));
1425  return mg_number_cache[level].n_global_dofs;
1426 }
1427 
1428 
1429 
1430 template <int dim, int spacedim>
1431 unsigned int
1433 {
1434  return number_cache.n_locally_owned_dofs;
1435 }
1436 
1437 
1438 
1439 template <int dim, int spacedim>
1440 const IndexSet &
1442 {
1443  return number_cache.locally_owned_dofs;
1444 }
1445 
1446 
1447 
1448 template <int dim, int spacedim>
1449 const IndexSet &
1451 {
1452  Assert(level < this->get_triangulation().n_global_levels(),
1453  ExcMessage("invalid level in locally_owned_mg_dofs"));
1454  Assert(
1455  mg_number_cache.size() == this->get_triangulation().n_global_levels(),
1456  ExcMessage(
1457  "The level dofs are not set up properly! Did you call distribute_mg_dofs()?"));
1458  return mg_number_cache[level].locally_owned_dofs;
1459 }
1460 
1461 
1462 
1463 template <int dim, int spacedim>
1464 const std::vector<types::global_dof_index> &
1466 {
1467  return number_cache.n_locally_owned_dofs_per_processor;
1468 }
1469 
1470 
1471 
1472 template <int dim, int spacedim>
1473 const std::vector<IndexSet> &
1475 {
1476  return number_cache.locally_owned_dofs_per_processor;
1477 }
1478 
1479 
1480 
1481 template <int dim, int spacedim>
1482 const std::vector<IndexSet> &
1484  const unsigned int level) const
1485 {
1486  Assert(level < this->get_triangulation().n_global_levels(),
1487  ExcMessage("invalid level in locally_owned_mg_dofs_per_processor"));
1488  Assert(
1489  mg_number_cache.size() == this->get_triangulation().n_global_levels(),
1490  ExcMessage(
1491  "The level dofs are not set up properly! Did you call distribute_mg_dofs()?"));
1492  return mg_number_cache[level].locally_owned_dofs_per_processor;
1493 }
1494 
1495 
1496 
1497 template <int dim, int spacedim>
1498 inline const FiniteElement<dim, spacedim> &
1499 DoFHandler<dim, spacedim>::get_fe(const unsigned int index) const
1500 {
1501  (void)index;
1502  Assert(index == 0,
1503  ExcMessage(
1504  "There is only one FiniteElement stored. The index must be zero!"));
1505  return get_fe_collection()[0];
1506 }
1507 
1508 
1509 
1510 template <int dim, int spacedim>
1511 inline const hp::FECollection<dim, spacedim> &
1513 {
1514  Assert(
1515  fe_collection.size() > 0,
1516  ExcMessage(
1517  "You are trying to access the DoFHandler's FECollection object before it has been initialized."));
1518  return fe_collection;
1519 }
1520 
1521 
1522 
1523 template <int dim, int spacedim>
1524 inline const Triangulation<dim, spacedim> &
1526 {
1527  Assert(tria != nullptr,
1528  ExcMessage("This DoFHandler object has not been associated "
1529  "with a triangulation."));
1530  return *tria;
1531 }
1532 
1533 
1534 
1535 template <int dim, int spacedim>
1536 inline const BlockInfo &
1538 {
1539  return block_info_object;
1540 }
1541 
1542 
1543 
1544 template <int dim, int spacedim>
1545 template <typename number>
1548  const std::map<types::boundary_id, const Function<spacedim, number> *>
1549  &boundary_ids) const
1550 {
1551  // extract the set of boundary ids and forget about the function object
1552  // pointers
1553  std::set<types::boundary_id> boundary_ids_only;
1554  for (typename std::map<types::boundary_id,
1555  const Function<spacedim, number> *>::const_iterator p =
1556  boundary_ids.begin();
1557  p != boundary_ids.end();
1558  ++p)
1559  boundary_ids_only.insert(p->first);
1560 
1561  // then just hand everything over to the other function that does the work
1562  return n_boundary_dofs(boundary_ids_only);
1563 }
1564 
1565 
1566 
1567 namespace internal
1568 {
1576  template <int dim, int spacedim>
1577  std::string
1578  policy_to_string(const ::internal::DoFHandlerImplementation::Policy::
1579  PolicyBase<dim, spacedim> &policy);
1580 } // namespace internal
1581 
1582 
1583 
1584 template <int dim, int spacedim>
1585 template <class Archive>
1586 void
1587 DoFHandler<dim, spacedim>::save(Archive &ar, const unsigned int) const
1588 {
1589  ar &block_info_object;
1590  ar &vertex_dofs;
1591  ar &number_cache;
1592 
1593  // some versions of gcc have trouble with loading vectors of
1594  // std::unique_ptr objects because std::unique_ptr does not
1595  // have a copy constructor. do it one level at a time
1596  unsigned int n_levels = levels.size();
1597  ar & n_levels;
1598  for (unsigned int i = 0; i < levels.size(); ++i)
1599  ar &levels[i];
1600 
1601  // boost dereferences a nullptr when serializing a nullptr
1602  // at least up to 1.65.1. This causes problems with clang-5.
1603  // Therefore, work around it.
1604  bool faces_is_nullptr = (faces.get() == nullptr);
1605  ar & faces_is_nullptr;
1606  if (!faces_is_nullptr)
1607  ar &faces;
1608 
1609  // write out the number of triangulation cells and later check during
1610  // loading that this number is indeed correct; same with something that
1611  // identifies the FE and the policy
1612  unsigned int n_cells = tria->n_cells();
1613  std::string fe_name = this->get_fe(0).get_name();
1614  std::string policy_name = internal::policy_to_string(*policy);
1615 
1616  ar &n_cells &fe_name &policy_name;
1617 }
1618 
1619 
1620 
1621 template <int dim, int spacedim>
1622 template <class Archive>
1623 void
1624 DoFHandler<dim, spacedim>::load(Archive &ar, const unsigned int)
1625 {
1626  ar &block_info_object;
1627  ar &vertex_dofs;
1628  ar &number_cache;
1629 
1630  // boost::serialization can restore pointers just fine, but if the
1631  // pointer object still points to something useful, that object is not
1632  // destroyed and we end up with a memory leak. consequently, first delete
1633  // previous content before re-loading stuff
1634  levels.clear();
1635  faces.reset();
1636 
1637  // some versions of gcc have trouble with loading vectors of
1638  // std::unique_ptr objects because std::unique_ptr does not
1639  // have a copy constructor. do it one level at a time
1640  unsigned int size;
1641  ar & size;
1642  levels.resize(size);
1643  for (unsigned int i = 0; i < levels.size(); ++i)
1644  {
1645  std::unique_ptr<internal::DoFHandlerImplementation::DoFLevel<dim>> level;
1646  ar & level;
1647  levels[i] = std::move(level);
1648  }
1649 
1650  // Workaround for nullptr, see in save().
1651  bool faces_is_nullptr = true;
1652  ar & faces_is_nullptr;
1653  if (!faces_is_nullptr)
1654  ar &faces;
1655 
1656  // these are the checks that correspond to the last block in the save()
1657  // function
1658  unsigned int n_cells;
1659  std::string fe_name;
1660  std::string policy_name;
1661 
1662  ar &n_cells &fe_name &policy_name;
1663 
1664  AssertThrow(n_cells == tria->n_cells(),
1665  ExcMessage(
1666  "The object being loaded into does not match the triangulation "
1667  "that has been stored previously."));
1668  AssertThrow(
1669  fe_name == this->get_fe(0).get_name(),
1670  ExcMessage(
1671  "The finite element associated with this DoFHandler does not match "
1672  "the one that was associated with the DoFHandler previously stored."));
1673  AssertThrow(policy_name == internal::policy_to_string(*policy),
1674  ExcMessage(
1675  "The policy currently associated with this DoFHandler (" +
1676  internal::policy_to_string(*policy) +
1677  ") does not match the one that was associated with the "
1678  "DoFHandler previously stored (" +
1679  policy_name + ")."));
1680 }
1681 
1682 
1683 
1684 template <int dim, int spacedim>
1687  const unsigned int level,
1688  const unsigned int dof_number,
1689  const unsigned int dofs_per_vertex) const
1690 {
1691  Assert((level >= coarsest_level) && (level <= finest_level),
1692  ExcInvalidLevel(level));
1693  return indices[dofs_per_vertex * (level - coarsest_level) + dof_number];
1694 }
1695 
1696 
1697 
1698 template <int dim, int spacedim>
1699 inline void
1701  const unsigned int level,
1702  const unsigned int dof_number,
1703  const unsigned int dofs_per_vertex,
1704  const types::global_dof_index index)
1705 {
1706  Assert((level >= coarsest_level) && (level <= finest_level),
1707  ExcInvalidLevel(level));
1708  indices[dofs_per_vertex * (level - coarsest_level) + dof_number] = index;
1709 }
1710 
1711 
1712 #endif // DOXYGEN
1713 
1714 DEAL_II_NAMESPACE_CLOSE
1715 
1716 #endif
DoFHandler & operator=(const DoFHandler &)=delete
IteratorRange< active_cell_iterator > active_cell_iterators_on_level(const unsigned int level) const
unsigned int max_couplings_between_dofs() const
std::vector< MGVertexDoFs > mg_vertex_dofs
Definition: dof_handler.h:1334
const Triangulation< dim, spacedim > & get_triangulation() const
level_cell_iterator end_mg() const
typename ActiveSelector::FaceAccessor face_accessor
Definition: dof_handler.h:234
cell_iterator begin(const unsigned int level=0) const
Definition: dof_handler.cc:930
typename ActiveSelector::quad_iterator quad_iterator
Definition: dof_handler.h:267
static const unsigned int dimension
Definition: dof_handler.h:395
static const unsigned int spacedim
static ::ExceptionBase & ExcInvalidLevel(int arg1)
const BlockInfo & block_info() const
cell_iterator end() const
Definition: dof_handler.cc:959
::internal::DoFHandlerImplementation::NumberCache number_cache
Definition: dof_handler.h:1212
virtual void clear()
const std::vector< IndexSet > & locally_owned_mg_dofs_per_processor(const unsigned int level) const
IteratorRange< level_cell_iterator > mg_cell_iterators_on_level(const unsigned int level) const
void clear_mg_space()
typename ActiveSelector::CellAccessor cell_accessor
Definition: dof_handler.h:220
STL namespace.
#define AssertThrow(cond, exc)
Definition: exceptions.h:1519
virtual std::size_t memory_consumption() const
void initialize(const Triangulation< dim, spacedim > &tria, const FiniteElement< dim, spacedim > &fe)
Definition: dof_handler.cc:895
const FiniteElement< dim, spacedim > & get_fe(const unsigned int index=0) const
typename ActiveSelector::face_iterator face_iterator
Definition: dof_handler.h:370
typename ActiveSelector::active_face_iterator active_face_iterator
Definition: dof_handler.h:383
int level() const
static ::ExceptionBase & ExcInvalidBoundaryIndicator()
active_cell_iterator begin_active(const unsigned int level=0) const
Definition: dof_handler.cc:943
static const bool is_hp_dof_handler
Definition: dof_handler.h:405
BlockInfo block_info_object
Definition: dof_handler.h:1182
unsigned int n_locally_owned_dofs() const
static ::ExceptionBase & ExcFacesHaveNoLevel()
const std::vector< types::global_dof_index > & n_locally_owned_dofs_per_processor() const
static ::ExceptionBase & ExcMessage(std::string arg1)
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:518
const Triangulation< dim, spacedim > * tria
typename ActiveSelector::hex_iterator hex_iterator
Definition: dof_handler.h:291
Definition: types.h:31
std::vector<::internal::DoFHandlerImplementation::NumberCache > mg_number_cache
Definition: dof_handler.h:1218
bool has_active_dofs() const
virtual void distribute_mg_dofs()
#define Assert(cond, exc)
Definition: exceptions.h:1407
hp::FECollection< dim, spacedim > fe_collection
Definition: dof_handler.h:1195
IteratorRange< active_cell_iterator > active_cell_iterators() const
static const unsigned int default_fe_index
Definition: dof_handler.h:431
active_cell_iterator end_active(const unsigned int level) const
Definition: dof_handler.cc:979
static ::ExceptionBase & ExcGridsDoNotMatch()
#define DeclException0(Exception0)
Definition: exceptions.h:473
types::global_dof_index n_boundary_dofs() const
SmartPointer< const Triangulation< dim, spacedim >, DoFHandler< dim, spacedim > > tria
Definition: dof_handler.h:1188
types::global_dof_index n_dofs() const
int index() const
level_cell_iterator begin_mg(const unsigned int level=0) const
Definition: dof_handler.cc:992
std::unique_ptr<::internal::DoFHandlerImplementation::Policy::PolicyBase< dim, spacedim > > policy
Definition: dof_handler.h:1203
const hp::FECollection< dim, spacedim > & get_fe_collection() const
virtual void set_fe(const FiniteElement< dim, spacedim > &fe)
const IndexSet & locally_owned_mg_dofs(const unsigned int level) const
void set_index(const unsigned int level, const unsigned int dof_number, const unsigned int dofs_per_vertex, const types::global_dof_index index)
std::unique_ptr<::internal::DoFHandlerImplementation::DoFFaces< dim > > faces
Definition: dof_handler.h:1354
Definition: hp.h:117
std::vector< std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel< dim > > > levels
Definition: dof_handler.h:1342
typename ActiveSelector::active_line_iterator active_line_iterator
Definition: dof_handler.h:258
void renumber_dofs(const std::vector< types::global_dof_index > &new_numbers)
std::unique_ptr< types::global_dof_index[]> indices
Definition: dof_handler.h:1295
void initialize_local_block_info()
unsigned int global_dof_index
Definition: types.h:89
const Triangulation< dim, spacedim > & get_triangulation() const
static ::ExceptionBase & ExcEmptyLevel(int arg1)
static const unsigned int dim
const std::vector< IndexSet > & locally_owned_dofs_per_processor() const
IteratorRange< level_cell_iterator > mg_cell_iterators() const
typename ActiveSelector::line_iterator line_iterator
Definition: dof_handler.h:243
unsigned int coarsest_level
Definition: dof_handler.h:1279
void clear_space()
virtual void distribute_dofs(const FiniteElement< dim, spacedim > &fe)
types::global_dof_index get_index(const unsigned int level, const unsigned int dof_number, const unsigned int dofs_per_vertex) const
void load(Archive &ar, const unsigned int version)
A small class collecting the different BlockIndices involved in global, multilevel and local computat...
Definition: block_info.h:96
IteratorRange< cell_iterator > cell_iterators_on_level(const unsigned int level) const
static ::ExceptionBase & ExcNewNumbersNotConsecutive(types::global_dof_index arg1)
typename ActiveSelector::cell_iterator cell_iterator
Definition: dof_handler.h:352
static const unsigned int space_dimension
Definition: dof_handler.h:400
unsigned int max_couplings_between_boundary_dofs() const
typename ActiveSelector::active_cell_iterator active_cell_iterator
Definition: dof_handler.h:324
const types::global_dof_index invalid_dof_index
Definition: types.h:188
virtual ~DoFHandler() override
Definition: dof_handler.cc:878
const IndexSet & locally_owned_dofs() const
bool has_level_dofs() const
unsigned int boundary_id
Definition: types.h:111
IteratorRange< cell_iterator > cell_iterators() const
typename ActiveSelector::active_quad_iterator active_quad_iterator
Definition: dof_handler.h:282
void save(Archive &ar, const unsigned int version) const
static const types::global_dof_index invalid_dof_index
Definition: dof_handler.h:419
std::vector< types::global_dof_index > vertex_dofs
Definition: dof_handler.h:1328
typename ActiveSelector::active_hex_iterator active_hex_iterator
Definition: dof_handler.h:302