diff +noname/animate.m @ 57:9a647dcccbdd

Added pausing option to noname.animate. Added characteristic bc to Euler1d.
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 12 Nov 2015 17:31:33 -0800
parents cca09cc5121d
children f87003695677
line wrap: on
line diff
--- a/+noname/animate.m	Thu Nov 12 12:03:45 2015 -0800
+++ b/+noname/animate.m	Thu Nov 12 17:31:33 2015 -0800
@@ -14,6 +14,13 @@
     default_arg('time_modifier',1);
     default_arg('time_method',[]);
 
+    if time_modifier < 0
+        do_pause = true;
+        time_modifier = -time_modifier;
+    else
+        do_pause = false;
+    end
+
 
     fprintf('Animating: %s\n',discretization.name);
     fprintf('Tend     : %.2f\n',Tend);
@@ -44,7 +51,11 @@
             save_frame();
         end
         % pause(0.1)
-        str = util.replace_string(str,'t = %.2f',ts.t);
+        str = util.replace_string(str,'t = %.5f',ts.t);
+
+        if do_pause
+            pause
+        end
 
     end
     sol = discretization.getTimeSnapshot(0);