Skip to content

Commit

Permalink
Merge pull request #1121 from CliMA/ar/check-arch
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-ramadhan committed Nov 9, 2020
2 parents 76a91d4 + eb0bdea commit dfdc49c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/incompressible_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Keyword arguments
"""
function IncompressibleModel(;
grid,
architecture = CPU(),
architecture::AbstractArchitecture = CPU(),
float_type = Float64,
clock = Clock{float_type}(0, 0, 1),
advection = CenteredSecondOrder(),
Expand Down
6 changes: 6 additions & 0 deletions test/test_models.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ end
@testset "Models" begin
@info "Testing models..."

@testset "Model constructor errors" begin
grid = RegularCartesianGrid(size=(1, 1, 1), extent=(1, 1, 1))
@test_throws TypeError IncompressibleModel(architecture=CPU, grid=grid)
@test_throws TypeError IncompressibleModel(architecture=GPU, grid=grid)
end

topos = ((Periodic, Periodic, Periodic),
(Periodic, Periodic, Bounded),
(Periodic, Bounded, Bounded),
Expand Down

0 comments on commit dfdc49c

Please sign in to comment.