Skip to content

Commit 8fa3f66

Browse files
committed
Use ==, not === for enums
1 parent be42fae commit 8fa3f66

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

test/test_body_aerodynamics.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ end
317317
index_reversed = length(body_aero.panels) - i + 1
318318
panel = body_aero.panels[index_reversed]
319319

320-
evaluation_point = if model === VSM
320+
evaluation_point = if model == VSM
321321
panel.control_point
322322
else # LLT
323323
panel.aero_center
@@ -333,7 +333,7 @@ end
333333
atol=1e-4
334334
)
335335

336-
if model === VSM
336+
if model == VSM
337337
@test isapprox(
338338
panel.aero_center,
339339
expected_controlpoints[i]["coordinates_aoa"],

test/test_wing_geometry.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Points are compared with approximate equality to handle floating point differenc
1515
function ==(a::Section, b::Section)
1616
return (isapprox(a.LE_point, b.LE_point; rtol=1e-5, atol=1e-5) &&
1717
isapprox(a.TE_point, b.TE_point; rtol=1e-5, atol=1e-5) &&
18-
a.aero_model === b.aero_model &&
18+
a.aero_model == b.aero_model &&
1919
all(a.aero_data .== b.aero_data))
2020
end
2121

@@ -329,7 +329,7 @@ end
329329
@test -2.0 < new_sections[5].LE_point[2] < -1.0
330330

331331
for section in new_sections
332-
@test section.aero_model === INVISCID
332+
@test section.aero_model == INVISCID
333333
end
334334
end
335335
end

test/thesis_oriol_cayon.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ function create_geometry_general(coordinates, Uinf, N, ring_geo, model)
205205
normal = x_airf
206206
tangential = y_airf
207207

208-
if model === VSM
208+
if model == VSM
209209
cp = Dict(
210210
"coordinates" => VSMpoint,
211211
"chord" => chord,
@@ -215,7 +215,7 @@ function create_geometry_general(coordinates, Uinf, N, ring_geo, model)
215215
"coordinates_aoa" => LLpoint
216216
)
217217
push!(controlpoints, cp)
218-
elseif model === LLT
218+
elseif model LLT
219219
cp = Dict(
220220
"coordinates" => LLpoint,
221221
"chord" => chord,
@@ -320,7 +320,7 @@ function thesis_induction_matrix_creation(ringvec, controlpoints, rings, Uinf, G
320320
airf_coord = [controlpoints[icp]["airf_coord"] for icp in 1:N]
321321

322322
for icp in 1:N
323-
if model === VSM
323+
if model == VSM
324324
# Velocity induced by infinite bound vortex with Gamma = 1
325325
U_2D[icp,:] = velocity_induced_bound_2D(ringvec[icp])
326326
end
@@ -347,7 +347,7 @@ function thesis_induction_matrix_creation(ringvec, controlpoints, rings, Uinf, G
347347

348348
# Different from old thesis code as this was considered wrong
349349
if icp == jring
350-
if model === VSM
350+
if model == VSM
351351
MatrixU[icp,jring] -= U_2D[icp,1]
352352
MatrixV[icp,jring] -= U_2D[icp,2]
353353
MatrixW[icp,jring] -= U_2D[icp,3]
@@ -501,7 +501,7 @@ function velocity_induced_single_ring_semiinfinite(ring, controlpoint, model, Ui
501501
XV1, Vf, XVP, -GAMMA, Uinf
502502
)
503503
elseif filament["id"] == "bound"
504-
if model === VSM
504+
if model == VSM
505505
XV2 = filament["x2"]
506506
tempvel = velocity_3D_bound_vortex(XV1, XV2, XVP, GAMMA)
507507
else

0 commit comments

Comments
 (0)