Mercurial > repos > public > sbplib_julia
diff sbpD2.jl @ 80:700a74c41b26 patch_based_test
Improve type stability
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Thu, 24 Jan 2019 14:33:49 +0100 |
parents | 8c4cfa680e5a |
children | 7f72e7e14659 |
line wrap: on
line diff
--- a/sbpD2.jl Thu Jan 24 14:27:57 2019 +0100 +++ b/sbpD2.jl Thu Jan 24 14:33:49 2019 +0100 @@ -28,8 +28,8 @@ struct D2{T} <: ConstantStencilOperator quadratureClosure::Vector{T} - innerStencil::Stencil - closureStencils::Vector{Stencil} # TBD: Should this be a tuple? + innerStencil::Stencil{T} + closureStencils::Vector{Stencil{T}} # TBD: Should this be a tuple? eClosure::Vector{T} dClosure::Vector{T} parity::Parity @@ -52,7 +52,7 @@ # Create boundary stencils boundarySize = length(d["boundary_stencils"]) - closureStencils = Vector{Stencil}() + closureStencils = Vector{typeof(innerStencil)}() for i ∈ 1:boundarySize stencilWeights = stringToVector(Float64, d["boundary_stencils"][i])