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) 2005 - 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_hp_dof_handler_h
17 #define dealii_hp_dof_handler_h
18 
19 
20 
21 #include <deal.II/base/config.h>
22 
24 #include <deal.II/base/function.h>
28 
33 
34 #include <deal.II/hp/dof_faces.h>
35 #include <deal.II/hp/dof_level.h>
37 
38 #include <map>
39 #include <memory>
40 #include <set>
41 #include <vector>
42 
44 
45 // Forward declarations
46 #ifndef DOXYGEN
47 template <int dim, int spacedim>
48 class Triangulation;
49 
50 namespace parallel
51 {
52  namespace distributed
53  {
54  template <int dim, int spacedim, typename VectorType>
55  class CellDataTransfer;
56  }
57 } // namespace parallel
58 
59 namespace internal
60 {
61  namespace DoFHandlerImplementation
62  {
63  struct Implementation;
64 
65  namespace Policy
66  {
67  template <int dim, int spacedim>
68  class PolicyBase;
69  struct Implementation;
70  } // namespace Policy
71  } // namespace DoFHandlerImplementation
72 
73  namespace hp
74  {
75  class DoFLevel;
76 
77  namespace DoFHandlerImplementation
78  {
79  struct Implementation;
80  }
81  } // namespace hp
82 } // namespace internal
83 
84 namespace internal
85 {
86  namespace DoFAccessorImplementation
87  {
88  struct Implementation;
89  }
90 
91  namespace DoFCellAccessorImplementation
92  {
93  struct Implementation;
94  }
95 } // namespace internal
96 #endif
97 
98 
99 namespace hp
100 {
202  template <int dim, int spacedim = dim>
203  class DoFHandler : public Subscriptor
204  {
205  using ActiveSelector = ::internal::DoFHandlerImplementation::
206  Iterators<DoFHandler<dim, spacedim>, false>;
207  using LevelSelector = ::internal::DoFHandlerImplementation::
208  Iterators<DoFHandler<dim, spacedim>, true>;
209 
210  public:
223  using cell_accessor = typename ActiveSelector::CellAccessor;
224 
237  using face_accessor = typename ActiveSelector::FaceAccessor;
238 
246  using line_iterator = typename ActiveSelector::line_iterator;
247 
261  using active_line_iterator = typename ActiveSelector::active_line_iterator;
262 
270  using quad_iterator = typename ActiveSelector::quad_iterator;
271 
285  using active_quad_iterator = typename ActiveSelector::active_quad_iterator;
286 
294  using hex_iterator = typename ActiveSelector::hex_iterator;
295 
305  using active_hex_iterator = typename ActiveSelector::active_hex_iterator;
306 
311 #ifndef _MSC_VER
312  using active_cell_iterator = typename ActiveSelector::active_cell_iterator;
313 #else
316 #endif
317 
318  using level_cell_iterator = typename LevelSelector::cell_iterator;
319 
324 #ifndef _MSC_VER
325  using cell_iterator = typename ActiveSelector::cell_iterator;
326 #else
327  using cell_iterator =
329 #endif
330 
335  using face_iterator = typename ActiveSelector::face_iterator;
336 
341  using active_face_iterator = typename ActiveSelector::active_face_iterator;
342 
343  using level_cell_accessor = typename LevelSelector::CellAccessor;
344  using level_face_accessor = typename LevelSelector::FaceAccessor;
345 
346  using level_face_iterator = typename LevelSelector::face_iterator;
347 
351  static const unsigned int dimension = dim;
352 
356  static const unsigned int space_dimension = spacedim;
357 
361  static const bool is_hp_dof_handler = true;
362 
373  static const unsigned int default_fe_index = numbers::invalid_unsigned_int;
374 
375 
379  DoFHandler();
380 
385 
392  DoFHandler(const DoFHandler &) = delete;
393 
397  virtual ~DoFHandler() override;
398 
405  DoFHandler &
406  operator=(const DoFHandler &) = delete;
407 
412  void
415 
432  virtual void
434 
460  virtual void
462 
467  void
468  set_active_fe_indices(const std::vector<unsigned int> &active_fe_indices);
469 
475  void
476  get_active_fe_indices(std::vector<unsigned int> &active_fe_indices) const;
477 
483  virtual void
484  clear();
485 
538  void
539  renumber_dofs(const std::vector<types::global_dof_index> &new_numbers);
540 
558  unsigned int
560 
573  unsigned int
575 
584  begin(const unsigned int level = 0) const;
585 
603  begin_active(const unsigned int level = 0) const;
604 
610  end() const;
611 
617  end(const unsigned int level) const;
618 
625  end_active(const unsigned int level) const;
626 
642  cell_iterators() const;
643 
685  active_cell_iterators() const;
686 
703  cell_iterators_on_level(const unsigned int level) const;
704 
721  active_cell_iterators_on_level(const unsigned int level) const;
722 
723  /*
724  * @}
725  */
726 
727  /*---------------------------------------*/
728 
729 
755  n_dofs() const;
756 
763  n_dofs(const unsigned int level) const;
764 
770  n_boundary_dofs() const;
771 
782  template <typename number>
785  const std::map<types::boundary_id, const Function<spacedim, number> *>
786  &boundary_ids) const;
787 
794  n_boundary_dofs(const std::set<types::boundary_id> &boundary_ids) const;
795 
814  n_locally_owned_dofs() const;
815 
821  const IndexSet &
822  locally_owned_dofs() const;
823 
837  DEAL_II_DEPRECATED const std::vector<IndexSet> &
839 
856  DEAL_II_DEPRECATED const std::vector<types::global_dof_index> &
858 
865  const IndexSet &
866  locally_owned_mg_dofs(const unsigned int level) const;
867 
882  DEAL_II_DEPRECATED const std::vector<IndexSet> &
883  locally_owned_mg_dofs_per_processor(const unsigned int level) const;
884 
890  get_fe(const unsigned int index) const;
891 
897  get_fe_collection() const;
898 
904  get_triangulation() const;
905 
914  virtual std::size_t
915  memory_consumption() const;
916 
933  void
935 
951  void
953 
958  template <class Archive>
959  void
960  save(Archive &ar, const unsigned int version) const;
961 
966  template <class Archive>
967  void
968  load(Archive &ar, const unsigned int version);
969 
970 #ifdef DOXYGEN
971 
975  template <class Archive>
976  void
977  serialize(Archive &archive, const unsigned int version);
978 #else
979  // This macro defines the serialize() method that is compatible with
980  // the templated save() and load() method that have been implemented.
981  BOOST_SERIALIZATION_SPLIT_MEMBER()
982 #endif
983 
1000  int,
1001  << "The matrix has the wrong dimension " << arg1);
1011  << "The given list of new dof indices is not consecutive: "
1012  << "the index " << arg1 << " does not exist.");
1017  int,
1018  int,
1019  << "The mesh contains a cell with an active_fe_index of "
1020  << arg1 << ", but the finite element collection only has "
1021  << arg2 << " elements");
1026  int,
1027  << "The given level " << arg1
1028  << " is not in the valid range!");
1037  int,
1038  << "You tried to do something on level " << arg1
1039  << ", but this level is empty.");
1040 
1041  private:
1047 
1052 
1057  std::unique_ptr<::internal::DoFHandlerImplementation::Policy::
1058  PolicyBase<dim, spacedim>>
1060 
1061 
1065  void
1067 
1071  void
1072  clear_space();
1073 
1074  template <int structdim>
1076  get_dof_index(const unsigned int obj_level,
1077  const unsigned int obj_index,
1078  const unsigned int fe_index,
1079  const unsigned int local_index) const;
1080 
1081  template <int structdim>
1082  void
1083  set_dof_index(const unsigned int obj_level,
1084  const unsigned int obj_index,
1085  const unsigned int fe_index,
1086  const unsigned int local_index,
1088 
1096  void
1098 
1107  void
1109 
1117  void
1119 
1129  void
1131 
1140  void
1142 
1151  void
1153 
1162  void
1164 
1173  void
1175 
1180  std::vector<std::unique_ptr<::internal::hp::DoFLevel>> levels;
1181 
1186  std::unique_ptr<::internal::hp::DoFIndicesOnFaces<dim>> faces;
1187 
1196 
1202  std::vector<::internal::DoFHandlerImplementation::NumberCache>
1204 
1217  std::vector<types::global_dof_index> vertex_dofs;
1218 
1231  std::vector<unsigned int> vertex_dof_offsets;
1232 
1240  {
1245  std::map<const cell_iterator, const unsigned int>
1247 
1252  std::map<const cell_iterator, const unsigned int> refined_cells_fe_index;
1253 
1258  std::map<const cell_iterator, const unsigned int>
1260 
1266  std::vector<unsigned int> active_fe_indices;
1267 
1273  std::unique_ptr<
1274  parallel::distributed::
1275  CellDataTransfer<dim, spacedim, std::vector<unsigned int>>>
1277  };
1278 
1283  std::unique_ptr<ActiveFEIndexTransfer> active_fe_index_transfer;
1284 
1289  std::vector<boost::signals2::connection> tria_listeners;
1290 
1291  // Make accessor objects friends.
1292  template <int, class, bool>
1293  friend class ::DoFAccessor;
1294  template <class, bool>
1295  friend class ::DoFCellAccessor;
1296  friend struct ::internal::DoFAccessorImplementation::Implementation;
1297  friend struct ::internal::DoFCellAccessorImplementation::
1298  Implementation;
1299 
1300  // Likewise for DoFLevel objects since they need to access the vertex dofs
1301  // in the functions that set and retrieve vertex dof indices.
1302  template <int>
1303  friend class ::internal::hp::DoFIndicesOnFacesOrEdges;
1304  friend struct ::internal::hp::DoFHandlerImplementation::
1305  Implementation;
1306  friend struct ::internal::DoFHandlerImplementation::Policy::
1307  Implementation;
1308  };
1309 
1310 
1311 
1312 #ifndef DOXYGEN
1313 
1314 
1315  /* ----------------------- Inline functions ----------------------------------
1316  */
1317 
1318 
1319  template <int dim, int spacedim>
1320  template <typename number>
1323  const std::map<types::boundary_id, const Function<spacedim, number> *>
1324  &boundary_ids) const
1325  {
1326  // extract the set of boundary ids and forget about the function object
1327  // pointers
1328  std::set<types::boundary_id> boundary_ids_only;
1329  for (typename std::map<types::boundary_id,
1330  const Function<spacedim, number> *>::const_iterator
1331  p = boundary_ids.begin();
1332  p != boundary_ids.end();
1333  ++p)
1334  boundary_ids_only.insert(p->first);
1335 
1336  // then just hand everything over to the other function that does the work
1337  return n_boundary_dofs(boundary_ids_only);
1338  }
1339 
1340 
1341 
1342  template <>
1345  {
1346  Assert(false, ExcNotImplemented());
1347  return 0;
1348  }
1349 
1350 
1351 
1352  template <>
1353  template <typename number>
1356  const std::map<types::boundary_id, const Function<3, number> *> &) const
1357  {
1358  Assert(false, ExcNotImplemented());
1359  return 0;
1360  }
1361 
1362 
1363 
1364  template <>
1366  DoFHandler<2, 3>::n_boundary_dofs(const std::set<types::boundary_id> &) const
1367  {
1368  Assert(false, ExcNotImplemented());
1369  return 0;
1370  }
1371 }
1372 
1373 
1374 namespace internal
1375 {
1383  template <int dim, int spacedim>
1384  std::string
1385  policy_to_string(const ::internal::DoFHandlerImplementation::Policy::
1386  PolicyBase<dim, spacedim> &policy);
1387 } // namespace internal
1388 
1389 
1390 namespace hp
1391 {
1392  template <int dim, int spacedim>
1393  template <class Archive>
1394  void
1395  DoFHandler<dim, spacedim>::save(Archive &ar, unsigned int) const
1396  {
1397  ar &vertex_dofs;
1398  ar &vertex_dof_offsets;
1399  ar &number_cache;
1400  ar &mg_number_cache;
1401 
1402  // some versions of gcc have trouble with loading vectors of
1403  // std::unique_ptr objects because std::unique_ptr does not
1404  // have a copy constructor. do it one level at a time
1405  const unsigned int n_levels = levels.size();
1406  ar & n_levels;
1407  for (unsigned int i = 0; i < n_levels; ++i)
1408  ar &levels[i];
1409 
1410  // boost dereferences a nullptr when serializing a nullptr
1411  // at least up to 1.65.1. This causes problems with clang-5.
1412  // Therefore, work around it.
1413  bool faces_is_nullptr = (faces.get() == nullptr);
1414  ar & faces_is_nullptr;
1415  if (!faces_is_nullptr)
1416  ar &faces;
1417 
1418  // write out the number of triangulation cells and later check during
1419  // loading that this number is indeed correct; same with something that
1420  // identifies the policy
1421  const unsigned int n_cells = tria->n_cells();
1422  std::string policy_name = ::internal::policy_to_string(*policy);
1423 
1424  ar &n_cells &policy_name;
1425  }
1426 
1427 
1428 
1429  template <int dim, int spacedim>
1430  template <class Archive>
1431  void
1432  DoFHandler<dim, spacedim>::load(Archive &ar, unsigned int)
1433  {
1434  ar &vertex_dofs;
1435  ar &vertex_dof_offsets;
1436  ar &number_cache;
1437  ar &mg_number_cache;
1438 
1439  // boost::serialization can restore pointers just fine, but if the
1440  // pointer object still points to something useful, that object is not
1441  // destroyed and we end up with a memory leak. consequently, first delete
1442  // previous content before re-loading stuff
1443  levels.clear();
1444  faces.reset();
1445 
1446  // some versions of gcc have trouble with loading vectors of
1447  // std::unique_ptr objects because std::unique_ptr does not
1448  // have a copy constructor. do it one level at a time
1449  unsigned int size;
1450  ar & size;
1451  levels.resize(size);
1452  for (unsigned int i = 0; i < size; ++i)
1453  {
1454  std::unique_ptr<::internal::hp::DoFLevel> level;
1455  ar & level;
1456  levels[i] = std::move(level);
1457  }
1458 
1459  // Workaround for nullptr, see in save().
1460  bool faces_is_nullptr = true;
1461  ar & faces_is_nullptr;
1462  if (!faces_is_nullptr)
1463  ar &faces;
1464 
1465  // these are the checks that correspond to the last block in the save()
1466  // function
1467  unsigned int n_cells;
1468  std::string policy_name;
1469 
1470  ar &n_cells &policy_name;
1471 
1472  AssertThrow(
1473  n_cells == tria->n_cells(),
1474  ExcMessage(
1475  "The object being loaded into does not match the triangulation "
1476  "that has been stored previously."));
1477  AssertThrow(policy_name == ::internal::policy_to_string(*policy),
1478  ExcMessage(
1479  "The policy currently associated with this DoFHandler (" +
1480  ::internal::policy_to_string(*policy) +
1481  ") does not match the one that was associated with the "
1482  "DoFHandler previously stored (" +
1483  policy_name + ")."));
1484  }
1485 
1486  template <int dim, int spacedim>
1489  {
1490  return number_cache.n_global_dofs;
1491  }
1492 
1493 
1494 
1495  template <int dim, int spacedim>
1497  DoFHandler<dim, spacedim>::n_dofs(const unsigned int) const
1498  {
1499  Assert(false, ExcNotImplemented());
1501  }
1502 
1503 
1504 
1505  template <int dim, int spacedim>
1508  {
1509  return number_cache.n_locally_owned_dofs;
1510  }
1511 
1512 
1513 
1514  template <int dim, int spacedim>
1515  const IndexSet &
1517  {
1518  return number_cache.locally_owned_dofs;
1519  }
1520 
1521 
1522 
1523  template <int dim, int spacedim>
1524  const std::vector<types::global_dof_index> &
1526  {
1527  if (number_cache.n_locally_owned_dofs_per_processor.empty() &&
1528  number_cache.n_global_dofs > 0)
1529  {
1530  MPI_Comm comm;
1531 
1533  (dynamic_cast<const parallel::TriangulationBase<dim, spacedim> *>(
1534  &this->get_triangulation()));
1535  if (tr != nullptr)
1536  comm = tr->get_communicator();
1537  else
1538  comm = MPI_COMM_SELF;
1539 
1541  number_cache)
1542  .n_locally_owned_dofs_per_processor =
1543  number_cache.get_n_locally_owned_dofs_per_processor(comm);
1544  }
1545  return number_cache.n_locally_owned_dofs_per_processor;
1546  }
1547 
1548 
1549 
1550  template <int dim, int spacedim>
1551  const std::vector<IndexSet> &
1553  {
1554  if (number_cache.locally_owned_dofs_per_processor.empty() &&
1555  number_cache.n_global_dofs > 0)
1556  {
1557  MPI_Comm comm;
1558 
1560  (dynamic_cast<const parallel::TriangulationBase<dim, spacedim> *>(
1561  &this->get_triangulation()));
1562  if (tr != nullptr)
1563  comm = tr->get_communicator();
1564  else
1565  comm = MPI_COMM_SELF;
1566 
1568  number_cache)
1569  .locally_owned_dofs_per_processor =
1570  number_cache.get_locally_owned_dofs_per_processor(comm);
1571  }
1572  return number_cache.locally_owned_dofs_per_processor;
1573  }
1574 
1575 
1576 
1577  template <int dim, int spacedim>
1578  const IndexSet &
1580  const unsigned int level) const
1581  {
1582  Assert(false, ExcNotImplemented());
1583  (void)level;
1584  Assert(level < this->get_triangulation().n_global_levels(),
1585  ExcMessage("The given level index exceeds the number of levels "
1586  "present in the triangulation"));
1587  return mg_number_cache[0].locally_owned_dofs;
1588  }
1589 
1590 
1591 
1592  template <int dim, int spacedim>
1593  const std::vector<IndexSet> &
1595  const unsigned int level) const
1596  {
1597  Assert(level < this->get_triangulation().n_global_levels(),
1598  ExcMessage("The given level index exceeds the number of levels "
1599  "present in the triangulation"));
1600  Assert(
1601  mg_number_cache.size() == this->get_triangulation().n_global_levels(),
1602  ExcMessage(
1603  "The level dofs are not set up properly! Did you call distribute_mg_dofs()?"));
1604  if (mg_number_cache[level].locally_owned_dofs_per_processor.empty() &&
1605  mg_number_cache[level].n_global_dofs > 0)
1606  {
1607  MPI_Comm comm;
1608 
1610  (dynamic_cast<const parallel::TriangulationBase<dim, spacedim> *>(
1611  &this->get_triangulation()));
1612  if (tr != nullptr)
1613  comm = tr->get_communicator();
1614  else
1615  comm = MPI_COMM_SELF;
1616 
1618  mg_number_cache[level])
1619  .locally_owned_dofs_per_processor =
1620  mg_number_cache[level].get_locally_owned_dofs_per_processor(comm);
1621  }
1622  return mg_number_cache[level].locally_owned_dofs_per_processor;
1623  }
1624 
1625 
1626 
1627  template <int dim, int spacedim>
1628  inline const FiniteElement<dim, spacedim> &
1629  DoFHandler<dim, spacedim>::get_fe(const unsigned int number) const
1630  {
1631  Assert(fe_collection.size() > 0,
1632  ExcMessage("No finite element collection is associated with "
1633  "this DoFHandler"));
1634  return fe_collection[number];
1635  }
1636 
1637 
1638 
1639  template <int dim, int spacedim>
1640  inline const hp::FECollection<dim, spacedim> &
1642  {
1643  Assert(fe_collection.size() > 0,
1644  ExcMessage("No finite element collection is associated with "
1645  "this DoFHandler"));
1646  return fe_collection;
1647  }
1648 
1649 
1650 
1651  template <int dim, int spacedim>
1652  inline const Triangulation<dim, spacedim> &
1654  {
1655  Assert(tria != nullptr,
1656  ExcMessage("This DoFHandler object has not been associated "
1657  "with a triangulation."));
1658  return *tria;
1659  }
1660 
1661 #endif
1662 
1663 } // namespace hp
1664 
1666 
1667 #endif
hp::DoFHandler::~DoFHandler
virtual ~DoFHandler() override
Definition: dof_handler.cc:1291
IndexSet
Definition: index_set.h:74
hp::DoFHandler::locally_owned_dofs
const IndexSet & locally_owned_dofs() const
hp::DoFHandler< dim >::cell_accessor
typename ActiveSelector::CellAccessor cell_accessor
Definition: dof_handler.h:223
numbers::invalid_dof_index
const types::global_dof_index invalid_dof_index
Definition: types.h:206
hp::DoFHandler::prepare_for_serialization_of_active_fe_indices
void prepare_for_serialization_of_active_fe_indices()
Definition: dof_handler.cc:2170
hp::DoFHandler::is_hp_dof_handler
static const bool is_hp_dof_handler
Definition: dof_handler.h:361
hp::DoFHandler::active_cell_iterators_on_level
IteratorRange< active_cell_iterator > active_cell_iterators_on_level(const unsigned int level) const
Definition: dof_handler.cc:1401
hp::DoFHandler< dim >::level_cell_accessor
typename LevelSelector::CellAccessor level_cell_accessor
Definition: dof_handler.h:343
deprecated_function_map.h
dof_faces.h
hp::DoFHandler< dim >::level_face_iterator
typename LevelSelector::face_iterator level_face_iterator
Definition: dof_handler.h:346
hp::DoFHandler::ExcMatrixHasWrongSize
static ::ExceptionBase & ExcMatrixHasWrongSize(int arg1)
hp::DoFHandler::max_couplings_between_boundary_dofs
unsigned int max_couplings_between_boundary_dofs() const
Definition: dof_handler.cc:1883
hp::DoFHandler::post_active_fe_index_transfer
void post_active_fe_index_transfer()
Definition: dof_handler.cc:2100
hp::DoFHandler::n_boundary_dofs
types::global_dof_index n_boundary_dofs() const
Definition: dof_handler.cc:1416
dof_iterator_selector.h
hp::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:2348
hp::DoFHandler::ExcGridsDoNotMatch
static ::ExceptionBase & ExcGridsDoNotMatch()
StandardExceptions::ExcNotImplemented
static ::ExceptionBase & ExcNotImplemented()
CellDataTransfer
Definition: cell_data_transfer.h:108
Triangulation
Definition: tria.h:1109
internal::DoFHandlerImplementation::Iterators
Definition: dof_iterator_selector.h:47
hp::DoFHandler< dim >::active_cell_iterator
typename ActiveSelector::active_cell_iterator active_cell_iterator
Definition: dof_handler.h:312
hp::DoFHandler::get_fe_collection
const hp::FECollection< dim, spacedim > & get_fe_collection() const
hp::DoFHandler::initialize
void initialize(const Triangulation< dim, spacedim > &tria, const hp::FECollection< dim, spacedim > &fe)
Definition: dof_handler.cc:1571
hp::DoFHandler::ExcNewNumbersNotConsecutive
static ::ExceptionBase & ExcNewNumbersNotConsecutive(types::global_dof_index arg1)
hp::DoFHandler< dim >::active_hex_iterator
typename ActiveSelector::active_hex_iterator active_hex_iterator
Definition: dof_handler.h:305
hp::DoFHandler< dim >::line_iterator
typename ActiveSelector::line_iterator line_iterator
Definition: dof_handler.h:246
hp::DoFHandler::ExcInvalidFEIndex
static ::ExceptionBase & ExcInvalidFEIndex(int arg1, int arg2)
hp::DoFHandler< dim >::active_quad_iterator
typename ActiveSelector::active_quad_iterator active_quad_iterator
Definition: dof_handler.h:285
hp::DoFHandler::fe_collection
hp::FECollection< dim, spacedim > fe_collection
Definition: dof_handler.h:1051
hp::DoFHandler::end_active
active_cell_iterator end_active(const unsigned int level) const
Definition: dof_handler.cc:1358
hp::DoFHandler::get_triangulation
const Triangulation< dim, spacedim > & get_triangulation() const
hp::DoFHandler< dim >::active_line_iterator
typename ActiveSelector::active_line_iterator active_line_iterator
Definition: dof_handler.h:261
MPI_Comm
hp::DoFHandler::post_distributed_active_fe_index_transfer
void post_distributed_active_fe_index_transfer()
Definition: dof_handler.cc:2126
hp::DoFHandler::ExcNoFESelected
static ::ExceptionBase & ExcNoFESelected()
hp::DoFHandler< dim >::quad_iterator
typename ActiveSelector::quad_iterator quad_iterator
Definition: dof_handler.h:270
hp::DoFHandler::ExcFunctionNotUseful
static ::ExceptionBase & ExcFunctionNotUseful()
hp::DoFHandler::load
void load(Archive &ar, const unsigned int version)
hp::DoFHandler::max_couplings_between_dofs
unsigned int max_couplings_between_dofs() const
Definition: dof_handler.cc:1872
hp::DoFHandler::n_dofs
types::global_dof_index n_dofs() const
hp::DoFHandler::serialize
void serialize(Archive &archive, const unsigned int version)
hp::DoFHandler::get_fe
const FiniteElement< dim, spacedim > & get_fe(const unsigned int index) const
hp::DoFHandler
Definition: dof_handler.h:203
hp::DoFHandler::ActiveFEIndexTransfer::coarsened_cells_fe_index
std::map< const cell_iterator, const unsigned int > coarsened_cells_fe_index
Definition: dof_handler.h:1259
hp::DoFHandler::create_active_fe_table
void create_active_fe_table()
Definition: dof_handler.cc:1917
hp::DoFHandler::ActiveFEIndexTransfer::refined_cells_fe_index
std::map< const cell_iterator, const unsigned int > refined_cells_fe_index
Definition: dof_handler.h:1252
Subscriptor
Definition: subscriptor.h:62
hp::DoFHandler< dim >::level_face_accessor
typename LevelSelector::FaceAccessor level_face_accessor
Definition: dof_handler.h:344
hp::DoFHandler::set_fe
virtual void set_fe(const hp::FECollection< dim, spacedim > &fe)
Definition: dof_handler.cc:1597
level
unsigned int level
Definition: grid_out.cc:4355
hp::DoFHandler::ActiveFEIndexTransfer::active_fe_indices
std::vector< unsigned int > active_fe_indices
Definition: dof_handler.h:1266
hp::DoFHandler::pre_distributed_active_fe_index_transfer
void pre_distributed_active_fe_index_transfer()
Definition: dof_handler.cc:2026
hp::DoFHandler::active_cell_iterators
IteratorRange< active_cell_iterator > active_cell_iterators() const
Definition: dof_handler.cc:1379
hp::DoFHandler::deserialize_active_fe_indices
void deserialize_active_fe_indices()
Definition: dof_handler.cc:2263
hp::DoFHandler::vertex_dof_offsets
std::vector< unsigned int > vertex_dof_offsets
Definition: dof_handler.h:1231
hp::DoFHandler::operator=
DoFHandler & operator=(const DoFHandler &)=delete
hp::DoFHandler::ActiveFEIndexTransfer::cell_data_transfer
std::unique_ptr< parallel::distributed::CellDataTransfer< dim, spacedim, std::vector< unsigned int > > > cell_data_transfer
Definition: dof_handler.h:1276
hp::DoFHandler::begin
cell_iterator begin(const unsigned int level=0) const
Definition: dof_handler.cc:1313
internal::DoFHandlerImplementation::NumberCache
Definition: number_cache.h:37
StandardExceptions::ExcMessage
static ::ExceptionBase & ExcMessage(std::string arg1)
hp::DoFHandler::vertex_dofs
std::vector< types::global_dof_index > vertex_dofs
Definition: dof_handler.h:1217
hp::DoFHandler::ExcEmptyLevel
static ::ExceptionBase & ExcEmptyLevel(int arg1)
hp::DoFHandler::get_active_fe_indices
void get_active_fe_indices(std::vector< unsigned int > &active_fe_indices) const
Definition: dof_handler.cc:1554
hp::DoFHandler::locally_owned_mg_dofs
const IndexSet & locally_owned_mg_dofs(const unsigned int level) const
IteratorRange
Definition: iterator_range.h:129
hp::DoFHandler::ExcInvalidLevel
static ::ExceptionBase & ExcInvalidLevel(int arg1)
fe_collection.h
hp::DoFHandler::n_locally_owned_dofs
types::global_dof_index n_locally_owned_dofs() const
hp::DoFHandler::end
cell_iterator end() const
Definition: dof_handler.cc:1338
hp::DoFHandler::locally_owned_mg_dofs_per_processor
const std::vector< IndexSet > & locally_owned_mg_dofs_per_processor(const unsigned int level) const
hp::DoFHandler::distribute_dofs
virtual void distribute_dofs(const hp::FECollection< dim, spacedim > &fe)
Definition: dof_handler.cc:1633
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
dof_level.h
hp::DoFHandler::post_refinement_action
void post_refinement_action()
Definition: dof_handler.cc:1971
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
smartpointer.h
hp::DoFHandler::clear_space
void clear_space()
Definition: dof_handler.cc:2361
hp::DoFHandler::number_cache
::internal::DoFHandlerImplementation::NumberCache number_cache
Definition: dof_handler.h:1195
iterator_range.h
hp::DoFHandler::cell_iterators
IteratorRange< cell_iterator > cell_iterators() const
Definition: dof_handler.cc:1369
FiniteElement
Definition: fe.h:648
hp::DoFHandler< dim >::cell_iterator
typename ActiveSelector::cell_iterator cell_iterator
Definition: dof_handler.h:325
exceptions.h
hp::DoFHandler::levels
std::vector< std::unique_ptr<::internal::hp::DoFLevel > > levels
Definition: dof_handler.h:1180
TriaActiveIterator
Definition: tria_iterator.h:759
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
hp::DoFHandler::renumber_dofs
void renumber_dofs(const std::vector< types::global_dof_index > &new_numbers)
Definition: dof_handler.cc:1805
hp::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:2334
hp::DoFHandler::begin_active
active_cell_iterator begin_active(const unsigned int level=0) const
Definition: dof_handler.cc:1322
hp::DoFHandler::cell_iterators_on_level
IteratorRange< cell_iterator > cell_iterators_on_level(const unsigned int level) const
Definition: dof_handler.cc:1390
SmartPointer
Definition: smartpointer.h:68
hp::DoFHandler::faces
std::unique_ptr<::internal::hp::DoFIndicesOnFaces< dim > > faces
Definition: dof_handler.h:1186
unsigned int
hp::DoFHandler::memory_consumption
virtual std::size_t memory_consumption() const
Definition: dof_handler.cc:1511
hp::DoFHandler::mg_number_cache
std::vector<::internal::DoFHandlerImplementation::NumberCache > mg_number_cache
Definition: dof_handler.h:1203
hp::DoFHandler::set_active_fe_indices
void set_active_fe_indices(const std::vector< unsigned int > &active_fe_indices)
Definition: dof_handler.cc:1533
function.h
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
hp::DoFHandler::ExcFacesHaveNoLevel
static ::ExceptionBase & ExcFacesHaveNoLevel()
hp::DoFHandler::active_fe_index_transfer
std::unique_ptr< ActiveFEIndexTransfer > active_fe_index_transfer
Definition: dof_handler.h:1283
hp::DoFHandler< dim >::level_cell_iterator
typename LevelSelector::cell_iterator level_cell_iterator
Definition: dof_handler.h:318
hp::DoFHandler::tria_listeners
std::vector< boost::signals2::connection > tria_listeners
Definition: dof_handler.h:1289
hp::DoFHandler::clear
virtual void clear()
Definition: dof_handler.cc:1795
hp::DoFHandler::n_locally_owned_dofs_per_processor
const std::vector< types::global_dof_index > & n_locally_owned_dofs_per_processor() const
hp::DoFHandler< dim >::face_accessor
typename ActiveSelector::FaceAccessor face_accessor
Definition: dof_handler.h:237
dof_accessor.h
DeclException0
#define DeclException0(Exception0)
Definition: exceptions.h:473
hp::DoFHandler::ExcInvalidBoundaryIndicator
static ::ExceptionBase & ExcInvalidBoundaryIndicator()
hp
Definition: hp.h:117
hp::DoFHandler::pre_refinement_action
void pre_refinement_action()
Definition: dof_handler.cc:1962
numbers::invalid_unsigned_int
static const unsigned int invalid_unsigned_int
Definition: types.h:191
hp::DoFHandler::setup_policy_and_listeners
void setup_policy_and_listeners()
Definition: dof_handler.cc:1708
internal::policy_to_string
std::string policy_to_string(const ::internal::DoFHandlerImplementation::Policy::PolicyBase< dim, spacedim > &policy)
Definition: dof_handler.cc:71
hp::DoFHandler::default_fe_index
static const unsigned int default_fe_index
Definition: dof_handler.h:373
parallel::TriangulationBase
Definition: tria_base.h:78
hp::DoFHandler::post_distributed_serialization_of_active_fe_indices
void post_distributed_serialization_of_active_fe_indices()
Definition: dof_handler.cc:2234
template_constraints.h
hp::DoFHandler::policy
std::unique_ptr<::internal::DoFHandlerImplementation::Policy::PolicyBase< dim, spacedim > > policy
Definition: dof_handler.h:1059
config.h
hp::DoFHandler< dim >::hex_iterator
typename ActiveSelector::hex_iterator hex_iterator
Definition: dof_handler.h:294
hp::DoFHandler< dim >::face_iterator
typename ActiveSelector::face_iterator face_iterator
Definition: dof_handler.h:335
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
internal::TriangulationImplementation::n_cells
unsigned int n_cells(const internal::TriangulationImplementation::NumberCache< 1 > &c)
Definition: tria.cc:12618
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
hp::DoFHandler::tria
SmartPointer< const Triangulation< dim, spacedim >, DoFHandler< dim, spacedim > > tria
Definition: dof_handler.h:1046
hp::DoFHandler::dimension
static const unsigned int dimension
Definition: dof_handler.h:351
internal::DoFHandlerImplementation::NumberCache::locally_owned_dofs_per_processor
std::vector< IndexSet > locally_owned_dofs_per_processor
Definition: number_cache.h:180
hp::DoFHandler::pre_active_fe_index_transfer
void pre_active_fe_index_transfer()
Definition: dof_handler.cc:2006
number_cache.h
hp::DoFHandler::DoFHandler
DoFHandler()
Definition: dof_handler.cc:1270
TriaIterator
Definition: tria_iterator.h:578
hp::DoFHandler::ActiveFEIndexTransfer
Definition: dof_handler.h:1239
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
DeclException2
#define DeclException2(Exception2, type1, type2, outsequence)
Definition: exceptions.h:541
AssertThrow
#define AssertThrow(cond, exc)
Definition: exceptions.h:1531
parallel
Definition: distributed.h:416
hp::DoFHandler< dim >::active_face_iterator
typename ActiveSelector::active_face_iterator active_face_iterator
Definition: dof_handler.h:341
hp::DoFHandler::locally_owned_dofs_per_processor
const std::vector< IndexSet > & locally_owned_dofs_per_processor() const
hp::DoFHandler::ActiveFEIndexTransfer::persisting_cells_fe_index
std::map< const cell_iterator, const unsigned int > persisting_cells_fe_index
Definition: dof_handler.h:1246
hp::FECollection
Definition: fe_collection.h:54
hp::DoFHandler::save
void save(Archive &ar, const unsigned int version) const
hp::DoFHandler::space_dimension
static const unsigned int space_dimension
Definition: dof_handler.h:356