Mercurial > repos > public > sbplib
comparison +noname/Discretization.m @ 80:14bf01b7a068
Changed noname.animate and noname.Discretization to use a opt struct for timestepper options.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 25 Nov 2015 18:33:49 +0100 |
parents | 7067bf8adbfa |
children | ceba6be0389f |
comparison
equal
deleted
inserted
replaced
79:4cd77c7bdcaf | 80:14bf01b7a068 |
---|---|
21 % cfl is a choses cfl constant used to set the timestep. ignored if k is set. | 21 % cfl is a choses cfl constant used to set the timestep. ignored if k is set. |
22 ts = getTimestepper(obj, method, k, cfl) | 22 ts = getTimestepper(obj, method, k, cfl) |
23 | 23 |
24 % Calculates a timestep for the discretization and a given timestepping method. | 24 % Calculates a timestep for the discretization and a given timestepping method. |
25 % Can take order, differnt types of scaling in h, or other parameters in Discr into | 25 % Can take order, differnt types of scaling in h, or other parameters in Discr into |
26 % account. | 26 % account. opt is a struct that among other things may contain |
27 % method -- time stepping method for which to give a timestep. | 27 % method -- time stepping method for which to give a timestep. |
28 % cfl -- [optioanal] a cfl constant to use to calculate the timetep. | 28 % cfl -- [optioanal] a cfl constant to use to calculate the timetep. |
29 % if skipped getTimestep should use a precomputed value. | 29 % if skipped getTimestep should use a precomputed value. |
30 k = getTimestep(obj, method, cfl) | 30 % k -- timestep to use |
31 k = getTimestep(obj, opt) | |
31 | 32 |
32 % getTimeSnapshot returns a struct which represents the solution in ts at current time. | 33 % getTimeSnapshot returns a struct which represents the solution in ts at current time. |
33 % if ts is empty or 0 a representation of the initial conditions be returned. | 34 % if ts is empty or 0 a representation of the initial conditions be returned. |
34 repr = getTimeSnapshot(obj, ts) | 35 repr = getTimeSnapshot(obj, ts) |
35 | 36 |