Skip to content

Commit 4b528fa

Browse files
juliasloan25akshaysridhar
authored andcommitted
update README: WeakValueDicts unmaintained
update test tolerances modified: test/Meshes/interval.jl
1 parent fa1e426 commit 4b528fa

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ ClimaCore.jl's high-level application programming interface (API) facilitates mo
4747
- Flexible memory layouts: Array-of-Structs (AoS), Struct-of-Arrays (SoA),Array-of-Struct-of-Arrays (AoSoA)
4848
- Useful overloads: `sum` (integral), `norm`, etc.
4949
- Compatible with [`DifferentialEquations.jl`](https://diffeq.sciml.ai/stable/) time steppers.
50-
* Composable operators via broadcasting: apply a function element-wise to an array; scalar values are broadcast over arrays
50+
* Composable operators via broadcasting: apply a function element-wise to an array; scalar values are broadcast over arrays
5151
* Fusion of multiple operations; can be specialized for custom functions or argument types (e.g. `CuArray` compiles and applies a custom CUDA kernel).
5252
* Operators (`grad`, `div`, `interpolate`) are “pseudo-functions”: Act like functions when broadcasted over a `Field`; fuse operators and function calls.
5353
* Add element node size dimensions to type domain
@@ -56,3 +56,6 @@ ClimaCore.jl's high-level application programming interface (API) facilitates mo
5656
* Flexible memory layouts allow for flexible threading models (upcoming):
5757
- CPU thread over elements
5858
- GPU thread over nodes.
59+
60+
Versions before and including ClimaCore.jl v0.11.7 relied on WeakValueDicts.jl, which is not thread-safe and no longer maintained.
61+
These versions are considered unsupported, and newer versions of ClimaCore.jl should be used.

test/Meshes/interval.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ end
239239
)
240240
# test the mesh coordinates are eqv to dz_bottom
241241
@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)
243243

244244
# test the face element distance at the top of the domain is dz_top
245245
fₑ₋₁ = Geometry.component(Meshes.coordinates(mesh, 45, 1), 1)
@@ -280,8 +280,7 @@ end
280280
# test the mesh coordinates are eqv to dz_bottom
281281
@test Meshes.coordinates(mesh, 1, 1) == Geometry.ZPoint(-1.0)
282282
# 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)
285284
fₑ₋₁ = Geometry.component(Meshes.coordinates(mesh, nelems, 1), 1)
286285
fₑ = Geometry.component(Meshes.coordinates(mesh, nelems, 2), 1)
287286
# a residual tol of ~1e-1 or 1e-2 is fine for typical use cases
@@ -308,7 +307,7 @@ end
308307
@test Meshes.coordinates(mesh, 1, 1) == Geometry.ZPoint(0.0)
309308
@test Meshes.coordinates(mesh, 1, nelems + 1) Geometry.ZPoint(1.0)
310309
# 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)
312311
end
313312

314313
@testset "IntervalMesh HyperbolicTangentStretching reverse" begin
@@ -334,7 +333,7 @@ end
334333
@test Meshes.coordinates(mesh, 1, 1) == Geometry.ZPoint(-1.0)
335334
@test Meshes.coordinates(mesh, 1, nelems + 1) Geometry.ZPoint(0.0)
336335
# 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)
338337
end
339338

340339
@testset "Truncated IntervalMesh" begin

0 commit comments

Comments
 (0)