Skip to content
This repository was archived by the owner on Jul 19, 2023. It is now read-only.

Commit d477f23

Browse files
author
AndiMD
committed
Add tests for Neuman/Dirichlet w. Complex numbers
1 parent 6106632 commit d477f23

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/robin.jl

+15
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,19 @@ for j in 1:2
198198
end
199199
end
200200

201+
# Test Neumann and Dirichlet as special cases of RobinBC
202+
dx = [0.121, 0.783, 0.317, 0.518, 0.178]
203+
αC = (0.539 + 0.653im, 0.842 + 0.47im)
204+
αR = (0.045, 0.577)
205+
@test NeumannBC(αC, dx).b_l -0.065219 - 0.079013im
206+
@test DirichletBC(αR...).b_r 0.577
207+
@test DirichletBC(Float64, αC...) 0.123 # broken
208+
209+
@test Dirichlet0BC(Float64).a_r [-0.0,0.0]
210+
@test Neumann0BC(dx).a_r [0.3436293436293436]
211+
@test Neumann0BC(ComplexF64,dx).a_l [0.15453384418901658 + 0.0im]
212+
213+
@test NeumannBC(αC, first(dx)).b_r 0.101882 + 0.05687im
214+
@test Neumann0BC(first(dx)).a_r [1.0 - 0.0im]
215+
@test Neumann0BC(ComplexF64,first(dx)).a_l [1.0 + 0.0im]
201216

0 commit comments

Comments
 (0)