@@ -84,7 +84,8 @@ function init_pos!(
8484 x_airf:: PosVector ,
8585 y_airf:: PosVector ,
8686 z_airf:: PosVector ,
87- delta
87+ delta,
88+ vec:: MVec3
8889)
8990 # Initialize basic geometry
9091 panel. TE_point_1 .= section_1. TE_point
@@ -95,11 +96,15 @@ function init_pos!(
9596 norm (panel. TE_point_1 - panel. LE_point_1) +
9697 norm (panel. TE_point_2 - panel. LE_point_2)
9798 ) / 2
98- panel. corner_points .= hcat (panel. LE_point_1, panel. TE_point_1, panel. TE_point_2, panel. LE_point_2)
99- panel. width = norm (bound_point_2 - bound_point_1)
100- init! (panel. filaments[1 ], bound_point_2, bound_point_1)
101- init! (panel. filaments[2 ], bound_point_1, panel. TE_point_1)
102- init! (panel. filaments[3 ], panel. TE_point_2, bound_point_2)
99+ panel. corner_points[:, 1 ] = panel. LE_point_1
100+ panel. corner_points[:, 2 ] = panel. TE_point_1
101+ panel. corner_points[:, 3 ] = panel. TE_point_2
102+ panel. corner_points[:, 4 ] = panel. LE_point_2
103+ vec .= bound_point_2 .- bound_point_1
104+ panel. width = norm (vec)
105+ init! (panel. filaments[1 ], bound_point_2, bound_point_1, vec)
106+ init! (panel. filaments[2 ], bound_point_1, panel. TE_point_1, vec)
107+ init! (panel. filaments[3 ], panel. TE_point_2, bound_point_2, vec)
103108
104109 panel. bound_point_1 .= bound_point_1
105110 panel. bound_point_2 .= bound_point_2
@@ -190,12 +195,13 @@ function init!(
190195 x_airf:: PosVector ,
191196 y_airf:: PosVector ,
192197 z_airf:: PosVector ,
193- delta;
198+ delta,
199+ vec:: MVec3 ;
194200 init_aero = true ,
195201 remove_nan = true
196202)
197- init_pos! (panel, section_1, section_2, aero_center, control_point, bound_point_1, bound_point_2,
198- x_airf, y_airf, z_airf, delta)
203+ @time init_pos! (panel, section_1, section_2, aero_center, control_point, bound_point_1, bound_point_2,
204+ x_airf, y_airf, z_airf, delta, vec )
199205 init_aero && init_aero! (panel, section_1, section_2; remove_nan)
200206 return nothing
201207end
0 commit comments