You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a boundscheck in scale_by_mass_matrix!, but it does not trigger an error if it fails:
julia> N =1010
julia> D =derivative_operator(MattssonNordström2004(), 1, 4, -1, 1, N)
SBP first-derivative operator of order 4 on a grid in [-1.0, 1.0] using10 nodes
and coefficients of Mattsson, Nordström (2004)
Summation by parts operators for finite difference approximations of second
derivatives.
Journal of Computational Physics 199, pp. 503-540.
julia> x =ones(N -1)
julia>scale_by_mass_matrix!(x, D)
9-element Vector{Float64}:0.07870370370370370.273148148148148140.199074074074074070.226851851851851830.22222222222222220.226851851851851830.199074074074074070.273148148148148140.0787037037037037
julia>using LinearAlgebra
julia>diag(mass_matrix(D))
10-element Vector{Float64}:0.07870370370370370.273148148148148140.199074074074074070.226851851851851830.22222222222222220.22222222222222220.226851851851851830.199074074074074070.273148148148148140.0787037037037037
This means, in this case, one of the central scaled nodes is simply omitted in the updated vector, which can lead to erroneous behavior.
The text was updated successfully, but these errors were encountered:
There is a boundscheck in
scale_by_mass_matrix!
, but it does not trigger an error if it fails:This means, in this case, one of the central scaled nodes is simply omitted in the updated vector, which can lead to erroneous behavior.
The text was updated successfully, but these errors were encountered: