diff --git a/scripts/1D_maxwell_additive_source_lossy_layer.jl b/scripts/1D_maxwell_additive_source_lossy_layer.jl index ce1255b..6720a23 100644 --- a/scripts/1D_maxwell_additive_source_lossy_layer.jl +++ b/scripts/1D_maxwell_additive_source_lossy_layer.jl @@ -320,6 +320,6 @@ function FDTD_1D(nx_, nt_, nvis_; src="exp", do_visu=false, do_test=false) return Array(E_z) end -FDTD_1D(200, 450, 10; do_visu=true, src="exp") +#FDTD_1D(200, 450, 10; do_visu=true, src="exp") #FDTD_1D(200, 450, 10; do_visu=true, src="sin") #FDTD_1D(200, 450, 10; do_visu=false, do_test=true, src="exp") diff --git a/test/test1D.jl b/test/test1D.jl index d6cd97d..cd56dd2 100644 --- a/test/test1D.jl +++ b/test/test1D.jl @@ -50,7 +50,7 @@ Ez_ref = zeros(Float32, nx_ + 1) Ez_ref = load("../test/ref_Ez_1D_cpu.jld") array_value = Ez_ref["data"] -@testset "Reference Test: Ez_ref = Ez" begin +@testset "Reference Test: Ez_ref ≈ Ez" begin @test isapprox(Ez, array_value) end diff --git a/test/test2D.jl b/test/test2D.jl index 8b18f1b..c65f008 100644 --- a/test/test2D.jl +++ b/test/test2D.jl @@ -59,6 +59,6 @@ Hz_ref = zeros(Float32, nx_pml, ny_pml) Hz_ref = load("../test/ref_Hz_2D_cpu.jld") array_value = Hz_ref["data"] -@testset "Reference Test: Hz_ref = Hz" begin +@testset "Reference Test: Hz_ref ≈ Hz" begin @test isapprox(Hz, array_value) end \ No newline at end of file diff --git a/test/test3D.jl b/test/test3D.jl index 3d7c508..62d2fbe 100644 --- a/test/test3D.jl +++ b/test/test3D.jl @@ -68,6 +68,6 @@ Hz_ref = zeros(Float32, nx_pml, ny_pml, nz_pml - 1) Hz_ref = load("../test/ref_Hz_3D_cpu.jld") array_value = Hz_ref["data"] -@testset "Reference Test: Hz_ref = Hz" begin +@testset "Reference Test: Hz_ref ≈ Hz" begin @test isapprox(Hz, array_value) end \ No newline at end of file