Reference documentation for deal.II version 9.2.0
\(\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_handler.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1998 - 2020 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 
24 #include <deal.II/base/function.h>
25 #include <deal.II/base/index_set.h>
28 
30 
34 #include <deal.II/dofs/dof_faces.h>
38 
40 
41 #include <boost/serialization/split_member.hpp>
42 
43 #include <map>
44 #include <memory>
45 #include <set>
46 #include <vector>
47 
49 
50 // Forward declarations
51 #ifndef DOXYGEN
52 template <int dim, int spacedim>
53 class FiniteElement;
54 template <int dim, int spacedim>
55 class Triangulation;
56 
57 namespace internal
58 {
59  namespace DoFHandlerImplementation
60  {
61  struct Implementation;
62 
63  namespace Policy
64  {
65  template <int dim, int spacedim>
66  class PolicyBase;
67  struct Implementation;
68  } // namespace Policy
69  } // namespace DoFHandlerImplementation
70 
71  namespace DoFAccessorImplementation
72  {
73  struct Implementation;
74  }
75 
76  namespace DoFCellAccessorImplementation
77  {
78  struct Implementation;
79  }
80 } // namespace internal
81 #endif
82 
204 template <int dim, int spacedim = dim>
205 class DoFHandler : public Subscriptor
206 {
207  using ActiveSelector = ::internal::DoFHandlerImplementation::
208  Iterators<DoFHandler<dim, spacedim>, false>;
209  using LevelSelector = ::internal::DoFHandlerImplementation::
210  Iterators<DoFHandler<dim, spacedim>, true>;
211 
212 public:
225  using cell_accessor = typename ActiveSelector::CellAccessor;
226 
239  using face_accessor = typename ActiveSelector::FaceAccessor;
240 
248  using line_iterator = typename ActiveSelector::line_iterator;
249 
263  using active_line_iterator = typename ActiveSelector::active_line_iterator;
264 
272  using quad_iterator = typename ActiveSelector::quad_iterator;
273 
287  using active_quad_iterator = typename ActiveSelector::active_quad_iterator;
288 
296  using hex_iterator = typename ActiveSelector::hex_iterator;
297 
307  using active_hex_iterator = typename ActiveSelector::active_hex_iterator;
308 
329  using active_cell_iterator = typename ActiveSelector::active_cell_iterator;
330 
357  using cell_iterator = typename ActiveSelector::cell_iterator;
358 
375  using face_iterator = typename ActiveSelector::face_iterator;
376 
388  using active_face_iterator = typename ActiveSelector::active_face_iterator;
389 
390  using level_cell_accessor = typename LevelSelector::CellAccessor;
391  using level_face_accessor = typename LevelSelector::FaceAccessor;
392 
393  using level_cell_iterator = typename LevelSelector::cell_iterator;
394  using level_face_iterator = typename LevelSelector::face_iterator;
395 
396 
400  static const unsigned int dimension = dim;
401 
405  static const unsigned int space_dimension = spacedim;
406 
410  static const bool is_hp_dof_handler = false;
411 
421  static const unsigned int default_fe_index = 0;
422 
428  DoFHandler();
429 
434 
441  DoFHandler(const DoFHandler &) = delete;
442 
446  virtual ~DoFHandler() override;
447 
454  DoFHandler &
455  operator=(const DoFHandler &) = delete;
456 
461  void
463  const FiniteElement<dim, spacedim> &fe);
464 
486  virtual void
488 
518  virtual void
520 
526  virtual void
528 
534  bool
535  has_level_dofs() const;
536 
551  bool
552  has_active_dofs() const;
553 
560  void
562 
566  virtual void
567  clear();
568 
621  void
622  renumber_dofs(const std::vector<types::global_dof_index> &new_numbers);
623 
628  void
629  renumber_dofs(const unsigned int level,
630  const std::vector<types::global_dof_index> &new_numbers);
631 
660  unsigned int
662 
675  unsigned int
677 
678  /*--------------------------------------*/
679 
684  /*
685  * @{
686  */
687 
692  begin(const unsigned int level = 0) const;
693 
711  begin_active(const unsigned int level = 0) const;
712 
718  end() const;
719 
725  end(const unsigned int level) const;
726 
733  end_active(const unsigned int level) const;
734 
735 
741  begin_mg(const unsigned int level = 0) const;
742 
748  end_mg(const unsigned int level) const;
749 
755  end_mg() const;
756 
772  cell_iterators() const;
773 
815  active_cell_iterators() const;
816 
829  mg_cell_iterators() const;
830 
847  cell_iterators_on_level(const unsigned int level) const;
848 
865  active_cell_iterators_on_level(const unsigned int level) const;
866 
884  mg_cell_iterators_on_level(const unsigned int level) const;
885 
886  /*
887  * @}
888  */
889 
890 
891  /*---------------------------------------*/
892 
893 
918  n_dofs() const;
919 
928  n_dofs(const unsigned int level) const;
929 
935  n_boundary_dofs() const;
936 
948  template <typename number>
951  const std::map<types::boundary_id, const Function<spacedim, number> *>
952  &boundary_ids) const;
953 
959  n_boundary_dofs(const std::set<types::boundary_id> &boundary_ids) const;
960 
976  const BlockInfo &
977  block_info() const;
978 
979 
1000  n_locally_owned_dofs() const;
1001 
1007  const IndexSet &
1008  locally_owned_dofs() const;
1009 
1014  const IndexSet &
1015  locally_owned_mg_dofs(const unsigned int level) const;
1016 
1029  DEAL_II_DEPRECATED const std::vector<IndexSet> &
1031 
1048  DEAL_II_DEPRECATED const std::vector<types::global_dof_index> &
1050 
1065  DEAL_II_DEPRECATED const std::vector<IndexSet> &
1066  locally_owned_mg_dofs_per_processor(const unsigned int level) const;
1067 
1074  get_fe(const unsigned int index = 0) const;
1075 
1083  get_fe_collection() const;
1084 
1089  get_triangulation() const;
1090 
1099  virtual std::size_t
1100  memory_consumption() const;
1101 
1106  template <class Archive>
1107  void
1108  save(Archive &ar, const unsigned int version) const;
1109 
1114  template <class Archive>
1115  void
1116  load(Archive &ar, const unsigned int version);
1117 
1118 #ifdef DOXYGEN
1119 
1123  template <class Archive>
1124  void
1125  serialize(Archive &archive, const unsigned int version);
1126 #else
1127  // This macro defines the serialize() method that is compatible with
1128  // the templated save() and load() method that have been implemented.
1129  BOOST_SERIALIZATION_SPLIT_MEMBER()
1130 #endif
1131 
1148  << "The given list of new dof indices is not consecutive: "
1149  << "the index " << arg1 << " does not exist.");
1155  int,
1156  << "The given level " << arg1
1157  << " is not in the valid range!");
1168  int,
1169  << "You tried to do something on level " << arg1
1170  << ", but this level is empty.");
1171 
1172 
1173 private:
1178 
1184 
1185 
1191 
1196  std::unique_ptr<::internal::DoFHandlerImplementation::Policy::
1197  PolicyBase<dim, spacedim>>
1199 
1208 
1212  std::vector<::internal::DoFHandlerImplementation::NumberCache>
1214 
1222  {
1223  public:
1227  MGVertexDoFs();
1228 
1234  void
1235  init(const unsigned int coarsest_level,
1236  const unsigned int finest_level,
1237  const unsigned int dofs_per_vertex);
1238 
1242  unsigned int
1243  get_coarsest_level() const;
1244 
1248  unsigned int
1249  get_finest_level() const;
1250 
1256  get_index(const unsigned int level,
1257  const unsigned int dof_number,
1258  const unsigned int dofs_per_vertex) const;
1259 
1264  void
1265  set_index(const unsigned int level,
1266  const unsigned int dof_number,
1267  const unsigned int dofs_per_vertex,
1268  const types::global_dof_index index);
1269 
1270  private:
1274  unsigned int coarsest_level;
1275 
1279  unsigned int finest_level;
1280 
1290  std::unique_ptr<types::global_dof_index[]> indices;
1291  };
1292 
1296  void
1297  clear_space();
1298 
1302  void
1303  clear_mg_space();
1304 
1305  template <int structdim>
1307  get_dof_index(const unsigned int obj_level,
1308  const unsigned int obj_index,
1309  const unsigned int fe_index,
1310  const unsigned int local_index) const;
1311 
1312  template <int structdim>
1313  void
1314  set_dof_index(const unsigned int obj_level,
1315  const unsigned int obj_index,
1316  const unsigned int fe_index,
1317  const unsigned int local_index,
1319 
1323  std::vector<types::global_dof_index> vertex_dofs;
1324 
1329  std::vector<MGVertexDoFs> mg_vertex_dofs;
1330 
1335  std::vector<
1336  std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel<dim>>>
1338 
1339  std::vector<
1340  std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel<dim>>>
1342 
1348  std::unique_ptr<::internal::DoFHandlerImplementation::DoFFaces<dim>>
1350 
1351  std::unique_ptr<::internal::DoFHandlerImplementation::DoFFaces<dim>>
1353 
1354  // Make accessor objects friends.
1355  template <int, class, bool>
1356  friend class DoFAccessor;
1357  template <class, bool>
1358  friend class DoFCellAccessor;
1359  friend struct ::internal::DoFAccessorImplementation::Implementation;
1360  friend struct ::internal::DoFCellAccessorImplementation::Implementation;
1361 
1362  friend struct ::internal::DoFHandlerImplementation::Implementation;
1363  friend struct ::internal::DoFHandlerImplementation::Policy::
1364  Implementation;
1365 
1366  // explicitly check for sensible template arguments, but not on windows
1367  // because MSVC creates bogus warnings during normal compilation
1368 #ifndef DEAL_II_MSVC
1369  static_assert(dim <= spacedim,
1370  "The dimension <dim> of a DoFHandler must be less than or "
1371  "equal to the space dimension <spacedim> in which it lives.");
1372 #endif
1373 };
1374 
1375 
1376 
1377 #ifndef DOXYGEN
1378 
1379 /* ----------------------- Inline functions ----------------------------------
1380  */
1381 
1382 
1383 template <int dim, int spacedim>
1384 inline bool
1386 {
1387  return mg_number_cache.size() > 0;
1388 }
1389 
1390 
1391 
1392 template <int dim, int spacedim>
1393 inline bool
1395 {
1396  return number_cache.n_global_dofs > 0;
1397 }
1398 
1399 
1400 
1401 template <int dim, int spacedim>
1404 {
1405  return number_cache.n_global_dofs;
1406 }
1407 
1408 
1409 
1410 template <int dim, int spacedim>
1412 DoFHandler<dim, spacedim>::n_dofs(const unsigned int level) const
1413 {
1414  Assert(has_level_dofs(),
1415  ExcMessage(
1416  "n_dofs(level) can only be called after distribute_mg_dofs()"));
1417  Assert(level < mg_number_cache.size(), ExcInvalidLevel(level));
1418  return mg_number_cache[level].n_global_dofs;
1419 }
1420 
1421 
1422 
1423 template <int dim, int spacedim>
1426 {
1427  return number_cache.n_locally_owned_dofs;
1428 }
1429 
1430 
1431 
1432 template <int dim, int spacedim>
1433 const IndexSet &
1435 {
1436  return number_cache.locally_owned_dofs;
1437 }
1438 
1439 
1440 
1441 template <int dim, int spacedim>
1442 const IndexSet &
1444 {
1445  Assert(level < this->get_triangulation().n_global_levels(),
1446  ExcMessage("The given level index exceeds the number of levels "
1447  "present in the triangulation"));
1448  Assert(
1449  mg_number_cache.size() == this->get_triangulation().n_global_levels(),
1450  ExcMessage(
1451  "The level dofs are not set up properly! Did you call distribute_mg_dofs()?"));
1452  return mg_number_cache[level].locally_owned_dofs;
1453 }
1454 
1455 
1456 
1457 template <int dim, int spacedim>
1458 const std::vector<types::global_dof_index> &
1460 {
1461  if (number_cache.n_locally_owned_dofs_per_processor.empty() &&
1462  number_cache.n_global_dofs > 0)
1463  {
1464  MPI_Comm comm;
1465 
1467  (dynamic_cast<const parallel::TriangulationBase<dim, spacedim> *>(
1468  &this->get_triangulation()));
1469  if (tr != nullptr)
1470  comm = tr->get_communicator();
1471  else
1472  comm = MPI_COMM_SELF;
1473 
1475  number_cache)
1476  .n_locally_owned_dofs_per_processor =
1477  number_cache.get_n_locally_owned_dofs_per_processor(comm);
1478  }
1479  return number_cache.n_locally_owned_dofs_per_processor;
1480 }
1481 
1482 
1483 
1484 template <int dim, int spacedim>
1485 const std::vector<IndexSet> &
1487 {
1488  if (number_cache.locally_owned_dofs_per_processor.empty() &&
1489  number_cache.n_global_dofs > 0)
1490  {
1491  MPI_Comm comm;
1492 
1494  (dynamic_cast<const parallel::TriangulationBase<dim, spacedim> *>(
1495  &this->get_triangulation()));
1496  if (tr != nullptr)
1497  comm = tr->get_communicator();
1498  else
1499  comm = MPI_COMM_SELF;
1500 
1502  number_cache)
1503  .locally_owned_dofs_per_processor =
1504  number_cache.get_locally_owned_dofs_per_processor(comm);
1505  }
1506  return number_cache.locally_owned_dofs_per_processor;
1507 }
1508 
1509 
1510 
1511 template <int dim, int spacedim>
1512 const std::vector<IndexSet> &
1514  const unsigned int level) const
1515 {
1516  Assert(level < this->get_triangulation().n_global_levels(),
1517  ExcMessage("The given level index exceeds the number of levels "
1518  "present in the triangulation"));
1519  Assert(
1520  mg_number_cache.size() == this->get_triangulation().n_global_levels(),
1521  ExcMessage(
1522  "The level dofs are not set up properly! Did you call distribute_mg_dofs()?"));
1523  if (mg_number_cache[level].locally_owned_dofs_per_processor.empty() &&
1524  mg_number_cache[level].n_global_dofs > 0)
1525  {
1526  MPI_Comm comm;
1527 
1529  (dynamic_cast<const parallel::TriangulationBase<dim, spacedim> *>(
1530  &this->get_triangulation()));
1531  if (tr != nullptr)
1532  comm = tr->get_communicator();
1533  else
1534  comm = MPI_COMM_SELF;
1535 
1537  mg_number_cache[level])
1538  .locally_owned_dofs_per_processor =
1539  mg_number_cache[level].get_locally_owned_dofs_per_processor(comm);
1540  }
1541  return mg_number_cache[level].locally_owned_dofs_per_processor;
1542 }
1543 
1544 
1545 
1546 template <int dim, int spacedim>
1547 inline const FiniteElement<dim, spacedim> &
1548 DoFHandler<dim, spacedim>::get_fe(const unsigned int index) const
1549 {
1550  (void)index;
1551  Assert(index == 0,
1552  ExcMessage(
1553  "There is only one FiniteElement stored. The index must be zero!"));
1554  return get_fe_collection()[0];
1555 }
1556 
1557 
1558 
1559 template <int dim, int spacedim>
1560 inline const hp::FECollection<dim, spacedim> &
1562 {
1563  Assert(
1564  fe_collection.size() > 0,
1565  ExcMessage(
1566  "You are trying to access the DoFHandler's FECollection object before it has been initialized."));
1567  return fe_collection;
1568 }
1569 
1570 
1571 
1572 template <int dim, int spacedim>
1573 inline const Triangulation<dim, spacedim> &
1575 {
1576  Assert(tria != nullptr,
1577  ExcMessage("This DoFHandler object has not been associated "
1578  "with a triangulation."));
1579  return *tria;
1580 }
1581 
1582 
1583 
1584 template <int dim, int spacedim>
1585 inline const BlockInfo &
1587 {
1588  return block_info_object;
1589 }
1590 
1591 
1592 
1593 template <int dim, int spacedim>
1594 template <typename number>
1597  const std::map<types::boundary_id, const Function<spacedim, number> *>
1598  &boundary_ids) const
1599 {
1600  // extract the set of boundary ids and forget about the function object
1601  // pointers
1602  std::set<types::boundary_id> boundary_ids_only;
1603  for (typename std::map<types::boundary_id,
1604  const Function<spacedim, number> *>::const_iterator p =
1605  boundary_ids.begin();
1606  p != boundary_ids.end();
1607  ++p)
1608  boundary_ids_only.insert(p->first);
1609 
1610  // then just hand everything over to the other function that does the work
1611  return n_boundary_dofs(boundary_ids_only);
1612 }
1613 
1614 
1615 
1616 namespace internal
1617 {
1625  template <int dim, int spacedim>
1626  std::string
1627  policy_to_string(const ::internal::DoFHandlerImplementation::Policy::
1628  PolicyBase<dim, spacedim> &policy);
1629 } // namespace internal
1630 
1631 
1632 
1633 template <int dim, int spacedim>
1634 template <class Archive>
1635 void
1636 DoFHandler<dim, spacedim>::save(Archive &ar, const unsigned int) const
1637 {
1638  ar &block_info_object;
1639  ar &vertex_dofs;
1640  ar &number_cache;
1641 
1642  // some versions of gcc have trouble with loading vectors of
1643  // std::unique_ptr objects because std::unique_ptr does not
1644  // have a copy constructor. do it one level at a time
1645  unsigned int n_levels = levels.size();
1646  ar & n_levels;
1647  for (unsigned int i = 0; i < levels.size(); ++i)
1648  ar &levels[i];
1649 
1650  // boost dereferences a nullptr when serializing a nullptr
1651  // at least up to 1.65.1. This causes problems with clang-5.
1652  // Therefore, work around it.
1653  bool faces_is_nullptr = (faces.get() == nullptr);
1654  ar & faces_is_nullptr;
1655  if (!faces_is_nullptr)
1656  ar &faces;
1657 
1658  // write out the number of triangulation cells and later check during
1659  // loading that this number is indeed correct; same with something that
1660  // identifies the FE and the policy
1661  unsigned int n_cells = tria->n_cells();
1662  std::string fe_name = this->get_fe(0).get_name();
1663  std::string policy_name = internal::policy_to_string(*policy);
1664 
1665  ar &n_cells &fe_name &policy_name;
1666 }
1667 
1668 
1669 
1670 template <int dim, int spacedim>
1671 template <class Archive>
1672 void
1673 DoFHandler<dim, spacedim>::load(Archive &ar, const unsigned int)
1674 {
1675  ar &block_info_object;
1676  ar &vertex_dofs;
1677  ar &number_cache;
1678 
1679  // boost::serialization can restore pointers just fine, but if the
1680  // pointer object still points to something useful, that object is not
1681  // destroyed and we end up with a memory leak. consequently, first delete
1682  // previous content before re-loading stuff
1683  levels.clear();
1684  faces.reset();
1685 
1686  // some versions of gcc have trouble with loading vectors of
1687  // std::unique_ptr objects because std::unique_ptr does not
1688  // have a copy constructor. do it one level at a time
1689  unsigned int size;
1690  ar & size;
1691  levels.resize(size);
1692  for (unsigned int i = 0; i < levels.size(); ++i)
1693  {
1694  std::unique_ptr<internal::DoFHandlerImplementation::DoFLevel<dim>> level;
1695  ar & level;
1696  levels[i] = std::move(level);
1697  }
1698 
1699  // Workaround for nullptr, see in save().
1700  bool faces_is_nullptr = true;
1701  ar & faces_is_nullptr;
1702  if (!faces_is_nullptr)
1703  ar &faces;
1704 
1705  // these are the checks that correspond to the last block in the save()
1706  // function
1707  unsigned int n_cells;
1708  std::string fe_name;
1709  std::string policy_name;
1710 
1711  ar &n_cells &fe_name &policy_name;
1712 
1713  AssertThrow(n_cells == tria->n_cells(),
1714  ExcMessage(
1715  "The object being loaded into does not match the triangulation "
1716  "that has been stored previously."));
1717  AssertThrow(
1718  fe_name == this->get_fe(0).get_name(),
1719  ExcMessage(
1720  "The finite element associated with this DoFHandler does not match "
1721  "the one that was associated with the DoFHandler previously stored."));
1722  AssertThrow(policy_name == internal::policy_to_string(*policy),
1723  ExcMessage(
1724  "The policy currently associated with this DoFHandler (" +
1725  internal::policy_to_string(*policy) +
1726  ") does not match the one that was associated with the "
1727  "DoFHandler previously stored (" +
1728  policy_name + ")."));
1729 }
1730 
1731 
1732 
1733 template <int dim, int spacedim>
1736  const unsigned int level,
1737  const unsigned int dof_number,
1738  const unsigned int dofs_per_vertex) const
1739 {
1742  return indices[dofs_per_vertex * (level - coarsest_level) + dof_number];
1743 }
1744 
1745 
1746 
1747 template <int dim, int spacedim>
1748 inline void
1750  const unsigned int level,
1751  const unsigned int dof_number,
1752  const unsigned int dofs_per_vertex,
1753  const types::global_dof_index index)
1754 {
1755  Assert((level >= coarsest_level) && (level <= finest_level),
1757  indices[dofs_per_vertex * (level - coarsest_level) + dof_number] = index;
1758 }
1759 
1760 
1761 #endif // DOXYGEN
1762 
1764 
1765 #endif
DoFHandler::mg_number_cache
std::vector<::internal::DoFHandlerImplementation::NumberCache > mg_number_cache
Definition: dof_handler.h:1213
DoFHandler::block_info_object
BlockInfo block_info_object
Definition: dof_handler.h:1177
IndexSet
Definition: index_set.h:74
DoFHandler::locally_owned_mg_dofs
const IndexSet & locally_owned_mg_dofs(const unsigned int level) const
DoFHandler::default_fe_index
static const unsigned int default_fe_index
Definition: dof_handler.h:421
DoFHandler::MGVertexDoFs::indices
std::unique_ptr< types::global_dof_index[]> indices
Definition: dof_handler.h:1290
DoFHandler::mg_cell_iterators_on_level
IteratorRange< level_cell_iterator > mg_cell_iterators_on_level(const unsigned int level) const
Definition: dof_handler.cc:1074
DoFHandler::ExcInvalidBoundaryIndicator
static ::ExceptionBase & ExcInvalidBoundaryIndicator()
DoFHandler::faces
std::unique_ptr<::internal::DoFHandlerImplementation::DoFFaces< dim > > faces
Definition: dof_handler.h:1349
DoFHandler< dim >::cell_iterator
typename ActiveSelector::cell_iterator cell_iterator
Definition: dof_handler.h:357
DoFHandler::active_cell_iterators_on_level
IteratorRange< active_cell_iterator > active_cell_iterators_on_level(const unsigned int level) const
Definition: dof_handler.cc:1062
deprecated_function_map.h
DoFHandler< dim >::active_cell_iterator
typename ActiveSelector::active_cell_iterator active_cell_iterator
Definition: dof_handler.h:329
DoFHandler< dim >::cell_accessor
typename ActiveSelector::CellAccessor cell_accessor
Definition: dof_handler.h:225
DoFHandler::levels
std::vector< std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel< dim > > > levels
Definition: dof_handler.h:1337
DoFHandler::ExcFacesHaveNoLevel
static ::ExceptionBase & ExcFacesHaveNoLevel()
DoFHandler< dim >::level_face_accessor
typename LevelSelector::FaceAccessor level_face_accessor
Definition: dof_handler.h:391
DoFHandler::begin_mg
level_cell_iterator begin_mg(const unsigned int level=0) const
Definition: dof_handler.cc:984
dof_iterator_selector.h
DoFHandler< dim >::level_cell_iterator
typename LevelSelector::cell_iterator level_cell_iterator
Definition: dof_handler.h:393
DoFHandler::policy
std::unique_ptr<::internal::DoFHandlerImplementation::Policy::PolicyBase< dim, spacedim > > policy
Definition: dof_handler.h:1198
DoFHandler::get_fe_collection
const hp::FECollection< dim, spacedim > & get_fe_collection() const
DoFHandler< dim >::face_iterator
typename ActiveSelector::face_iterator face_iterator
Definition: dof_handler.h:375
Triangulation
Definition: tria.h:1109
internal::DoFHandlerImplementation::Iterators
Definition: dof_iterator_selector.h:47
DoFHandler::end_active
active_cell_iterator end_active(const unsigned int level) const
Definition: dof_handler.cc:971
DoFHandler::mg_faces
std::unique_ptr<::internal::DoFHandlerImplementation::DoFFaces< dim > > mg_faces
Definition: dof_handler.h:1352
DoFHandler::MGVertexDoFs::get_finest_level
unsigned int get_finest_level() const
Definition: dof_handler.cc:1608
DoFHandler< dim >::face_accessor
typename ActiveSelector::FaceAccessor face_accessor
Definition: dof_handler.h:239
DoFHandler::ExcInvalidLevel
static ::ExceptionBase & ExcInvalidLevel(int arg1)
DoFHandler::initialize_local_block_info
void initialize_local_block_info()
Definition: dof_handler.cc:1343
MPI_Comm
DoFCellAccessor::dim
static const unsigned int dim
Definition: dof_accessor.h:1329
DoFHandler::locally_owned_dofs_per_processor
const std::vector< IndexSet > & locally_owned_dofs_per_processor() const
DoFCellAccessor::spacedim
static const unsigned int spacedim
Definition: dof_accessor.h:1334
DoFHandler::renumber_dofs
void renumber_dofs(const std::vector< types::global_dof_index > &new_numbers)
Definition: dof_handler.cc:1363
DoFHandler::DoFHandler
DoFHandler()
Definition: dof_handler.cc:864
DoFHandler::clear_space
void clear_space()
Definition: dof_handler.cc:1507
DoFHandler
Definition: dof_handler.h:205
DoFHandler::MGVertexDoFs::get_coarsest_level
unsigned int get_coarsest_level() const
Definition: dof_handler.cc:1599
DoFHandler::max_couplings_between_boundary_dofs
unsigned int max_couplings_between_boundary_dofs() const
Definition: dof_handler.cc:1470
DoFHandler::MGVertexDoFs::get_index
types::global_dof_index get_index(const unsigned int level, const unsigned int dof_number, const unsigned int dofs_per_vertex) const
DoFHandler::distribute_dofs
virtual void distribute_dofs(const FiniteElement< dim, spacedim > &fe)
Definition: dof_handler.cc:1247
Subscriptor
Definition: subscriptor.h:62
DoFHandler::ExcNewNumbersNotConsecutive
static ::ExceptionBase & ExcNewNumbersNotConsecutive(types::global_dof_index arg1)
DoFHandler::locally_owned_dofs
const IndexSet & locally_owned_dofs() const
level
unsigned int level
Definition: grid_out.cc:4355
DoFHandler::ExcEmptyLevel
static ::ExceptionBase & ExcEmptyLevel(int arg1)
DoFHandler::active_cell_iterators
IteratorRange< active_cell_iterator > active_cell_iterators() const
Definition: dof_handler.cc:1030
DoFHandler::begin
cell_iterator begin(const unsigned int level=0) const
Definition: dof_handler.cc:922
DoFHandler::mg_cell_iterators
IteratorRange< level_cell_iterator > mg_cell_iterators() const
Definition: dof_handler.cc:1041
DoFHandler::~DoFHandler
virtual ~DoFHandler() override
Definition: dof_handler.cc:870
DoFHandler::get_dof_index
types::global_dof_index get_dof_index(const unsigned int obj_level, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index) const
Definition: dof_handler.cc:1523
DoFHandler::load
void load(Archive &ar, const unsigned int version)
internal::DoFHandlerImplementation::NumberCache
Definition: number_cache.h:37
StandardExceptions::ExcMessage
static ::ExceptionBase & ExcMessage(std::string arg1)
types::global_dof_index
unsigned int global_dof_index
Definition: types.h:76
DoFHandler::operator=
DoFHandler & operator=(const DoFHandler &)=delete
IteratorRange
Definition: iterator_range.h:129
DoFHandler::has_level_dofs
bool has_level_dofs() const
fe_collection.h
DoFHandler::mg_vertex_dofs
std::vector< MGVertexDoFs > mg_vertex_dofs
Definition: dof_handler.h:1329
DoFHandler::get_triangulation
const Triangulation< dim, spacedim > & get_triangulation() const
index_set.h
DoFHandler::space_dimension
static const unsigned int space_dimension
Definition: dof_handler.h:405
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
DoFHandler::save
void save(Archive &ar, const unsigned int version) const
DoFHandler< dim >::active_line_iterator
typename ActiveSelector::active_line_iterator active_line_iterator
Definition: dof_handler.h:263
DoFHandler< dim >::active_face_iterator
typename ActiveSelector::active_face_iterator active_face_iterator
Definition: dof_handler.h:388
DoFHandler::vertex_dofs
std::vector< types::global_dof_index > vertex_dofs
Definition: dof_handler.h:1323
DoFHandler::block_info
const BlockInfo & block_info() const
DEAL_II_DEPRECATED
#define DEAL_II_DEPRECATED
Definition: config.h:98
DoFCellAccessor
Definition: dof_accessor.h:1321
DeclException1
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:518
DoFAccessor
Definition: dof_accessor.h:211
smartpointer.h
DoFHandler::dimension
static const unsigned int dimension
Definition: dof_handler.h:400
DoFHandler::end_mg
level_cell_iterator end_mg() const
Definition: dof_handler.cc:1012
DoFHandler::MGVertexDoFs
Definition: dof_handler.h:1221
DoFHandler::MGVertexDoFs::set_index
void set_index(const unsigned int level, const unsigned int dof_number, const unsigned int dofs_per_vertex, const types::global_dof_index index)
iterator_range.h
DoFHandler::cell_iterators
IteratorRange< cell_iterator > cell_iterators() const
Definition: dof_handler.cc:1021
FiniteElement
Definition: fe.h:648
exceptions.h
internal::DoFHandlerImplementation::NumberCache::get_n_locally_owned_dofs_per_processor
std::vector< types::global_dof_index > get_n_locally_owned_dofs_per_processor(const MPI_Comm mpi_communicator) const
Definition: number_cache.cc:87
DoFHandler::end
cell_iterator end() const
Definition: dof_handler.cc:951
DoFHandler::max_couplings_between_dofs
unsigned int max_couplings_between_dofs() const
Definition: dof_handler.cc:1460
DoFHandler< dim >::hex_iterator
typename ActiveSelector::hex_iterator hex_iterator
Definition: dof_handler.h:296
DoFHandler::cell_iterators_on_level
IteratorRange< cell_iterator > cell_iterators_on_level(const unsigned int level) const
Definition: dof_handler.cc:1051
DoFHandler::ExcGridsDoNotMatch
static ::ExceptionBase & ExcGridsDoNotMatch()
SmartPointer
Definition: smartpointer.h:68
DoFHandler::MGVertexDoFs::coarsest_level
unsigned int coarsest_level
Definition: dof_handler.h:1274
unsigned int
function.h
DoFHandler::MGVertexDoFs::init
void init(const unsigned int coarsest_level, const unsigned int finest_level, const unsigned int dofs_per_vertex)
Definition: dof_handler.cc:1573
parallel::TriangulationBase::get_communicator
virtual const MPI_Comm & get_communicator() const
Definition: tria_base.cc:138
Assert
#define Assert(cond, exc)
Definition: exceptions.h:1419
DoFHandler< dim >::level_face_iterator
typename LevelSelector::face_iterator level_face_iterator
Definition: dof_handler.h:394
DoFHandler::is_hp_dof_handler
static const bool is_hp_dof_handler
Definition: dof_handler.h:410
DoFHandler::memory_consumption
virtual std::size_t memory_consumption() const
Definition: dof_handler.cc:1203
block_info.h
DoFHandler::clear
virtual void clear()
Definition: dof_handler.cc:1352
DoFHandler::number_cache
::internal::DoFHandlerImplementation::NumberCache number_cache
Definition: dof_handler.h:1207
dof_accessor.h
DeclException0
#define DeclException0(Exception0)
Definition: exceptions.h:473
dof_faces.h
DoFHandler< dim >::active_hex_iterator
typename ActiveSelector::active_hex_iterator active_hex_iterator
Definition: dof_handler.h:307
internal::policy_to_string
std::string policy_to_string(const ::internal::DoFHandlerImplementation::Policy::PolicyBase< dim, spacedim > &policy)
Definition: dof_handler.cc:71
DoFHandler< dim >::active_quad_iterator
typename ActiveSelector::active_quad_iterator active_quad_iterator
Definition: dof_handler.h:287
DoFHandler::has_active_dofs
bool has_active_dofs() const
parallel::TriangulationBase
Definition: tria_base.h:78
DoFHandler::set_dof_index
void set_dof_index(const unsigned int obj_level, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index) const
Definition: dof_handler.cc:1543
config.h
DoFHandler::distribute_mg_dofs
virtual void distribute_mg_dofs()
Definition: dof_handler.cc:1296
DoFHandler::n_locally_owned_dofs
types::global_dof_index n_locally_owned_dofs() const
Function
Definition: function.h:151
internal
Definition: aligned_vector.h:369
internal::DoFHandlerImplementation::NumberCache::get_locally_owned_dofs_per_processor
std::vector< IndexSet > get_locally_owned_dofs_per_processor(const MPI_Comm mpi_communicator) const
Definition: number_cache.cc:110
BlockInfo
A small class collecting the different BlockIndices involved in global, multilevel and local computat...
Definition: block_info.h:99
DoFHandler::n_locally_owned_dofs_per_processor
const std::vector< types::global_dof_index > & n_locally_owned_dofs_per_processor() const
DoFHandler::locally_owned_mg_dofs_per_processor
const std::vector< IndexSet > & locally_owned_mg_dofs_per_processor(const unsigned int level) const
DoFHandler::n_boundary_dofs
types::global_dof_index n_boundary_dofs() const
Definition: dof_handler.cc:1089
internal::TriangulationImplementation::n_cells
unsigned int n_cells(const internal::TriangulationImplementation::NumberCache< 1 > &c)
Definition: tria.cc:12618
DoFHandler::clear_mg_space
void clear_mg_space()
Definition: dof_handler.cc:1328
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
DoFHandler::MGVertexDoFs::finest_level
unsigned int finest_level
Definition: dof_handler.h:1279
dof_levels.h
DoFHandler::tria
SmartPointer< const Triangulation< dim, spacedim >, DoFHandler< dim, spacedim > > tria
Definition: dof_handler.h:1183
internal::DoFHandlerImplementation::NumberCache::locally_owned_dofs_per_processor
std::vector< IndexSet > locally_owned_dofs_per_processor
Definition: number_cache.h:180
DoFHandler< dim >::quad_iterator
typename ActiveSelector::quad_iterator quad_iterator
Definition: dof_handler.h:272
DoFHandler::begin_active
active_cell_iterator begin_active(const unsigned int level=0) const
Definition: dof_handler.cc:935
DoFHandler< dim >::line_iterator
typename ActiveSelector::line_iterator line_iterator
Definition: dof_handler.h:248
number_cache.h
DoFHandler::fe_collection
hp::FECollection< dim, spacedim > fe_collection
Definition: dof_handler.h:1190
TrilinosWrappers::global_index
TrilinosWrappers::types::int_type global_index(const Epetra_BlockMap &map, const ::types::global_dof_index i)
Definition: trilinos_index_access.h:82
DoFHandler::initialize
void initialize(const Triangulation< dim, spacedim > &tria, const FiniteElement< dim, spacedim > &fe)
Definition: dof_handler.cc:887
DoFHandler::serialize
void serialize(Archive &archive, const unsigned int version)
DoFHandler::mg_levels
std::vector< std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel< dim > > > mg_levels
Definition: dof_handler.h:1341
DoFHandler::get_fe
const FiniteElement< dim, spacedim > & get_fe(const unsigned int index=0) const
AssertThrow
#define AssertThrow(cond, exc)
Definition: exceptions.h:1531
DoFHandler::MGVertexDoFs::MGVertexDoFs
MGVertexDoFs()
Definition: dof_handler.cc:1564
DoFHandler::set_fe
virtual void set_fe(const FiniteElement< dim, spacedim > &fe)
Definition: dof_handler.cc:1235
tria_base.h
hp::FECollection
Definition: fe_collection.h:54
DoFHandler< dim >::level_cell_accessor
typename LevelSelector::CellAccessor level_cell_accessor
Definition: dof_handler.h:390
DoFHandler::n_dofs
types::global_dof_index n_dofs() const