Skip to content

Commit 62558c0

Browse files
committed
Tests pass
1 parent c19a3ff commit 62558c0

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/body_aerodynamics.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,11 @@ function init!(body_aero::BodyAerodynamics;
110110
idx = 1
111111
for wing in body_aero.wings
112112
println("init wing")
113-
@time init!(wing; aero_center_location, control_point_location)
114-
# @assert false
113+
init!(wing; aero_center_location, control_point_location)
115114
panel_props = wing.panel_props
116115

117116
# Create panels
118-
@time for i in 1:wing.n_panels
117+
for i in 1:wing.n_panels
119118
if wing isa RamAirWing
120119
delta = wing.delta_dist[i]
121120
else

src/wing_geometry.jl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,16 @@ function update_panel_properties!(panel_props::PanelProperties, section_list::Ve
121121

122122
for i in 1:n_panels
123123
# Define panel points
124-
p1 = coords[2i-1, :] # LE_1
125-
p2 = coords[2i+1, :] # LE_2
126-
p3 = coords[2i+2, :] # TE_2
127-
p4 = coords[2i, :] # TE_1
124+
@views begin
125+
p1 = coords[2i-1, :] # LE_1
126+
p2 = coords[2i+1, :] # LE_2
127+
p3 = coords[2i+2, :] # TE_2
128+
p4 = coords[2i, :] # TE_1
129+
end
128130

129131
# Calculate control point position
130-
di = norm(coords[2i-1, :] * 0.75 + coords[2i, :] * 0.25 -
131-
(coords[2i+1, :] * 0.75 + coords[2i+2, :] * 0.25))
132+
di = norm(coords[2i-1, :] .* 0.75 .+ coords[2i, :] .* 0.25 .-
133+
(coords[2i+1, :] .* 0.75 .+ coords[2i+2, :] .* 0.25))
132134

133135
ncp = if i == 1
134136
diplus = norm(coords[2i+1, :] * 0.75 + coords[2i+2, :] * 0.25 -

0 commit comments

Comments
 (0)