Mercurial > repos > public > sbplib_julia
comparison test/Grids/curvilinear_grid_test.jl @ 1434:af73340a8f0e feature/grids/curvilinear
Add todos
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 07 Sep 2023 09:03:07 +0200 |
parents | 64b60b42d367 |
children | 647c8b18b84f |
comparison
equal
deleted
inserted
replaced
1433:1656228095b5 | 1434:af73340a8f0e |
---|---|
1 using Sbplib.Grids | 1 using Sbplib.Grids |
2 using Test | 2 using Test |
3 using StaticArrays | 3 using StaticArrays |
4 | 4 |
5 @testset "CurvilinearGrid" begin | 5 @testset "CurvilinearGrid" begin |
6 lg = equidistant_grid((11,11), (0,0), (1,1)) | 6 lg = equidistant_grid((11,11), (0,0), (1,1)) # TODO: Change dims of the grid to be different |
7 x̄ = map(ξ̄ -> 2ξ̄, lg) | 7 x̄ = map(ξ̄ -> 2ξ̄, lg) |
8 J = map(ξ̄ -> @SArray(fill(2., 2, 2)), lg) | 8 J = map(ξ̄ -> @SArray(fill(2., 2, 2)), lg) |
9 cg = CurvilinearGrid(lg, x̄, J) | 9 cg = CurvilinearGrid(lg, x̄, J) |
10 | |
11 # TODO: Test constructor for different dims of range and domain for the coordinates | |
12 # TODO: Test constructor with different type than TensorGrid. a dummy type? | |
13 | |
14 @test_broken false # @test_throws ArgumentError("Sizes must match") CurvilinearGrid(lg, map(ξ̄ -> @SArray[ξ̄[1], ξ̄[2], -ξ̄[1]], lg), rand(SMatrix{2,3,Float64},15,11)) | |
15 | |
10 | 16 |
11 @test cg isa Grid{SVector{2, Float64},2} | 17 @test cg isa Grid{SVector{2, Float64},2} |
12 | 18 |
13 @test jacobian(cg) isa Array{<:AbstractMatrix} | 19 @test jacobian(cg) isa Array{<:AbstractMatrix} |
14 @test logicalgrid(cg) isa Grid | 20 @test logicalgrid(cg) isa Grid |