Skip to content

Commit f05b7e7

Browse files
committed
up Ascher docs, line width and unicode characters fixed
1 parent 3cfaec9 commit f05b7e7

File tree

5 files changed

+20
-26
lines changed

5 files changed

+20
-26
lines changed

toolbox/+otp/+ascherlineardae/+presets/Canonical.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
classdef Canonical < otp.ascherlineardae.AscherLinearDAEProblem
2-
% The problem defined by Uri Ascher in :cite:p:`Asc89` (sec. 2)
3-
% which uses timespan $t \in [0, 1]$ and intial condition $[y_0, z_0]^T = [1, \beta]^T $.
2+
% The problem defined by Uri Ascher in :cite:p:`Asc89` (sec. 2) which uses time span $t \in [0, 1]$ and intial
3+
% condition $[y_0, z_0]^T = [1, β]^T$.
44
%
55
methods
66
function obj = Canonical(varargin)
@@ -11,7 +11,7 @@
1111
% varargin
1212
% A variable number of name-value pairs. The accepted names are
1313
%
14-
% - ``Beta`` – The parameter of the Ascher linear DAE problem.
14+
% - ``Beta`` – Value of $β$.
1515

1616
p = inputParser;
1717
p.addParameter('beta', 1);

toolbox/+otp/+ascherlineardae/+presets/Petzold.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
classdef Petzold < otp.ascherlineardae.AscherLinearDAEProblem
2-
% The Petzold DAE example :cite:p:`Pet86` as a special case of the
3-
% Ascher linear DAE problem.
4-
% This preset uses timespan $t \in [0, 1]$ and $\beta = 0 $ with the initial condition $[y_0, z_0]^T = [1, 0]^T $.
2+
% The Petzold DAE example :cite:p:`Pet86` as a special case of the Ascher linear DAE problem. This preset uses time
3+
% span $t \in [0, 1]$ and $β = 0 $ with the initial condition $[y_0, z_0]^T = [1, 0]^T $.
54
%
65
methods
76
function obj = Petzold

toolbox/+otp/+ascherlineardae/+presets/Stiff.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
classdef Stiff < otp.ascherlineardae.AscherLinearDAEProblem
2-
% The Stiff example from :cite:p:`Asc89`. A variant of the
3-
% Ascher linear DAE problem
4-
% which uses timespan $t \in [0, 1]$ and $\beta = 100 $ with the initial condition $[y_0, z_0]^T = [1, 100]^T $.
2+
% The Stiff example from :cite:p:`Asc89`. A variant of the Ascher linear DAE problem which uses time span
3+
% $t \in [0, 1]$ and $β = 100$ with the initial condition $[y_0, z_0]^T = [1, 100]^T$.
54
%
65
methods
76
function obj = Stiff
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
classdef AscherLinearDAEParameters
22
% Parameters for Ascher Linear DAE problem
33
properties
4-
% Beta is a scalar parameter in the linear model. It affects the stifness
5-
% of the problem.
4+
% A scalar parameter $β$ in the linear model. It affects the stifness of the problem.
65
Beta %MATLAB ONLY: (1,1) {mustBeNumeric} = 1
76
end
87
end

toolbox/+otp/+ascherlineardae/AscherLinearDAEProblem.m

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,31 @@
11
classdef AscherLinearDAEProblem < otp.Problem
22
% A linear differential-algebraic problem with time-dependant mass matrix.
33
%
4-
% The Ascher linear DAE Problem :cite:p:`Asc89` is an index-1 differential-agebraic
5-
% equation given by
4+
% The Ascher linear DAE Problem :cite:p:`Asc89` is an index-1 differential-agebraic equation given by
65
%
76
% $$
87
% \begin{bmatrix}
98
% 1 & -t \\
109
% 0 & 0
1110
% \end{bmatrix} \begin{bmatrix} y'(t) \\ z'(t) \end{bmatrix} = \left[ \begin{array}{cc}
1211
% -1 & 1+t \\
13-
% \beta & -1-\beta t
12+
% β & -1-β t
1413
% \end{array}\right] \begin{bmatrix} y(t) \\ z(t) \end{bmatrix} + \begin{bmatrix}
1514
% 0 \\
16-
% \sin t
15+
% \sin(t)
1716
% \end{bmatrix}.
1817
% $$
1918
%
20-
% When the initial condition $y(0) = 1 , z(0) = \beta$ is used, the problem has the following closed-form solution:
19+
% When the initial condition $y(0) = 1 , z(0) = β$ is used, the problem has the following closed-form solution:
2120
%
2221
% $$
2322
% \begin{bmatrix} y(t)\\ z(t) \end{bmatrix} = \begin{bmatrix}
24-
% t \sin(t) + (1 + \beta t) e^{-t}\\
25-
% \beta e^{-t} + \sin(t)
23+
% t \sin(t) + (1 + β t) e^{-t}\\
24+
% β e^{-t} + \sin(t)
2625
% \end{bmatrix}.
2726
% $$
28-
% This DAE problem
29-
% can be used to investigate
30-
% the convergence of implcit time-stepping methods due to its stiffness and time-dependant mass
31-
% matrix.
27+
% This DAE problem can be used to investigate the convergence of implcit time-stepping methods due to its stiffness
28+
% and time-dependant mass matrix.
3229
%
3330
% Notes
3431
% -----
@@ -37,13 +34,13 @@
3734
% +---------------------+-----------------------------------------+
3835
% | Number of Variables | 2 |
3936
% +---------------------+-----------------------------------------+
40-
% | Stiff | possibly, depending on $\beta$ |
37+
% | Stiff | possibly, depending on $β$ |
4138
% +---------------------+-----------------------------------------+
4239
%
4340
% Example
4441
% -------
4542
% >>> problem = otp.ascherlineardae.presets.Canonical('Beta', 50);
46-
% >>> t = linspace(0,1);
43+
% >>> t = linspace(0, 1);
4744
% >>> sol = problem.solveExactly(t);
4845
% >>> problem.plot(t, sol);
4946

@@ -76,9 +73,9 @@ function onSettingsChanged(obj)
7673

7774
function label = internalIndex2label(~, index)
7875
if index == 1
79-
label = 'Differential Variable';
76+
label = 'Differential';
8077
else
81-
label = 'Algebraic Variable';
78+
label = 'Algebraic';
8279
end
8380
end
8481

0 commit comments

Comments
 (0)