Skip to content

Commit 04a84ee

Browse files
State independent Jacobians are not matrices instead of function handles
1 parent 55f1d0c commit 04a84ee

File tree

11 files changed

+11
-11
lines changed

11 files changed

+11
-11
lines changed

src/+otp/+bouncingball/BouncingBallProblem.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function onSettingsChanged(obj)
1212
slope = obj.Parameters.groundSlope;
1313

1414
obj.Rhs = otp.Rhs(@(t, y) otp.bouncingball.f(t, y, g, ground, slope), ...
15-
otp.Rhs.FieldNames.Jacobian, @(t, y) otp.bouncingball.jac(t, y, g, ground, slope), ...
15+
otp.Rhs.FieldNames.Jacobian, otp.bouncingball.jac(g, ground, slope), ...
1616
otp.Rhs.FieldNames.Events, @(t, y) otp.bouncingball.events(t, y, g, ground, slope), ...
1717
otp.Rhs.FieldNames.OnEvent, @otp.bouncingball.onevent);
1818
end

src/+otp/+bouncingball/jac.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function J = jac(~, ~, ~, ~, ~)
1+
function J = jac(~, ~, ~)
22

33
J = [0, 0, 1, 0; 0, 0, 0, 1; 0, 0, 0, 0; 0, 0, 0, 0];
44

src/+otp/+brusselator/BrusselatorProblem.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function onSettingsChanged(obj)
4242
otp.Rhs.FieldNames.JacobianAdjointVectorProduct, @(t, y, x) otp.brusselator.javp(t, y, x, a, b));
4343

4444
obj.RhsLinear = otp.Rhs(@(t, y) otp.brusselator.flinear(t, y, a, b), ...
45-
otp.Rhs.FieldNames.Jacobian, @(t, y) otp.brusselator.jaclinear(t, y, a, b));
45+
otp.Rhs.FieldNames.Jacobian, otp.brusselator.jaclinear(a, b));
4646

4747
obj.RhsNonlinear = otp.Rhs(@(t, y) otp.brusselator.fnonlinear(t, y, a, b), ...
4848
otp.Rhs.FieldNames.Jacobian, @(t, y) otp.brusselator.jacnonlinear(t, y, a, b));

src/+otp/+brusselator/jaclinear.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function jac = jaclinear(~, ~, ~, b)
1+
function jac = jaclinear(~, b)
22

33
jac = [-1 - b, 0; b, 0];
44

src/+otp/+cusp/CUSPProblem.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function onSettingsChanged(obj)
3838
otp.Rhs.FieldNames.Jacobian, @(t, y) otp.cusp.jacnonstiff(t, y, epsilon, L));
3939

4040
obj.RhsDiffusion = otp.Rhs(@(t, y) otp.cusp.fdiffusion(t, y, epsilon, L), ...
41-
otp.Rhs.FieldNames.Jacobian, @(t, y) otp.cusp.jacdiffusion(t, y, epsilon, L));
41+
otp.Rhs.FieldNames.Jacobian, otp.cusp.jacdiffusion(epsilon, L));
4242

4343
obj.RhsReaction = otp.Rhs(@(t, y) otp.cusp.freaction(t, y, epsilon, L), ...
4444
otp.Rhs.FieldNames.Jacobian, @(t, y) otp.cusp.jacreaction(t, y, epsilon, L));

src/+otp/+cusp/jacdiffusion.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function j = jacdiffusion(~, ~, ~, L)
1+
function j = jacdiffusion(~, L)
22

33
j = blkdiag(L, L, L);
44

src/+otp/+linear/LinearProblem.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
function rhs = createRhs(~, A)
2929
rhs = otp.Rhs(@(~, y) A * y, ...
30-
otp.Rhs.FieldNames.Jacobian, @(~, ~) A, ...
30+
otp.Rhs.FieldNames.Jacobian, A, ...
3131
otp.Rhs.FieldNames.JacobianVectorProduct, @(~, ~, v) A * v, ...
3232
otp.Rhs.FieldNames.JacobianAdjointVectorProduct, @(~, ~, v) A' * v);
3333
end

src/+otp/+protherorobinson/ProtheroRobinsonProblem.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function onSettingsChanged(obj)
1212
dphi = obj.Parameters.dphi;
1313

1414
obj.Rhs = otp.Rhs(@(t, y) otp.protherorobinson.f(t, y, lambda, phi, dphi), ...
15-
otp.Rhs.FieldNames.Jacobian, @(t, y) otp.protherorobinson.jac(t, y, lambda, phi, dphi));
15+
otp.Rhs.FieldNames.Jacobian, otp.protherorobinson.jac(lambda, phi, dphi));
1616
end
1717

1818
function validateNewState(obj, newTimeSpan, newY0, newParameters)

src/+otp/+protherorobinson/jac.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function j = jac(~, ~, lambda, ~, ~)
1+
function j = jac(lambda, ~, ~)
22

33
j = lambda;
44

src/+otp/+vanderpol/VanderpolProblem.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function onSettingsChanged(obj)
2121
otp.Rhs.FieldNames.Jacobian, @(t, y) otp.vanderpol.jacstiff(t, y, epsilon));
2222

2323
obj.RhsNonstiff = otp.Rhs(@(t, y) otp.vanderpol.fnonstiff(t, y, epsilon), ...
24-
otp.Rhs.FieldNames.Jacobian, @(t, y) otp.vanderpol.jacnonstiff(t, y, epsilon));
24+
otp.Rhs.FieldNames.Jacobian, otp.vanderpol.jacnonstiff(epsilon));
2525
end
2626

2727
function validateNewState(obj, newTimeSpan, newY0, newParameters)

0 commit comments

Comments
 (0)