Adding an SMatrix

It is intended: adding an AbstractMatrix to a SMatrix results in a SMatrix. If you want to keep the type of Ke unchanged, you could use broadcasting:

using StaticArrays
Ke = zeros(3, 3)
Ke .+= SA[1 2 3; 4 3 2; 4 3 2]
Ke[1, 1] += 3
2 Likes