Mercurial > repos > public > sbplib_julia
changeset 1332:ad31c1022e42 refactor/grids
Rename function for coordinate size of a grid
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 03 May 2023 15:31:53 +0200 |
parents | ed3ea0630825 |
children | 79a2193da5c1 |
files | src/Grids/Grids.jl src/Grids/grid.jl test/Grids/grid_test.jl |
diffstat | 3 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/Grids/Grids.jl Wed May 03 15:29:44 2023 +0200 +++ b/src/Grids/Grids.jl Wed May 03 15:31:53 2023 +0200 @@ -6,7 +6,7 @@ # Grid export Grid -export target_manifold_dim +export coordinate_size export component_type export TensorGrid
--- a/src/Grids/grid.jl Wed May 03 15:29:44 2023 +0200 +++ b/src/Grids/grid.jl Wed May 03 15:31:53 2023 +0200 @@ -19,7 +19,7 @@ Base.ndims(::Grid{T,D}) where {T,D} = D Base.eltype(::Type{<:Grid{T}}) where T = T -target_manifold_dim(::Grid{T}) where T = _ncomponents(T) # TBD: Name of this function?! +coordinate_size(::Grid{T}) where T = _ncomponents(T) # TBD: Name of this function?! component_type(::Grid{T}) where T = eltype(T) """
--- a/test/Grids/grid_test.jl Wed May 03 15:29:44 2023 +0200 +++ b/test/Grids/grid_test.jl Wed May 03 15:31:53 2023 +0200 @@ -11,8 +11,8 @@ @test ndims(DummyGrid{Int, 2}()) == 2 - @test target_manifold_dim(DummyGrid{Int, 1}()) == 1 - @test target_manifold_dim(DummyGrid{SVector{3,Float64}, 2}()) == 3 + @test coordinate_size(DummyGrid{Int, 1}()) == 1 + @test coordinate_size(DummyGrid{SVector{3,Float64}, 2}()) == 3 @testset "component_type" begin @test component_type(DummyGrid{Int,1}()) == Int