Skip to content

Commit a8921bc

Browse files
committed
Reduce allocations to 85
1 parent cec063d commit a8921bc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/VortexStepMethod.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,8 @@ include("solver.jl")
277277
# Step 3: Initialize aerodynamics
278278
body_aero::BodyAerodynamics = BodyAerodynamics([wing])
279279

280-
y = [panel.control_point[2] for panel in body_aero.panels]
280+
gamma_initial = zeros(length(body_aero.panels))
281+
calculate_circulation_distribution_elliptical_wing(gamma_initial, body_aero)
281282

282283
nothing
283284
end

src/body_aerodynamics.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Main structure for calculating aerodynamic properties of bodies.
2121
"""
2222
@with_kw mutable struct BodyAerodynamics{P}
2323
panels::Vector{Panel}
24-
wings::Vector{AbstractWing}
24+
wings::Union{Vector{Wing}, Vector{RamAirWing}}
2525
_va::MVec3 = zeros(MVec3)
2626
omega::MVec3 = zeros(MVec3)
2727
gamma_distribution::Vector{Float64} = zeros(Float64, P)

0 commit comments

Comments
 (0)