Mercurial > repos > public > sbplib
annotate +noname/Discretization.m @ 2:bce9e28c1e26
Added a cfl paramater to getTimestepper in Discretization. Added function to get cfl value for a Discr.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 18 Sep 2015 12:50:52 +0200 |
parents | 48b6fb693025 |
children | 16bad7c459da |
rev | line source |
---|---|
0 | 1 classdef Discretization < handle |
2 properties (Abstract) | |
3 name %Short description | |
4 description %Longer description | |
5 order %Order of accuracy | |
6 end | |
7 | |
8 methods (Abstract) | |
9 % Prints some info about the discretisation | |
10 printInfo() | |
11 | |
12 % Return the number of DOF | |
13 n = size(obj) | |
14 | |
15 % Returns a timestepper for integrating the discretisation in time | |
16 % method is a string that states which timestepping method should be used. | |
17 % The implementation should switch on the string and deliver | |
18 % the appropriate timestepper. It should also provide a default value. | |
19 % time_align is a time that the timesteps should align with so that for some | |
20 % integer number of timesteps we end up exactly on time_align | |
2
bce9e28c1e26
Added a cfl paramater to getTimestepper in Discretization. Added function to get cfl value for a Discr.
Jonatan Werpers <jonatan@werpers.com>
parents:
0
diff
changeset
|
21 ts = getTimestepper(obj,method,time_align,cfl) %% ??? |
0 | 22 |
23 % Sets up movie recording to a given file. | |
24 % saveFrame is a function_handle with no inputs that records the current state | |
25 % as a frame in the moive. | |
26 saveFrame = setupMov(obj, file) | |
27 | |
28 % Sets up a plot of the discretisation | |
29 % update is a function_handle accepting a timestepper that updates the plot to the | |
30 % state of the timestepper | |
31 [update,hand] = setupPlot(obj) | |
32 | |
33 end | |
34 | |
35 methods(Abstract,Static) | |
36 % Compare two functions u and v in the discrete l2 norm. | |
37 e = compareSolutions(u, v) | |
38 | |
39 % Compare the functions u to the analytical function g in the discrete l2 norm. | |
40 e = compareSolutionsAnalytical(u, g) | |
41 end | |
42 end |