Mercurial > repos > public > sbplib_julia
diff src/SbpOperators/quadrature/inverse_diagonal_quadrature.jl @ 561:04d7b4eb63ef feature/quadrature_as_outer_product
Merge with default
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Mon, 30 Nov 2020 16:28:32 +0100 |
parents | src/SbpOperators/quadrature/inverse_diagonal_inner_product.jl@d1929491180b src/SbpOperators/quadrature/inverse_diagonal_inner_product.jl@9b5710ae6587 |
children |
line wrap: on
line diff
--- a/src/SbpOperators/quadrature/inverse_diagonal_quadrature.jl Sun Nov 29 22:42:23 2020 +0100 +++ b/src/SbpOperators/quadrature/inverse_diagonal_quadrature.jl Mon Nov 30 16:28:32 2020 +0100 @@ -61,17 +61,17 @@ `Lower`,`Interior`,`Upper`. If `i` is another type of index (e.g an `Int`) it will first be converted to an `Index{R}`. """ -function LazyTensors.apply(Hi::InverseDiagonalQuadrature{T}, v::AbstractVector{T}, I::Index{Lower}) where T - return @inbounds Hi.h_inv*Hi.closure[Int(I)]*v[Int(I)] +function LazyTensors.apply(Hi::InverseDiagonalQuadrature{T}, v::AbstractVector{T}, i::Index{Lower}) where T + return @inbounds Hi.h_inv*Hi.closure[Int(i)]*v[Int(i)] end -function LazyTensors.apply(Hi::InverseDiagonalQuadrature{T}, v::AbstractVector{T}, I::Index{Upper}) where T +function LazyTensors.apply(Hi::InverseDiagonalQuadrature{T}, v::AbstractVector{T}, i::Index{Upper}) where T N = length(v); - return @inbounds Hi.h_inv*Hi.closure[N-Int(I)+1]*v[Int(I)] + return @inbounds Hi.h_inv*Hi.closure[N-Int(i)+1]*v[Int(i)] end -function LazyTensors.apply(Hi::InverseDiagonalQuadrature{T}, v::AbstractVector{T}, I::Index{Interior}) where T - return @inbounds Hi.h_inv*v[Int(I)] +function LazyTensors.apply(Hi::InverseDiagonalQuadrature{T}, v::AbstractVector{T}, i::Index{Interior}) where T + return @inbounds Hi.h_inv*v[Int(i)] end function LazyTensors.apply(Hi::InverseDiagonalQuadrature{T}, v::AbstractVector{T}, i) where T