]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Update tutorials to use cell->as_dof_handler_iterator() 14143/head
authorJean-Paul Pelteret <jppelteret@gmail.com>
Tue, 19 Jul 2022 21:33:59 +0000 (23:33 +0200)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Wed, 20 Jul 2022 06:48:11 +0000 (08:48 +0200)
examples/step-32/step-32.cc
examples/step-51/step-51.cc

index 309c0064ba210116c3d224298eed5a8b526ca16f..a66bda791a674c08ab6c2a991bcf9b7edd3f0bae 100644 (file)
@@ -2218,8 +2218,8 @@ namespace Step32
 
     scratch.stokes_fe_values.reinit(cell);
 
-    typename DoFHandler<dim>::active_cell_iterator temperature_cell(
-      &triangulation, cell->level(), cell->index(), &temperature_dof_handler);
+    const typename DoFHandler<dim>::active_cell_iterator temperature_cell =
+      cell->as_dof_handler_iterator(temperature_dof_handler);
     scratch.temperature_fe_values.reinit(temperature_cell);
 
     if (rebuild_stokes_matrix)
@@ -2485,8 +2485,8 @@ namespace Step32
 
     scratch.temperature_fe_values.reinit(cell);
 
-    typename DoFHandler<dim>::active_cell_iterator stokes_cell(
-      &triangulation, cell->level(), cell->index(), &stokes_dof_handler);
+    typename DoFHandler<dim>::active_cell_iterator stokes_cell =
+      cell->as_dof_handler_iterator(stokes_dof_handler);
     scratch.stokes_fe_values.reinit(stokes_cell);
 
     scratch.temperature_fe_values.get_function_values(
index 60ec5c89019cdbc85e3fe3aa6a42c6ad0b9a4599..648cdc13923f63d24557311ce514d790e992f312 100644 (file)
@@ -698,10 +698,8 @@ namespace Step51
     PerTaskData &                                         task_data)
   {
     // Construct iterator for dof_handler_local for FEValues reinit function.
-    typename DoFHandler<dim>::active_cell_iterator loc_cell(&triangulation,
-                                                            cell->level(),
-                                                            cell->index(),
-                                                            &dof_handler_local);
+    const typename DoFHandler<dim>::active_cell_iterator loc_cell =
+      cell->as_dof_handler_iterator(dof_handler_local);
 
     const unsigned int n_q_points =
       scratch.fe_values_local.get_quadrature().size();
@@ -1128,10 +1126,8 @@ namespace Step51
     PostProcessScratchData &                              scratch,
     unsigned int &)
   {
-    typename DoFHandler<dim>::active_cell_iterator loc_cell(&triangulation,
-                                                            cell->level(),
-                                                            cell->index(),
-                                                            &dof_handler_local);
+    const typename DoFHandler<dim>::active_cell_iterator loc_cell =
+      cell->as_dof_handler_iterator(dof_handler_local);
 
     scratch.fe_values_local.reinit(loc_cell);
     scratch.fe_values.reinit(cell);

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.