Reference documentation for deal.II version Git 6a05540 2018-06-21 10:59:02 -0400
dof_handler.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1998 - 2018 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  typedef ::internal::DoFHandlerImplementation::
203  Iterators<DoFHandler<dim, spacedim>, false>
204  ActiveSelector;
205  typedef ::internal::DoFHandlerImplementation::
206  Iterators<DoFHandler<dim, spacedim>, true>
207  LevelSelector;
208 
209 public:
210  typedef typename ActiveSelector::CellAccessor cell_accessor;
211  typedef typename ActiveSelector::FaceAccessor face_accessor;
212 
213  typedef typename ActiveSelector::line_iterator line_iterator;
214  typedef typename ActiveSelector::active_line_iterator active_line_iterator;
215 
216  typedef typename ActiveSelector::quad_iterator quad_iterator;
217  typedef typename ActiveSelector::active_quad_iterator active_quad_iterator;
218 
219  typedef typename ActiveSelector::hex_iterator hex_iterator;
220  typedef typename ActiveSelector::active_hex_iterator active_hex_iterator;
221 
242  typedef typename ActiveSelector::active_cell_iterator active_cell_iterator;
243 
270  typedef typename ActiveSelector::cell_iterator cell_iterator;
271 
288  typedef typename ActiveSelector::face_iterator face_iterator;
289 
301  typedef typename ActiveSelector::active_face_iterator active_face_iterator;
302 
303  typedef typename LevelSelector::CellAccessor level_cell_accessor;
304  typedef typename LevelSelector::FaceAccessor level_face_accessor;
305 
306  typedef typename LevelSelector::cell_iterator level_cell_iterator;
307  typedef typename LevelSelector::face_iterator level_face_iterator;
308 
309 
313  static const unsigned int dimension = dim;
314 
318  static const unsigned int space_dimension = spacedim;
319 
331  DEAL_II_DEPRECATED
334 
344  static const unsigned int default_fe_index = 0;
345 
351  DoFHandler();
352 
357 
364  DoFHandler(const DoFHandler &) = delete;
365 
369  virtual ~DoFHandler() override;
370 
377  DoFHandler &
378  operator=(const DoFHandler &) = delete;
379 
384  void
386  const FiniteElement<dim, spacedim> &fe);
387 
426  virtual void
428 
437  DEAL_II_DEPRECATED
438  virtual void
440 
446  virtual void
448 
454  bool
455  has_level_dofs() const;
456 
471  bool
472  has_active_dofs() const;
473 
480  void
482 
486  virtual void
487  clear();
488 
541  void
542  renumber_dofs(const std::vector<types::global_dof_index> &new_numbers);
543 
548  void
549  renumber_dofs(const unsigned int level,
550  const std::vector<types::global_dof_index> &new_numbers);
551 
580  unsigned int
582 
595  unsigned int
597 
598  /*--------------------------------------*/
599 
604  /*
605  * @{
606  */
607 
611  cell_iterator
612  begin(const unsigned int level = 0) const;
613 
627  active_cell_iterator
628  begin_active(const unsigned int level = 0) const;
629 
634  cell_iterator
635  end() const;
636 
641  cell_iterator
642  end(const unsigned int level) const;
643 
649  active_cell_iterator
650  end_active(const unsigned int level) const;
651 
652 
657  level_cell_iterator
658  begin_mg(const unsigned int level = 0) const;
659 
664  level_cell_iterator
665  end_mg(const unsigned int level) const;
666 
671  level_cell_iterator
672  end_mg() const;
673 
689  cell_iterators() const;
690 
732  active_cell_iterators() const;
733 
746  mg_cell_iterators() const;
747 
764  cell_iterators_on_level(const unsigned int level) const;
765 
782  active_cell_iterators_on_level(const unsigned int level) const;
783 
801  mg_cell_iterators_on_level(const unsigned int level) const;
802 
803  /*
804  * @}
805  */
806 
807 
808  /*---------------------------------------*/
809 
810 
835  n_dofs() const;
836 
845  n_dofs(const unsigned int level) const;
846 
851  n_boundary_dofs() const;
852 
863  template <typename number>
866  const std::map<types::boundary_id, const Function<spacedim, number> *>
867  &boundary_ids) const;
868 
874  n_boundary_dofs(const std::set<types::boundary_id> &boundary_ids) const;
875 
891  const BlockInfo &
892  block_info() const;
893 
894 
914  unsigned int
915  n_locally_owned_dofs() const;
916 
922  const IndexSet &
923  locally_owned_dofs() const;
924 
929  const IndexSet &
930  locally_owned_mg_dofs(const unsigned int level) const;
931 
944  const std::vector<IndexSet> &
946 
962  const std::vector<types::global_dof_index> &
964 
976  const std::vector<IndexSet> &
977  locally_owned_mg_dofs_per_processor(const unsigned int level) const;
978 
985  get_fe(const unsigned int index = 0) const;
986 
994  get_fe_collection() const;
995 
1000  get_triangulation() const;
1001 
1010  virtual std::size_t
1011  memory_consumption() const;
1012 
1017  template <class Archive>
1018  void
1019  save(Archive &ar, const unsigned int version) const;
1020 
1025  template <class Archive>
1026  void
1027  load(Archive &ar, const unsigned int version);
1028 
1029  BOOST_SERIALIZATION_SPLIT_MEMBER()
1030 
1031 
1046  types::global_dof_index,
1047  << "The given list of new dof indices is not consecutive: "
1048  << "the index " << arg1 << " does not exist.");
1054  int,
1055  << "The given level " << arg1
1056  << " is not in the valid range!");
1067  int,
1068  << "You tried to do something on level " << arg1
1069  << ", but this level is empty.");
1070 
1071 
1072 private:
1077 
1081  SmartPointer<const Triangulation<dim, spacedim>, DoFHandler<dim, spacedim>>
1083 
1084 
1089  hp::FECollection<dim, spacedim> fe_collection;
1090 
1095  std::unique_ptr<::internal::DoFHandlerImplementation::Policy::
1096  PolicyBase<dim, spacedim>>
1098 
1106  ::internal::DoFHandlerImplementation::NumberCache number_cache;
1107 
1111  std::vector<::internal::DoFHandlerImplementation::NumberCache>
1113 
1121  {
1122  public:
1126  MGVertexDoFs();
1127 
1133  void
1134  init(const unsigned int coarsest_level,
1135  const unsigned int finest_level,
1136  const unsigned int dofs_per_vertex);
1137 
1141  unsigned int
1142  get_coarsest_level() const;
1143 
1147  unsigned int
1148  get_finest_level() const;
1149 
1155  get_index(const unsigned int level,
1156  const unsigned int dof_number,
1157  const unsigned int dofs_per_vertex) const;
1158 
1163  void
1164  set_index(const unsigned int level,
1165  const unsigned int dof_number,
1166  const unsigned int dofs_per_vertex,
1167  const types::global_dof_index index);
1168 
1169  private:
1173  unsigned int coarsest_level;
1174 
1178  unsigned int finest_level;
1179 
1189  std::unique_ptr<types::global_dof_index[]> indices;
1190  };
1191 
1195  void
1196  clear_space();
1197 
1201  void
1202  clear_mg_space();
1203 
1204  template <int structdim>
1206  get_dof_index(const unsigned int obj_level,
1207  const unsigned int obj_index,
1208  const unsigned int fe_index,
1209  const unsigned int local_index) const;
1210 
1211  template <int structdim>
1212  void
1213  set_dof_index(const unsigned int obj_level,
1214  const unsigned int obj_index,
1215  const unsigned int fe_index,
1216  const unsigned int local_index,
1217  const types::global_dof_index global_index) const;
1218 
1222  std::vector<types::global_dof_index> vertex_dofs;
1223 
1228  std::vector<MGVertexDoFs> mg_vertex_dofs;
1229 
1234  std::vector<
1235  std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel<dim>>>
1237 
1238  std::vector<
1239  std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel<dim>>>
1240  mg_levels;
1241 
1247  std::unique_ptr<::internal::DoFHandlerImplementation::DoFFaces<dim>>
1249 
1250  std::unique_ptr<::internal::DoFHandlerImplementation::DoFFaces<dim>>
1251  mg_faces;
1252 
1256  template <int, class, bool>
1257  friend class DoFAccessor;
1258  template <class, bool>
1259  friend class DoFCellAccessor;
1260  friend struct ::internal::DoFAccessorImplementation::Implementation;
1261  friend struct ::internal::DoFCellAccessorImplementation::Implementation;
1262 
1263  friend struct ::internal::DoFHandlerImplementation::Implementation;
1264  friend struct ::internal::DoFHandlerImplementation::Policy::
1265  Implementation;
1266 
1267  // explicitly check for sensible template arguments, but not on windows
1268  // because MSVC creates bogus warnings during normal compilation
1269 #ifndef DEAL_II_MSVC
1270  static_assert(dim <= spacedim,
1271  "The dimension <dim> of a DoFHandler must be less than or "
1272  "equal to the space dimension <spacedim> in which it lives.");
1273 #endif
1274 };
1275 
1276 
1277 
1278 #ifndef DOXYGEN
1279 
1280 /* ----------------------- Inline functions ----------------------------------
1281  */
1282 
1283 
1284 template <int dim, int spacedim>
1285 inline bool
1287 {
1288  return mg_number_cache.size() > 0;
1289 }
1290 
1291 
1292 
1293 template <int dim, int spacedim>
1294 inline bool
1296 {
1297  return number_cache.n_global_dofs > 0;
1298 }
1299 
1300 
1301 
1302 template <int dim, int spacedim>
1305 {
1306  return number_cache.n_global_dofs;
1307 }
1308 
1309 
1310 
1311 template <int dim, int spacedim>
1313 DoFHandler<dim, spacedim>::n_dofs(const unsigned int level) const
1314 {
1315  Assert(has_level_dofs(),
1316  ExcMessage(
1317  "n_dofs(level) can only be called after distribute_mg_dofs()"));
1318  Assert(level < mg_number_cache.size(), ExcInvalidLevel(level));
1319  return mg_number_cache[level].n_global_dofs;
1320 }
1321 
1322 
1323 
1324 template <int dim, int spacedim>
1325 unsigned int
1327 {
1328  return number_cache.n_locally_owned_dofs;
1329 }
1330 
1331 
1332 
1333 template <int dim, int spacedim>
1334 const IndexSet &
1336 {
1337  return number_cache.locally_owned_dofs;
1338 }
1339 
1340 
1341 
1342 template <int dim, int spacedim>
1343 const IndexSet &
1344 DoFHandler<dim, spacedim>::locally_owned_mg_dofs(const unsigned int level) const
1345 {
1346  Assert(level < this->get_triangulation().n_global_levels(),
1347  ExcMessage("invalid level in locally_owned_mg_dofs"));
1348  Assert(
1349  mg_number_cache.size() == this->get_triangulation().n_global_levels(),
1350  ExcMessage(
1351  "The level dofs are not set up properly! Did you call distribute_mg_dofs()?"));
1352  return mg_number_cache[level].locally_owned_dofs;
1353 }
1354 
1355 
1356 
1357 template <int dim, int spacedim>
1358 const std::vector<types::global_dof_index> &
1360 {
1361  return number_cache.n_locally_owned_dofs_per_processor;
1362 }
1363 
1364 
1365 
1366 template <int dim, int spacedim>
1367 const std::vector<IndexSet> &
1369 {
1370  return number_cache.locally_owned_dofs_per_processor;
1371 }
1372 
1373 
1374 
1375 template <int dim, int spacedim>
1376 const std::vector<IndexSet> &
1378  const unsigned int level) const
1379 {
1380  Assert(level < this->get_triangulation().n_global_levels(),
1381  ExcMessage("invalid level in locally_owned_mg_dofs_per_processor"));
1382  Assert(
1383  mg_number_cache.size() == this->get_triangulation().n_global_levels(),
1384  ExcMessage(
1385  "The level dofs are not set up properly! Did you call distribute_mg_dofs()?"));
1386  return mg_number_cache[level].locally_owned_dofs_per_processor;
1387 }
1388 
1389 
1390 
1391 template <int dim, int spacedim>
1392 inline const FiniteElement<dim, spacedim> &
1393 DoFHandler<dim, spacedim>::get_fe(const unsigned int index) const
1394 {
1395  (void)index;
1396  Assert(index == 0,
1397  ExcMessage(
1398  "There is only one FiniteElement stored. The index must be zero!"));
1399  return get_fe_collection()[0];
1400 }
1401 
1402 
1403 
1404 template <int dim, int spacedim>
1405 inline const hp::FECollection<dim, spacedim> &
1407 {
1408  Assert(
1409  fe_collection.size() > 0,
1410  ExcMessage(
1411  "You are trying to access the DoFHandler's FECollection object before it has been initialized."));
1412  return fe_collection;
1413 }
1414 
1415 
1416 
1417 template <int dim, int spacedim>
1418 inline const Triangulation<dim, spacedim> &
1420 {
1421  Assert(tria != nullptr,
1422  ExcMessage("This DoFHandler object has not been associated "
1423  "with a triangulation."));
1424  return *tria;
1425 }
1426 
1427 
1428 
1429 template <int dim, int spacedim>
1430 inline const BlockInfo &
1432 {
1433  return block_info_object;
1434 }
1435 
1436 
1437 
1438 template <int dim, int spacedim>
1439 template <typename number>
1442  const std::map<types::boundary_id, const Function<spacedim, number> *>
1443  &boundary_ids) const
1444 {
1445  // extract the set of boundary ids and forget about the function object
1446  // pointers
1447  std::set<types::boundary_id> boundary_ids_only;
1448  for (typename std::map<types::boundary_id,
1449  const Function<spacedim, number> *>::const_iterator p =
1450  boundary_ids.begin();
1451  p != boundary_ids.end();
1452  ++p)
1453  boundary_ids_only.insert(p->first);
1454 
1455  // then just hand everything over to the other function that does the work
1456  return n_boundary_dofs(boundary_ids_only);
1457 }
1458 
1459 
1460 
1461 namespace internal
1462 {
1470  template <int dim, int spacedim>
1471  std::string
1472  policy_to_string(const ::internal::DoFHandlerImplementation::Policy::
1473  PolicyBase<dim, spacedim> &policy);
1474 } // namespace internal
1475 
1476 
1477 
1478 template <int dim, int spacedim>
1479 template <class Archive>
1480 void
1481 DoFHandler<dim, spacedim>::save(Archive &ar, const unsigned int) const
1482 {
1483  ar &block_info_object;
1484  ar &vertex_dofs;
1485  ar &number_cache;
1486 
1487  // some versions of gcc have trouble with loading vectors of
1488  // std::unique_ptr objects because std::unique_ptr does not
1489  // have a copy constructor. do it one level at a time
1490  unsigned int n_levels = levels.size();
1491  ar & n_levels;
1492  for (unsigned int i = 0; i < levels.size(); ++i)
1493  ar &levels[i];
1494 
1495  // boost dereferences a nullptr when serializing a nullptr
1496  // at least up to 1.65.1. This causes problems with clang-5.
1497  // Therefore, work around it.
1498  bool faces_is_nullptr = (faces.get() == nullptr);
1499  ar & faces_is_nullptr;
1500  if (!faces_is_nullptr)
1501  ar &faces;
1502 
1503  // write out the number of triangulation cells and later check during
1504  // loading that this number is indeed correct; same with something that
1505  // identifies the FE and the policy
1506  unsigned int n_cells = tria->n_cells();
1507  std::string fe_name = this->get_fe(0).get_name();
1508  std::string policy_name = internal::policy_to_string(*policy);
1509 
1510  ar &n_cells &fe_name &policy_name;
1511 }
1512 
1513 
1514 
1515 template <int dim, int spacedim>
1516 template <class Archive>
1517 void
1518 DoFHandler<dim, spacedim>::load(Archive &ar, const unsigned int)
1519 {
1520  ar &block_info_object;
1521  ar &vertex_dofs;
1522  ar &number_cache;
1523 
1524  // boost::serialization can restore pointers just fine, but if the
1525  // pointer object still points to something useful, that object is not
1526  // destroyed and we end up with a memory leak. consequently, first delete
1527  // previous content before re-loading stuff
1528  levels.clear();
1529  faces.reset();
1530 
1531  // some versions of gcc have trouble with loading vectors of
1532  // std::unique_ptr objects because std::unique_ptr does not
1533  // have a copy constructor. do it one level at a time
1534  unsigned int size;
1535  ar & size;
1536  levels.resize(size);
1537  for (unsigned int i = 0; i < levels.size(); ++i)
1538  {
1539  std::unique_ptr<internal::DoFHandlerImplementation::DoFLevel<dim>> level;
1540  ar & level;
1541  levels[i] = std::move(level);
1542  }
1543 
1544  // Workaround for nullptr, see in save().
1545  bool faces_is_nullptr = true;
1546  ar & faces_is_nullptr;
1547  if (!faces_is_nullptr)
1548  ar &faces;
1549 
1550  // these are the checks that correspond to the last block in the save()
1551  // function
1552  unsigned int n_cells;
1553  std::string fe_name;
1554  std::string policy_name;
1555 
1556  ar &n_cells &fe_name &policy_name;
1557 
1558  AssertThrow(n_cells == tria->n_cells(),
1559  ExcMessage(
1560  "The object being loaded into does not match the triangulation "
1561  "that has been stored previously."));
1562  AssertThrow(
1563  fe_name == this->get_fe(0).get_name(),
1564  ExcMessage(
1565  "The finite element associated with this DoFHandler does not match "
1566  "the one that was associated with the DoFHandler previously stored."));
1567  AssertThrow(policy_name == internal::policy_to_string(*policy),
1568  ExcMessage(
1569  "The policy currently associated with this DoFHandler (" +
1570  internal::policy_to_string(*policy) +
1571  ") does not match the one that was associated with the "
1572  "DoFHandler previously stored (" +
1573  policy_name + ")."));
1574 }
1575 
1576 
1577 
1578 template <int dim, int spacedim>
1581  const unsigned int level,
1582  const unsigned int dof_number,
1583  const unsigned int dofs_per_vertex) const
1584 {
1585  Assert((level >= coarsest_level) && (level <= finest_level),
1586  ExcInvalidLevel(level));
1587  return indices[dofs_per_vertex * (level - coarsest_level) + dof_number];
1588 }
1589 
1590 
1591 
1592 template <int dim, int spacedim>
1593 inline void
1595  const unsigned int level,
1596  const unsigned int dof_number,
1597  const unsigned int dofs_per_vertex,
1598  const types::global_dof_index index)
1599 {
1600  Assert((level >= coarsest_level) && (level <= finest_level),
1601  ExcInvalidLevel(level));
1602  indices[dofs_per_vertex * (level - coarsest_level) + dof_number] = index;
1603 }
1604 
1605 
1606 #endif // DOXYGEN
1607 
1608 DEAL_II_NAMESPACE_CLOSE
1609 
1610 #endif
DoFHandler & operator=(const DoFHandler &)=delete
unsigned int max_couplings_between_boundary_dofs() const
std::vector< MGVertexDoFs > mg_vertex_dofs
Definition: dof_handler.h:1228
active_cell_iterator end_active(const unsigned int level) const
Definition: dof_handler.cc:979
active_cell_iterator begin_active(const unsigned int level=0) const
Definition: dof_handler.cc:943
Iterator points to a valid object.
static const unsigned int dimension
Definition: dof_handler.h:313
const BlockInfo & block_info() const
static const unsigned int spacedim
static::ExceptionBase & ExcInvalidLevel(int arg1)
level_cell_iterator begin_mg(const unsigned int level=0) const
Definition: dof_handler.cc:992
unsigned int boundary_id
Definition: types.h:111
::internal::DoFHandlerImplementation::NumberCache number_cache
Definition: dof_handler.h:1106
virtual void clear()
void clear_mg_space()
ActiveSelector::active_cell_iterator active_cell_iterator
Definition: dof_handler.h:242
STL namespace.
bool has_level_dofs() const
#define AssertThrow(cond, exc)
Definition: exceptions.h:1329
const Triangulation< dim, spacedim > & get_triangulation() const
const std::vector< types::global_dof_index > & n_locally_owned_dofs_per_processor() const
unsigned int max_couplings_between_dofs() const
void initialize(const Triangulation< dim, spacedim > &tria, const FiniteElement< dim, spacedim > &fe)
Definition: dof_handler.cc:895
static::ExceptionBase & ExcInvalidBoundaryIndicator()
ActiveSelector::face_iterator face_iterator
Definition: dof_handler.h:288
BlockInfo block_info_object
Definition: dof_handler.h:1076
IteratorRange< active_cell_iterator > active_cell_iterators_on_level(const unsigned int level) const
static::ExceptionBase & ExcFacesHaveNoLevel()
static::ExceptionBase & ExcMessage(std::string arg1)
level_cell_iterator end_mg() const
ActiveSelector::cell_iterator cell_iterator
Definition: dof_handler.h:270
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:408
const Triangulation< dim, spacedim > * tria
Definition: types.h:31
unsigned int global_dof_index
Definition: types.h:89
std::vector<::internal::DoFHandlerImplementation::NumberCache > mg_number_cache
Definition: dof_handler.h:1112
virtual void distribute_mg_dofs()
#define Assert(cond, exc)
Definition: exceptions.h:1227
hp::FECollection< dim, spacedim > fe_collection
Definition: dof_handler.h:1089
types::global_dof_index n_dofs() const
const hp::FECollection< dim, spacedim > & get_fe_collection() const
static const unsigned int default_fe_index
Definition: dof_handler.h:344
unsigned int n_locally_owned_dofs() const
static::ExceptionBase & ExcGridsDoNotMatch()
#define DeclException0(Exception0)
Definition: exceptions.h:385
SmartPointer< const Triangulation< dim, spacedim >, DoFHandler< dim, spacedim > > tria
Definition: dof_handler.h:1082
const Triangulation< dim, spacedim > & get_triangulation() const
std::unique_ptr<::internal::DoFHandlerImplementation::Policy::PolicyBase< dim, spacedim > > policy
Definition: dof_handler.h:1097
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:1248
cell_iterator end() const
Definition: dof_handler.cc:959
Definition: hp.h:102
std::vector< std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel< dim > > > levels
Definition: dof_handler.h:1236
IteratorRange< cell_iterator > cell_iterators_on_level(const unsigned int level) const
const IndexSet & locally_owned_mg_dofs(const unsigned int level) const
IteratorRange< cell_iterator > cell_iterators() const
void renumber_dofs(const std::vector< types::global_dof_index > &new_numbers)
std::unique_ptr< types::global_dof_index[]> indices
Definition: dof_handler.h:1189
void initialize_local_block_info()
bool has_active_dofs() const
const std::vector< IndexSet > & locally_owned_mg_dofs_per_processor(const unsigned int level) const
static::ExceptionBase & ExcEmptyLevel(int arg1)
static const unsigned int dim
cell_iterator begin(const unsigned int level=0) const
Definition: dof_handler.cc:930
void save(Archive &ar, const unsigned int version) const
types::global_dof_index get_index(const unsigned int level, const unsigned int dof_number, const unsigned int dofs_per_vertex) const
IteratorRange< level_cell_iterator > mg_cell_iterators() const
const FiniteElement< dim, spacedim > & get_fe(const unsigned int index=0) const
types::global_dof_index n_boundary_dofs() const
unsigned int coarsest_level
Definition: dof_handler.h:1173
void clear_space()
IteratorRange< level_cell_iterator > mg_cell_iterators_on_level(const unsigned int level) const
int index() const
virtual void distribute_dofs(const FiniteElement< dim, spacedim > &fe)
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
ActiveSelector::active_face_iterator active_face_iterator
Definition: dof_handler.h:301
static::ExceptionBase & ExcNewNumbersNotConsecutive(types::global_dof_index arg1)
static const unsigned int space_dimension
Definition: dof_handler.h:318
virtual std::size_t memory_consumption() const
const types::global_dof_index invalid_dof_index
Definition: types.h:188
const IndexSet & locally_owned_dofs() const
const std::vector< IndexSet > & locally_owned_dofs_per_processor() const
virtual ~DoFHandler() override
Definition: dof_handler.cc:878
IteratorRange< active_cell_iterator > active_cell_iterators() const
static const types::global_dof_index invalid_dof_index
Definition: dof_handler.h:332
std::vector< types::global_dof_index > vertex_dofs
Definition: dof_handler.h:1222
int level() const