Mercurial > repos > public > sbplib
annotate +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 |
rev | line source |
---|---|
20
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
1 function plotSolutions(filename, figename_prefix, plot_type) |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
2 default_arg('figename_prefix',[]); |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
3 default_arg('plot_type','plot') |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
4 |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
5 save_figures = isempty(figename_prefix); |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
6 |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
7 sf = SolutionFile(filename); |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
8 |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
9 for i = 1:length(sf.keys) |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
10 key = sf.keys{i}; |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
11 entry = sf.get(key); |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
12 |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
13 method = key.method; |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
14 order = key.order; |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
15 m = key.m; |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
16 T = key.T; |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
17 repr = entry.repr; |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
18 runtime = entry.runtime; |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
19 k = entry.k; |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
20 |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
21 discr = entry.discrHand(m,order); |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
22 |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
23 [update, hand] = discr.setupPlot(plot_type); |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
24 update(repr); |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
25 end |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
26 |
c7efff913935
Decoupled plotting and timesteppers. Added possibility of different plot_types. Added functions for printing and plotting solution file content.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
27 end |