Mercurial > repos > public > sbplib
annotate +draw/labelPoint.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 | 48b6fb693025 |
children |
rev | line source |
---|---|
0 | 1 % Takes a variable number of points as inputs and plots them with a label to the current figure. |
2 % label_pt(p) | |
3 function label_pt(varargin) | |
4 for i = 1:length(varargin) | |
5 try | |
6 placelabel(varargin{i},inputname(i)); | |
7 catch e | |
8 error('Could not place label for input %d, ''%s''. Not a valid point',i,inputname(i)) | |
9 end | |
10 end | |
11 end | |
12 | |
13 function placelabel(pt,str) | |
14 x = pt(1); | |
15 y = pt(2); | |
16 h = line(x,y); | |
17 h.Marker = '.'; | |
18 h = text(x,y,str); | |
19 h.HorizontalAlignment = 'center'; | |
20 h.VerticalAlignment = 'bottom'; | |
21 end |