From: Daniel Arndt Date: Tue, 25 May 2021 15:44:11 +0000 (-0400) Subject: Remove deprecated parallel::distributed::CellDataTransfer::CoarseningStrategies X-Git-Tag: v9.4.0-rc1~1332^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3b61d2e93749cc3b58fc8172632a0f37ba4e507;p=dealii.git Remove deprecated parallel::distributed::CellDataTransfer::CoarseningStrategies --- diff --git a/doc/news/changes/incompatibilities/20210525DanielArndt b/doc/news/changes/incompatibilities/20210525DanielArndt new file mode 100644 index 0000000000..e5713b960d --- /dev/null +++ b/doc/news/changes/incompatibilities/20210525DanielArndt @@ -0,0 +1,5 @@ +Removed the deprecated +parallel::distributed::CellDataTransfer::CoarseningStrategies +use AdaptationStrategies::Coarsening instead. +
+(Daniel Arndt, 2021/05/25) diff --git a/include/deal.II/distributed/cell_data_transfer.h b/include/deal.II/distributed/cell_data_transfer.h index 9198c2d486..115ff2edad 100644 --- a/include/deal.II/distributed/cell_data_transfer.h +++ b/include/deal.II/distributed/cell_data_transfer.h @@ -133,77 +133,6 @@ namespace parallel using value_type = typename VectorType::value_type; public: - /** - * When data is transferred during coarsening, it is not trivial to decide - * how to handle data of child cells which will be coarsened. Or in other - * words, which data should be stored in the corresponding parent cell. - * - * In this struct, we offer a few strategies that cope with this - * problem. Such strategies can be passed to the CellDataTransfer and - * parallel::distributed::CellDataTransfer constructors. - * - * @deprecated Use the namespace dealii::AdaptationStrategies::Coarsening instead. - */ - struct DEAL_II_DEPRECATED CoarseningStrategies - { - /** - * @copydoc dealii::AdaptationStrategies::Coarsening::check_equality() - * - * @deprecated Use dealii::AdaptationStrategies::Coarsening::check_equality() instead. - */ - DEAL_II_DEPRECATED static typename VectorType::value_type - check_equality(const typename parallel::distributed:: - Triangulation::cell_iterator &parent, - const VectorType &input_vector) - { - const typename VectorType::value_type value = - input_vector[parent->child(0)->active_cell_index()]; - - for (unsigned int child_index = 1; child_index < parent->n_children(); - ++child_index) - Assert( - value == - input_vector[parent->child(child_index)->active_cell_index()], - ExcMessage( - "Values on cells that will be coarsened are not equal!")); - - return value; - } - - /** - * @copydoc dealii::AdaptationStrategies::Coarsening::sum() - * - * @deprecated Use dealii::AdaptationStrategies::Coarsening::sum() instead. - */ - DEAL_II_DEPRECATED static typename VectorType::value_type - sum(const typename parallel::distributed::Triangulation:: - cell_iterator & parent, - const VectorType &input_vector) - { - typename VectorType::value_type sum = 0; - - for (unsigned int child_index = 0; child_index < parent->n_children(); - ++child_index) - sum += - input_vector[parent->child(child_index)->active_cell_index()]; - - return sum; - } - - /** - * @copydoc dealii::AdaptationStrategies::Coarsening::mean() - * - * @deprecated Use dealii::AdaptationStrategies::Coarsening::mean() instead. - */ - DEAL_II_DEPRECATED static typename VectorType::value_type - mean(const typename parallel::distributed:: - Triangulation::cell_iterator &parent, - const VectorType & input_vector) - { - return sum(parent, input_vector) / parent->n_children(); - } - }; - /** * Constructor. * @@ -236,30 +165,6 @@ namespace parallel &dealii::AdaptationStrategies::Coarsening:: check_equality); - /** - * Constructor. - * - * @param[in] triangulation The triangulation on which all operations will - * happen. At the time when this constructor is called, the refinement - * in question has not happened yet. - * @param[in] transfer_variable_size_data Specify whether your VectorType - * container stores values that differ in size. A varying amount of data - * may be packed per cell, if for example the underlying ValueType of - * the VectorType container is a container itself. - * @param[in] coarsening_strategy %Function deciding which data to store - * on a cell whose children will get coarsened into. - * - * @deprecated Use the above constructor instead. - */ - DEAL_II_DEPRECATED - CellDataTransfer(const parallel::distributed::Triangulation - & triangulation, - const bool transfer_variable_size_data, - const std::function::cell_iterator &parent, - const VectorType &input_vector)> coarsening_strategy); - /** * Prepare the current object for coarsening and refinement. * diff --git a/include/deal.II/distributed/cell_data_transfer.templates.h b/include/deal.II/distributed/cell_data_transfer.templates.h index 260d97a8e5..5b4b82eabc 100644 --- a/include/deal.II/distributed/cell_data_transfer.templates.h +++ b/include/deal.II/distributed/cell_data_transfer.templates.h @@ -89,56 +89,6 @@ namespace parallel , handle(numbers::invalid_unsigned_int) {} - template - DEAL_II_DEPRECATED - CellDataTransfer::CellDataTransfer( - const parallel::distributed::Triangulation &triangulation, - const bool transfer_variable_size_data, - const std::function< - value_type(const typename parallel::distributed:: - Triangulation::cell_iterator &parent, - const VectorType &input_vector)> coarsening_strategy) - : triangulation(&triangulation, typeid(*this).name()) - , transfer_variable_size_data(transfer_variable_size_data) - , refinement_strategy(&dealii::AdaptationStrategies::Refinement:: - preserve) - , handle(numbers::invalid_unsigned_int) - { - value_type (*const *old_strategy)( - const typename parallel::distributed::Triangulation:: - cell_iterator &, - const VectorType &) = - coarsening_strategy.template target< - value_type (*)(const typename parallel::distributed:: - Triangulation::cell_iterator &, - const VectorType &)>(); - - if (*old_strategy == CoarseningStrategies::check_equality) - const_cast::cell_iterator &, - const std::vector &)> &>(this->coarsening_strategy) = - &dealii::AdaptationStrategies::Coarsening:: - check_equality; - else if (*old_strategy == CoarseningStrategies::sum) - const_cast::cell_iterator &, - const std::vector &)> &>(this->coarsening_strategy) = - &dealii::AdaptationStrategies::Coarsening:: - sum; - else if (*old_strategy == CoarseningStrategies::mean) - const_cast::cell_iterator &, - const std::vector &)> &>(this->coarsening_strategy) = - &dealii::AdaptationStrategies::Coarsening:: - mean; - else - Assert( - false, - ExcMessage( - "The constructor using the former function type of the " - "coarsening_strategy parameter is no longer supported. Please use " - "the latest function type instead")); - } // Interface for packing