Closed BeastyBlacksmith closed 5 years ago
Your question is not clear for me. Did you try to pass a StaticArryas as an 'axis' parameter? Did you try to use a single variable problem?
Note, that this method is basically designed for multi-variable problem, so variable axes must be provided in a Vector. Even if a single-variable problem is used, then that single axis should be passed in a vector form.
Try to use this form:
a = SVector{7}([-3,-2,-1,0,1, 2, 3])
mymdbm=MDBM_Problem((x)->x^2-2,[a])
solve!(mymdbm,5)
println(getinterpolatedsolution(mymdbm))
my code was more like
a = Axis([-3,-2,-1,0,1, 2, 3])
b = Axis([-3,-2,-1,0,1, 2, 3])
ax = @SVector [a,b]
mymdbm=MDBM_Problem((x...)->x.^2.-2,ax)
solve!(mymdbm,5)
println(getinterpolatedsolution(mymdbm))
Thank your for the comment! I did not considered this type of calling.
You are right, Vector
is updated to AbstractVector
and it solved the problem.
See the commit
However, this type of calling will not effect any performance, because the axes is used in a different format (struct), so there is no need to use this form
ax = @SVector [a,b]
it is sufficient to use:
ax = [a,b]
What is the reason that you can't allow
AbstractArays
here?I naively expected it to work with
StaticArrays
.