Rename the *_array locals to say whether they are a vector or a matrix
Second of the three parts of #147 (Refactoring part III). Stack it on the pull request from branch agent/147-refactoring-part-iii (typed empty containers). The va naming is the third part and comes after this one.
#147 asks to replace every array in a name with vector (1D) or matrix (2D). ufechner7 suggested the suffix _vec for a 1D vector on that thread, and Bart agreed as long as the naming is consistent everywhere. A survey of main at 2b312ea found 22 identifiers and 241 occurrences, all of them locals, positional arguments, or the private calc_norm_array!. None is exported, a struct field, or a keyword, so no public API moves.
- 2D (P×3):
va_array, va_unit_array, x_airf_array, y_airf_array, z_airf_array, relative_velocity_array, v_acrossz_array
- 1D:
va_norm_array, chord_array, v_normal_array, v_tangential_array, va_magw_array, mu_array, cl_array, cd_array, cm_array, panel_width_array, force_array, moment_array (length 3), v_a_array, alpha_array
- Files: src/solver.jl, src/body_aerodynamics.jl, test/bench.jl, test/body_aerodynamics/test_body_aerodynamics.jl, test/solver/test_solver.jl
The struct fields holding the same data already use _dist (VSMSolution._x_airf_dist, _va_dist, _chord_dist). Decide whether the locals follow the fields or the suffix. A per-panel quantity reads as _dist whether it is 1D or 2D, and that decision belongs in the PR card. There are no 3D names; AIC and SectionAero.cp/cf are Array{T,3} fields and keep their names.
Also noticed: test/body_aerodynamics/test_body_aerodynamics.jl:66-67 and :101-102 size va_norm_array/va_unit_array with length(coord) on a matrix, which counts elements rather than rows.
Rename the
*_arraylocals to say whether they are a vector or a matrixSecond of the three parts of #147 (Refactoring part III). Stack it on the pull request from branch
agent/147-refactoring-part-iii(typed empty containers). Thevanaming is the third part and comes after this one.#147 asks to replace every
arrayin a name withvector(1D) ormatrix(2D). ufechner7 suggested the suffix_vecfor a 1D vector on that thread, and Bart agreed as long as the naming is consistent everywhere. A survey of main at 2b312ea found 22 identifiers and 241 occurrences, all of them locals, positional arguments, or the privatecalc_norm_array!. None is exported, a struct field, or a keyword, so no public API moves.va_array,va_unit_array,x_airf_array,y_airf_array,z_airf_array,relative_velocity_array,v_acrossz_arrayva_norm_array,chord_array,v_normal_array,v_tangential_array,va_magw_array,mu_array,cl_array,cd_array,cm_array,panel_width_array,force_array,moment_array(length 3),v_a_array,alpha_arrayThe struct fields holding the same data already use
_dist(VSMSolution._x_airf_dist,_va_dist,_chord_dist). Decide whether the locals follow the fields or the suffix. A per-panel quantity reads as_distwhether it is 1D or 2D, and that decision belongs in the PR card. There are no 3D names;AICandSectionAero.cp/cfareArray{T,3}fields and keep their names.Also noticed:
test/body_aerodynamics/test_body_aerodynamics.jl:66-67and:101-102sizeva_norm_array/va_unit_arraywithlength(coord)on a matrix, which counts elements rather than rows.