diff --git a/modules/aerodyn/src/UnsteadyAero.f90 b/modules/aerodyn/src/UnsteadyAero.f90 index ffb217631c..c326447b64 100644 --- a/modules/aerodyn/src/UnsteadyAero.f90 +++ b/modules/aerodyn/src/UnsteadyAero.f90 @@ -1416,7 +1416,7 @@ subroutine UA_Init_Outputs(InitInp, p, y, InitOut, errStat, errMsg) ! --- Write to File if ((p%NumOuts > 0) .and. p%UA_OUTS==2) then - call WrScr(' UA: Writing separate output file: '//trim((InitInp%OutRootName)//'.out')) + call WrScr(' UA: Writing separate output file: '//trim(InitInp%OutRootName)//'.out') CALL GetNewUnit( p%unOutFile, ErrStat2, ErrMsg2 ) call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) if (ErrStat >= AbortErrLev) return diff --git a/modules/lindyn/src/LinDyn.f90 b/modules/lindyn/src/LinDyn.f90 index 9ae64598f4..3bb9f0f292 100644 --- a/modules/lindyn/src/LinDyn.f90 +++ b/modules/lindyn/src/LinDyn.f90 @@ -238,8 +238,8 @@ end subroutine LD_InitInputData !---------------------------------------------------------------------------------------------------------------------------------- !> Compute A and B state matrices for a linear mechanical system !! NOTE: Generic function (no derived types), keep it that way -!! A = [ 0 I ] B = [0 ] -!! [-M^{-1}K -M^{-1}C ] = [-M^{-1}] +!! A = [ 0 I ] B = [ 0 ] +!! [-M^{-1}K -M^{-1}C ] = [ M^{-1} ] subroutine StateMatrices(MM, CC, KK, AA, BB, errStat, errMsg) real(ReKi), intent(in ) :: MM(:,:) real(ReKi), intent(in ) :: CC(:,:) @@ -251,6 +251,7 @@ subroutine StateMatrices(MM, CC, KK, AA, BB, errStat, errMsg) integer(IntKi) :: errStat2 ! Status of error message character(1024) :: errMsg2 ! Error message if ErrStat /= ErrID_None integer :: nx, nq, i + real(ReKi), dimension(:,:), allocatable :: MLU ! LU factorization of M matrix real(ReKi), dimension(:,:), allocatable :: MinvX ! Tmp array to store either: M^{-1} C, M^{-1} K , or M^{-1} real(ReKi), dimension(:) , allocatable :: WORK ! LAPACK variable @@ -291,10 +292,12 @@ subroutine StateMatrices(MM, CC, KK, AA, BB, errStat, errMsg) ! Inverse of M MinvX = MLU LWORK=nx*nx ! Somehow LWORK = -1 does not work - allocate(WORK(LWORk)) + call AllocAry(WORK, LWORk, 'WORK', errStat2, errMsg2); if(Failed()) return call LAPACK_getri(nx, MinvX, IPIV, WORK, LWORK, errStat2, errMsg2); if(Failed()) return - BB(nx+1:nq, : ) = -MinvX + BB(nx+1:nq, : ) = MinvX + call CleanUp() + contains logical function Failed() call SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, 'StateMatrices' ) diff --git a/reg_tests/executeUnsteadyAeroRegressionCase.py b/reg_tests/executeUnsteadyAeroRegressionCase.py index d67a9ecf68..2e441c4abc 100644 --- a/reg_tests/executeUnsteadyAeroRegressionCase.py +++ b/reg_tests/executeUnsteadyAeroRegressionCase.py @@ -117,7 +117,7 @@ def Error(msg): for dvrf in dvrFiles: simName = os.path.splitext(os.path.basename(dvrf))[0] localOutFile = os.path.join(testBuildDirectory, simName + '.outb') - baselineOutFile = os.path.join(inputsDirectory, simName + '.out') # TODO TODO + baselineOutFile = os.path.join(inputsDirectory, simName + '.outb') # TODO TODO if not os.path.exists(localOutFile): Error('File does not exist: {}'.format(localOutFile)) diff --git a/reg_tests/r-test b/reg_tests/r-test index 1abd888ce2..37ce0d28ed 160000 --- a/reg_tests/r-test +++ b/reg_tests/r-test @@ -1 +1 @@ -Subproject commit 1abd888ce2209432cf5d126d5bfcd989d221327b +Subproject commit 37ce0d28ed629faa945975c3836bae5b1efe9050