Skip to content

Commit a1eb650

Browse files
committed
Now 350 allocations
1 parent 05c733e commit a1eb650

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/body_aerodynamics.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -330,14 +330,13 @@ function calculate_AIC_matrices!(body_aero::BodyAerodynamics, model::Model,
330330
core_radius_fraction,
331331
body_aero.work_vectors
332332
)
333-
body_aero.AIC[:, icp, jring] .= velocity_induced
334-
333+
335334
# Subtract 2D induced velocity for VSM
336-
if icp == jring && model === VSM
337-
# TODO why is this allocating?
335+
if icp == jring && model == VSM
338336
calculate_velocity_induced_bound_2D!(U_2D, body_aero.panels[jring], ep, body_aero.work_vectors)
339-
body_aero.AIC[:, icp, jring] .-= U_2D
337+
velocity_induced .-= U_2D
340338
end
339+
body_aero.AIC[:, icp, jring] .= velocity_induced
341340
end
342341
end
343342
return nothing

0 commit comments

Comments
 (0)