You can control this by overloading StaticArrays.similar_type
. In this case:
StaticArrays.similar_type(::Type{TypeOneFV}, ::Type{Float64}, s::Size{(2,)}) = TypeOneFV
results in
julia> z_fv = r * x_fv - y_fv / r
2-element TypeOneFV:
3.5
7.25
You can control this by overloading StaticArrays.similar_type
. In this case:
StaticArrays.similar_type(::Type{TypeOneFV}, ::Type{Float64}, s::Size{(2,)}) = TypeOneFV
results in
julia> z_fv = r * x_fv - y_fv / r
2-element TypeOneFV:
3.5
7.25