Skip to content

Commit 3c37ffd

Browse files
committed
Fix missing method for Topologies.mesh
Closes #2287
1 parent 41c518e commit 3c37ffd

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ ClimaCore.jl Release Notes
44
main
55
-------
66

7+
- Fixed missing method for `Topologies.mesh(Topology2D)`
8+
[2288](https://github.com/CliMA/ClimaCore.jl/pull/2288).
9+
710
v0.14.31
811
-------
912

src/Topologies/topology2d.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,10 @@ function compute_ghost_send_recv_idx(topology::Topology2D, Nq)
696696
return DA(send_buf_idx), DA(recv_buf_idx)
697697
end
698698

699+
function mesh(topology::Topology2D)
700+
getfield(topology, :mesh)
701+
end
702+
699703
domain(topology::Topology2D) = domain(topology.mesh)
700704
nelems(topology::Topology2D) = length(topology.elemorder)
701705
nlocalelems(topology::Topology2D) = length(topology.local_elem_gidx)

test/Topologies/rectangle.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,3 +337,8 @@ end
337337
@test topology1 === topology2
338338
@test topology1 !== topology3
339339
end
340+
341+
@testset "accessors" begin
342+
topology = rectangular_grid(3, 3, true, true)
343+
@test Topologies.mesh(topology) == topology.mesh
344+
end

0 commit comments

Comments
 (0)