]> https://gitweb.dealii.org/ - code-gallery.git/commitdiff
Incompatibility: SolutionTransfer::interpolate
authorMarc Fehling <mafehling.git@gmail.com>
Mon, 19 Aug 2024 23:53:51 +0000 (17:53 -0600)
committerMarc Fehling <mafehling.git@gmail.com>
Mon, 19 Aug 2024 23:53:51 +0000 (17:53 -0600)
ElastoplasticTorsion/ElastoplasticTorsion.cc
TravelingWaves/TravelingWaveSolver.cc
goal_oriented_elastoplasticity/elastoplastic.cc

index 9879af5fee2e92872dabf56a9ab03043e4865570..56477034e38c4f0db9face0005acf250738a1b9a 100644 (file)
@@ -778,9 +778,13 @@ namespace nsp
     solution_transfer.prepare_for_coarsening_and_refinement(present_solution);
     triangulation.execute_coarsening_and_refinement();
     dof_handler.distribute_dofs(fe);
+#  if DEAL_II_VERSION_GTE(9, 7, 0)
+    solution_transfer.interpolate(present_solution);
+#  else
     Vector<double> tmp(dof_handler.n_dofs());
     solution_transfer.interpolate(present_solution, tmp);
     present_solution = tmp;
+#  endif
     set_boundary_values ();
     hanging_node_constraints.clear();
 
index cb1edfd39a54d74a2633bc59b9e0ab2e24cedd55..a682d91c67740061bd4eb22fb202b5a34bd31960 100644 (file)
@@ -636,9 +636,13 @@ namespace TravelingWave
 
     setup_system(/*initial_step=*/ false);
 
+#  if DEAL_II_VERSION_GTE(9, 7, 0)
+    solution_transfer.interpolate(current_solution);
+#  else
     Vector<double> tmp(dof_handler.n_dofs());
     solution_transfer.interpolate(current_solution, tmp);
     current_solution = std::move(tmp);
+#  endif
 
     set_boundary_and_centering_values();
 
index a8dda191fb1c88a0239b625e680a9af37f5fe159..32a50a2227f16b2bc657cbe0da7021eff03a0d60 100644 (file)
@@ -5605,6 +5605,30 @@ namespace ElastoPlastic
 
     // ---------------------------------------------------
     history_dof_handler.distribute_dofs (history_fe);
+
+#  if DEAL_II_VERSION_GTE(9, 7, 0)
+    // stress
+    history_stress_field_transfer0.interpolate(history_stress_field[0]);
+    if ( dim > 1)
+      {
+        history_stress_field_transfer1.interpolate(history_stress_field[1]);
+      }
+    if ( dim == 3)
+      {
+        history_stress_field_transfer2.interpolate(history_stress_field[2]);
+      }
+
+    // strain
+    history_strain_field_transfer0.interpolate(history_strain_field[0]);
+    if ( dim > 1)
+      {
+        history_strain_field_transfer1.interpolate(history_strain_field[1]);
+      }
+    if ( dim == 3)
+      {
+        history_strain_field_transfer2.interpolate(history_strain_field[2]);
+      }
+#  else
     // stress
     std::vector< std::vector< Vector<double> > >
     distributed_history_stress_field (dim, std::vector< Vector<double> >(dim));
@@ -5646,6 +5670,7 @@ namespace ElastoPlastic
       }
 
     history_strain_field = distributed_history_strain_field;
+#  endif
 
     // ---------------------------------------------------------------
     // Transfer the history data to the quadrature points of the new mesh

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.