comparison test/Grids/grid_test.jl @ 2016:e17d90763a3f feature/grids/multiblock_grids

Add ndims for grid types
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 12 Mar 2025 08:59:28 +0100
parents 471a948cd2b2
children
comparison
equal deleted inserted replaced
1985:5d34b88e5733 2016:e17d90763a3f
7 struct DummyGrid{T,D} <: Grid{T,D} end 7 struct DummyGrid{T,D} <: Grid{T,D} end
8 8
9 @test eltype(DummyGrid{Int, 2}) == Int 9 @test eltype(DummyGrid{Int, 2}) == Int
10 @test eltype(DummyGrid{Int, 2}()) == Int 10 @test eltype(DummyGrid{Int, 2}()) == Int
11 11
12 @test ndims(DummyGrid{Int, 2}) == 2
12 @test ndims(DummyGrid{Int, 2}()) == 2 13 @test ndims(DummyGrid{Int, 2}()) == 2
13 14
14 @test coordinate_size(DummyGrid{Int, 1}()) == 1 15 @test coordinate_size(DummyGrid{Int, 1}()) == 1
15 @test coordinate_size(DummyGrid{SVector{3,Float64}, 2}()) == 3 16 @test coordinate_size(DummyGrid{SVector{3,Float64}, 2}()) == 3
16 17