comparison src/SbpOperators/boundaryops/boundary_restriction.jl @ 517:2edacece1637 feature/boundary_ops

Fix range_size not returning empty tuple
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Tue, 24 Nov 2020 18:30:25 +0100
parents d55008f5e2f3
children 8f7919a9b398
comparison
equal deleted inserted replaced
516:f932af8c1e56 517:2edacece1637
36 36
37 function BoundaryRestriction(grid::EquidistantGrid{1,T}, closureStencil::Stencil{T,M}, region::Region) where {T,M,R} 37 function BoundaryRestriction(grid::EquidistantGrid{1,T}, closureStencil::Stencil{T,M}, region::Region) where {T,M,R}
38 return BoundaryRestriction{T,M,typeof(region)}(closureStencil,size(grid)) 38 return BoundaryRestriction{T,M,typeof(region)}(closureStencil,size(grid))
39 end 39 end
40 40
41 LazyTensors.range_size(e::BoundaryRestriction) = (0,) 41 LazyTensors.range_size(e::BoundaryRestriction) = ()
42 LazyTensors.domain_size(e::BoundaryRestriction) = e.size 42 LazyTensors.domain_size(e::BoundaryRestriction) = e.size
43 43
44 # TODO: Currently not working. 44 # TODO: Currently not working.
45 # We need to handle getindex for LazyTensorMappingApplication such that we pass more #indices than the 45 # We need to handle getindex for LazyTensorMappingApplication such that we pass more #indices than the
46 # range size of the TensorMapping. Or we need to be able to handle the case where we dont pass any index, for 46 # range size of the TensorMapping. Or we need to be able to handle the case where we dont pass any index, for