Skip to content

Commit

Permalink
Fix default context in domains
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
Sbozzolo committed Dec 12, 2024
1 parent 035b811 commit 7373367
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/shared_utilities/Domains.jl
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ end
periodic::Tuple{Bool,Bool},
npolynomial::Int,
longlat = nothing,
comms_ctx = ClimaComms.SingletonCommsContext(),
comms_ctx = ClimaComms.context(),
radius_earth = FT(6.378e6)
) where {FT}
Expand All @@ -251,7 +251,7 @@ function Plane(;
periodic::Tuple{Bool, Bool} = isnothing(longlat) ? (true, true) :
(false, false),
npolynomial::Int,
comms_ctx = ClimaComms.SingletonCommsContext(),
comms_ctx = ClimaComms.context(),
radius_earth = 6.378e6,
) where {FT}
if isnothing(longlat)
Expand Down Expand Up @@ -548,7 +548,7 @@ function SphericalShell(;
nelements::Tuple{Int, Int},
npolynomial::Int,
dz_tuple::Union{Tuple{FT, FT}, Nothing} = nothing,
comms_ctx = ClimaComms.SingletonCommsContext(),
comms_ctx = ClimaComms.context(),
) where {FT}
@assert 0 < radius
@assert 0 < depth
Expand Down Expand Up @@ -635,15 +635,15 @@ end
radius::FT,
nelements::Int
npolynomial::Int,
comms_ctx = ClimaComms.SingletonCommsContext(),
comms_ctx = ClimaComms.context(),
) where {FT}
Outer constructor for the `SphericalSurface` domain, using keyword arguments.
"""
function SphericalSurface(;
radius::FT,
nelements::Int,
npolynomial::Int,
comms_ctx = ClimaComms.SingletonCommsContext(),
comms_ctx = ClimaComms.context(),
) where {FT}
@assert 0 < radius
horzdomain = ClimaCore.Domains.SphereDomain(radius)
Expand Down

0 comments on commit 7373367

Please sign in to comment.