Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Oceananigans.jl
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ device(::GPU) = GPUifyLoops.CUDA()
end
end

# @hascuda CuArrays.allowscalar(false)
@hascuda CuArrays.allowscalar(false)

abstract type Metadata end
abstract type ConstantsCollection end
Expand Down
6 changes: 3 additions & 3 deletions src/models.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ add_bcs!(model::Model; kwargs...) = add_bcs(model.boundary_conditions; kwargs...
function initialize_with_defaults!(eos, tracers, sets...)

# Default tracer initial condition is deteremined by eos.
tracers.S.data .= eos.S₀
tracers.T.data .= eos.T₀
tracers.S.data.parent .= eos.S₀
tracers.T.data.parent .= eos.T₀

# Set all further fields to 0
for set in sets
for fldname in propertynames(set)
fld = getproperty(set, fldname)
fld.data .= 0 # promotes to eltype of fld.data
fld.data.parent .= 0 # promotes to eltype of fld.data
end
end

Expand Down