From: Marc Fehling Date: Tue, 20 Aug 2024 17:34:28 +0000 (-0600) Subject: Fix tutorials with SolutionTransfer. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9a5152cb03ae5f937107e13a6530f1c7c2bf54e;p=code-gallery.git Fix tutorials with SolutionTransfer. --- diff --git a/ElastoplasticTorsion/ElastoplasticTorsion.cc b/ElastoplasticTorsion/ElastoplasticTorsion.cc index 5647703..447ec3b 100644 --- a/ElastoplasticTorsion/ElastoplasticTorsion.cc +++ b/ElastoplasticTorsion/ElastoplasticTorsion.cc @@ -273,8 +273,8 @@ namespace nsp ComputeMultiplier::get_names() const { std::vector solution_names; - solution_names.push_back ("Gradient norm"); - solution_names.push_back ("Lagrange multiplier"); + solution_names.push_back ("Gradient_norm"); + solution_names.push_back ("Lagrange_multiplier"); return solution_names; } @@ -779,6 +779,7 @@ namespace nsp triangulation.execute_coarsening_and_refinement(); dof_handler.distribute_dofs(fe); # if DEAL_II_VERSION_GTE(9, 7, 0) + present_solution.reinit(dof_handler.n_dofs()); solution_transfer.interpolate(present_solution); # else Vector tmp(dof_handler.n_dofs()); diff --git a/TravelingWaves/TravelingWaveSolver.cc b/TravelingWaves/TravelingWaveSolver.cc index a682d91..99f757a 100644 --- a/TravelingWaves/TravelingWaveSolver.cc +++ b/TravelingWaves/TravelingWaveSolver.cc @@ -292,7 +292,7 @@ namespace TravelingWave ); }; - auto kappa_2 = [=](double T, double lambda){ + auto kappa_2 = [=](double T, double /*lambda*/){ return -problem.k * std::exp(-problem.theta / T) * Heaviside_func(T - problem.T_ign); }; @@ -637,6 +637,7 @@ namespace TravelingWave setup_system(/*initial_step=*/ false); # if DEAL_II_VERSION_GTE(9, 7, 0) + current_solution.reinit(dof_handler.n_dofs()); solution_transfer.interpolate(current_solution); # else Vector tmp(dof_handler.n_dofs()); diff --git a/goal_oriented_elastoplasticity/elastoplastic.cc b/goal_oriented_elastoplasticity/elastoplastic.cc index 32a50a2..6294013 100644 --- a/goal_oriented_elastoplasticity/elastoplastic.cc +++ b/goal_oriented_elastoplasticity/elastoplastic.cc @@ -5608,6 +5608,12 @@ namespace ElastoPlastic # if DEAL_II_VERSION_GTE(9, 7, 0) // stress + for (unsigned int i=0; i 1) { @@ -5619,6 +5625,12 @@ namespace ElastoPlastic } // strain + for (unsigned int i=0; i 1) {