From 0b09015de38f5cd8e6032478eb565889c03a3a21 Mon Sep 17 00:00:00 2001 From: akshaysridhar Date: Mon, 17 Jun 2024 08:18:11 -0700 Subject: [PATCH] modified: test/Spaces/terrain_warp.jl --- test/Spaces/terrain_warp.jl | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test/Spaces/terrain_warp.jl b/test/Spaces/terrain_warp.jl index b1dcb197f5..44029edb23 100644 --- a/test/Spaces/terrain_warp.jl +++ b/test/Spaces/terrain_warp.jl @@ -450,6 +450,27 @@ end @test yinit123 ≈ y123 @test yinit123_cpu ≈ y123_cpu @test parent(y123_cpu) ≈ Array(parent(y123)) + + # test DSS for a Contravariant123Vector + y123 = @. Geometry.Contravariant123Vector(y1, y2, y3) + y123_cpu = @. Geometry.Contravariant123Vector(y1_cpu, y2_cpu, y3_cpu) + + dss_buffer123 = Spaces.create_dss_buffer(y123) + dss_buffer123_cpu = Spaces.create_dss_buffer(y123_cpu) + + # ensure physical velocity is continous across SE boundary for initial state + Spaces.weighted_dss!(y123 => dss_buffer123) + Spaces.weighted_dss!(y123_cpu => dss_buffer123_cpu) + + yinit123 = copy(y123) + yinit123_cpu = copy(y123_cpu) + + Spaces.weighted_dss!(y123, dss_buffer123) + Spaces.weighted_dss!(y123_cpu, dss_buffer123_cpu) + + @test yinit123 ≈ y123 + @test yinit123_cpu ≈ y123_cpu + @test parent(y123_cpu) ≈ Array(parent(y123)) end end end