Skip to content

Commit

Permalink
Merge pull request #348 from rafmudaf/bugfix/ad14_optimization_segfault
Browse files Browse the repository at this point in the history
AD14: Restructure loop to fix optimization bug
  • Loading branch information
andrew-platt authored Oct 23, 2019
2 parents 0259e46 + c854019 commit de5b749
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions modules/aerodyn14/src/AeroSubs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -4693,13 +4693,8 @@ SUBROUTINE infdist( P, m, ErrStat, ErrMess )
RHScos(i) = 0.
RHSsin(i) = 0.
! First, calculate {rhs} = V[L]^-1*{alpha}
DO k = 1, maxInfl
! DO 260 k = MaxInflo+1, maxInfl
RHScos(i) = RHScos(i) + m%DynInflow%xLcos(i,k) * m%DynInflow%old_Alph(k)
END DO !k
DO k = P%DynInflow%MaxInflo+1, maxInfl
RHSsin(i) = RHSsin(i) + m%DynInflow%xLsin(i,k) * m%DynInflow%old_Beta(k)
END DO !k
RHScos(i) = sum(m%DynInflow%xLcos(i,1:maxInfl) * m%DynInflow%old_Alph(1:maxInfl))
RHSsin(i) = sum(m%DynInflow%xLsin(i,P%DynInflow%MaxInflo+1:maxInfl) * m%DynInflow%old_Beta(P%DynInflow%MaxInflo+1:maxInfl))
! Second, calculate {rhs} = 0.5*{tau} - [V]{rhs}
! = 0.5*{tau} - [V][L]^-1*{alpha}
! USE "VPARAM" for m>0
Expand Down

0 comments on commit de5b749

Please sign in to comment.