jipolanco / BSplineKit.jl

A collection of B-spline tools in Julia
https://jipolanco.github.io/BSplineKit.jl/dev/
MIT License
50 stars 9 forks source link

REPL crash with collocation on out-of-bounds points #56

Closed asparc closed 1 year ago

asparc commented 1 year ago

Hi,

Unfortunately, I'm experiencing another issue with the library, particularly with the collocation_matrix function. I'm posting here two different cases that make my Julia REPL crash entirely:

B = BSplineBasis(4, [0.,1.])
pts = [-0.0,0.1]
collocation_matrix(B, pts, Derivative(0), Matrix{Float64})

and

B = BSplineBasis(4, [0.,1.])
pts = [-0.3,-0.2]
collocation_matrix(B, pts, Derivative(1), Matrix{Float64})

My first impression is that the issue has to do with the (negative) out of bounds evaluation points.

jipolanco commented 1 year ago

Thanks, this was caused by trying to assemble the collocation matrix while using @inbounds. Should be fixed by #57.