From 96ebfab3014f13e7acaa8fcce06996458777100a Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 3 Jul 2023 08:43:31 -0600 Subject: [PATCH] Standardize on . --- include/deal.II/multigrid/multigrid.h | 103 +++++++++++++------------- 1 file changed, 53 insertions(+), 50 deletions(-) diff --git a/include/deal.II/multigrid/multigrid.h b/include/deal.II/multigrid/multigrid.h index 3ef46d160e..61957788b4 100644 --- a/include/deal.II/multigrid/multigrid.h +++ b/include/deal.II/multigrid/multigrid.h @@ -478,7 +478,7 @@ private: */ SmartPointer, Multigrid> edge_up; - template + template friend class PreconditionMG; }; @@ -493,11 +493,11 @@ private: * void copy_from_mg(VectorType&) to store the result of the v-cycle * in @p dst. * - * If VectorType is in fact a block vector and the TRANSFER object supports - * use of a separate DoFHandler for each block, this class also allows + * If VectorType is in fact a block vector and the `TransferType` object + * supports use of a separate DoFHandler for each block, this class also allows * to be initialized with a separate DoFHandler for each block. */ -template +template class PreconditionMG : public Subscriptor { public: @@ -507,7 +507,7 @@ public: */ PreconditionMG(const DoFHandler &dof_handler, Multigrid &mg, - const TRANSFER & transfer); + const TransferType & transfer); /** * Same as above in case every component of a block vector @@ -515,7 +515,7 @@ public: */ PreconditionMG(const std::vector *> &dof_handler, Multigrid & mg, - const TRANSFER & transfer); + const TransferType & transfer); /** * Dummy function needed by other classes. @@ -612,7 +612,7 @@ private: * Associated @p DoFHandler. */ std::vector, - PreconditionMG>> + PreconditionMG>> dof_handler_vector; /** @@ -624,13 +624,15 @@ private: /** * The multigrid object. */ - SmartPointer, PreconditionMG> + SmartPointer, + PreconditionMG> multigrid; /** * Object for grid transfer. */ - SmartPointer> + SmartPointer> transfer; /** @@ -706,12 +708,12 @@ namespace internal { template - std::enable_if_t + std::enable_if_t vmult(const std::vector *> &dof_handler_vector, Multigrid & multigrid, - const TRANSFER & transfer, + const TransferType & transfer, OtherVectorType & dst, const OtherVectorType & src, const bool uses_dof_handler_vector, @@ -737,12 +739,12 @@ namespace internal template void vmult(const std::vector *> &dof_handler_vector, Multigrid & multigrid, - const TRANSFER & transfer, + const TransferType & transfer, OtherVectorType & dst, const OtherVectorType & src, const bool uses_dof_handler_vector, @@ -765,12 +767,12 @@ namespace internal template - std::enable_if_t + std::enable_if_t vmult_add(const std::vector *> &dof_handler_vector, Multigrid & multigrid, - const TRANSFER & transfer, + const TransferType & transfer, OtherVectorType & dst, const OtherVectorType & src, const bool uses_dof_handler_vector, @@ -798,12 +800,12 @@ namespace internal template void vmult_add(const std::vector *> &dof_handler_vector, Multigrid & multigrid, - const TRANSFER & transfer, + const TransferType & transfer, OtherVectorType & dst, const OtherVectorType & src, const bool uses_dof_handler_vector, @@ -828,11 +830,11 @@ namespace internal } // namespace PreconditionMGImplementation } // namespace internal -template -PreconditionMG::PreconditionMG( +template +PreconditionMG::PreconditionMG( const DoFHandler &dof_handler, Multigrid &mg, - const TRANSFER & transfer) + const TransferType & transfer) : dof_handler_vector(1, &dof_handler) , dof_handler_vector_raw(1, &dof_handler) , multigrid(&mg) @@ -840,11 +842,11 @@ PreconditionMG::PreconditionMG( , uses_dof_handler_vector(false) {} -template -PreconditionMG::PreconditionMG( +template +PreconditionMG::PreconditionMG( const std::vector *> &dof_handler, Multigrid & mg, - const TRANSFER & transfer) + const TransferType & transfer) : dof_handler_vector(dof_handler.size()) , dof_handler_vector_raw(dof_handler.size()) , multigrid(&mg) @@ -858,17 +860,17 @@ PreconditionMG::PreconditionMG( } } -template +template inline bool -PreconditionMG::empty() const +PreconditionMG::empty() const { return false; } -template +template template void -PreconditionMG::vmult( +PreconditionMG::vmult( OtherVectorType & dst, const OtherVectorType &src) const { @@ -883,9 +885,9 @@ PreconditionMG::vmult( } -template +template IndexSet -PreconditionMG::locally_owned_range_indices( +PreconditionMG::locally_owned_range_indices( const unsigned int block) const { AssertIndexRange(block, dof_handler_vector.size()); @@ -893,9 +895,9 @@ PreconditionMG::locally_owned_range_indices( } -template +template IndexSet -PreconditionMG::locally_owned_domain_indices( +PreconditionMG::locally_owned_domain_indices( const unsigned int block) const { AssertIndexRange(block, dof_handler_vector.size()); @@ -904,9 +906,9 @@ PreconditionMG::locally_owned_domain_indices( -template +template MPI_Comm -PreconditionMG::get_mpi_communicator() const +PreconditionMG::get_mpi_communicator() const { // currently parallel GMG works with parallel triangulations only, // so it should be a safe bet to use it to query MPI communicator: @@ -919,9 +921,9 @@ PreconditionMG::get_mpi_communicator() const -template +template boost::signals2::connection -PreconditionMG::connect_transfer_to_mg( +PreconditionMG::connect_transfer_to_mg( const std::function &slot) { return this->signals.transfer_to_mg.connect(slot); @@ -929,9 +931,9 @@ PreconditionMG::connect_transfer_to_mg( -template +template boost::signals2::connection -PreconditionMG::connect_transfer_to_global( +PreconditionMG::connect_transfer_to_global( const std::function &slot) { return this->signals.transfer_to_global.connect(slot); @@ -939,10 +941,10 @@ PreconditionMG::connect_transfer_to_global( -template +template template void -PreconditionMG::vmult_add( +PreconditionMG::vmult_add( OtherVectorType & dst, const OtherVectorType &src) const { @@ -957,20 +959,21 @@ PreconditionMG::vmult_add( } -template +template template void -PreconditionMG::Tvmult(OtherVectorType &, - const OtherVectorType &) const +PreconditionMG::Tvmult( + OtherVectorType &, + const OtherVectorType &) const { Assert(false, ExcNotImplemented()); } -template +template template void -PreconditionMG::Tvmult_add( +PreconditionMG::Tvmult_add( OtherVectorType &, const OtherVectorType &) const { @@ -978,17 +981,17 @@ PreconditionMG::Tvmult_add( } -template +template Multigrid & -PreconditionMG::get_multigrid() +PreconditionMG::get_multigrid() { return *this->multigrid; } -template +template const Multigrid & -PreconditionMG::get_multigrid() const +PreconditionMG::get_multigrid() const { return *this->multigrid; } -- 2.39.5