From b006f6138ca3d0e909cd1bb866609602666b97c9 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Thu, 27 May 2021 17:05:04 -0400 Subject: [PATCH] Remove deprecated parallel::CellWeights member functions --- .../incompatibilities/20210527DanielArndt-1 | 3 + include/deal.II/distributed/cell_weights.h | 90 ------------- source/distributed/cell_weights.cc | 121 ------------------ 3 files changed, 3 insertions(+), 211 deletions(-) create mode 100644 doc/news/changes/incompatibilities/20210527DanielArndt-1 diff --git a/doc/news/changes/incompatibilities/20210527DanielArndt-1 b/doc/news/changes/incompatibilities/20210527DanielArndt-1 new file mode 100644 index 0000000000..ad790d58ad --- /dev/null +++ b/doc/news/changes/incompatibilities/20210527DanielArndt-1 @@ -0,0 +1,3 @@ +Removed: Deprecated parallel::CellWeights member functions have been removed. +
+(Daniel Arndt, 2021/05/27) diff --git a/include/deal.II/distributed/cell_weights.h b/include/deal.II/distributed/cell_weights.h index a19ff4e253..7804dc0a6e 100644 --- a/include/deal.II/distributed/cell_weights.h +++ b/include/deal.II/distributed/cell_weights.h @@ -186,97 +186,7 @@ namespace parallel * @} */ - /** - * @name Deprecated functions - * @{ - */ - - /** - * Constructor. - * - * @param[in] dof_handler The DoFHandler which will be used to - * determine each cell's finite element. - */ - DEAL_II_DEPRECATED - CellWeights(const dealii::DoFHandler &dof_handler); - - /** - * Choose a constant weight @p factor on each cell. - * - * @deprecated Use CellWeights::constant_weighting() instead. - */ - DEAL_II_DEPRECATED void - register_constant_weighting(const unsigned int factor = 1000); - - /** - * Choose a weight for each cell that is proportional to its number of - * degrees of freedom with a factor @p factor. - * - * @deprecated Use CellWeights::ndofs_weighting() instead. - */ - DEAL_II_DEPRECATED void - register_ndofs_weighting(const unsigned int factor = 1000); - - /** - * Choose a weight for each cell that is proportional to its number of - * degrees of freedom squared with a factor @p factor. - * - * @deprecated Use CellWeights::ndofs_weighting() instead. - */ - DEAL_II_DEPRECATED void - register_ndofs_squared_weighting(const unsigned int factor = 1000); - - /** - * Register a custom weight for each cell by providing a function as a - * parameter. - * - * @param[in] custom_function The custom weighting function returning - * the weight of each cell as an unsigned integer. It is required - * to have two arguments, namely the FiniteElement that will be - * active on the particular cell, and the cell itself of type - * DoFHandler::cell_iterator. We require both to make sure to - * get the right active FiniteElement on each cell in case that we - * coarsen the Triangulation. - */ - DEAL_II_DEPRECATED void - register_custom_weighting( - const std::function< - unsigned int(const FiniteElement &, - const typename DoFHandler::cell_iterator &)> - custom_function); - - /** - * @} - */ - private: - /** - * @name Deprecated members - * @{ - */ - - /** - * Pointer to the degree of freedom handler. - */ - DEAL_II_DEPRECATED - SmartPointer, CellWeights> - dof_handler; - - /** - * Pointer to the Triangulation associated with the degree of freedom - * handler. - * - * We store both to make sure to always work on the correct combination of - * both. - */ - DEAL_II_DEPRECATED - SmartPointer, CellWeights> - triangulation; - - /** - * @} - */ - /** * A connection to the corresponding cell_weight signal of the Triangulation * which is attached to the DoFHandler. diff --git a/source/distributed/cell_weights.cc b/source/distributed/cell_weights.cc index 51dff77f44..2218f2ee42 100644 --- a/source/distributed/cell_weights.cc +++ b/source/distributed/cell_weights.cc @@ -216,127 +216,6 @@ namespace parallel // Return the cell weight determined by the function of choice. return weighting_function(cell, dof_handler.get_fe(fe_index)); } - - - - // ---------- deprecated functions ---------- - - template - CellWeights::CellWeights( - const dealii::DoFHandler &dof_handler) - : dof_handler(&dof_handler) - , triangulation( - dynamic_cast *>( - &(dof_handler.get_triangulation()))) - { - Assert( - triangulation != nullptr, - ExcMessage( - "parallel::CellWeights requires a parallel::TriangulationBase object.")); - - register_constant_weighting(); - } - - - - template - void - CellWeights::register_constant_weighting( - const unsigned int factor) - { - connection.disconnect(); - - connection = triangulation->signals.cell_weight.connect( - [this, - factor](const typename Triangulation::cell_iterator &cell, - const typename Triangulation::CellStatus status) - -> unsigned int { - return this->weighting_callback(cell, - status, - std::cref(*(this->dof_handler)), - std::cref(*(this->triangulation)), - this->constant_weighting(factor)); - }); - } - - - - template - void - CellWeights::register_ndofs_weighting( - const unsigned int factor) - { - connection.disconnect(); - - connection = triangulation->signals.cell_weight.connect( - [this, - factor](const typename Triangulation::cell_iterator &cell, - const typename Triangulation::CellStatus status) - -> unsigned int { - return this->weighting_callback(cell, - status, - std::cref(*(this->dof_handler)), - std::cref(*(this->triangulation)), - this->ndofs_weighting({factor, 1})); - }); - } - - - - template - void - CellWeights::register_ndofs_squared_weighting( - const unsigned int factor) - { - connection.disconnect(); - - connection = triangulation->signals.cell_weight.connect( - [this, - factor](const typename Triangulation::cell_iterator &cell, - const typename Triangulation::CellStatus status) - -> unsigned int { - return this->weighting_callback(cell, - status, - std::cref(*(this->dof_handler)), - std::cref(*(this->triangulation)), - this->ndofs_weighting({factor, 2})); - }); - } - - - - template - void - CellWeights::register_custom_weighting( - const std::function< - unsigned int(const FiniteElement &, - const typename DoFHandler::cell_iterator &)> - custom_function) - { - connection.disconnect(); - - const std::function< - unsigned int(const typename DoFHandler::cell_iterator &, - const FiniteElement &)> - converted_function = - [&custom_function]( - const typename DoFHandler::cell_iterator &cell, - const FiniteElement &future_fe) -> unsigned int { - return custom_function(future_fe, cell); - }; - - connection = triangulation->signals.cell_weight.connect( - [this, converted_function]( - const typename Triangulation::cell_iterator &cell, - const typename Triangulation::CellStatus status) - -> unsigned int { - return this->weighting_callback(cell, - status, - std::cref(*(this->dof_handler)), - std::cref(*(this->triangulation)), - converted_function); - }); - } } // namespace parallel -- 2.39.5