Skip to content

Commit

Permalink
add basic test for interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebeggs committed May 13, 2023
1 parent 0084895 commit 38c59c8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/operators/interpolation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ function franke(x)
return a + b + c - d
end

N = 100
N = 1000
x = map(x -> SVector{2}(rand(MersenneTwister(x), 2)), 1:N)
y = franke.(x)

interp = RadialBasisInterp(x, y, PHS(3; poly_deg=2))
@test interp isa RadialBasisInterp

xnew = SVector(0.5, 0.5)
@test abs(interp(xnew) - franke(xnew)) < 1e-5

0 comments on commit 38c59c8

Please sign in to comment.