comparison src/SbpOperators/boundaryops/boundary_restriction.jl @ 580:0779713f95a2 feature/boundary_ops

Add constructor that infers T and N
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 01 Dec 2020 17:47:14 +0100
parents cd7d3949f692
children aa44edea36fc
comparison
equal deleted inserted replaced
579:cd7d3949f692 580:0779713f95a2
33 stencil::Stencil{T,N} 33 stencil::Stencil{T,N}
34 size::Int 34 size::Int
35 end 35 end
36 export BoundaryRestriction 36 export BoundaryRestriction
37 37
38 BoundaryRestriction{R}(stencil::Stencil{T,N}, size::Int) where {T,R,N} = BoundaryRestriction{T,R,N}(stencil, size)
39
38 function BoundaryRestriction(grid::EquidistantGrid{1}, closureStencil::Stencil{T,N}, region::Region) where {T,N} 40 function BoundaryRestriction(grid::EquidistantGrid{1}, closureStencil::Stencil{T,N}, region::Region) where {T,N}
39 return BoundaryRestriction{T,typeof(region),N}(closureStencil,size(grid)[1]) 41 return BoundaryRestriction{T,typeof(region),N}(closureStencil,size(grid)[1])
40 end 42 end
41 43
42 closure_size(::BoundaryRestriction{T,R,N}) where {T,R,N} = N 44 closure_size(::BoundaryRestriction{T,R,N}) where {T,R,N} = N