From ec03d5d2f43c782ce0d13dfc49e0bc6447f664b4 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Wed, 29 Jun 2022 08:27:16 +0200 Subject: [PATCH] MGTransferBlockMatrixFree: allow to copy form other type of block vector --- .../multigrid/mg_transfer_matrix_free.h | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/include/deal.II/multigrid/mg_transfer_matrix_free.h b/include/deal.II/multigrid/mg_transfer_matrix_free.h index abbe4376c8..d49ab0a1fd 100644 --- a/include/deal.II/multigrid/mg_transfer_matrix_free.h +++ b/include/deal.II/multigrid/mg_transfer_matrix_free.h @@ -179,12 +179,12 @@ public: * * The use of this function is demonstrated in step-66. */ - template + template void interpolate_to_mg( const DoFHandler & dof_handler, MGLevelObject> &dst, - const LinearAlgebra::distributed::Vector & src) const; + const BlockVectorType2 & src) const; /** * Finite element does not provide prolongation matrices. @@ -385,42 +385,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, MGLevelObject> &dst, - const LinearAlgebra::distributed::BlockVector & src) const; + 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, MGLevelObject> &dst, - const LinearAlgebra::distributed::BlockVector & src) const; + const BlockVectorType2 & src) const; /** * Transfer from multi-level block-vector to normal vector. */ - template + template void copy_from_mg( - const DoFHandler & dof_handler, - LinearAlgebra::distributed::BlockVector &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, - LinearAlgebra::distributed::BlockVector & dst, + BlockVectorType2 & dst, const MGLevelObject> &src) const; @@ -547,12 +547,12 @@ private: template -template +template void MGTransferMatrixFree::interpolate_to_mg( const DoFHandler & dof_handler, MGLevelObject> &dst, - const LinearAlgebra::distributed::Vector & src) const + const BlockVectorType2 & src) const { const unsigned int min_level = dst.min_level(); const unsigned int max_level = dst.max_level(); @@ -640,12 +640,12 @@ MGTransferMatrixFree::interpolate_to_mg( template -template +template void MGTransferBlockMatrixFreeBase::copy_to_mg( const DoFHandler & dof_handler, MGLevelObject> &dst, - const LinearAlgebra::distributed::BlockVector & src) const + const BlockVectorType2 & src) const { Assert(same_for_all, ExcMessage( @@ -661,12 +661,12 @@ MGTransferBlockMatrixFreeBase::copy_to_mg( template -template +template void MGTransferBlockMatrixFreeBase::copy_to_mg( const std::vector *> & dof_handler, MGLevelObject> &dst, - const LinearAlgebra::distributed::BlockVector & src) const + const BlockVectorType2 & src) const { const unsigned int n_blocks = src.n_blocks(); AssertDimension(dof_handler.size(), n_blocks); @@ -700,11 +700,11 @@ MGTransferBlockMatrixFreeBase::copy_to_mg( } template -template +template void MGTransferBlockMatrixFreeBase::copy_from_mg( - const DoFHandler & dof_handler, - LinearAlgebra::distributed::BlockVector &dst, + const DoFHandler &dof_handler, + BlockVectorType2 & dst, const MGLevelObject> &src) const { @@ -720,11 +720,11 @@ MGTransferBlockMatrixFreeBase::copy_from_mg( } template -template +template void MGTransferBlockMatrixFreeBase::copy_from_mg( const std::vector *> &dof_handler, - LinearAlgebra::distributed::BlockVector & dst, + BlockVectorType2 & dst, const MGLevelObject> &src) const { -- 2.39.5