Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/quadrature/diagonal_quadrature.jl @ 507:576c6d1acc28 feature/quadrature_as_outer_product
Make function naming more consistent.
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Sat, 07 Nov 2020 13:31:55 +0100 |
parents | c2f991b819fc |
children | 09ae5b519b4c |
comparison
equal
deleted
inserted
replaced
506:c2f991b819fc | 507:576c6d1acc28 |
---|---|
58 return @inbounds H.h*v[Int(I)] | 58 return @inbounds H.h*v[Int(I)] |
59 end | 59 end |
60 | 60 |
61 function LazyTensors.apply(H::DiagonalQuadrature{T}, v::AbstractVector{T}, index::Index{Unknown}) where T | 61 function LazyTensors.apply(H::DiagonalQuadrature{T}, v::AbstractVector{T}, index::Index{Unknown}) where T |
62 N = length(v); | 62 N = length(v); |
63 r = getregion(Int(index), closuresize(H), N) | 63 r = getregion(Int(index), closure_size(H), N) |
64 i = Index(Int(index), r) | 64 i = Index(Int(index), r) |
65 return LazyTensors.apply(H, v, i) | 65 return LazyTensors.apply(H, v, i) |
66 end | 66 end |
67 | 67 |
68 LazyTensors.apply_transpose(H::DiagonalQuadrature{T}, v::AbstractVector{T}, I::Index) where T = LazyTensors.apply(H,v,I) | 68 LazyTensors.apply_transpose(H::DiagonalQuadrature{T}, v::AbstractVector{T}, I::Index) where T = LazyTensors.apply(H,v,I) |
69 | 69 |
70 """ | 70 """ |
71 closuresize(H) | 71 closure_size(H) |
72 Returns the size of the closure stencil of a DiagonalQuadrature `H`. | 72 Returns the size of the closure stencil of a DiagonalQuadrature `H`. |
73 """ | 73 """ |
74 closuresize(H::DiagonalQuadrature{T,M}) where {T,M} = M | 74 closure_size(H::DiagonalQuadrature{T,M}) where {T,M} = M |
75 export closuresize | 75 export closure_size |