Mercurial > repos > public > sbplib_julia
diff sbpD2.jl @ 52:0236f8e90567
Merge changes
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Fri, 11 Jan 2019 11:55:48 +0100 |
parents | 8c4cfa680e5a |
children | 27a8d3021a1c 8a7a537f54e5 700a74c41b26 48079bd39969 |
line wrap: on
line diff
--- a/sbpD2.jl Fri Jan 11 11:55:13 2019 +0100 +++ b/sbpD2.jl Fri Jan 11 11:55:48 2019 +0100 @@ -15,12 +15,16 @@ end for i ∈ range(innerEnd+1, length=cSize) - u[i] = op.parity*apply(flip(op.closureStencils[N-i+1]), v, i)/h^2 + u[i] = Int(op.parity)*apply(flip(op.closureStencils[N-i+1]), v, i)/h^2 end + + return nothing end -odd = -1 -even = 1 +@enum Parity begin + odd = -1 + even = 1 +end struct D2{T} <: ConstantStencilOperator quadratureClosure::Vector{T} @@ -28,7 +32,7 @@ closureStencils::Vector{Stencil} # TBD: Should this be a tuple? eClosure::Vector{T} dClosure::Vector{T} - parity::Int + parity::Parity end function closureSize(D::D2)::Int