From cbec52ebe1dfa582d66152514b7f0d70db8900d7 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 3 Nov 2023 15:56:31 -0600 Subject: [PATCH] Use the standard form of lambda expressions. --- include/deal.II/lac/sparse_vanka.templates.h | 5 +++-- source/base/kokkos.cc | 2 +- source/dofs/dof_handler.cc | 10 +++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/deal.II/lac/sparse_vanka.templates.h b/include/deal.II/lac/sparse_vanka.templates.h index fc21ecba46..e78507d94e 100644 --- a/include/deal.II/lac/sparse_vanka.templates.h +++ b/include/deal.II/lac/sparse_vanka.templates.h @@ -568,8 +568,9 @@ SparseBlockVanka::vmult(Vector &dst, Threads::TaskGroup<> tasks; for (unsigned int block = 0; block < n_blocks; ++block) - tasks += Threads::new_task( - [&, block] { this->apply_preconditioner(dst, src, &dof_masks[block]); }); + tasks += Threads::new_task([&, block]() { + this->apply_preconditioner(dst, src, &dof_masks[block]); + }); tasks.join_all(); } diff --git a/source/base/kokkos.cc b/source/base/kokkos.cc index 6380fad4ec..8be535e2cc 100644 --- a/source/base/kokkos.cc +++ b/source/base/kokkos.cc @@ -37,7 +37,7 @@ namespace internal ) { // only execute once - static bool dummy = [] { + static bool dummy = []() { dealii_initialized_kokkos = true; #if KOKKOS_VERSION >= 30700 const auto settings = diff --git a/source/dofs/dof_handler.cc b/source/dofs/dof_handler.cc index 399442ae68..94bea20d69 100644 --- a/source/dofs/dof_handler.cc +++ b/source/dofs/dof_handler.cc @@ -2741,7 +2741,7 @@ void DoFHandler::connect_to_triangulation_signals() [this]() { this->pre_distributed_transfer_action(); })); this->tria_listeners_for_transfer.push_back( this->tria->signals.post_distributed_repartition.connect( - [this] { this->post_distributed_transfer_action(); })); + [this]() { this->post_distributed_transfer_action(); })); // refinement signals this->tria_listeners_for_transfer.push_back( @@ -2778,20 +2778,20 @@ void DoFHandler::connect_to_triangulation_signals() })); this->tria_listeners_for_transfer.push_back( this->tria->signals.pre_refinement.connect( - [this] { this->pre_transfer_action(); })); + [this]() { this->pre_transfer_action(); })); this->tria_listeners_for_transfer.push_back( this->tria->signals.post_refinement.connect( - [this] { this->post_transfer_action(); })); + [this]() { this->post_transfer_action(); })); } else { // refinement signals this->tria_listeners_for_transfer.push_back( this->tria->signals.pre_refinement.connect( - [this] { this->pre_transfer_action(); })); + [this]() { this->pre_transfer_action(); })); this->tria_listeners_for_transfer.push_back( this->tria->signals.post_refinement.connect( - [this] { this->post_transfer_action(); })); + [this]() { this->post_transfer_action(); })); } } -- 2.39.5