From: Peter Munch Date: Sat, 15 Jul 2023 10:02:02 +0000 (+0200) Subject: MGTransferMatrixFree: remove unused template argument X-Git-Tag: relicensing~652^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9605b88dd18099e24335c736269059cc7ae55dba;p=dealii.git MGTransferMatrixFree: remove unused template argument --- diff --git a/doc/news/changes/incompatibilities/20230721Munch b/doc/news/changes/incompatibilities/20230721Munch new file mode 100644 index 0000000000..31dde10e24 --- /dev/null +++ b/doc/news/changes/incompatibilities/20230721Munch @@ -0,0 +1,8 @@ +Removed: The methods copy_to_mg, copy_from_mg, +and interpolate_to_mg used of +MGTransferGlobalCoarsening and MGTransferMatrixFree +used to have spacedim as template argument. Since it +is not used and the underlying functionality did not work, +it has been removed. +
+(Peter Munch, 2023/07/21) diff --git a/include/deal.II/multigrid/mg_transfer_global_coarsening.h b/include/deal.II/multigrid/mg_transfer_global_coarsening.h index 3d01d1420c..0ef32204b4 100644 --- a/include/deal.II/multigrid/mg_transfer_global_coarsening.h +++ b/include/deal.II/multigrid/mg_transfer_global_coarsening.h @@ -889,11 +889,11 @@ public: * * @note DoFHandler is not needed here, but is required by the interface. */ - template + template void - copy_to_mg(const DoFHandler &dof_handler, - MGLevelObject & dst, - const InVector & src) const; + copy_to_mg(const DoFHandler & dof_handler, + MGLevelObject &dst, + const InVector & src) const; /** * Initialize internal vectors and copy the values on the finest @@ -901,9 +901,9 @@ public: * * @note DoFHandler is not needed here, but is required by the interface. */ - template + template void - copy_from_mg(const DoFHandler &dof_handler, + copy_from_mg(const DoFHandler & dof_handler, OutVector & dst, const MGLevelObject &src) const; @@ -929,11 +929,11 @@ public: * is required to be able to use MGTransferGlobalCoarsening and * MGTransferMatrixFree as template argument. */ - template + template void - interpolate_to_mg(const DoFHandler &dof_handler, - MGLevelObject & dst, - const InVector & src) const; + interpolate_to_mg(const DoFHandler & dof_handler, + MGLevelObject &dst, + const InVector & src) const; /** * Return the memory consumption of the allocated memory in this class. @@ -1150,12 +1150,12 @@ MGTransferGlobalCoarsening::restrict_and_add( template -template +template void MGTransferGlobalCoarsening::copy_to_mg( - const DoFHandler &dof_handler, - MGLevelObject & dst, - const InVector & src) const + const DoFHandler & dof_handler, + MGLevelObject &dst, + const InVector & src) const { (void)dof_handler; @@ -1173,10 +1173,10 @@ MGTransferGlobalCoarsening::copy_to_mg( template -template +template void MGTransferGlobalCoarsening::copy_from_mg( - const DoFHandler &dof_handler, + const DoFHandler & dof_handler, OutVector & dst, const MGLevelObject &src) const { @@ -1212,12 +1212,12 @@ MGTransferGlobalCoarsening::interpolate_to_mg( template -template +template void MGTransferGlobalCoarsening::interpolate_to_mg( - const DoFHandler &dof_handler, - MGLevelObject & dst, - const InVector & src) const + const DoFHandler & dof_handler, + MGLevelObject &dst, + const InVector & src) const { (void)dof_handler; diff --git a/include/deal.II/multigrid/mg_transfer_matrix_free.h b/include/deal.II/multigrid/mg_transfer_matrix_free.h index ddf6fa8d30..cef72e3e46 100644 --- a/include/deal.II/multigrid/mg_transfer_matrix_free.h +++ b/include/deal.II/multigrid/mg_transfer_matrix_free.h @@ -102,7 +102,7 @@ public: * ignored and internal variants are used instead. */ void - build(const DoFHandler &dof_handler, + build(const DoFHandler &dof_handler, const std::vector> &external_partitioners = std::vector>()); @@ -112,7 +112,7 @@ public: * partitioners. */ void - build(const DoFHandler &dof_handler, + build(const DoFHandler &dof_handler, const std::function &)> &initialize_dof_vector); @@ -181,10 +181,10 @@ public: * * The use of this function is demonstrated in step-66. */ - template + template void interpolate_to_mg( - const DoFHandler & dof_handler, + const DoFHandler & dof_handler, MGLevelObject> &dst, const BlockVectorType2 & src) const; @@ -387,42 +387,42 @@ public: * This function will initialize @p dst accordingly if needed as required by * the Multigrid class. */ - template + template void copy_to_mg( - const DoFHandler & dof_handler, + const DoFHandler & dof_handler, MGLevelObject> &dst, const BlockVectorType2 & src) const; /** * Same as above for the case that each block has its own DoFHandler. */ - template + template void copy_to_mg( - const std::vector *> & dof_handler, + const std::vector *> & dof_handler, MGLevelObject> &dst, const BlockVectorType2 & src) const; /** * Transfer from multi-level block-vector to normal vector. */ - template + template void copy_from_mg( - const DoFHandler &dof_handler, - BlockVectorType2 & dst, + const DoFHandler &dof_handler, + BlockVectorType2 & dst, const MGLevelObject> &src) const; /** * Same as above for the case that each block has its own DoFHandler. */ - template + template void copy_from_mg( - const std::vector *> &dof_handler, - BlockVectorType2 & dst, + const std::vector *> &dof_handler, + BlockVectorType2 & dst, const MGLevelObject> &src) const; @@ -515,13 +515,13 @@ public: * Actually build the information for the prolongation for each level. */ void - build(const DoFHandler &dof_handler); + build(const DoFHandler &dof_handler); /** * Same as above for the case that each block has its own DoFHandler. */ void - build(const std::vector *> &dof_handler); + build(const std::vector *> &dof_handler); /** * Memory used by this object. @@ -549,10 +549,10 @@ private: template -template +template void MGTransferMatrixFree::interpolate_to_mg( - const DoFHandler & dof_handler, + const DoFHandler & dof_handler, MGLevelObject> &dst, const BlockVectorType2 & src) const { @@ -563,7 +563,7 @@ MGTransferMatrixFree::interpolate_to_mg( ExcDimensionMismatch( max_level, dof_handler.get_triangulation().n_global_levels() - 1)); - const FiniteElement &fe = dof_handler.get_fe(); + const auto &fe = dof_handler.get_fe(); for (unsigned int level = min_level; level <= max_level; ++level) if (dst[level].size() != dof_handler.n_dofs(level) || @@ -642,10 +642,10 @@ MGTransferMatrixFree::interpolate_to_mg( template -template +template void MGTransferBlockMatrixFreeBase::copy_to_mg( - const DoFHandler & dof_handler, + const DoFHandler & dof_handler, MGLevelObject> &dst, const BlockVectorType2 & src) const { @@ -654,8 +654,8 @@ MGTransferBlockMatrixFreeBase::copy_to_mg( "This object was initialized with support for usage with one " "DoFHandler for each block, but this method assumes that " "the same DoFHandler is used for all the blocks!")); - const std::vector *> mg_dofs(src.n_blocks(), - &dof_handler); + const std::vector *> mg_dofs(src.n_blocks(), + &dof_handler); copy_to_mg(mg_dofs, dst, src); } @@ -663,10 +663,10 @@ MGTransferBlockMatrixFreeBase::copy_to_mg( template -template +template void MGTransferBlockMatrixFreeBase::copy_to_mg( - const std::vector *> & dof_handler, + const std::vector *> & dof_handler, MGLevelObject> &dst, const BlockVectorType2 & src) const { @@ -702,11 +702,11 @@ MGTransferBlockMatrixFreeBase::copy_to_mg( } template -template +template void MGTransferBlockMatrixFreeBase::copy_from_mg( - const DoFHandler &dof_handler, - BlockVectorType2 & dst, + const DoFHandler &dof_handler, + BlockVectorType2 & dst, const MGLevelObject> &src) const { @@ -715,18 +715,18 @@ MGTransferBlockMatrixFreeBase::copy_from_mg( "This object was initialized with support for usage with one " "DoFHandler for each block, but this method assumes that " "the same DoFHandler is used for all the blocks!")); - const std::vector *> mg_dofs(dst.n_blocks(), - &dof_handler); + const std::vector *> mg_dofs(dst.n_blocks(), + &dof_handler); copy_from_mg(mg_dofs, dst, src); } template -template +template void MGTransferBlockMatrixFreeBase::copy_from_mg( - const std::vector *> &dof_handler, - BlockVectorType2 & dst, + const std::vector *> &dof_handler, + BlockVectorType2 & dst, const MGLevelObject> &src) const { diff --git a/source/multigrid/mg_transfer_matrix_free.cc b/source/multigrid/mg_transfer_matrix_free.cc index da32097f73..acdaed6a18 100644 --- a/source/multigrid/mg_transfer_matrix_free.cc +++ b/source/multigrid/mg_transfer_matrix_free.cc @@ -97,7 +97,7 @@ MGTransferMatrixFree::clear() template void MGTransferMatrixFree::build( - const DoFHandler &dof_handler, + const DoFHandler &dof_handler, const std::vector> &external_partitioners) { @@ -203,7 +203,7 @@ MGTransferMatrixFree::build( template void MGTransferMatrixFree::build( - const DoFHandler &dof_handler, + const DoFHandler &dof_handler, const std::function &)> &initialize_dof_vector) @@ -756,7 +756,7 @@ MGTransferBlockMatrixFree::initialize_constraints( template void MGTransferBlockMatrixFree::build( - const DoFHandler &dof_handler) + const DoFHandler &dof_handler) { AssertDimension(this->matrix_free_transfer_vector.size(), 1); this->matrix_free_transfer_vector[0].build(dof_handler); @@ -767,7 +767,7 @@ MGTransferBlockMatrixFree::build( template void MGTransferBlockMatrixFree::build( - const std::vector *> &dof_handler) + const std::vector *> &dof_handler) { AssertDimension(this->matrix_free_transfer_vector.size(), dof_handler.size()); for (unsigned int i = 0; i < dof_handler.size(); ++i)