Mercurial > repos > public > sbplib
comparison +noname/Discretization.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 | 16bad7c459da |
children | ed6a704b028d |
comparison
equal
deleted
inserted
replaced
19:1644d000c304 | 20:c7efff913935 |
---|---|
26 % method -- time stepping method for which to give a timestep. | 26 % method -- time stepping method for which to give a timestep. |
27 % cfl -- [optioanal] a cfl constant to use to calculate the timetep. | 27 % cfl -- [optioanal] a cfl constant to use to calculate the timetep. |
28 % if skipped getTimestep should use a precomputed value. | 28 % if skipped getTimestep should use a precomputed value. |
29 k = getTimestep(obj, method, cfl) | 29 k = getTimestep(obj, method, cfl) |
30 | 30 |
31 % getTimeSnapshot returns a struct which represents the solution in ts at current time. | |
32 % if ts is empty or 0 a representation of the initial conditions be returned. | |
33 repr = getTimeSnapshot(obj,ts) | |
34 | |
31 | 35 |
32 % Sets up movie recording to a given file. | 36 % Sets up movie recording to a given file. |
33 % saveFrame is a function_handle with no inputs that records the current state | 37 % saveFrame is a function_handle with no inputs that records the current state |
34 % as a frame in the moive. | 38 % as a frame in the moive. |
35 saveFrame = setupMov(obj, file) | 39 saveFrame = setupMov(obj, file) |
36 | 40 |
37 % Sets up a plot of the discretisation | 41 % Sets up a plot of the discretisation |
38 % update is a function_handle accepting a timestepper that updates the plot to the | 42 % update is a function_handle accepting a timestepper that updates the plot to the |
39 % state of the timestepper | 43 % state of the timestepper |
40 [update,hand] = setupPlot(obj) | 44 % type allows for different kinds of plots. Some special values are used by the lib. 'animate' and 'plot' for example |
45 [update,hand] = setupPlot(obj, type) | |
41 | 46 |
42 end | 47 end |
43 | 48 |
44 methods(Abstract,Static) | 49 methods(Abstract,Static) |
45 % Compare two functions u and v in the discrete l2 norm. | 50 % Compare two functions u and v in the discrete l2 norm. |