Skip to content

Commit

Permalink
AD15: Error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-platt committed Nov 17, 2023
1 parent 24c7668 commit de60b1a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions modules/aerodyn/src/AeroDyn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -263,21 +263,21 @@ subroutine AD_Init( InitInp, u, p, x, xd, z, OtherState, y, m, Interval, InitOut
! Allocate rotors data types

nRotors = size(InitInp%rotors)
allocate(x%rotors(nRotors), xd%rotors(nRotors), z%rotors(nRotors), OtherState%rotors(nRotors), stat=errStat)
if (errStat/=0) call SetErrStat( ErrID_Fatal, 'Allocating rotor states', errStat, errMsg, RoutineName )
allocate(u%rotors(nRotors), y%rotors(nRotors), InitOut%rotors(nRotors), InputFileData%rotors(nRotors), stat=errStat)
if (errStat/=0) call SetErrStat( ErrID_Fatal, 'Allocating rotor input/outputs', errStat, errMsg, RoutineName )
allocate(p%rotors(nRotors), m%rotors(nRotors), stat=errStat)
if (errStat/=0) call SetErrStat( ErrID_Fatal, 'Allocating rotor params/misc', errStat, errMsg, RoutineName )
allocate(NumBlades(nRotors), stat=errStat ) ! temp array to pass NumBlades
if (errStat/=0) call SetErrStat( ErrID_Fatal, 'Allocating numblades per rotor', errStat, errMsg, RoutineName )
allocate(AeroProjMod(nRotors), stat=errStat ) ! temp array to pass AeroProjMod
AeroProjMod=-1
if (errStat/=0) call SetErrStat( ErrID_Fatal, 'Allocating AeroProjMod per rotor', errStat, errMsg, RoutineName )
allocate(x%rotors(nRotors), xd%rotors(nRotors), z%rotors(nRotors), OtherState%rotors(nRotors), stat=errStat2)
if (errStat2/=0) call SetErrStat( ErrID_Fatal, 'Allocating rotor states', errStat, errMsg, RoutineName )
allocate(u%rotors(nRotors), y%rotors(nRotors), InitOut%rotors(nRotors), InputFileData%rotors(nRotors), stat=errStat2)
if (errStat2/=0) call SetErrStat( ErrID_Fatal, 'Allocating rotor input/outputs', errStat, errMsg, RoutineName )
allocate(p%rotors(nRotors), m%rotors(nRotors), stat=errStat2)
if (errStat2/=0) call SetErrStat( ErrID_Fatal, 'Allocating rotor params/misc', errStat, errMsg, RoutineName )
allocate(NumBlades(nRotors), stat=errStat2 ) ! temp array to pass NumBlades
if (errStat2/=0) call SetErrStat( ErrID_Fatal, 'Allocating numblades per rotor', errStat, errMsg, RoutineName )
allocate(AeroProjMod(nRotors), stat=errStat2 ) ! temp array to pass AeroProjMod
if (errStat2/=0) call SetErrStat( ErrID_Fatal, 'Allocating AeroProjMod per rotor', errStat, errMsg, RoutineName )
if (errStat/=ErrID_None) then
call Cleanup()
return
end if
AeroProjMod=-1



Expand Down

0 comments on commit de60b1a

Please sign in to comment.