Mercurial > repos > public > sbplib_julia
comparison src/Grids/grid.jl @ 1651:707fc9761c2b feature/sbp_operators/laplace_curvilinear
Merge feature/grids/manifolds
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 26 Jun 2024 12:47:26 +0200 |
parents | 8250cf5a3ce9 |
children | 13a7a4ff49e3 |
comparison
equal
deleted
inserted
replaced
1648:b7dcd3dd3181 | 1651:707fc9761c2b |
---|---|
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!`? |
104 boundary_identifiers(g::Grid) | 104 boundary_identifiers(g::Grid) |
105 | 105 |
106 Identifiers for all the boundaries of `g`. | 106 Identifiers for all the boundaries of `g`. |
107 """ | 107 """ |
108 function boundary_identifiers end | 108 function boundary_identifiers end |
109 | |
110 # TBD: Boundary identifiers for charts and atlases? | |
109 | 111 |
110 """ | 112 """ |
111 boundary_grid(g::Grid, id::BoundaryIdentifier) | 113 boundary_grid(g::Grid, id::BoundaryIdentifier) |
112 | 114 |
113 The grid for the boundary specified by `id`. | 115 The grid for the boundary specified by `id`. |