From 795a077927b68bb33953a3a7813ce3cffd68a8be Mon Sep 17 00:00:00 2001 From: juddmehr Date: Wed, 16 Oct 2024 15:56:54 -0600 Subject: [PATCH] go back to how CCBlade does it --- src/C4Blade/C4Blade.jl | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/C4Blade/C4Blade.jl b/src/C4Blade/C4Blade.jl index 81a087d..c0ede8a 100644 --- a/src/C4Blade/C4Blade.jl +++ b/src/C4Blade/C4Blade.jl @@ -94,17 +94,13 @@ struct Section{TFr,TFc,TFt,TAF} chord::TFc theta::TFt af::TAF - function Section(r,chord,theta,af) - r, chord, theta = promote(r, chord, theta) - new(r,chord,theta, af) - end end -# # promote to same type, e.g., duals -# function Section(r, chord, theta, af) -# r, chord, theta = promote(r, chord, theta) -# return Section(r, chord, theta, af) -# end +# promote to same type, e.g., duals +function Section(r, chord, theta, af) + r, chord, theta = promote(r, chord, theta) + return Section(r, chord, theta, af) +end # convenience function to access fields within an array of structs function Base.getproperty(obj::AbstractVector{<:Section}, sym::Symbol)