Mercurial > repos > public > sbplib
view +noname/plotSolutions.m @ 1012:1e437c9e5132 feature/advectionRV
Create residual viscosity package +rv and generalize the ResidualViscosity class
- Generalize residual viscosity, by passing user-defined flux and calculating the time derivative outside of the update.
- Create separate RungekuttaRV specifically using interior RV updates
- Separate the artifical dissipation operator from the scheme AdvectionRV1D so that the same scheme can be reused for creating the diff op used by the ResidualViscosity class
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Wed, 05 Dec 2018 13:44:10 +0100 |
parents | 7bb2ef637142 |
children |
line wrap: on
line source
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); name = key.name; order = key.order; m = key.m; T = key.T; repr = entry.repr; runtime = entry.runtime; k = entry.k; discr = entry.discr; [update, hand] = discr.setupPlot(plot_type); update(repr); if save_figures figname = sprintf('%s_%s_o%d_m%d_T%d',figename_prefix,name,order,m,i); fprintf('Saving figure to ''%s''\n',figname); saveeps(hand,figname); end end end