This repository was archived by the owner on Jul 19, 2023. It is now read-only.

Description
We decided to implement stencil_coefs of the PDEOperator as a StaticVector as they are stored on stack rather than on the heap and are hence fast.
But for optimum performance they need to be initialized with both Type and Length like SVector{Length, Type} which made the constructor for LinearOperator look ugly. A = LinearOperator{Float64, SVector{1000, Float64}} for an operator working on 1000 dimensional vectors.
So we fixed it by creating an internal constructor
(::Type{LinearOperator{T}}){T<:Real}(dorder::Int, aorder::Int, dim::Int) =
LinearOperator{T, SVector{dorder+aorder-1,T}}(dorder, aorder, dim)
which decides the length of the SVector at runtime using the given input parameters.