From: Wolfgang Bangerth Date: Sun, 18 Jun 2017 01:15:09 +0000 (-0600) Subject: Non-functional source cleanups at the textual level. X-Git-Tag: v9.0.0-rc1~1487^2~10 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2b7d3b357e391d31b01612dba71fd60b5dd693b;p=dealii.git Non-functional source cleanups at the textual level. --- diff --git a/include/deal.II/dofs/dof_handler.h b/include/deal.II/dofs/dof_handler.h index ffbc214337..ac85819b20 100644 --- a/include/deal.II/dofs/dof_handler.h +++ b/include/deal.II/dofs/dof_handler.h @@ -1035,13 +1035,19 @@ private: types::global_dof_index *indices_offset; }; - void clear_mg_space (); - /** - * Free all used memory. + * Free all memory used for non-multigrid data structures. */ void clear_space (); + /** + * Free all memory used for multigrid data structures. + */ + void clear_mg_space (); + + /** + * Allocate space that will be used by distribute_dofs(). + */ void reserve_space (); template diff --git a/source/dofs/dof_handler.cc b/source/dofs/dof_handler.cc index 6ec3099f4f..c0b2561007 100644 --- a/source/dofs/dof_handler.cc +++ b/source/dofs/dof_handler.cc @@ -1404,7 +1404,7 @@ void DoFHandler<3>::renumber_dofs (const unsigned int level, const_cast &>(this->get_triangulation()).load_user_flags (user_flags); } - //HEX DoFs + // HEX DoFs for (std::vector::iterator i=mg_levels[level]->dof_object.dofs.begin(); i!=mg_levels[level]->dof_object.dofs.end(); ++i) { @@ -1479,14 +1479,15 @@ void DoFHandler::clear_space () number_cache.clear (); } + + template template types::global_dof_index -DoFHandler::get_dof_index ( - const unsigned int obj_level, - const unsigned int obj_index, - const unsigned int fe_index, - const unsigned int local_index) const +DoFHandler::get_dof_index (const unsigned int obj_level, + const unsigned int obj_index, + const unsigned int fe_index, + const unsigned int local_index) const { return internal::DoFHandler::Implementation::get_dof_index (*this, *this->mg_levels[obj_level], *this->mg_faces, obj_index, @@ -1494,18 +1495,37 @@ DoFHandler::get_dof_index ( internal::int2type ()); } + + template template -void DoFHandler::set_dof_index (const unsigned int obj_level, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index) const +void DoFHandler::set_dof_index (const unsigned int obj_level, + const unsigned int obj_index, + const unsigned int fe_index, + const unsigned int local_index, + const types::global_dof_index global_index) const { - internal::DoFHandler::Implementation::set_dof_index (*this, *this->mg_levels[obj_level], *this->mg_faces, obj_index, fe_index, local_index, global_index, internal::int2type ()); + internal::DoFHandler::Implementation::set_dof_index (*this, + *this->mg_levels[obj_level], + *this->mg_faces, + obj_index, + fe_index, + local_index, + global_index, + internal::int2type ()); } + template -DoFHandler::MGVertexDoFs::MGVertexDoFs (): coarsest_level (numbers::invalid_unsigned_int), finest_level (0), indices (nullptr), indices_offset (nullptr) -{ -} +DoFHandler::MGVertexDoFs::MGVertexDoFs () + : + coarsest_level (numbers::invalid_unsigned_int), + finest_level (0), + indices (nullptr), + indices_offset (nullptr) +{} + template @@ -1515,8 +1535,12 @@ DoFHandler::MGVertexDoFs::~MGVertexDoFs () delete[] indices_offset; } + + template -void DoFHandler::MGVertexDoFs::init (const unsigned int cl, const unsigned int fl, const unsigned int dofs_per_vertex) +void DoFHandler::MGVertexDoFs::init (const unsigned int cl, + const unsigned int fl, + const unsigned int dofs_per_vertex) { if (indices != nullptr) { @@ -1531,7 +1555,7 @@ void DoFHandler::MGVertexDoFs::init (const unsigned int cl, const } coarsest_level = cl; - finest_level = fl; + finest_level = fl; if (cl > fl) return; @@ -1548,12 +1572,16 @@ void DoFHandler::MGVertexDoFs::init (const unsigned int cl, const indices_offset[i] = i * dofs_per_vertex; } + + template unsigned int DoFHandler::MGVertexDoFs::get_coarsest_level () const { return coarsest_level; } + + template unsigned int DoFHandler::MGVertexDoFs::get_finest_level () const {