Skip to content

Commit 7373367

Browse files
committed
Fix default context in domains
The default context should not be singleton, it is preferable for it to be picked up automatically (otherwise we would have to always set it explicitely)
1 parent 035b811 commit 7373367

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/shared_utilities/Domains.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ end
228228
periodic::Tuple{Bool,Bool},
229229
npolynomial::Int,
230230
longlat = nothing,
231-
comms_ctx = ClimaComms.SingletonCommsContext(),
231+
comms_ctx = ClimaComms.context(),
232232
radius_earth = FT(6.378e6)
233233
) where {FT}
234234
@@ -251,7 +251,7 @@ function Plane(;
251251
periodic::Tuple{Bool, Bool} = isnothing(longlat) ? (true, true) :
252252
(false, false),
253253
npolynomial::Int,
254-
comms_ctx = ClimaComms.SingletonCommsContext(),
254+
comms_ctx = ClimaComms.context(),
255255
radius_earth = 6.378e6,
256256
) where {FT}
257257
if isnothing(longlat)
@@ -548,7 +548,7 @@ function SphericalShell(;
548548
nelements::Tuple{Int, Int},
549549
npolynomial::Int,
550550
dz_tuple::Union{Tuple{FT, FT}, Nothing} = nothing,
551-
comms_ctx = ClimaComms.SingletonCommsContext(),
551+
comms_ctx = ClimaComms.context(),
552552
) where {FT}
553553
@assert 0 < radius
554554
@assert 0 < depth
@@ -635,15 +635,15 @@ end
635635
radius::FT,
636636
nelements::Int
637637
npolynomial::Int,
638-
comms_ctx = ClimaComms.SingletonCommsContext(),
638+
comms_ctx = ClimaComms.context(),
639639
) where {FT}
640640
Outer constructor for the `SphericalSurface` domain, using keyword arguments.
641641
"""
642642
function SphericalSurface(;
643643
radius::FT,
644644
nelements::Int,
645645
npolynomial::Int,
646-
comms_ctx = ClimaComms.SingletonCommsContext(),
646+
comms_ctx = ClimaComms.context(),
647647
) where {FT}
648648
@assert 0 < radius
649649
horzdomain = ClimaCore.Domains.SphereDomain(radius)

0 commit comments

Comments
 (0)