Skip to content

Commit

Permalink
fix polars concatenation in assembly of aeroinformation
Browse files Browse the repository at this point in the history
issue with using overload of + operator - if polars of the same length, the result would be a summed array rather than concatenation
  • Loading branch information
kccwing authored Sep 28, 2023
1 parent 58ddceb commit dadee64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sharpy/utils/generate_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,7 @@ def assembly_aerodynamics(self, *args):
if self.m_distribution.lower() == 'user_defined':
self.user_defined_m_distribution = self.user_defined_m_distribution + aerodynamics_to_add.user_defined_m_distribution
if self.polars is not None:
self.polars = self.polars + aerodynamics_to_add.polars
self.polars = np.array([self.polars, aerodynamics_to_add.polars])
total_num_airfoils += len(aerodynamics_to_add.airfoils[:, 0, 0])
# total_num_surfaces += len(aerodynamics_to_add.surface_m)
total_num_surfaces += np.sum(aerodynamics_to_add.surface_m != -1)
Expand Down

0 comments on commit dadee64

Please sign in to comment.