Mercurial > repos > public > sbplib_julia
comparison src/Grids/tensor_grid.jl @ 1751:f3d7e2d7a43f feature/sbp_operators/laplace_curvilinear
Merge feature/grids/manifolds
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 11 Sep 2024 16:26:19 +0200 |
parents | 863385aae454 |
children | 189e69d44056 871f3f1decea |
comparison
equal
deleted
inserted
replaced
1731:3684db043add | 1751:f3d7e2d7a43f |
---|---|
1 # TODO: Check this file and other grids for duplicate implementation of general methods implemented for Grid | |
2 | |
3 """ | 1 """ |
4 TensorGrid{T,D} <: Grid{T,D} | 2 TensorGrid{T,D} <: Grid{T,D} |
5 | 3 |
6 A grid constructed as the tensor product of other grids. | 4 A grid constructed as the tensor product of other grids. |
7 | 5 |
117 function combine_coordinates(coords...) | 115 function combine_coordinates(coords...) |
118 return mapreduce(SVector, vcat, coords) | 116 return mapreduce(SVector, vcat, coords) |
119 end | 117 end |
120 | 118 |
121 """ | 119 """ |
122 grid_and_local_dim_index(nds, d) | 120 grid_and_local_dim_index(nds, d) |
123 | 121 |
124 Given a tuple of number of dimensions `nds`, and a global dimension index `d`, | 122 Given a tuple of number of dimensions `nds`, and a global dimension index `d`, |
125 calculate which grid index, and local dimension, `d` corresponds to. | 123 calculate which grid index, and local dimension, `d` corresponds to. |
126 | 124 |
127 `nds` would come from broadcasting `ndims` on the grids tuple of a | 125 `nds` would come from broadcasting `ndims` on the grids tuple of a |