Skip to content

Commit d6b4e90

Browse files
Jacobian -> PartialDerivative for time and parameters
1 parent 8a9ae97 commit d6b4e90

File tree

11 files changed

+20
-72
lines changed

11 files changed

+20
-72
lines changed

src/+otp/+lorenz63/Lorenz63Problem.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function onSettingsChanged(obj)
2626
otp.Rhs.FieldNames.Jacobian, @(t, y) otp.lorenz63.jac(t, y, sigma, rho, beta), ...
2727
otp.Rhs.FieldNames.JacobianVectorProduct, @(t, y, v) otp.lorenz63.jvp(t, y, v, sigma, rho, beta), ...
2828
otp.Rhs.FieldNames.JacobianAdjointVectorProduct, @(t, y, v) otp.lorenz63.javp(t, y, v, sigma, rho, beta), ...
29-
otp.Rhs.FieldNames.JacobianParameters, @(t, y) otp.lorenz63.jacparams(t, y, sigma, rho, beta), ...
29+
otp.Rhs.FieldNames.PartialDerivativeParameters, @(t, y) otp.lorenz63.pdparams(t, y, sigma, rho, beta), ...
3030
otp.Rhs.FieldNames.HessianVectorProduct, @(t, y, u, v) otp.lorenz63.hvp(t, y, u, v, sigma, rho, beta), ...
3131
otp.Rhs.FieldNames.HessianAdjointVectorProduct, @(t, y, u, v) otp.lorenz63.havp(t, y, u, v, sigma, rho, beta));
3232
end

src/+otp/+lorenz63/jacparams.m

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/+otp/+lorenz63/pdparams.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
function Jp = pdparams(~, y, ~, ~, ~)
2+
3+
% This will be the jacobian with respect to sigma, rho, and beta
4+
5+
Jp = diag([y(2) - y(1), y(1), -y(3)]);
6+
7+
end

src/+otp/+qg/QuasiGeostrophicProblem.m

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,6 @@ function onSettingsChanged(obj)
150150
...
151151
otp.Rhs.FieldNames.JacobianAdjointVectorProduct, @(t, psi, u) ...
152152
otp.qg.javp(psi, u, L, RdnL, PdnL, Ddx, Ddy, Re, Ro), ...
153-
...
154-
otp.Rhs.FieldNames.JacobianTime, @(t, psi) ...
155-
otp.qg.jact(psi, L, RdnL, PdnL, Ddx, Ddy, ymat, Re, Ro) ...
156153
);
157154

158155

src/+otp/+qg/jact.m

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/+otp/+quadratic/QuadraticProblem.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ function onSettingsChanged(obj)
1818

1919
obj.Rhs = otp.Rhs(@(t, x) otp.quadratic.f(t, x, a, B, C), ...
2020
otp.Rhs.FieldNames.Jacobian, @(t, x) otp.quadratic.jac(t, x, a, B, C), ...
21-
'JacobianParametera', @(t, x) otp.quadratic.jacpara(t, x, a, B, C), ...
22-
'JacobianParameterB', @(t, x) otp.quadratic.jacparaB(t, x, a, B, C), ...
23-
'JacobianParameterC', @(t, x) otp.quadratic.jacparC(t, x, a, B, C));
21+
'PartialDerivativea', @(t, x) otp.quadratic.pda(t, x, a, B, C), ...
22+
'PartialDerivativeB', @(t, x) otp.quadratic.pdb(t, x, a, B, C), ...
23+
'PartialDerivativeC', @(t, x) otp.quadratic.pdc(t, x, a, B, C));
2424

2525
obj.RhsClosure = otp.Rhs(@(t, x, Btilde) otp.quadratic.fclosureB(t, x, a, B, C, Btilde));
2626
end

src/+otp/+quadratic/jacpara.m

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/+otp/+quadratic/pda.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function ja = pda(~, ~, a, ~, ~)
2+
3+
ja = speye(length(a));
4+
5+
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function jB = jacparB(~, y, ~, B, ~)
1+
function jB = pdb(~, y, ~, B, ~)
22

33
r = size(B, 1);
44

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function jC = jacparC(~, y, ~, ~, C)
1+
function jC = pdc(~, y, ~, ~, C)
22

33
r = size(C, 1);
44

0 commit comments

Comments
 (0)