|
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(Meshes.coordinates(mesh, 1, 2), Geometry.ZPoint(0.02 / 45.0), rtol=1e-3) |
243 | 243 |
|
244 | 244 | # test the face element distance at the top of the domain is dz_top |
245 | 245 | fₑ₋₁ = Geometry.component(Meshes.coordinates(mesh, 45, 1), 1) |
|
280 | 280 | # test the mesh coordinates are eqv to dz_bottom |
281 | 281 | @test Meshes.coordinates(mesh, 1, 1) == Geometry.ZPoint(-1.0) |
282 | 282 | # 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) |
| 283 | + @test isapprox(Meshes.coordinates(mesh, 1, nelems), Geometry.ZPoint(-Geometry.ZPoint(0.02 / 45.0).z), rtol = 1e-3) |
285 | 284 | fₑ₋₁ = Geometry.component(Meshes.coordinates(mesh, nelems, 1), 1) |
286 | 285 | fₑ = Geometry.component(Meshes.coordinates(mesh, nelems, 2), 1) |
287 | 286 | # a residual tol of ~1e-1 or 1e-2 is fine for typical use cases |
|
308 | 307 | @test Meshes.coordinates(mesh, 1, 1) == Geometry.ZPoint(0.0) |
309 | 308 | @test Meshes.coordinates(mesh, 1, nelems + 1) ≈ Geometry.ZPoint(1.0) |
310 | 309 | # 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) |
| 310 | + @test isapprox(Meshes.coordinates(mesh, 1, 2), Geometry.ZPoint(0.03 / 75.0), rtol = 1e-3) |
312 | 311 | end |
313 | 312 |
|
314 | 313 | @testset "IntervalMesh HyperbolicTangentStretching reverse" begin |
|
334 | 333 | @test Meshes.coordinates(mesh, 1, 1) == Geometry.ZPoint(-1.0) |
335 | 334 | @test Meshes.coordinates(mesh, 1, nelems + 1) ≈ Geometry.ZPoint(0.0) |
336 | 335 | # 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) |
| 336 | + @test isapprox(Meshes.coordinates(mesh, 1, nelems), Geometry.ZPoint(-0.03 / 75.0), rtol=1e-3) |
338 | 337 | end |
339 | 338 |
|
340 | 339 | @testset "Truncated IntervalMesh" begin |
|
0 commit comments