]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Properly initalization of velocity vector 10100/head
authorAlexey Ozeritskiy <aozeritsky@gmail.com>
Fri, 8 May 2020 22:03:15 +0000 (01:03 +0300)
committerAlexey Ozeritskiy <aozeritsky@gmail.com>
Sat, 9 May 2020 22:11:10 +0000 (01:11 +0300)
examples/step-35/step-35.cc

index b48218bc5c93003f94aeb7b358031c348a347b47..4298f427abb5a7ee522de319c1a2ba53d8c37470 100644 (file)
@@ -796,12 +796,10 @@ namespace Step35
         vel_exact.set_time(t_0);
         vel_exact.set_component(d);
         VectorTools::interpolate(dof_handler_velocity,
-                                 Functions::ZeroFunction<dim>(),
+                                 vel_exact,
                                  u_n_minus_1[d]);
         vel_exact.advance_time(dt);
-        VectorTools::interpolate(dof_handler_velocity,
-                                 Functions::ZeroFunction<dim>(),
-                                 u_n[d]);
+        VectorTools::interpolate(dof_handler_velocity, vel_exact, u_n[d]);
       }
   }
 

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.