Skip to content

Commit 72e9dbd

Browse files
Merge pull request #2367 from CliMA/as/readme
update README: WeakValueDicts unmaintained
2 parents fa1e426 + fbe430f commit 72e9dbd

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-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: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,11 @@ 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(
243+
Meshes.coordinates(mesh, 1, 2),
244+
Geometry.ZPoint(0.02 / 45.0),
245+
rtol = 1e-3,
246+
)
243247

244248
# test the face element distance at the top of the domain is dz_top
245249
fₑ₋₁ = Geometry.component(Meshes.coordinates(mesh, 45, 1), 1)
@@ -280,8 +284,11 @@ end
280284
# test the mesh coordinates are eqv to dz_bottom
281285
@test Meshes.coordinates(mesh, 1, 1) == Geometry.ZPoint(-1.0)
282286
# 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+
)
285292
fₑ₋₁ = Geometry.component(Meshes.coordinates(mesh, nelems, 1), 1)
286293
fₑ = Geometry.component(Meshes.coordinates(mesh, nelems, 2), 1)
287294
# a residual tol of ~1e-1 or 1e-2 is fine for typical use cases
@@ -308,7 +315,11 @@ end
308315
@test Meshes.coordinates(mesh, 1, 1) == Geometry.ZPoint(0.0)
309316
@test Meshes.coordinates(mesh, 1, nelems + 1) Geometry.ZPoint(1.0)
310317
# 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+
)
312323
end
313324

314325
@testset "IntervalMesh HyperbolicTangentStretching reverse" begin
@@ -334,7 +345,11 @@ end
334345
@test Meshes.coordinates(mesh, 1, 1) == Geometry.ZPoint(-1.0)
335346
@test Meshes.coordinates(mesh, 1, nelems + 1) Geometry.ZPoint(0.0)
336347
# 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+
)
338353
end
339354

340355
@testset "Truncated IntervalMesh" begin

0 commit comments

Comments
 (0)