Grid.jl icon indicating copy to clipboard operation
Grid.jl copied to clipboard

CoordInterpGrid does not work with InterpCubic in 2 dimensions

Open mathtd opened this issue 11 years ago • 1 comments

I used the example provided on the main page:

x = -1.0:0.1:1.0
y = 2.0:0.5:10.0
z_2d = Float64[sin(i+j) for i in x, j in y]

With these variables, InterpQuadratic works fine but if I try

z_2di = CoordInterpGrid((x,y), z_2d, BCnil, InterpCubic)

I get:

ERROR: DimensionMismatch("Coordinate lengths do not match grid size.")
 in CoordInterpGrid at /Users/mathieu/.julia/Grid/src/coord.jl:7
 in CoordInterpGrid at /Users/mathieu/.julia/Grid/src/coord.jl:13
 in CoordInterpGrid at /Users/mathieu/.julia/Grid/src/coord.jl:21

mathtd avatar Sep 17 '14 20:09 mathtd

We've seen something similar before (maybe #29?) and I thought we fixed it. It seems every time I try to fix one broken thing with InterpCubic, I break something else... =(

The problem is very likely to be somewhere around here - I unfortunately don't have time to take a deeper look at it at the moment, but if you're able to fix it a pull request is most welcome! =) Most likely, something similar to the specialization for BCfill, but specializing for InterpCubic with BCnil, is needed.

tomasaschan avatar Sep 18 '14 07:09 tomasaschan