Skip to content

Commit e58ae6b

Browse files
committed
Merge remote-tracking branch 'origin/structarrays2' into cs_safe
2 parents 36a27b2 + 718c5bb commit e58ae6b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/CCBlade.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ function Section(r, chord, theta, af)
8686
return Section(r, chord, theta, af)
8787
end
8888

89-
function Base.similar(bc::Broadcast.Broadcasted{Broadcast.DefaultArrayStyle{N}}, ::Type{ElType}) where {N,ElType<:Section}
90-
return StructArray{ElType}(undef, size(bc))
89+
function Base.similar(bc::Broadcast.Broadcasted{Broadcast.DefaultArrayStyle{N}}, ::Type{Section{TF,TAF}}) where {N,TF,TAF}
90+
return StructArray{Section{TF,TAF}}(undef, size(bc))
9191
end
9292

9393
"""
@@ -122,8 +122,8 @@ OperatingPoint(Vx, Vy, rho, pitch, mu, asound) = OperatingPoint(promote(Vx, Vy,
122122
# convenience constructor when Re and Mach are not used.
123123
OperatingPoint(Vx, Vy, rho; pitch=zero(rho), mu=one(rho), asound=one(rho)) = OperatingPoint(Vx, Vy, rho, pitch, mu, asound)
124124

125-
function Base.similar(bc::Broadcast.Broadcasted{Broadcast.DefaultArrayStyle{N}}, ::Type{ElType}) where {N,ElType<:OperatingPoint}
126-
return StructArray{ElType}(undef, size(bc))
125+
function Base.similar(bc::Broadcast.Broadcasted{Broadcast.DefaultArrayStyle{N}}, ::Type{OperatingPoint{TF}}) where {N,TF}
126+
return StructArray{OperatingPoint{TF}}(undef, size(bc))
127127
end
128128

129129
"""
@@ -172,8 +172,8 @@ Outputs(Np, Tp, a, ap, u, v, phi, alpha, W, cl, cd, cn, ct, F, G) = Outputs(prom
172172
# convenience constructor to initialize
173173
Outputs() = Outputs(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
174174

175-
function Base.similar(bc::Broadcast.Broadcasted{Broadcast.DefaultArrayStyle{N}}, ::Type{ElType}) where {N,ElType<:Outputs}
176-
return StructArray{ElType}(undef, size(bc))
175+
function Base.similar(bc::Broadcast.Broadcasted{Broadcast.DefaultArrayStyle{N}}, ::Type{Outputs{TF}}) where {N,TF}
176+
return StructArray{Outputs{TF}}(undef, size(bc))
177177
end
178178

179179
# -------------------------------

0 commit comments

Comments
 (0)