From a2b3f46918ae31485381970837aef754bd09a65d Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Fri, 15 May 2020 01:45:24 +0200 Subject: [PATCH] Review by Marc. --- examples/step-70/step-70.cc | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/examples/step-70/step-70.cc b/examples/step-70/step-70.cc index dfb2189f27..f5ca8c633f 100644 --- a/examples/step-70/step-70.cc +++ b/examples/step-70/step-70.cc @@ -908,14 +908,12 @@ namespace Step70 // functions will receive a signal when refinement is about to happen, and // when it has just happened, and will take care of transferring all // information to the newly refined grid with minimal computational cost. - fluid_tria.signals.pre_distributed_refinement.connect(std::bind( - &Particles::ParticleHandler::register_store_callback_function, - &tracer_particle_handler)); + fluid_tria.signals.pre_distributed_refinement.connect( + [&]() { tracer_particle_handler.register_store_callback_function(); }); - fluid_tria.signals.post_distributed_refinement.connect(std::bind( - &Particles::ParticleHandler::register_load_callback_function, - &tracer_particle_handler, - false)); + fluid_tria.signals.post_distributed_refinement.connect([&]() { + tracer_particle_handler.register_load_callback_function(false); + }); // Finally, we display to the terminal the number of total tracer particles // that were generated @@ -1007,14 +1005,11 @@ namespace Step70 // Now make sure that upon refinement, particles are correctly transferred - fluid_tria.signals.pre_distributed_refinement.connect(std::bind( - &Particles::ParticleHandler::register_store_callback_function, - &solid_particle_handler)); - - fluid_tria.signals.post_distributed_refinement.connect(std::bind( - &Particles::ParticleHandler::register_load_callback_function, - &solid_particle_handler, - false)); + fluid_tria.signals.pre_distributed_refinement.connect( + [&]() { solid_particle_handler.register_store_callback_function(); }); + + fluid_tria.signals.post_distributed_refinement.connect( + [&]() { solid_particle_handler.register_load_callback_function(false); }); pcout << "Solid particles: " << solid_particle_handler.n_global_particles() << std::endl; -- 2.39.5