Skip to content

Commit 3301f30

Browse files
Switch naming convention of funcitons to camel case
1 parent 228facf commit 3301f30

File tree

82 files changed

+156
-155
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+156
-155
lines changed

docs/CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions

src/+otp/+allencahn/AllenCahnProblem.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function onSettingsChanged(obj)
1818
L = otp.utils.pde.laplacian([n n], domain, [1, 1], 'NN');
1919

2020
if ~isa(forcing, 'function_handle')
21-
f = @(t, y) otp.allencahn.fconstforce(t, y, L, alpha, beta, forcing);
21+
f = @(t, y) otp.allencahn.fConstForce(t, y, L, alpha, beta, forcing);
2222
else
2323
[x, y] = meshgrid(linspace(0, 1, n), linspace(0, 1, n));
2424
x = x(:);

src/+otp/+allencahn/fConstForce.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function du = fConstForce(~, u, L, alpha, beta, forcing)
2+
3+
du = alpha*L*u + beta * (u - u.^3) + forcing;
4+
5+
end

src/+otp/+allencahn/fconstforce.m

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

src/+otp/+bouncingball/BouncingBallParameters.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
%BOUNCINGBALLPARAMETERS
33
properties
44
%Gravity defines the magnitude of acceleration towards the ground
5-
Gravity (1,1) {mustBeNonnegative}
5+
Gravity %MATLAB ONLY: (1,1) {mustBeNonnegative}
66
%Ground is a function defining the ground in terms of space
7-
Ground {mustBeA(Ground, 'function_handle')} = @(x) 0
7+
Ground %MATLAB ONLY: {mustBeA(Ground, 'function_handle')} = @(x) 0
88
%GroundSlope is the slope (derivative) of the ground
9-
GroundSlope {mustBeA(GroundSlope, 'function_handle')} = @(x) 0
9+
GroundSlope %MATLAB ONLY: {mustBeA(GroundSlope, 'function_handle')} = @(x) 0
1010
end
1111
end
1212

src/+otp/+bouncingball/BouncingBallProblem.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function onSettingsChanged(obj)
1414
obj.RHS = otp.RHS(@(t, y) otp.bouncingball.f(t, y, g, ground, groundSlope), ...
1515
'Jacobian', otp.bouncingball.jacobian(g, ground, groundSlope), ...
1616
'Events', @(t, y) otp.bouncingball.events(t, y, g, ground, groundSlope), ...
17-
'OnEvent', @otp.bouncingball.onevent);
17+
'OnEvent', @otp.bouncingball.onEvent);
1818
end
1919

2020
function label = internalIndex2label(~, index)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function [isterminal, newProblem] = onevent(sol, problem)
1+
function [isterminal, newProblem] = onEvent(sol, problem)
22

33
% The general idea behind the transformation that we will do here is
44
% as follows: We transform the ball hitting the surface into a

src/+otp/+brusselator/BrusselatorProblem.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ function onSettingsChanged(obj)
3838

3939
obj.RHS = otp.RHS(@(t, y) otp.brusselator.f(t, y, a, b), ...
4040
'Jacobian', @(t, y) otp.brusselator.jacobian(t, y, a, b), ...
41-
'JacobianVectorProduct', @(t, y, x) otp.brusselator.jacobianvectorproduct(t, y, x, a, b), ...
42-
'JacobianAdjointVectorProduct', @(t, y, x) otp.brusselator.jacobianadjointvectorproduct(t, y, x, a, b), ...
41+
'JacobianVectorProduct', @(t, y, x) otp.brusselator.jacobianVectorProduct(t, y, x, a, b), ...
42+
'JacobianAdjointVectorProduct', @(t, y, x) otp.brusselator.jacobianAdjointVectorProduct(t, y, x, a, b), ...
4343
'Vectorized', 'on');
4444

45-
obj.RHSLinear = otp.RHS(@(t, y) otp.brusselator.flinear(t, y, a, b), ...
46-
'Jacobian', otp.brusselator.jacobianlinear(a, b), ...
45+
obj.RHSLinear = otp.RHS(@(t, y) otp.brusselator.fLinear(t, y, a, b), ...
46+
'Jacobian', otp.brusselator.jacobianLinear(a, b), ...
4747
'Vectorized', 'on');
4848

49-
obj.RHSNonlinear = otp.RHS(@(t, y) otp.brusselator.fnonlinear(t, y, a, b), ...
50-
'Jacobian', @(t, y) otp.brusselator.jacobiannonlinear(t, y, a, b), ...
49+
obj.RHSNonlinear = otp.RHS(@(t, y) otp.brusselator.fNonlinear(t, y, a, b), ...
50+
'Jacobian', @(t, y) otp.brusselator.jacobianNonlinear(t, y, a, b), ...
5151
'Vectorized', 'on');
5252
end
5353

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

33
dy = [
44
-(1 + b) * y(1, :);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function dy = fnonlinear(~, y, a, ~)
1+
function dy = fNonlinear(~, y, a, ~)
22

33
nonlinearTerm = a * y(1, :).^2 * y(2, :);
44

0 commit comments

Comments
 (0)