julia> using SummationByPartsOperators
julia> Dp = periodic_derivative_operator(1, 2, 0//1, 5//1, 6, 0)
Periodic 1st derivative operator of order 2 {T=Rational{Int64}, Parallel=Val{:serial}}
on a grid in [0//1, 5//1] using 6 nodes,
stencils with 0 nodes to the left, 2 nodes to the right, and coefficients from
Fornberg (1998)
Calculation of Weights in Finite Difference Formulas.
SIAM Rev. 40.3, pp. 685-691.
julia> Dp * grid(Dp)
ERROR: BoundsError: attempt to access ()
at index [0]
Stacktrace:
[1] getindex(::Tuple, ::Int64) at ./tuple.jl:24
[2] getindex at StaticArrays/1g9bq/src/SVector.jl:37 [inlined]
[3] macro expansion at SummationByPartsOperators/src/periodic_operators.jl:152 [inlined]
[4] convolve_periodic_boundary_coefficients!(::Array{Rational{Int64},1}, ::StaticArrays.SArray{Tuple{0},Rational{Int64},1,0}, ::Rational{Int64}, ::StaticArrays.SArray{Tuple{2},Rational{Int64},1,2}, ::LinRange{Rational{Int64}}, ::Rational{Int64}) at SummationByPartsOperators/src/periodic_operators.jl:116
[5] mul!(::Array{Rational{Int64},1}, ::SummationByPartsOperators.PeriodicDerivativeCoefficients{Rational{Int64},0,2,Val{:serial},Fornberg1998}, ::LinRange{Rational{Int64}}, ::Rational{Int64}) at SummationByPartsOperators/src/periodic_operators.jl:61
[6] mul! at SummationByPartsOperators/src/periodic_operators.jl:646 [inlined]
[7] mul! at SummationByPartsOperators/src/general_operators.jl:31 [inlined]
[8] *(::PeriodicDerivativeOperator{Rational{Int64},0,2,Val{:serial},Fornberg1998,LinRange{Rational{Int64}}}, ::LinRange{Rational{Int64}}) at SummationByPartsOperators/src/general_operators.jl:40
[9] top-level scope at REPL[34]:1