Reference documentation for deal.II version Git 92ca227 2018-05-25 19:47:08 -0500
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 at
12 // the top level of the deal.II distribution.
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/index_set.h>
25 #include <deal.II/base/iterator_range.h>
26 #include <deal.II/base/smartpointer.h>
27 
28 #include <deal.II/dofs/block_info.h>
29 #include <deal.II/dofs/dof_faces.h>
30 #include <deal.II/dofs/dof_iterator_selector.h>
31 #include <deal.II/dofs/dof_levels.h>
32 #include <deal.II/dofs/function_map.h>
33 #include <deal.II/dofs/number_cache.h>
34 
35 #include <deal.II/hp/fe_collection.h>
36 
37 #include <boost/serialization/split_member.hpp>
38 
39 #include <map>
40 #include <memory>
41 #include <set>
42 #include <vector>
43 
44 DEAL_II_NAMESPACE_OPEN
45 
46 template <int dim, int spacedim>
47 class FiniteElement;
48 template <int dim, int spacedim>
50 
51 namespace internal
52 {
53  namespace DoFHandlerImplementation
54  {
55  struct Implementation;
56 
57  namespace Policy
58  {
59  template <int dim, int spacedim>
60  class PolicyBase;
61  struct Implementation;
62  } // namespace Policy
63  } // namespace DoFHandlerImplementation
64 
65  namespace DoFAccessorImplementation
66  {
67  struct Implementation;
68  }
69 
70  namespace DoFCellAccessorImplementation
71  {
72  struct Implementation;
73  }
74 } // namespace internal
75 
76 
198 template <int dim, int spacedim = dim>
199 class DoFHandler : public Subscriptor
200 {
201  typedef ::internal::DoFHandlerImplementation::
202  Iterators<DoFHandler<dim, spacedim>, false>
203  ActiveSelector;
204  typedef ::internal::DoFHandlerImplementation::
205  Iterators<DoFHandler<dim, spacedim>, true>
206  LevelSelector;
207 
208 public:
209  typedef typename ActiveSelector::CellAccessor cell_accessor;
210  typedef typename ActiveSelector::FaceAccessor face_accessor;
211 
212  typedef typename ActiveSelector::line_iterator line_iterator;
213  typedef typename ActiveSelector::active_line_iterator active_line_iterator;
214 
215  typedef typename ActiveSelector::quad_iterator quad_iterator;
216  typedef typename ActiveSelector::active_quad_iterator active_quad_iterator;
217 
218  typedef typename ActiveSelector::hex_iterator hex_iterator;
219  typedef typename ActiveSelector::active_hex_iterator active_hex_iterator;
220 
241  typedef typename ActiveSelector::active_cell_iterator active_cell_iterator;
242 
269  typedef typename ActiveSelector::cell_iterator cell_iterator;
270 
287  typedef typename ActiveSelector::face_iterator face_iterator;
288 
300  typedef typename ActiveSelector::active_face_iterator active_face_iterator;
301 
302  typedef typename LevelSelector::CellAccessor level_cell_accessor;
303  typedef typename LevelSelector::FaceAccessor level_face_accessor;
304 
305  typedef typename LevelSelector::cell_iterator level_cell_iterator;
306  typedef typename LevelSelector::face_iterator level_face_iterator;
307 
308 
312  static const unsigned int dimension = dim;
313 
317  static const unsigned int space_dimension = spacedim;
318 
330  DEAL_II_DEPRECATED
333 
343  static const unsigned int default_fe_index = 0;
344 
350  DoFHandler();
351 
356 
363  DoFHandler(const DoFHandler &) = delete;
364 
368  virtual ~DoFHandler() override;
369 
376  DoFHandler &
377  operator=(const DoFHandler &) = delete;
378 
383  void
385  const FiniteElement<dim, spacedim> &fe);
386 
425  virtual void
427 
436  DEAL_II_DEPRECATED
437  virtual void
439 
445  virtual void
447 
453  bool
454  has_level_dofs() const;
455 
470  bool
471  has_active_dofs() const;
472 
479  void
481 
485  virtual void
486  clear();
487 
540  void
541  renumber_dofs(const std::vector<types::global_dof_index> &new_numbers);
542 
547  void
548  renumber_dofs(const unsigned int level,
549  const std::vector<types::global_dof_index> &new_numbers);
550 
579  unsigned int
581 
594  unsigned int
596 
597  /*--------------------------------------*/
598 
603  /*
604  * @{
605  */
606 
610  cell_iterator
611  begin(const unsigned int level = 0) const;
612 
626  active_cell_iterator
627  begin_active(const unsigned int level = 0) const;
628 
633  cell_iterator
634  end() const;
635 
640  cell_iterator
641  end(const unsigned int level) const;
642 
648  active_cell_iterator
649  end_active(const unsigned int level) const;
650 
651 
656  level_cell_iterator
657  begin_mg(const unsigned int level = 0) const;
658 
663  level_cell_iterator
664  end_mg(const unsigned int level) const;
665 
670  level_cell_iterator
671  end_mg() const;
672 
688  cell_iterators() const;
689 
731  active_cell_iterators() const;
732 
745  mg_cell_iterators() const;
746 
763  cell_iterators_on_level(const unsigned int level) const;
764 
781  active_cell_iterators_on_level(const unsigned int level) const;
782 
800  mg_cell_iterators_on_level(const unsigned int level) const;
801 
802  /*
803  * @}
804  */
805 
806 
807  /*---------------------------------------*/
808 
809 
834  n_dofs() const;
835 
844  n_dofs(const unsigned int level) const;
845 
850  n_boundary_dofs() const;
851 
864  template <typename number>
867  const std::map<types::boundary_id, const Function<spacedim, number> *>
868  &boundary_ids) const;
869 
875  n_boundary_dofs(const std::set<types::boundary_id> &boundary_ids) const;
876 
892  const BlockInfo &
893  block_info() const;
894 
895 
915  unsigned int
916  n_locally_owned_dofs() const;
917 
923  const IndexSet &
924  locally_owned_dofs() const;
925 
930  const IndexSet &
931  locally_owned_mg_dofs(const unsigned int level) const;
932 
945  const std::vector<IndexSet> &
947 
963  const std::vector<types::global_dof_index> &
965 
977  const std::vector<IndexSet> &
978  locally_owned_mg_dofs_per_processor(const unsigned int level) const;
979 
986  get_fe(const unsigned int index = 0) const;
987 
995  get_fe_collection() const;
996 
1001  get_triangulation() const;
1002 
1011  virtual std::size_t
1012  memory_consumption() const;
1013 
1018  template <class Archive>
1019  void
1020  save(Archive &ar, const unsigned int version) const;
1021 
1026  template <class Archive>
1027  void
1028  load(Archive &ar, const unsigned int version);
1029 
1030  BOOST_SERIALIZATION_SPLIT_MEMBER()
1031 
1032 
1047  types::global_dof_index,
1048  << "The given list of new dof indices is not consecutive: "
1049  << "the index " << arg1 << " does not exist.");
1055  int,
1056  << "The given level " << arg1
1057  << " is not in the valid range!");
1068  int,
1069  << "You tried to do something on level " << arg1
1070  << ", but this level is empty.");
1071 
1072 
1073 private:
1078 
1082  SmartPointer<const Triangulation<dim, spacedim>, DoFHandler<dim, spacedim>>
1084 
1085 
1090  hp::FECollection<dim, spacedim> fe_collection;
1091 
1096  std::unique_ptr<::internal::DoFHandlerImplementation::Policy::
1097  PolicyBase<dim, spacedim>>
1099 
1107  ::internal::DoFHandlerImplementation::NumberCache number_cache;
1108 
1112  std::vector<::internal::DoFHandlerImplementation::NumberCache>
1114 
1122  {
1123  public:
1127  MGVertexDoFs();
1128 
1134  void
1135  init(const unsigned int coarsest_level,
1136  const unsigned int finest_level,
1137  const unsigned int dofs_per_vertex);
1138 
1142  unsigned int
1143  get_coarsest_level() const;
1144 
1148  unsigned int
1149  get_finest_level() const;
1150 
1156  get_index(const unsigned int level,
1157  const unsigned int dof_number,
1158  const unsigned int dofs_per_vertex) const;
1159 
1164  void
1165  set_index(const unsigned int level,
1166  const unsigned int dof_number,
1167  const unsigned int dofs_per_vertex,
1168  const types::global_dof_index index);
1169 
1170  private:
1174  unsigned int coarsest_level;
1175 
1179  unsigned int finest_level;
1180 
1190  std::unique_ptr<types::global_dof_index[]> indices;
1191  };
1192 
1196  void
1197  clear_space();
1198 
1202  void
1203  clear_mg_space();
1204 
1205  template <int structdim>
1207  get_dof_index(const unsigned int obj_level,
1208  const unsigned int obj_index,
1209  const unsigned int fe_index,
1210  const unsigned int local_index) const;
1211 
1212  template <int structdim>
1213  void
1214  set_dof_index(const unsigned int obj_level,
1215  const unsigned int obj_index,
1216  const unsigned int fe_index,
1217  const unsigned int local_index,
1218  const types::global_dof_index global_index) const;
1219 
1223  std::vector<types::global_dof_index> vertex_dofs;
1224 
1229  std::vector<MGVertexDoFs> mg_vertex_dofs;
1230 
1235  std::vector<
1236  std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel<dim>>>
1238 
1239  std::vector<
1240  std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel<dim>>>
1241  mg_levels;
1242 
1248  std::unique_ptr<::internal::DoFHandlerImplementation::DoFFaces<dim>>
1250 
1251  std::unique_ptr<::internal::DoFHandlerImplementation::DoFFaces<dim>>
1252  mg_faces;
1253 
1257  template <int, class, bool>
1258  friend class DoFAccessor;
1259  template <class, bool>
1260  friend class DoFCellAccessor;
1261  friend struct ::internal::DoFAccessorImplementation::Implementation;
1262  friend struct ::internal::DoFCellAccessorImplementation::Implementation;
1263 
1264  friend struct ::internal::DoFHandlerImplementation::Implementation;
1265  friend struct ::internal::DoFHandlerImplementation::Policy::
1266  Implementation;
1267 
1268  // explicitly check for sensible template arguments, but not on windows
1269  // because MSVC creates bogus warnings during normal compilation
1270 #ifndef DEAL_II_MSVC
1271  static_assert(dim <= spacedim,
1272  "The dimension <dim> of a DoFHandler must be less than or "
1273  "equal to the space dimension <spacedim> in which it lives.");
1274 #endif
1275 };
1276 
1277 
1278 
1279 #ifndef DOXYGEN
1280 
1281 /* ----------------------- Inline functions ----------------------------------
1282  */
1283 
1284 
1285 template <int dim, int spacedim>
1286 inline bool
1288 {
1289  return mg_number_cache.size() > 0;
1290 }
1291 
1292 
1293 
1294 template <int dim, int spacedim>
1295 inline bool
1297 {
1298  return number_cache.n_global_dofs > 0;
1299 }
1300 
1301 
1302 
1303 template <int dim, int spacedim>
1306 {
1307  return number_cache.n_global_dofs;
1308 }
1309 
1310 
1311 
1312 template <int dim, int spacedim>
1314 DoFHandler<dim, spacedim>::n_dofs(const unsigned int level) const
1315 {
1316  Assert(
1317  has_level_dofs(),
1318  ExcMessage("n_dofs(level) can only be called after distribute_mg_dofs()"));
1319  Assert(level < mg_number_cache.size(), ExcInvalidLevel(level));
1320  return mg_number_cache[level].n_global_dofs;
1321 }
1322 
1323 
1324 
1325 template <int dim, int spacedim>
1326 unsigned int
1328 {
1329  return number_cache.n_locally_owned_dofs;
1330 }
1331 
1332 
1333 
1334 template <int dim, int spacedim>
1335 const IndexSet &
1337 {
1338  return number_cache.locally_owned_dofs;
1339 }
1340 
1341 
1342 
1343 template <int dim, int spacedim>
1344 const IndexSet &
1345 DoFHandler<dim, spacedim>::locally_owned_mg_dofs(const unsigned int level) const
1346 {
1347  Assert(level < this->get_triangulation().n_global_levels(),
1348  ExcMessage("invalid level in locally_owned_mg_dofs"));
1349  Assert(
1350  mg_number_cache.size() == this->get_triangulation().n_global_levels(),
1351  ExcMessage(
1352  "The level dofs are not set up properly! Did you call distribute_mg_dofs()?"));
1353  return mg_number_cache[level].locally_owned_dofs;
1354 }
1355 
1356 
1357 
1358 template <int dim, int spacedim>
1359 const std::vector<types::global_dof_index> &
1361 {
1362  return number_cache.n_locally_owned_dofs_per_processor;
1363 }
1364 
1365 
1366 
1367 template <int dim, int spacedim>
1368 const std::vector<IndexSet> &
1370 {
1371  return number_cache.locally_owned_dofs_per_processor;
1372 }
1373 
1374 
1375 
1376 template <int dim, int spacedim>
1377 const std::vector<IndexSet> &
1379  const unsigned int level) const
1380 {
1381  Assert(level < this->get_triangulation().n_global_levels(),
1382  ExcMessage("invalid level in locally_owned_mg_dofs_per_processor"));
1383  Assert(
1384  mg_number_cache.size() == this->get_triangulation().n_global_levels(),
1385  ExcMessage(
1386  "The level dofs are not set up properly! Did you call distribute_mg_dofs()?"));
1387  return mg_number_cache[level].locally_owned_dofs_per_processor;
1388 }
1389 
1390 
1391 
1392 template <int dim, int spacedim>
1393 inline const FiniteElement<dim, spacedim> &
1394 DoFHandler<dim, spacedim>::get_fe(const unsigned int index) const
1395 {
1396  (void)index;
1397  Assert(index == 0,
1398  ExcMessage(
1399  "There is only one FiniteElement stored. The index must be zero!"));
1400  return get_fe_collection()[0];
1401 }
1402 
1403 
1404 
1405 template <int dim, int spacedim>
1406 inline const hp::FECollection<dim, spacedim> &
1408 {
1409  Assert(
1410  fe_collection.size() > 0,
1411  ExcMessage(
1412  "You are trying to access the DoFHandler's FECollection object before it has been initialized."));
1413  return fe_collection;
1414 }
1415 
1416 
1417 
1418 template <int dim, int spacedim>
1419 inline const Triangulation<dim, spacedim> &
1421 {
1422  Assert(tria != nullptr,
1423  ExcMessage("This DoFHandler object has not been associated "
1424  "with a triangulation."));
1425  return *tria;
1426 }
1427 
1428 
1429 
1430 template <int dim, int spacedim>
1431 inline const BlockInfo &
1433 {
1434  return block_info_object;
1435 }
1436 
1437 
1438 
1439 template <int dim, int spacedim>
1440 template <typename number>
1443  const std::map<types::boundary_id, const Function<spacedim, number> *>
1444  &boundary_ids) const
1445 {
1446  // extract the set of boundary ids and forget about the function object
1447  // pointers
1448  std::set<types::boundary_id> boundary_ids_only;
1449  for (typename std::map<types::boundary_id,
1450  const Function<spacedim, number> *>::const_iterator p =
1451  boundary_ids.begin();
1452  p != boundary_ids.end();
1453  ++p)
1454  boundary_ids_only.insert(p->first);
1455 
1456  // then just hand everything over to the other function that does the work
1457  return n_boundary_dofs(boundary_ids_only);
1458 }
1459 
1460 
1461 
1462 namespace internal
1463 {
1471  template <int dim, int spacedim>
1472  std::string
1473  policy_to_string(const ::internal::DoFHandlerImplementation::Policy::
1474  PolicyBase<dim, spacedim> &policy);
1475 } // namespace internal
1476 
1477 
1478 
1479 template <int dim, int spacedim>
1480 template <class Archive>
1481 void
1482 DoFHandler<dim, spacedim>::save(Archive &ar, const unsigned int) const
1483 {
1484  ar &block_info_object;
1485  ar &vertex_dofs;
1486  ar &number_cache;
1487 
1488  // some versions of gcc have trouble with loading vectors of
1489  // std::unique_ptr objects because std::unique_ptr does not
1490  // have a copy constructor. do it one level at a time
1491  unsigned int n_levels = levels.size();
1492  ar & n_levels;
1493  for (unsigned int i = 0; i < levels.size(); ++i)
1494  ar &levels[i];
1495 
1496  // boost dereferences a nullptr when serializing a nullptr
1497  // at least up to 1.65.1. This causes problems with clang-5.
1498  // Therefore, work around it.
1499  bool faces_is_nullptr = (faces.get() == nullptr);
1500  ar & faces_is_nullptr;
1501  if (!faces_is_nullptr)
1502  ar &faces;
1503 
1504  // write out the number of triangulation cells and later check during
1505  // loading that this number is indeed correct; same with something that
1506  // identifies the FE and the policy
1507  unsigned int n_cells = tria->n_cells();
1508  std::string fe_name = this->get_fe(0).get_name();
1509  std::string policy_name = internal::policy_to_string(*policy);
1510 
1511  ar &n_cells &fe_name &policy_name;
1512 }
1513 
1514 
1515 
1516 template <int dim, int spacedim>
1517 template <class Archive>
1518 void
1519 DoFHandler<dim, spacedim>::load(Archive &ar, const unsigned int)
1520 {
1521  ar &block_info_object;
1522  ar &vertex_dofs;
1523  ar &number_cache;
1524 
1525  // boost::serialization can restore pointers just fine, but if the
1526  // pointer object still points to something useful, that object is not
1527  // destroyed and we end up with a memory leak. consequently, first delete
1528  // previous content before re-loading stuff
1529  levels.clear();
1530  faces.reset();
1531 
1532  // some versions of gcc have trouble with loading vectors of
1533  // std::unique_ptr objects because std::unique_ptr does not
1534  // have a copy constructor. do it one level at a time
1535  unsigned int size;
1536  ar & size;
1537  levels.resize(size);
1538  for (unsigned int i = 0; i < levels.size(); ++i)
1539  {
1540  std::unique_ptr<internal::DoFHandlerImplementation::DoFLevel<dim>> level;
1541  ar & level;
1542  levels[i] = std::move(level);
1543  }
1544 
1545  // Workaround for nullptr, see in save().
1546  bool faces_is_nullptr = true;
1547  ar & faces_is_nullptr;
1548  if (!faces_is_nullptr)
1549  ar &faces;
1550 
1551  // these are the checks that correspond to the last block in the save()
1552  // function
1553  unsigned int n_cells;
1554  std::string fe_name;
1555  std::string policy_name;
1556 
1557  ar &n_cells &fe_name &policy_name;
1558 
1559  AssertThrow(
1560  n_cells == tria->n_cells(),
1561  ExcMessage("The object being loaded into does not match the triangulation "
1562  "that has been stored previously."));
1563  AssertThrow(
1564  fe_name == this->get_fe(0).get_name(),
1565  ExcMessage(
1566  "The finite element associated with this DoFHandler does not match "
1567  "the one that was associated with the DoFHandler previously stored."));
1568  AssertThrow(
1569  policy_name == internal::policy_to_string(*policy),
1570  ExcMessage("The policy currently associated with this DoFHandler (" +
1571  internal::policy_to_string(*policy) +
1572  ") does not match the one that was associated with the "
1573  "DoFHandler previously stored (" +
1574  policy_name + ")."));
1575 }
1576 
1577 
1578 
1579 template <int dim, int spacedim>
1582  const unsigned int level,
1583  const unsigned int dof_number,
1584  const unsigned int dofs_per_vertex) const
1585 {
1586  Assert((level >= coarsest_level) && (level <= finest_level),
1587  ExcInvalidLevel(level));
1588  return indices[dofs_per_vertex * (level - coarsest_level) + dof_number];
1589 }
1590 
1591 
1592 
1593 template <int dim, int spacedim>
1594 inline void
1596  const unsigned int level,
1597  const unsigned int dof_number,
1598  const unsigned int dofs_per_vertex,
1599  const types::global_dof_index index)
1600 {
1601  Assert((level >= coarsest_level) && (level <= finest_level),
1602  ExcInvalidLevel(level));
1603  indices[dofs_per_vertex * (level - coarsest_level) + dof_number] = index;
1604 }
1605 
1606 
1607 #endif // DOXYGEN
1608 
1609 DEAL_II_NAMESPACE_CLOSE
1610 
1611 #endif
DoFHandler & operator=(const DoFHandler &)=delete
unsigned int max_couplings_between_boundary_dofs() const
std::vector< MGVertexDoFs > mg_vertex_dofs
Definition: dof_handler.h:1229
active_cell_iterator end_active(const unsigned int level) const
Definition: dof_handler.cc:965
active_cell_iterator begin_active(const unsigned int level=0) const
Definition: dof_handler.cc:929
Iterator points to a valid object.
static const unsigned int dimension
Definition: dof_handler.h:312
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:978
unsigned int boundary_id
Definition: types.h:111
::internal::DoFHandlerImplementation::NumberCache number_cache
Definition: dof_handler.h:1107
virtual void clear()
void clear_mg_space()
ActiveSelector::active_cell_iterator active_cell_iterator
Definition: dof_handler.h:241
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:881
static::ExceptionBase & ExcInvalidBoundaryIndicator()
ActiveSelector::face_iterator face_iterator
Definition: dof_handler.h:287
BlockInfo block_info_object
Definition: dof_handler.h:1077
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:269
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:410
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:1113
virtual void distribute_mg_dofs()
#define Assert(cond, exc)
Definition: exceptions.h:1227
hp::FECollection< dim, spacedim > fe_collection
Definition: dof_handler.h:1090
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:343
unsigned int n_locally_owned_dofs() const
static::ExceptionBase & ExcGridsDoNotMatch()
#define DeclException0(Exception0)
Definition: exceptions.h:387
SmartPointer< const Triangulation< dim, spacedim >, DoFHandler< dim, spacedim > > tria
Definition: dof_handler.h:1083
const Triangulation< dim, spacedim > & get_triangulation() const
std::unique_ptr<::internal::DoFHandlerImplementation::Policy::PolicyBase< dim, spacedim > > policy
Definition: dof_handler.h:1098
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:1249
cell_iterator end() const
Definition: dof_handler.cc:945
Definition: hp.h:102
std::vector< std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel< dim > > > levels
Definition: dof_handler.h:1237
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:1190
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:916
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:1174
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:300
static::ExceptionBase & ExcNewNumbersNotConsecutive(types::global_dof_index arg1)
static const unsigned int space_dimension
Definition: dof_handler.h:317
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:864
IteratorRange< active_cell_iterator > active_cell_iterators() const
static const types::global_dof_index invalid_dof_index
Definition: dof_handler.h:331
std::vector< types::global_dof_index > vertex_dofs
Definition: dof_handler.h:1223
int level() const