Skip to content

Commit

Permalink
Rewrite unit_space test for floating point
Browse files Browse the repository at this point in the history
This test was failing with
```
/home/runner/work/ClimaCore.jl/ClimaCore.jl/test/Spaces/unit_spaces.jl:58
  Expression: coord_slab[slab_index(4)] == Geometry.XPoint{FT}(5)
   Evaluated: XPoint(4.999999999999999) == XPoint(5.0)
```
  • Loading branch information
Sbozzolo committed Nov 11, 2024
1 parent acc1747 commit e155ef6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/Spaces/unit_spaces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ on_gpu = ClimaComms.device() isa ClimaComms.CUDADevice
@test DataLayouts.farray_size(Spaces.coordinates_data(space)) == (4, 1, 1)
coord_slab = slab(Spaces.coordinates_data(space), 1)
@test coord_slab[slab_index(1)] == Geometry.XPoint{FT}(-3)
@test coord_slab[slab_index(4)] == Geometry.XPoint{FT}(5)
@test typeof(coord_slab[slab_index(4)]) == Geometry.XPoint{FT}
@test coord_slab[slab_index(4)].x FT(5)

local_geometry_slab = slab(Spaces.local_geometry_data(space), 1)
dss_weights_slab = slab(space.grid.dss_weights, 1)
Expand Down

0 comments on commit e155ef6

Please sign in to comment.