16 #include <deal.II/base/geometry_info.h> 17 #include <deal.II/base/memory_consumption.h> 18 #include <deal.II/base/std_cxx14/memory.h> 19 #include <deal.II/base/thread_management.h> 21 #include <deal.II/distributed/shared_tria.h> 22 #include <deal.II/distributed/tria.h> 24 #include <deal.II/dofs/dof_accessor.h> 25 #include <deal.II/dofs/dof_handler_policy.h> 27 #include <deal.II/fe/fe.h> 29 #include <deal.II/grid/grid_tools.h> 30 #include <deal.II/grid/tria.h> 31 #include <deal.II/grid/tria_accessor.h> 32 #include <deal.II/grid/tria_iterator.h> 33 #include <deal.II/grid/tria_levels.h> 35 #include <deal.II/hp/dof_faces.h> 36 #include <deal.II/hp/dof_handler.h> 37 #include <deal.II/hp/dof_level.h> 39 #include <boost/serialization/array.hpp> 45 DEAL_II_NAMESPACE_OPEN
50 #if defined(_MSC_VER) && (_MSC_VER >= 1800) 51 template <
int dim,
int spacedim>
55 # define HpDoFHandler DoFHandler 73 namespace DoFHandlerImplementation
77 using ::hp::DoFHandler;
89 template <
int dim,
int spacedim>
96 std::vector<std::vector<DoFLevel::active_fe_index_type>>
97 active_fe_backup(dof_handler.
levels.size());
98 for (
unsigned int level = 0; level < dof_handler.
levels.size();
100 active_fe_backup[level] =
101 std::move(dof_handler.
levels[level]->active_fe_indices);
107 for (
unsigned int level = 0; level < dof_handler.
tria->n_levels();
111 dof_handler.
levels[level]->active_fe_indices =
112 std::move(active_fe_backup[level]);
117 std_cxx14::make_unique<internal::hp::DoFIndicesOnFaces<dim>>();
127 template <
int dim,
int spacedim>
143 std::vector<bool> locally_used_vertices(
144 dof_handler.
tria->n_vertices(),
false);
145 for (
typename HpDoFHandler<dim, spacedim>::active_cell_iterator cell =
147 cell != dof_handler.
end();
149 if (!cell->is_artificial())
150 for (
unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_cell;
152 locally_used_vertices[cell->vertex_index(v)] =
true;
154 std::vector<std::vector<bool>> vertex_fe_association(
156 std::vector<bool>(dof_handler.
tria->n_vertices(),
false));
158 for (
typename HpDoFHandler<dim, spacedim>::active_cell_iterator cell =
160 cell != dof_handler.
end();
162 if (!cell->is_artificial())
163 for (
unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_cell;
165 vertex_fe_association[cell->active_fe_index()]
166 [cell->vertex_index(v)] =
true;
174 for (
unsigned int v = 0; v < dof_handler.
tria->n_vertices(); ++v)
175 if (locally_used_vertices[v] ==
true)
176 if (dof_handler.
tria->vertex_used(v) ==
true)
180 if (vertex_fe_association[fe][v] ==
true)
192 dof_handler.vertex_dof_offsets.resize(dof_handler.
tria->n_vertices(),
195 unsigned int vertex_slots_needed = 0;
196 for (
unsigned int v = 0; v < dof_handler.
tria->n_vertices(); ++v)
197 if (dof_handler.
tria->vertex_used(v) ==
true)
198 if (locally_used_vertices[v] ==
true)
200 dof_handler.vertex_dof_offsets[v] = vertex_slots_needed;
202 for (
unsigned int fe = 0;
205 if (vertex_fe_association[fe][v] ==
true)
206 vertex_slots_needed +=
207 dof_handler.
get_fe(fe).dofs_per_vertex + 1;
210 ++vertex_slots_needed;
215 dof_handler.
vertex_dofs.resize(vertex_slots_needed,
217 for (
unsigned int v = 0; v < dof_handler.
tria->n_vertices(); ++v)
218 if (dof_handler.
tria->vertex_used(v) ==
true)
219 if (locally_used_vertices[v] ==
true)
221 unsigned int current_index =
222 dof_handler.vertex_dof_offsets[v];
223 for (
unsigned int fe = 0;
226 if (vertex_fe_association[fe][v] ==
true)
232 dof_handler.
get_fe(fe).dofs_per_vertex + 1;
245 template <
int dim,
int spacedim>
257 for (
unsigned int level = 0; level < dof_handler.
tria->n_levels();
260 dof_handler.
levels[level]->dof_offsets =
261 std::vector<DoFLevel::offset_type>(
262 dof_handler.
tria->n_raw_cells(level),
264 dof_handler.
levels[level]->cell_cache_offsets =
265 std::vector<DoFLevel::offset_type>(
266 dof_handler.
tria->n_raw_cells(level),
271 typename HpDoFHandler<dim, spacedim>::active_cell_iterator
274 for (; cell != endc; ++cell)
275 if (!cell->has_children() && !cell->is_artificial())
277 dof_handler.
levels[level]->dof_offsets[cell->index()] =
280 cell->get_fe().template n_dofs_per_object<dim>();
283 ->cell_cache_offsets[cell->index()] = cache_size;
284 cache_size += cell->get_fe().dofs_per_cell;
287 dof_handler.
levels[level]->dof_indices =
288 std::vector<types::global_dof_index>(
290 dof_handler.
levels[level]->cell_dof_indices_cache =
291 std::vector<types::global_dof_index>(
300 for (
unsigned int level = 0; level < dof_handler.
tria->n_levels();
304 typename HpDoFHandler<dim, spacedim>::active_cell_iterator
307 for (; cell != endc; ++cell)
308 if (!cell->has_children() && !cell->is_artificial())
309 counter += cell->get_fe().template n_dofs_per_object<dim>();
311 Assert(dof_handler.
levels[level]->dof_indices.size() == counter,
318 unsigned int n_active_non_artificial_cells = 0;
319 for (cell = dof_handler.
begin_active(level); cell != endc; ++cell)
320 if (!cell->has_children() && !cell->is_artificial())
321 ++n_active_non_artificial_cells;
323 Assert(static_cast<unsigned int>(std::count(
324 dof_handler.
levels[level]->dof_offsets.begin(),
325 dof_handler.
levels[level]->dof_offsets.end(),
327 dof_handler.
tria->n_raw_cells(level) -
328 n_active_non_artificial_cells,
340 template <
int dim,
int spacedim>
345 std::vector<unsigned int> &face_dof_offsets =
354 std::vector<types::global_dof_index> &face_dof_indices =
380 std::vector<bool> saved_face_user_flags;
387 .save_user_flags_line(saved_face_user_flags);
390 .clear_user_flags_line();
399 .save_user_flags_quad(saved_face_user_flags);
402 .clear_user_flags_quad();
413 unsigned int n_face_slots = 0;
415 for (
typename HpDoFHandler<dim, spacedim>::active_cell_iterator
417 cell != dof_handler.
end();
419 if (!cell->is_artificial())
420 for (
unsigned int face = 0;
421 face < GeometryInfo<dim>::faces_per_cell;
423 if (!cell->face(face)->user_flag_set())
433 if (cell->at_boundary(face) ||
434 cell->face(face)->has_children() ||
435 cell->neighbor_is_coarser(face) ||
436 (!cell->at_boundary(face) &&
437 cell->neighbor(face)->is_artificial()) ||
438 (!cell->at_boundary(face) &&
439 !cell->neighbor(face)->is_artificial() &&
440 (cell->active_fe_index() ==
441 cell->neighbor(face)->active_fe_index())))
446 dof_handler.
get_fe(cell->active_fe_index())
447 .
template n_dofs_per_object<dim - 1>() +
456 dof_handler.
get_fe(cell->active_fe_index())
457 .
template n_dofs_per_object<dim - 1>() +
459 .
get_fe(cell->neighbor(face)->active_fe_index())
460 .
template n_dofs_per_object<dim - 1>() +
464 cell->face(face)->set_user_flag();
472 std::vector<unsigned int>(dof_handler.
tria->n_raw_faces(),
475 std::vector<types::global_dof_index>(n_face_slots,
487 .clear_user_flags_line();
496 .clear_user_flags_quad();
505 unsigned int next_free_face_slot = 0;
507 for (
typename HpDoFHandler<dim, spacedim>::active_cell_iterator
509 cell != dof_handler.
end();
511 if (!cell->is_artificial())
512 for (
unsigned int face = 0;
513 face < GeometryInfo<dim>::faces_per_cell;
515 if (!cell->face(face)->user_flag_set())
518 if (cell->at_boundary(face) ||
519 cell->face(face)->has_children() ||
520 cell->neighbor_is_coarser(face) ||
521 (!cell->at_boundary(face) &&
522 cell->neighbor(face)->is_artificial()) ||
523 (!cell->at_boundary(face) &&
524 !cell->neighbor(face)->is_artificial() &&
525 (cell->active_fe_index() ==
526 cell->neighbor(face)->active_fe_index())))
528 face_dof_offsets[cell->face(face)->index()] =
533 face_dof_indices[next_free_face_slot] =
534 cell->active_fe_index();
543 next_free_face_slot +=
544 dof_handler.
get_fe(cell->active_fe_index())
545 .
template n_dofs_per_object<dim - 1>() +
550 face_dof_offsets[cell->face(face)->index()] =
555 face_dof_indices[next_free_face_slot] =
556 cell->active_fe_index();
564 [next_free_face_slot +
565 dof_handler.
get_fe(cell->active_fe_index())
566 .
template n_dofs_per_object<dim - 1>() +
567 1] = cell->neighbor(face)->active_fe_index();
576 next_free_face_slot +=
577 (dof_handler.
get_fe(cell->active_fe_index())
578 .
template n_dofs_per_object<dim - 1>() +
580 .
get_fe(cell->neighbor(face)->active_fe_index())
581 .
template n_dofs_per_object<dim - 1>() +
586 cell->face(face)->set_user_flag();
600 .load_user_flags_line(saved_face_user_flags);
609 .load_user_flags_quad(saved_face_user_flags);
627 template <
int spacedim>
633 ExcMessage(
"The current Triangulation must not be empty."));
637 reserve_space_release_space(dof_handler);
639 reserve_space_cells(dof_handler);
640 reserve_space_vertices(dof_handler);
645 template <
int spacedim>
651 ExcMessage(
"The current Triangulation must not be empty."));
655 reserve_space_release_space(dof_handler);
658 reserve_space_cells(dof_handler);
659 reserve_space_faces(dof_handler);
662 reserve_space_vertices(dof_handler);
667 template <
int spacedim>
670 const unsigned int dim = 3;
675 ExcMessage(
"The current Triangulation must not be empty."));
679 reserve_space_release_space(dof_handler);
682 reserve_space_cells(dof_handler);
683 reserve_space_faces(dof_handler);
700 std::vector<std::vector<bool>> line_fe_association(
702 std::vector<bool>(dof_handler.
tria->n_raw_lines(),
false));
704 for (
typename HpDoFHandler<dim, spacedim>::active_cell_iterator
706 cell != dof_handler.
end();
708 if (!cell->is_artificial())
709 for (
unsigned int l = 0;
710 l < GeometryInfo<dim>::lines_per_cell;
712 line_fe_association[cell->active_fe_index()]
713 [cell->line_index(l)] =
true;
719 std::vector<bool> line_is_used(dof_handler.
tria->n_raw_lines(),
721 for (
unsigned int line = 0;
722 line < dof_handler.
tria->n_raw_lines();
724 for (
unsigned int fe = 0; fe < dof_handler.
fe_collection.size();
726 if (line_fe_association[fe][line] ==
true)
728 line_is_used[line] =
true;
737 dof_handler.
faces->lines.dof_offsets.resize(
740 unsigned int line_slots_needed = 0;
741 for (
unsigned int line = 0;
742 line < dof_handler.
tria->n_raw_lines();
744 if (line_is_used[line] ==
true)
746 dof_handler.
faces->lines.dof_offsets[line] =
749 for (
unsigned int fe = 0;
752 if (line_fe_association[fe][line] ==
true)
754 dof_handler.
get_fe(fe).dofs_per_line + 1;
760 dof_handler.
faces->lines.dofs.resize(line_slots_needed,
762 for (
unsigned int line = 0;
763 line < dof_handler.
tria->n_raw_lines();
765 if (line_is_used[line] ==
true)
767 unsigned int pointer =
768 dof_handler.
faces->lines.dof_offsets[line];
769 for (
unsigned int fe = 0;
772 if (line_fe_association[fe][line] ==
true)
776 dof_handler.
faces->lines.dofs[pointer] = fe;
777 pointer += dof_handler.
get_fe(fe).dofs_per_line + 1;
780 dof_handler.
faces->lines.dofs[pointer] =
787 reserve_space_vertices(dof_handler);
794 template <
int spacedim>
798 return std::min(static_cast<types::global_dof_index>(
807 template <
int spacedim>
831 switch (dof_handler.
tria->max_adjacent_cells())
867 return std::min(max_couplings, dof_handler.
n_dofs());
871 template <
int spacedim>
884 const unsigned int max_adjacent_cells =
885 dof_handler.
tria->max_adjacent_cells();
888 if (max_adjacent_cells <= 8)
890 7 * 7 * 7 * dof_handler.
fe_collection.max_dofs_per_vertex() +
891 7 * 6 * 7 * 3 * dof_handler.
fe_collection.max_dofs_per_line() +
892 9 * 4 * 7 * 3 * dof_handler.
fe_collection.max_dofs_per_quad() +
900 return std::min(max_couplings, dof_handler.
n_dofs());
909 template <
int dim,
int spacedim>
929 std::vector<unsigned int> active_fe_indices(tr->n_active_cells(),
932 if (cell->is_locally_owned())
933 active_fe_indices[cell->active_cell_index()] =
934 cell->active_fe_index();
937 tr->get_communicator(),
947 if (cell->is_ghost())
948 dof_handler.
levels[cell->level()]->set_active_fe_index(
950 active_fe_indices[cell->active_cell_index()]);
964 [](
const typename ::hp::DoFHandler<dim, spacedim>::
965 active_cell_iterator &cell) ->
unsigned int {
966 return cell->active_fe_index();
971 const typename ::hp::DoFHandler<dim, spacedim>::
972 active_cell_iterator &cell,
973 const unsigned int & active_fe_index) ->
void {
978 dof_handler.
levels[cell->level()]->set_active_fe_index(
979 cell->index(), active_fe_index);
1005 template <
int dim,
int spacedim>
1008 template <
int dim,
int spacedim>
1011 template <
int dim,
int spacedim>
1016 template <
int dim,
int spacedim>
1018 : tria(nullptr, typeid(*this).name())
1023 template <
int dim,
int spacedim>
1026 : tria(&tria, typeid(*this).name())
1035 template <
int dim,
int spacedim>
1054 template <
int dim,
int spacedim>
1063 template <
int dim,
int spacedim>
1071 while (i->has_children())
1079 template <
int dim,
int spacedim>
1087 template <
int dim,
int spacedim>
1097 template <
int dim,
int spacedim>
1108 template <
int dim,
int spacedim>
1117 template <
int dim,
int spacedim>
1128 template <
int dim,
int spacedim>
1131 const unsigned int level)
const 1139 template <
int dim,
int spacedim>
1142 const unsigned int level)
const 1154 template <
int dim,
int spacedim>
1160 std::set<types::global_dof_index> boundary_dofs;
1161 std::vector<types::global_dof_index> dofs_on_face;
1169 typename HpDoFHandler<dim, spacedim>::active_cell_iterator
1172 for (; cell != endc; ++cell)
1173 for (
unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
1174 if (cell->at_boundary(f))
1176 const unsigned int dofs_per_face = cell->get_fe().dofs_per_face;
1177 dofs_on_face.resize(dofs_per_face);
1179 cell->face(f)->get_dof_indices(dofs_on_face,
1180 cell->active_fe_index());
1181 for (
unsigned int i = 0; i < dofs_per_face; ++i)
1182 boundary_dofs.insert(dofs_on_face[i]);
1184 return boundary_dofs.size();
1189 template <
int dim,
int spacedim>
1192 const std::set<types::boundary_id> &boundary_ids)
const 1201 std::set<types::global_dof_index> boundary_dofs;
1202 std::vector<types::global_dof_index> dofs_on_face;
1205 typename HpDoFHandler<dim, spacedim>::active_cell_iterator
1208 for (; cell != endc; ++cell)
1209 for (
unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
1210 if (cell->at_boundary(f) &&
1211 (boundary_ids.find(cell->face(f)->boundary_id()) !=
1212 boundary_ids.end()))
1214 const unsigned int dofs_per_face = cell->get_fe().dofs_per_face;
1215 dofs_on_face.resize(dofs_per_face);
1217 cell->face(f)->get_dof_indices(dofs_on_face,
1218 cell->active_fe_index());
1219 for (
unsigned int i = 0; i < dofs_per_face; ++i)
1220 boundary_dofs.insert(dofs_on_face[i]);
1222 return boundary_dofs.size();
1238 template <
typename number>
1259 template <
int dim,
int spacedim>
1273 for (
unsigned int i = 0; i <
levels.size(); ++i)
1282 template <
int dim,
int spacedim>
1285 const std::vector<unsigned int> &active_fe_indices)
1297 for (
unsigned int i = 0; cell != endc; ++cell, ++i)
1298 if (cell->is_locally_owned())
1299 cell->set_active_fe_index(active_fe_indices[i]);
1304 template <
int dim,
int spacedim>
1307 std::vector<unsigned int> &active_fe_indices)
const 1315 for (
unsigned int i = 0; cell != endc; ++cell, ++i)
1316 active_fe_indices[i] = cell->active_fe_index();
1319 template <
int dim,
int spacedim>
1325 if (this->tria != &tria)
1342 template <
int dim,
int spacedim>
1350 "You need to set the Triangulation in the DoFHandler using initialize() or " 1351 "in the constructor before you can distribute DoFs."));
1353 ExcMessage(
"The Triangulation you are using is empty!"));
1369 std::vector<types::subdomain_id> saved_subdomain_ids;
1373 if (shared_tria->with_artificial_cells())
1375 saved_subdomain_ids.resize(shared_tria->n_active_cells());
1381 const std::vector<types::subdomain_id> &true_subdomain_ids =
1382 shared_tria->get_true_subdomain_ids_of_cells();
1384 for (
unsigned int index = 0; cell != endc; ++cell, ++index)
1386 saved_subdomain_ids[index] = cell->subdomain_id();
1387 cell->set_subdomain_id(true_subdomain_ids[index]);
1398 if (cell->is_locally_owned())
1413 if (shared_tria->with_artificial_cells())
1419 for (
unsigned int index = 0; cell != endc; ++cell, ++index)
1420 cell->set_subdomain_id(saved_subdomain_ids[index]);
1428 std::vector<bool> user_flags;
1429 tria->save_user_flags(user_flags);
1443 for (
int level =
levels.size() - 1; level >= 0; --level)
1445 &::internal::hp::DoFLevel::compress_data<dim, spacedim>,
1457 template <
int dim,
int spacedim>
1464 &*this->
tria) !=
nullptr)
1469 else if (
dynamic_cast< 1471 &*this->
tria) !=
nullptr)
1472 policy = std_cxx14::make_unique<
1491 template <
int dim,
int spacedim>
1501 template <
int dim,
int spacedim>
1504 const std::vector<types::global_dof_index> &new_numbers)
1508 "You need to distribute DoFs before you can renumber them."));
1524 std::vector<types::global_dof_index> tmp(new_numbers);
1525 std::sort(tmp.begin(), tmp.end());
1526 std::vector<types::global_dof_index>::const_iterator p = tmp.begin();
1528 for (; p != tmp.end(); ++p, ++i)
1535 "New DoF index is not less than the total number of dofs."));
1543 for (
int level =
levels.size() - 1; level >= 0; --level)
1545 &::internal::hp::DoFLevel::uncompress_data<dim, spacedim>,
1557 for (
int level =
levels.size() - 1; level >= 0; --level)
1559 &::internal::hp::DoFLevel::compress_data<dim, spacedim>,
1568 template <
int dim,
int spacedim>
1573 return ::internal::hp::DoFHandlerImplementation::Implementation::
1574 max_couplings_between_dofs(*
this);
1579 template <
int dim,
int spacedim>
1613 template <
int dim,
int spacedim>
1619 levels.emplace_back(new ::internal::hp::DoFLevel);
1623 for (
unsigned int level = 0; level <
levels.size(); ++level)
1625 if (
levels[level]->active_fe_indices.size() == 0)
1626 levels[level]->active_fe_indices.resize(
tria->n_raw_cells(level), 0);
1633 tria->n_raw_cells(level),
1643 levels[level]->normalize_active_fe_indices();
1648 template <
int dim,
int spacedim>
1657 for (
unsigned int i = 0; i <
levels.size(); ++i)
1659 const unsigned int cells_on_level =
tria->n_raw_cells(i);
1660 std::unique_ptr<std::vector<bool>> has_children_level(
1661 new std::vector<bool>(cells_on_level));
1667 std::transform(
tria->levels[i]->cells.children.begin(),
1668 tria->levels[i]->cells.children.end(),
1669 has_children_level->begin(),
1670 std::bind(std::not_equal_to<int>(),
1671 std::placeholders::_1,
1674 std::transform(
tria->levels[i]->cells.refinement_cases.begin(),
1675 tria->levels[i]->cells.refinement_cases.end(),
1676 has_children_level->begin(),
1677 std::bind(std::not_equal_to<unsigned char>(),
1678 std::placeholders::_1,
1679 static_cast<unsigned char>(
1682 has_children.emplace_back(std::move(has_children_level));
1688 template <
int dim,
int spacedim>
1697 levels.emplace_back(new ::internal::hp::DoFLevel);
1709 for (
unsigned int i = 0; i <
levels.size(); ++i)
1710 levels[i]->active_fe_indices.resize(
tria->n_raw_cells(i), 0);
1722 for (; cell != endc; ++cell)
1737 if (cell->has_children() &&
1750 for (
unsigned int i = 0; i < cell->n_children(); ++i)
1751 if (cell->child(i)->is_locally_owned())
1752 cell->child(i)->set_active_fe_index(
1753 levels[cell->level()]->active_fe_index(cell->index()));
1763 template <
int dim,
int spacedim>
1764 template <
int structdim>
1769 const unsigned int)
const 1776 template <
int dim,
int spacedim>
1777 template <
int structdim>
1789 template <
int dim,
int spacedim>
1796 vertex_dofs = std::move(std::vector<types::global_dof_index>());
1804 #include "dof_handler.inst" 1807 DEAL_II_NAMESPACE_CLOSE
active_cell_iterator end_active(const unsigned int level) const
virtual void distribute_dofs(const hp::FECollection< dim, spacedim > &fe)
static const unsigned int invalid_unsigned_int
active_cell_iterator begin_active(const unsigned int level=0) const
#define AssertDimension(dim1, dim2)
static::ExceptionBase & ExcInvalidFEIndex(int arg1, int arg2)
unsigned int max_couplings_between_dofs() const
types::global_dof_index n_dofs() const
void renumber_dofs(const std::vector< types::global_dof_index > &new_numbers)
unsigned int max_couplings_between_boundary_dofs() const
void set_active_fe_indices(const std::vector< unsigned int > &active_fe_indices)
Task< RT > new_task(const std::function< RT()> &function)
::internal::DoFHandlerImplementation::NumberCache number_cache
active_cell_iterator end_active(const unsigned int level) const
std::vector< std::unique_ptr<::internal::hp::DoFLevel > > levels
void load_user_flags(std::istream &in)
std::vector< std::unique_ptr< std::vector< bool > > > has_children
void pre_refinement_action()
std::unique_ptr<::internal::hp::DoFIndicesOnFaces< dim > > faces
void setup_policy_and_listeners()
static::ExceptionBase & ExcNewNumbersNotConsecutive(types::global_dof_index arg1)
unsigned int size() const
std::vector< boost::signals2::connection > tria_listeners
static void reserve_space_cells(DoFHandler< dim, spacedim > &dof_handler)
unsigned long long int global_dof_index
SmartPointer< const Triangulation< dim, spacedim >, DoFHandler< dim, spacedim > > tria
std::unique_ptr<::internal::DoFHandlerImplementation::Policy::PolicyBase< dim, spacedim > > policy
active_cell_iterator begin_active(const unsigned int level=0) const
typename ActiveSelector::active_cell_iterator active_cell_iterator
IteratorRange< active_cell_iterator > active_cell_iterators_on_level(const unsigned int level) const
static::ExceptionBase & ExcNoFESelected()
static::ExceptionBase & ExcMessage(std::string arg1)
typename ActiveSelector::cell_iterator cell_iterator
const Triangulation< dim, spacedim > & get_triangulation() const
T sum(const T &t, const MPI_Comm &mpi_communicator)
#define Assert(cond, exc)
hp::FECollection< dim, spacedim > fe_collection
types::global_dof_index n_dofs() const
static::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
std::vector< types::global_dof_index > dofs
static void reserve_space_release_space(DoFHandler< dim, spacedim > &dof_handler)
virtual ~DoFHandler() override
SmartPointer< const Triangulation< dim, spacedim >, DoFHandler< dim, spacedim > > tria
virtual std::size_t memory_consumption() const
static unsigned int max_couplings_between_dofs(const DoFHandler< 1, spacedim > &dof_handler)
std::unique_ptr<::internal::DoFHandlerImplementation::DoFFaces< dim > > faces
cell_iterator end() const
std::vector< unsigned int > dof_offsets
static::ExceptionBase & ExcInvalidBoundaryIndicator()
std::vector< std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel< dim > > > levels
IteratorRange< cell_iterator > cell_iterators_on_level(const unsigned int level) const
internal::hp::DoFIndicesOnFacesOrEdges< 2 > quads
IteratorRange< cell_iterator > cell_iterators() const
cell_iterator end() const
void initialize(const Triangulation< dim, spacedim > &tria, const hp::FECollection< dim, spacedim > &fe)
const FiniteElement< dim, spacedim > & get_fe(const unsigned int index=0) const
hp::FECollection< dim, spacedim > fe_collection
unsigned int max_dofs_per_face(const hp::DoFHandler< dim, spacedim > &dh)
static void reserve_space_vertices(DoFHandler< dim, spacedim > &dof_handler)
static::ExceptionBase & ExcNotImplemented()
cell_iterator begin(const unsigned int level=0) const
const hp::FECollection< dim, spacedim > & get_fe_collection() const
Iterator points to a valid object.
const types::boundary_id internal_face_boundary_id
static void communicate_active_fe_indices(::hp::DoFHandler< dim, spacedim > &dof_handler)
static void reserve_space(DoFHandler< 1, spacedim > &dof_handler)
const types::global_dof_index invalid_dof_index
void create_active_fe_table()
std::vector< types::global_dof_index > vertex_dofs
types::global_dof_index n_locally_owned_dofs() const
IteratorRange< active_cell_iterator > active_cell_iterators() const
static::ExceptionBase & ExcNoFESelected()
static void reserve_space_faces(DoFHandler< dim, spacedim > &dof_handler)
std::vector< unsigned int > vertex_dof_offsets
types::global_dof_index n_boundary_dofs() const
std::enable_if< std::is_fundamental< T >::value, std::size_t >::type memory_consumption(const T &t)
std::vector< types::global_dof_index > vertex_dofs
static::ExceptionBase & ExcInternalError()
void get_active_fe_indices(std::vector< unsigned int > &active_fe_indices) const