Skip to content

Commit 4862ff0

Browse files
authored
Fix boundary point in Laplace in a strip tests (#927)
1 parent 6a468e5 commit 4862ff0

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

examples/NonlinearBVP1.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ using LinearAlgebra
33

44
# Define the vector that collates the differential equation and
55
# the boundary conditions
6-
N(u, x = Fun()) = [u(-1.)-1., u(1.)+0.5, 0.001u'' + 6(1-x^2)u' + u^2 - 1];
6+
N1(u, x = Fun()) = [u(-1.)-1., u(1.)+0.5, 0.001u'' + 6(1-x^2)u' + u^2 - 1];
77

88
# Solve the equation using Newton iteration
99
function nbvpsolver()
1010
x = Fun()
1111
u0 = 0 * x # starting value
1212

13-
newton(N, u0)
13+
newton(N1, u0)
1414
end
1515

1616
u = nbvpsolver();
1717

1818
#src # We verify that the solution satisfies the differential equation and the boundary conditions
1919
using Test #src
20-
@test norm(N(u)) 1000eps() #src
20+
@test norm(N1(u)) 1000eps() #src

examples/NonlinearBVP2.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using ApproxFun
55
using LinearAlgebra
66

7-
N(u1, u2) = [u1'(0) - 0.5*u1(0)*u2(0);
7+
N2(u1, u2) = [u1'(0) - 0.5*u1(0)*u2(0);
88
u2'(0) + 1;
99
u1(1) - 1;
1010
u2(1) - 1;
@@ -15,6 +15,6 @@ function nbvpsolver2()
1515
x = Fun(0..1)
1616
u10 = one(x)
1717
u20 = one(x)
18-
newton(N, [u10,u20])
18+
newton(N2, [u10,u20])
1919
end
2020
u1,u2 = nbvpsolver2();

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ end
9393
b = rangespace(A)
9494

9595
@test Fun(component(v[1],1), component(b[1],1))(0.1,-1.0) v(0.1,-1.0)[1]
96-
@test Fun(component(v[1],2), component(b[1],2))(0.1,-1.0) v(0.1,-1.0)[1]
96+
@test Fun(component(v[1],2), component(b[1],2))(0.1,1.0) v(0.1,1.0)[1]
9797
@test ApproxFun.default_Fun(v[1] , b[1])(0.1,1.0) v(0.1,1.0)[1]
9898
end
9999

0 commit comments

Comments
 (0)