Mercurial > repos > public > sbplib_julia
comparison test/SbpOperators/volumeops/derivatives/dissipation_test.jl @ 1033:0cb4c6b15d8e feature/dissipation_operators
Make closures have the same number of weights in all stencils
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 22 Mar 2022 11:27:45 +0100 |
parents | 129262c8e897 |
children | ed19c549c506 |
comparison
equal
deleted
inserted
replaced
1032:11767fbb29f4 | 1033:0cb4c6b15d8e |
---|---|
143 | 143 |
144 | 144 |
145 @testset "dissipation_transpose_lower_closure_stencils" begin | 145 @testset "dissipation_transpose_lower_closure_stencils" begin |
146 cases = ( | 146 cases = ( |
147 (-1,1) => ( | 147 (-1,1) => ( |
148 Stencil(-1,-1, center=1), | 148 Stencil(-1,-1, 0, center=1), |
149 Stencil( 1, 1,-1, center=2), | 149 Stencil( 1, 1,-1, center=2), |
150 ), | 150 ), |
151 (1,-2,1) => ( | 151 (1,-2,1) => ( |
152 Stencil( 1, 1, center=1), | 152 Stencil( 1, 1, 0, 0, center=1), |
153 Stencil(-2,-2, 1, center=2), | 153 Stencil(-2,-2, 1, 0, center=2), |
154 Stencil( 1, 1,-2, 1, center=3), | 154 Stencil( 1, 1,-2, 1, center=3), |
155 ), | 155 ), |
156 (-1,3,-3,1) => ( | 156 (-1,3,-3,1) => ( |
157 Stencil(-1,-1,-1, center=1), | 157 Stencil(-1,-1,-1, 0, 0, 0, center=1), |
158 Stencil( 3, 3, 3,-1, center=2), | 158 Stencil( 3, 3, 3,-1, 0, 0, center=2), |
159 Stencil(-3,-3,-3, 3,-1, center=3), | 159 Stencil(-3,-3,-3, 3,-1, 0, center=3), |
160 Stencil( 1, 1, 1,-3, 3,-1, center=4), | 160 Stencil( 1, 1, 1,-3, 3,-1, center=4), |
161 ), | 161 ), |
162 ) | 162 ) |
163 @testset "interior_weights = $w" for (w, closure_stencils) ∈ cases | 163 @testset "interior_weights = $w" for (w, closure_stencils) ∈ cases |
164 @test dissipation_transpose_lower_closure_stencils(w) == closure_stencils | 164 @test dissipation_transpose_lower_closure_stencils(w) == closure_stencils |
167 | 167 |
168 @testset "dissipation_transpose_upper_closure_stencils" begin | 168 @testset "dissipation_transpose_upper_closure_stencils" begin |
169 cases = ( | 169 cases = ( |
170 (-1,1) => ( | 170 (-1,1) => ( |
171 Stencil( 1,-1, center = 1), | 171 Stencil( 1,-1, center = 1), |
172 Stencil( 1, center = 1), | 172 Stencil( 0, 1, center = 2), |
173 ), | 173 ), |
174 (1,-2,1) => ( | 174 (1,-2,1) => ( |
175 Stencil( 1, -2, 1, 1, center=2), | 175 Stencil( 1,-2, 1, 1, center=2), |
176 Stencil( 1,-2,-2, center=2), | 176 Stencil( 0, 1,-2,-2, center=3), |
177 Stencil( 1, 1, center=2), | 177 Stencil( 0, 0, 1, 1, center=4), |
178 ), | 178 ), |
179 (-1,3,-3,1) => ( | 179 (-1,3,-3,1) => ( |
180 Stencil( 1,-3, 3,-1,-1, center=2), | 180 Stencil( 1,-3, 3,-1,-1, center=2), |
181 Stencil( 1,-3, 3, 3, center=2), | 181 Stencil( 0, 1,-3, 3, 3, center=3), |
182 Stencil( 1,-3,-3, center=2), | 182 Stencil( 0, 0, 1,-3,-3, center=4), |
183 Stencil( 1, 1, center=2), | 183 Stencil( 0, 0, 0, 1, 1, center=5), |
184 ), | 184 ), |
185 ) | 185 ) |
186 @testset "interior_weights = $w" for (w, closure_stencils) ∈ cases | 186 @testset "interior_weights = $w" for (w, closure_stencils) ∈ cases |
187 @test dissipation_transpose_upper_closure_stencils(w) == closure_stencils | 187 @test dissipation_transpose_upper_closure_stencils(w) == closure_stencils |
188 end | 188 end |