Mercurial > repos > public > sbplib_julia
changeset 612:1db945cba3a2 feature/volume_and_boundary_operators
Remove extra argument to volume_operator in SecondDerivative()
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sat, 05 Dec 2020 20:46:49 +0100 |
parents | e71f2f81b5f8 |
children | d9324671b412 |
files | src/SbpOperators/laplace/secondderivative.jl test/testSbpOperators.jl |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/SbpOperators/laplace/secondderivative.jl Sat Dec 05 19:14:39 2020 +0100 +++ b/src/SbpOperators/laplace/secondderivative.jl Sat Dec 05 20:46:49 2020 +0100 @@ -1,6 +1,6 @@ function SecondDerivative(grid::EquidistantGrid{Dim}, inner_stencil, closure_stencils, direction) where Dim h_inv = inverse_spacing(grid)[direction] - return volume_operator(grid, scale(inner_stencil,h_inv^2), scale.(closure_stencils,h_inv^2), size(grid), even, direction) + return volume_operator(grid, scale(inner_stencil,h_inv^2), scale.(closure_stencils,h_inv^2), even, direction) end SecondDerivative(grid::EquidistantGrid{1}, inner_stencil, closure_stencils) = SecondDerivative(grid,inner_stencil,closure_stencils,1) export SecondDerivative
--- a/test/testSbpOperators.jl Sat Dec 05 19:14:39 2020 +0100 +++ b/test/testSbpOperators.jl Sat Dec 05 20:46:49 2020 +0100 @@ -107,10 +107,10 @@ # implies that L*v should be exact for v - monomial up to order 3. # Exact differentiation is measured point-wise. For other grid functions # the error is measured in the H-norm. - @test norm(L*v0) ≈ 0 atol=5e-10 - @test norm(L*v1) ≈ 0 atol=5e-10 + @test norm(L*v0) ≈ 0 atol=1e-9 + @test norm(L*v1) ≈ 0 atol=1e-9 @test L*v2 ≈ v0 # Seems to be more accurate - @test L*v3 ≈ v1 atol=5e-10 + @test L*v3 ≈ v1 atol=1e-9 h = spacing(g) l2(v) = sqrt(prod(h)*sum(v.^2))