Reference documentation for deal.II version Git 035d1ad 2018-08-17 19:42:27 -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  using ActiveSelector = ::internal::DoFHandlerImplementation::
203  Iterators<DoFHandler<dim, spacedim>, false>;
204  using LevelSelector = ::internal::DoFHandlerImplementation::
205  Iterators<DoFHandler<dim, spacedim>, true>;
206 
207 public:
208  using cell_accessor = typename ActiveSelector::CellAccessor;
209  using face_accessor = typename ActiveSelector::FaceAccessor;
210 
211  using line_iterator = typename ActiveSelector::line_iterator;
212  using active_line_iterator = typename ActiveSelector::active_line_iterator;
213 
214  using quad_iterator = typename ActiveSelector::quad_iterator;
215  using active_quad_iterator = typename ActiveSelector::active_quad_iterator;
216 
217  using hex_iterator = typename ActiveSelector::hex_iterator;
218  using active_hex_iterator = typename ActiveSelector::active_hex_iterator;
219 
240  using active_cell_iterator = typename ActiveSelector::active_cell_iterator;
241 
268  using cell_iterator = typename ActiveSelector::cell_iterator;
269 
286  using face_iterator = typename ActiveSelector::face_iterator;
287 
299  using active_face_iterator = typename ActiveSelector::active_face_iterator;
300 
301  using level_cell_accessor = typename LevelSelector::CellAccessor;
302  using level_face_accessor = typename LevelSelector::FaceAccessor;
303 
304  using level_cell_iterator = typename LevelSelector::cell_iterator;
305  using level_face_iterator = typename LevelSelector::face_iterator;
306 
307 
311  static const unsigned int dimension = dim;
312 
316  static const unsigned int space_dimension = spacedim;
317 
321  static const bool is_hp_dof_handler = false;
322 
334  DEAL_II_DEPRECATED
337 
347  static const unsigned int default_fe_index = 0;
348 
354  DoFHandler();
355 
360 
367  DoFHandler(const DoFHandler &) = delete;
368 
372  virtual ~DoFHandler() override;
373 
380  DoFHandler &
381  operator=(const DoFHandler &) = delete;
382 
387  void
389  const FiniteElement<dim, spacedim> &fe);
390 
429  virtual void
431 
440  DEAL_II_DEPRECATED
441  virtual void
443 
449  virtual void
451 
457  bool
458  has_level_dofs() const;
459 
474  bool
475  has_active_dofs() const;
476 
483  void
485 
489  virtual void
490  clear();
491 
544  void
545  renumber_dofs(const std::vector<types::global_dof_index> &new_numbers);
546 
551  void
552  renumber_dofs(const unsigned int level,
553  const std::vector<types::global_dof_index> &new_numbers);
554 
583  unsigned int
585 
598  unsigned int
600 
601  /*--------------------------------------*/
602 
607  /*
608  * @{
609  */
610 
615  begin(const unsigned int level = 0) const;
616 
634  begin_active(const unsigned int level = 0) const;
635 
641  end() const;
642 
648  end(const unsigned int level) const;
649 
656  end_active(const unsigned int level) const;
657 
658 
663  level_cell_iterator
664  begin_mg(const unsigned int level = 0) const;
665 
670  level_cell_iterator
671  end_mg(const unsigned int level) const;
672 
677  level_cell_iterator
678  end_mg() const;
679 
695  cell_iterators() const;
696 
738  active_cell_iterators() const;
739 
752  mg_cell_iterators() const;
753 
770  cell_iterators_on_level(const unsigned int level) const;
771 
788  active_cell_iterators_on_level(const unsigned int level) const;
789 
807  mg_cell_iterators_on_level(const unsigned int level) const;
808 
809  /*
810  * @}
811  */
812 
813 
814  /*---------------------------------------*/
815 
816 
841  n_dofs() const;
842 
851  n_dofs(const unsigned int level) const;
852 
857  n_boundary_dofs() const;
858 
869  template <typename number>
872  const std::map<types::boundary_id, const Function<spacedim, number> *>
873  &boundary_ids) const;
874 
880  n_boundary_dofs(const std::set<types::boundary_id> &boundary_ids) const;
881 
897  const BlockInfo &
898  block_info() const;
899 
900 
920  unsigned int
921  n_locally_owned_dofs() const;
922 
928  const IndexSet &
929  locally_owned_dofs() const;
930 
935  const IndexSet &
936  locally_owned_mg_dofs(const unsigned int level) const;
937 
950  const std::vector<IndexSet> &
952 
968  const std::vector<types::global_dof_index> &
970 
982  const std::vector<IndexSet> &
983  locally_owned_mg_dofs_per_processor(const unsigned int level) const;
984 
991  get_fe(const unsigned int index = 0) const;
992 
1000  get_fe_collection() const;
1001 
1006  get_triangulation() const;
1007 
1016  virtual std::size_t
1017  memory_consumption() const;
1018 
1023  template <class Archive>
1024  void
1025  save(Archive &ar, const unsigned int version) const;
1026 
1031  template <class Archive>
1032  void
1033  load(Archive &ar, const unsigned int version);
1034 
1035  BOOST_SERIALIZATION_SPLIT_MEMBER()
1036 
1037 
1052  types::global_dof_index,
1053  << "The given list of new dof indices is not consecutive: "
1054  << "the index " << arg1 << " does not exist.");
1060  int,
1061  << "The given level " << arg1
1062  << " is not in the valid range!");
1073  int,
1074  << "You tried to do something on level " << arg1
1075  << ", but this level is empty.");
1076 
1077 
1078 private:
1083 
1087  SmartPointer<const Triangulation<dim, spacedim>, DoFHandler<dim, spacedim>>
1089 
1090 
1095  hp::FECollection<dim, spacedim> fe_collection;
1096 
1101  std::unique_ptr<::internal::DoFHandlerImplementation::Policy::
1102  PolicyBase<dim, spacedim>>
1104 
1112  ::internal::DoFHandlerImplementation::NumberCache number_cache;
1113 
1117  std::vector<::internal::DoFHandlerImplementation::NumberCache>
1119 
1127  {
1128  public:
1132  MGVertexDoFs();
1133 
1139  void
1140  init(const unsigned int coarsest_level,
1141  const unsigned int finest_level,
1142  const unsigned int dofs_per_vertex);
1143 
1147  unsigned int
1148  get_coarsest_level() const;
1149 
1153  unsigned int
1154  get_finest_level() const;
1155 
1161  get_index(const unsigned int level,
1162  const unsigned int dof_number,
1163  const unsigned int dofs_per_vertex) const;
1164 
1169  void
1170  set_index(const unsigned int level,
1171  const unsigned int dof_number,
1172  const unsigned int dofs_per_vertex,
1173  const types::global_dof_index index);
1174 
1175  private:
1179  unsigned int coarsest_level;
1180 
1184  unsigned int finest_level;
1185 
1195  std::unique_ptr<types::global_dof_index[]> indices;
1196  };
1197 
1201  void
1202  clear_space();
1203 
1207  void
1208  clear_mg_space();
1209 
1210  template <int structdim>
1212  get_dof_index(const unsigned int obj_level,
1213  const unsigned int obj_index,
1214  const unsigned int fe_index,
1215  const unsigned int local_index) const;
1216 
1217  template <int structdim>
1218  void
1219  set_dof_index(const unsigned int obj_level,
1220  const unsigned int obj_index,
1221  const unsigned int fe_index,
1222  const unsigned int local_index,
1223  const types::global_dof_index global_index) const;
1224 
1228  std::vector<types::global_dof_index> vertex_dofs;
1229 
1234  std::vector<MGVertexDoFs> mg_vertex_dofs;
1235 
1240  std::vector<
1241  std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel<dim>>>
1243 
1244  std::vector<
1245  std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel<dim>>>
1246  mg_levels;
1247 
1253  std::unique_ptr<::internal::DoFHandlerImplementation::DoFFaces<dim>>
1255 
1256  std::unique_ptr<::internal::DoFHandlerImplementation::DoFFaces<dim>>
1257  mg_faces;
1258 
1262  template <int, class, bool>
1263  friend class DoFAccessor;
1264  template <class, bool>
1265  friend class DoFCellAccessor;
1266  friend struct ::internal::DoFAccessorImplementation::Implementation;
1267  friend struct ::internal::DoFCellAccessorImplementation::Implementation;
1268 
1269  friend struct ::internal::DoFHandlerImplementation::Implementation;
1270  friend struct ::internal::DoFHandlerImplementation::Policy::
1271  Implementation;
1272 
1273  // explicitly check for sensible template arguments, but not on windows
1274  // because MSVC creates bogus warnings during normal compilation
1275 #ifndef DEAL_II_MSVC
1276  static_assert(dim <= spacedim,
1277  "The dimension <dim> of a DoFHandler must be less than or "
1278  "equal to the space dimension <spacedim> in which it lives.");
1279 #endif
1280 };
1281 
1282 
1283 
1284 #ifndef DOXYGEN
1285 
1286 /* ----------------------- Inline functions ----------------------------------
1287  */
1288 
1289 
1290 template <int dim, int spacedim>
1291 inline bool
1293 {
1294  return mg_number_cache.size() > 0;
1295 }
1296 
1297 
1298 
1299 template <int dim, int spacedim>
1300 inline bool
1302 {
1303  return number_cache.n_global_dofs > 0;
1304 }
1305 
1306 
1307 
1308 template <int dim, int spacedim>
1311 {
1312  return number_cache.n_global_dofs;
1313 }
1314 
1315 
1316 
1317 template <int dim, int spacedim>
1319 DoFHandler<dim, spacedim>::n_dofs(const unsigned int level) const
1320 {
1321  Assert(has_level_dofs(),
1322  ExcMessage(
1323  "n_dofs(level) can only be called after distribute_mg_dofs()"));
1324  Assert(level < mg_number_cache.size(), ExcInvalidLevel(level));
1325  return mg_number_cache[level].n_global_dofs;
1326 }
1327 
1328 
1329 
1330 template <int dim, int spacedim>
1331 unsigned int
1333 {
1334  return number_cache.n_locally_owned_dofs;
1335 }
1336 
1337 
1338 
1339 template <int dim, int spacedim>
1340 const IndexSet &
1342 {
1343  return number_cache.locally_owned_dofs;
1344 }
1345 
1346 
1347 
1348 template <int dim, int spacedim>
1349 const IndexSet &
1350 DoFHandler<dim, spacedim>::locally_owned_mg_dofs(const unsigned int level) const
1351 {
1352  Assert(level < this->get_triangulation().n_global_levels(),
1353  ExcMessage("invalid level in locally_owned_mg_dofs"));
1354  Assert(
1355  mg_number_cache.size() == this->get_triangulation().n_global_levels(),
1356  ExcMessage(
1357  "The level dofs are not set up properly! Did you call distribute_mg_dofs()?"));
1358  return mg_number_cache[level].locally_owned_dofs;
1359 }
1360 
1361 
1362 
1363 template <int dim, int spacedim>
1364 const std::vector<types::global_dof_index> &
1366 {
1367  return number_cache.n_locally_owned_dofs_per_processor;
1368 }
1369 
1370 
1371 
1372 template <int dim, int spacedim>
1373 const std::vector<IndexSet> &
1375 {
1376  return number_cache.locally_owned_dofs_per_processor;
1377 }
1378 
1379 
1380 
1381 template <int dim, int spacedim>
1382 const std::vector<IndexSet> &
1384  const unsigned int level) const
1385 {
1386  Assert(level < this->get_triangulation().n_global_levels(),
1387  ExcMessage("invalid level in locally_owned_mg_dofs_per_processor"));
1388  Assert(
1389  mg_number_cache.size() == this->get_triangulation().n_global_levels(),
1390  ExcMessage(
1391  "The level dofs are not set up properly! Did you call distribute_mg_dofs()?"));
1392  return mg_number_cache[level].locally_owned_dofs_per_processor;
1393 }
1394 
1395 
1396 
1397 template <int dim, int spacedim>
1398 inline const FiniteElement<dim, spacedim> &
1399 DoFHandler<dim, spacedim>::get_fe(const unsigned int index) const
1400 {
1401  (void)index;
1402  Assert(index == 0,
1403  ExcMessage(
1404  "There is only one FiniteElement stored. The index must be zero!"));
1405  return get_fe_collection()[0];
1406 }
1407 
1408 
1409 
1410 template <int dim, int spacedim>
1411 inline const hp::FECollection<dim, spacedim> &
1413 {
1414  Assert(
1415  fe_collection.size() > 0,
1416  ExcMessage(
1417  "You are trying to access the DoFHandler's FECollection object before it has been initialized."));
1418  return fe_collection;
1419 }
1420 
1421 
1422 
1423 template <int dim, int spacedim>
1424 inline const Triangulation<dim, spacedim> &
1426 {
1427  Assert(tria != nullptr,
1428  ExcMessage("This DoFHandler object has not been associated "
1429  "with a triangulation."));
1430  return *tria;
1431 }
1432 
1433 
1434 
1435 template <int dim, int spacedim>
1436 inline const BlockInfo &
1438 {
1439  return block_info_object;
1440 }
1441 
1442 
1443 
1444 template <int dim, int spacedim>
1445 template <typename number>
1448  const std::map<types::boundary_id, const Function<spacedim, number> *>
1449  &boundary_ids) const
1450 {
1451  // extract the set of boundary ids and forget about the function object
1452  // pointers
1453  std::set<types::boundary_id> boundary_ids_only;
1454  for (typename std::map<types::boundary_id,
1455  const Function<spacedim, number> *>::const_iterator p =
1456  boundary_ids.begin();
1457  p != boundary_ids.end();
1458  ++p)
1459  boundary_ids_only.insert(p->first);
1460 
1461  // then just hand everything over to the other function that does the work
1462  return n_boundary_dofs(boundary_ids_only);
1463 }
1464 
1465 
1466 
1467 namespace internal
1468 {
1476  template <int dim, int spacedim>
1477  std::string
1478  policy_to_string(const ::internal::DoFHandlerImplementation::Policy::
1479  PolicyBase<dim, spacedim> &policy);
1480 } // namespace internal
1481 
1482 
1483 
1484 template <int dim, int spacedim>
1485 template <class Archive>
1486 void
1487 DoFHandler<dim, spacedim>::save(Archive &ar, const unsigned int) const
1488 {
1489  ar &block_info_object;
1490  ar &vertex_dofs;
1491  ar &number_cache;
1492 
1493  // some versions of gcc have trouble with loading vectors of
1494  // std::unique_ptr objects because std::unique_ptr does not
1495  // have a copy constructor. do it one level at a time
1496  unsigned int n_levels = levels.size();
1497  ar & n_levels;
1498  for (unsigned int i = 0; i < levels.size(); ++i)
1499  ar &levels[i];
1500 
1501  // boost dereferences a nullptr when serializing a nullptr
1502  // at least up to 1.65.1. This causes problems with clang-5.
1503  // Therefore, work around it.
1504  bool faces_is_nullptr = (faces.get() == nullptr);
1505  ar & faces_is_nullptr;
1506  if (!faces_is_nullptr)
1507  ar &faces;
1508 
1509  // write out the number of triangulation cells and later check during
1510  // loading that this number is indeed correct; same with something that
1511  // identifies the FE and the policy
1512  unsigned int n_cells = tria->n_cells();
1513  std::string fe_name = this->get_fe(0).get_name();
1514  std::string policy_name = internal::policy_to_string(*policy);
1515 
1516  ar &n_cells &fe_name &policy_name;
1517 }
1518 
1519 
1520 
1521 template <int dim, int spacedim>
1522 template <class Archive>
1523 void
1524 DoFHandler<dim, spacedim>::load(Archive &ar, const unsigned int)
1525 {
1526  ar &block_info_object;
1527  ar &vertex_dofs;
1528  ar &number_cache;
1529 
1530  // boost::serialization can restore pointers just fine, but if the
1531  // pointer object still points to something useful, that object is not
1532  // destroyed and we end up with a memory leak. consequently, first delete
1533  // previous content before re-loading stuff
1534  levels.clear();
1535  faces.reset();
1536 
1537  // some versions of gcc have trouble with loading vectors of
1538  // std::unique_ptr objects because std::unique_ptr does not
1539  // have a copy constructor. do it one level at a time
1540  unsigned int size;
1541  ar & size;
1542  levels.resize(size);
1543  for (unsigned int i = 0; i < levels.size(); ++i)
1544  {
1545  std::unique_ptr<internal::DoFHandlerImplementation::DoFLevel<dim>> level;
1546  ar & level;
1547  levels[i] = std::move(level);
1548  }
1549 
1550  // Workaround for nullptr, see in save().
1551  bool faces_is_nullptr = true;
1552  ar & faces_is_nullptr;
1553  if (!faces_is_nullptr)
1554  ar &faces;
1555 
1556  // these are the checks that correspond to the last block in the save()
1557  // function
1558  unsigned int n_cells;
1559  std::string fe_name;
1560  std::string policy_name;
1561 
1562  ar &n_cells &fe_name &policy_name;
1563 
1564  AssertThrow(n_cells == tria->n_cells(),
1565  ExcMessage(
1566  "The object being loaded into does not match the triangulation "
1567  "that has been stored previously."));
1568  AssertThrow(
1569  fe_name == this->get_fe(0).get_name(),
1570  ExcMessage(
1571  "The finite element associated with this DoFHandler does not match "
1572  "the one that was associated with the DoFHandler previously stored."));
1573  AssertThrow(policy_name == internal::policy_to_string(*policy),
1574  ExcMessage(
1575  "The policy currently associated with this DoFHandler (" +
1576  internal::policy_to_string(*policy) +
1577  ") does not match the one that was associated with the "
1578  "DoFHandler previously stored (" +
1579  policy_name + ")."));
1580 }
1581 
1582 
1583 
1584 template <int dim, int spacedim>
1587  const unsigned int level,
1588  const unsigned int dof_number,
1589  const unsigned int dofs_per_vertex) const
1590 {
1591  Assert((level >= coarsest_level) && (level <= finest_level),
1592  ExcInvalidLevel(level));
1593  return indices[dofs_per_vertex * (level - coarsest_level) + dof_number];
1594 }
1595 
1596 
1597 
1598 template <int dim, int spacedim>
1599 inline void
1601  const unsigned int level,
1602  const unsigned int dof_number,
1603  const unsigned int dofs_per_vertex,
1604  const types::global_dof_index index)
1605 {
1606  Assert((level >= coarsest_level) && (level <= finest_level),
1607  ExcInvalidLevel(level));
1608  indices[dofs_per_vertex * (level - coarsest_level) + dof_number] = index;
1609 }
1610 
1611 
1612 #endif // DOXYGEN
1613 
1614 DEAL_II_NAMESPACE_CLOSE
1615 
1616 #endif
DoFHandler & operator=(const DoFHandler &)=delete
unsigned int max_couplings_between_boundary_dofs() const
std::vector< MGVertexDoFs > mg_vertex_dofs
Definition: dof_handler.h:1234
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:311
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
::internal::DoFHandlerImplementation::NumberCache number_cache
Definition: dof_handler.h:1112
virtual void clear()
void clear_mg_space()
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
typename ActiveSelector::face_iterator face_iterator
Definition: dof_handler.h:286
typename ActiveSelector::active_face_iterator active_face_iterator
Definition: dof_handler.h:299
static::ExceptionBase & ExcInvalidBoundaryIndicator()
static const bool is_hp_dof_handler
Definition: dof_handler.h:321
BlockInfo block_info_object
Definition: dof_handler.h:1082
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
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:408
const Triangulation< dim, spacedim > * tria
Definition: types.h:31
std::vector<::internal::DoFHandlerImplementation::NumberCache > mg_number_cache
Definition: dof_handler.h:1118
virtual void distribute_mg_dofs()
#define Assert(cond, exc)
Definition: exceptions.h:1239
hp::FECollection< dim, spacedim > fe_collection
Definition: dof_handler.h:1095
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:347
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:1088
const Triangulation< dim, spacedim > & get_triangulation() const
std::unique_ptr<::internal::DoFHandlerImplementation::Policy::PolicyBase< dim, spacedim > > policy
Definition: dof_handler.h:1103
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:1254
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:1242
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:1195
void initialize_local_block_info()
unsigned int global_dof_index
Definition: types.h:89
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:1179
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
static::ExceptionBase & ExcNewNumbersNotConsecutive(types::global_dof_index arg1)
typename ActiveSelector::cell_iterator cell_iterator
Definition: dof_handler.h:268
static const unsigned int space_dimension
Definition: dof_handler.h:316
typename ActiveSelector::active_cell_iterator active_cell_iterator
Definition: dof_handler.h:240
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
unsigned int boundary_id
Definition: types.h:111
static const types::global_dof_index invalid_dof_index
Definition: dof_handler.h:335
std::vector< types::global_dof_index > vertex_dofs
Definition: dof_handler.h:1228
int level() const