diff +noname/plotSolutions.m @ 20:c7efff913935

Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 22 Sep 2015 17:35:58 +0200
parents
children b1e04c1f2b45
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/+noname/plotSolutions.m	Tue Sep 22 17:35:58 2015 +0200
@@ -0,0 +1,27 @@
+function plotSolutions(filename, figename_prefix, plot_type)
+    default_arg('figename_prefix',[]);
+    default_arg('plot_type','plot')
+
+    save_figures = isempty(figename_prefix);
+
+    sf = SolutionFile(filename);
+
+    for i = 1:length(sf.keys)
+        key = sf.keys{i};
+        entry = sf.get(key);
+
+        method  = key.method;
+        order   = key.order;
+        m       = key.m;
+        T       = key.T;
+        repr       = entry.repr;
+        runtime = entry.runtime;
+        k       = entry.k;
+
+        discr = entry.discrHand(m,order);
+
+        [update, hand] = discr.setupPlot(plot_type);
+        update(repr);
+    end
+
+end
\ No newline at end of file