|
239 | 239 | )
|
240 | 240 | # test the mesh coordinates are eqv to dz_bottom
|
241 | 241 | @test Meshes.coordinates(mesh, 1, 1) == Geometry.ZPoint(0.0)
|
242 |
| - @test Meshes.coordinates(mesh, 1, 2) ≈ Geometry.ZPoint(0.02 / 45.0) |
| 242 | + @test isapprox( |
| 243 | + Meshes.coordinates(mesh, 1, 2), |
| 244 | + Geometry.ZPoint(0.02 / 45.0), |
| 245 | + rtol = 1e-3, |
| 246 | + ) |
243 | 247 |
|
244 | 248 | # test the face element distance at the top of the domain is dz_top
|
245 | 249 | fₑ₋₁ = Geometry.component(Meshes.coordinates(mesh, 45, 1), 1)
|
|
280 | 284 | # test the mesh coordinates are eqv to dz_bottom
|
281 | 285 | @test Meshes.coordinates(mesh, 1, 1) == Geometry.ZPoint(-1.0)
|
282 | 286 | # test the face element distance at the top of the domain is dz_top
|
283 |
| - @test Meshes.coordinates(mesh, 1, nelems) ≈ |
284 |
| - Geometry.ZPoint(-Geometry.ZPoint(0.02 / 45.0).z) |
| 287 | + @test isapprox( |
| 288 | + Meshes.coordinates(mesh, 1, nelems), |
| 289 | + Geometry.ZPoint(-Geometry.ZPoint(0.02 / 45.0).z), |
| 290 | + rtol = 1e-3, |
| 291 | + ) |
285 | 292 | fₑ₋₁ = Geometry.component(Meshes.coordinates(mesh, nelems, 1), 1)
|
286 | 293 | fₑ = Geometry.component(Meshes.coordinates(mesh, nelems, 2), 1)
|
287 | 294 | # a residual tol of ~1e-1 or 1e-2 is fine for typical use cases
|
|
308 | 315 | @test Meshes.coordinates(mesh, 1, 1) == Geometry.ZPoint(0.0)
|
309 | 316 | @test Meshes.coordinates(mesh, 1, nelems + 1) ≈ Geometry.ZPoint(1.0)
|
310 | 317 | # test the interval of the mesh coordinates at the surface is the same as dz_surface
|
311 |
| - @test Meshes.coordinates(mesh, 1, 2) ≈ Geometry.ZPoint(0.03 / 75.0) |
| 318 | + @test isapprox( |
| 319 | + Meshes.coordinates(mesh, 1, 2), |
| 320 | + Geometry.ZPoint(0.03 / 75.0), |
| 321 | + rtol = 1e-3, |
| 322 | + ) |
312 | 323 | end
|
313 | 324 |
|
314 | 325 | @testset "IntervalMesh HyperbolicTangentStretching reverse" begin
|
|
334 | 345 | @test Meshes.coordinates(mesh, 1, 1) == Geometry.ZPoint(-1.0)
|
335 | 346 | @test Meshes.coordinates(mesh, 1, nelems + 1) ≈ Geometry.ZPoint(0.0)
|
336 | 347 | # test the interval of the mesh coordinates at the surface is the same as dz_surface
|
337 |
| - @test Meshes.coordinates(mesh, 1, nelems) ≈ Geometry.ZPoint(-0.03 / 75.0) |
| 348 | + @test isapprox( |
| 349 | + Meshes.coordinates(mesh, 1, nelems), |
| 350 | + Geometry.ZPoint(-0.03 / 75.0), |
| 351 | + rtol = 1e-3, |
| 352 | + ) |
338 | 353 | end
|
339 | 354 |
|
340 | 355 | @testset "Truncated IntervalMesh" begin
|
|
0 commit comments