]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Review by Marc. 9078/head
authorLuca Heltai <luca.heltai@sissa.it>
Thu, 14 May 2020 23:45:24 +0000 (01:45 +0200)
committerLuca Heltai <luca.heltai@sissa.it>
Thu, 14 May 2020 23:45:24 +0000 (01:45 +0200)
examples/step-70/step-70.cc

index dfb2189f2742b11ec5f24459c03e18d167bd978c..f5ca8c633fdbb73faa320e70fce43d99a111a44e 100644 (file)
@@ -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<spacedim>::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<spacedim>::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<spacedim>::register_store_callback_function,
-      &solid_particle_handler));
-
-    fluid_tria.signals.post_distributed_refinement.connect(std::bind(
-      &Particles::ParticleHandler<spacedim>::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;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.