comparison src/Grids/grid.jl @ 1649:b02917bcd7d5 feature/grids/curvilinear

Merge default
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 26 Jun 2024 12:41:03 +0200
parents 9113f437431d 888e4092e2ed
children 8250cf5a3ce9 51f0c5f895fb
comparison
equal deleted inserted replaced
1645:64452a678e7a 1649:b02917bcd7d5
72 CT = typeof(first(v)[component_index...]) 72 CT = typeof(first(v)[component_index...])
73 return new{CT, eltype(v), ndims(v), typeof(v), typeof(component_index)}(v,component_index) 73 return new{CT, eltype(v), ndims(v), typeof(v), typeof(component_index)}(v,component_index)
74 end 74 end
75 end 75 end
76 76
77 Base.size(cv) = size(cv.v) 77 Base.size(cv::ArrayComponentView) = size(cv.v)
78 Base.getindex(cv::ArrayComponentView, i::Int) = cv.v[i][cv.component_index...] 78 Base.getindex(cv::ArrayComponentView, i::Int) = cv.v[i][cv.component_index...]
79 Base.getindex(cv::ArrayComponentView, I::Vararg{Int}) = cv.v[I...][cv.component_index...] 79 Base.getindex(cv::ArrayComponentView, I::Vararg{Int}) = cv.v[I...][cv.component_index...]
80 IndexStyle(::Type{<:ArrayComponentView{<:Any,<:Any,AT}}) where AT = IndexStyle(AT) 80 IndexStyle(::Type{<:ArrayComponentView{<:Any,<:Any,AT}}) where AT = IndexStyle(AT)
81 81
82 # TODO: Implement `setindex!`? 82 # TODO: Implement `setindex!`?