Skip to content

Commit

Permalink
Merge pull request #2519 from deslaughter/b/of_registry_B4Ki_bounds
Browse files Browse the repository at this point in the history
Use B4Ki to store array bounds during pack/restore of TurbineType to file
  • Loading branch information
deslaughter authored Nov 16, 2024
2 parents c8ceb1e + 2e783a3 commit dc04b70
Show file tree
Hide file tree
Showing 57 changed files with 9,565 additions and 9,564 deletions.
120 changes: 60 additions & 60 deletions glue-codes/fast-farm/src/FASTWrapper_Types.f90

Large diffs are not rendered by default.

208 changes: 104 additions & 104 deletions glue-codes/fast-farm/src/FAST_Farm_Types.f90

Large diffs are not rendered by default.

130 changes: 65 additions & 65 deletions modules/aerodisk/src/AeroDisk_Types.f90

Large diffs are not rendered by default.

532 changes: 266 additions & 266 deletions modules/aerodyn/src/AeroAcoustics_Types.f90

Large diffs are not rendered by default.

178 changes: 89 additions & 89 deletions modules/aerodyn/src/AeroDyn_Driver_Types.f90

Large diffs are not rendered by default.

250 changes: 125 additions & 125 deletions modules/aerodyn/src/AeroDyn_Inflow_Types.f90

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions modules/aerodyn/src/AeroDyn_Registry.txt
Original file line number Diff line number Diff line change
Expand Up @@ -351,14 +351,6 @@ typedef ^ RotMiscVarType ReKi TFinSTV_i 3 - - "Structural velocity at the refer
typedef ^ RotMiscVarType ReKi TFinF_i 3 - - "Forces at the reference point of the fin in the inertial system"
typedef ^ RotMiscVarType ReKi TFinM_i 3 - - "Moments at the reference point of the fin in the inertial system"

typedef ^ MiscVarType RotMiscVarType rotors {:} - - "MiscVars for each rotor" -
typedef ^ MiscVarType FVW_InputType FVW_u : - - "Inputs to the FVW module" -
typedef ^ MiscVarType FVW_OutputType FVW_y - - - "Outputs from the FVW module" -
typedef ^ MiscVarType FVW_MiscVarType FVW - - - "MiscVars from the FVW module" -
typedef ^ MiscVarType ReKi WindPos {:}{:} - - "XYZ coordinates to query for wind velocity/acceleration" -
typedef ^ MiscVarType ReKi WindVel {:}{:} - - "XYZ components of wind velocity" -
typedef ^ MiscVarType ReKi WindAcc {:}{:} - - "XYZ components of wind acceleration" -

# Inflow data storage
typedef ^ ElemInflowType ReKi InflowVel {:}{:} - - "U,V,W at nodes on element (note if we change the requirement that NumNodes is the same for each blade, this will need to change)" m/s
typedef ^ ElemInflowType ReKi InflowAcc {:}{:} - - "Wind acceleration at nodes on element (blade or tower) (note if we change the requirement that NumNodes is the same for each blade, this will need to change)" m/s
Expand All @@ -368,8 +360,17 @@ typedef ^ RotInflowType ReKi InflowOnHub {3}{1} - - "U,V,W at hub" m/s
typedef ^ RotInflowType ReKi InflowOnNacelle {3}{1} - - "U,V,W at nacelle" m/s
typedef ^ RotInflowType ReKi InflowOnTailFin {3}{1} - - "U,V,W at tailfin" m/s
typedef ^ RotInflowType ReKi AvgDiskVel {3} - 0.0 "disk-averaged U,V,W" m/s

typedef ^ AD_InflowType ReKi InflowWakeVel {:}{:} - - "U,V,W at wake points" m/s
typedef ^ AD_InflowType RotInflowType RotInflow {:} - - "Inflow on rotor" -

typedef ^ MiscVarType RotMiscVarType rotors {:} - - "MiscVars for each rotor" -
typedef ^ MiscVarType FVW_InputType FVW_u : - - "Inputs to the FVW module" -
typedef ^ MiscVarType FVW_OutputType FVW_y - - - "Outputs from the FVW module" -
typedef ^ MiscVarType FVW_MiscVarType FVW - - - "MiscVars from the FVW module" -
typedef ^ MiscVarType ReKi WindPos {:}{:} - - "XYZ coordinates to query for wind velocity/acceleration" -
typedef ^ MiscVarType ReKi WindVel {:}{:} - - "XYZ components of wind velocity" -
typedef ^ MiscVarType ReKi WindAcc {:}{:} - - "XYZ components of wind acceleration" -
typedef ^ MiscVarType AD_InflowType Inflow {:} - - "Inflow storage (size of u for history of inputs)" -


Expand Down
1,738 changes: 869 additions & 869 deletions modules/aerodyn/src/AeroDyn_Types.f90

Large diffs are not rendered by default.

58 changes: 29 additions & 29 deletions modules/aerodyn/src/AirfoilInfo_Types.f90
Original file line number Diff line number Diff line change
Expand Up @@ -522,15 +522,15 @@ subroutine AFI_CopyTable_Type(SrcTable_TypeData, DstTable_TypeData, CtrlCode, Er
integer(IntKi), intent(in ) :: CtrlCode
integer(IntKi), intent( out) :: ErrStat
character(*), intent( out) :: ErrMsg
integer(B8Ki) :: LB(3), UB(3)
integer(B4Ki) :: LB(3), UB(3)
integer(IntKi) :: ErrStat2
character(ErrMsgLen) :: ErrMsg2
character(*), parameter :: RoutineName = 'AFI_CopyTable_Type'
ErrStat = ErrID_None
ErrMsg = ''
if (allocated(SrcTable_TypeData%Alpha)) then
LB(1:1) = lbound(SrcTable_TypeData%Alpha, kind=B8Ki)
UB(1:1) = ubound(SrcTable_TypeData%Alpha, kind=B8Ki)
LB(1:1) = lbound(SrcTable_TypeData%Alpha)
UB(1:1) = ubound(SrcTable_TypeData%Alpha)
if (.not. allocated(DstTable_TypeData%Alpha)) then
allocate(DstTable_TypeData%Alpha(LB(1):UB(1)), stat=ErrStat2)
if (ErrStat2 /= 0) then
Expand All @@ -541,8 +541,8 @@ subroutine AFI_CopyTable_Type(SrcTable_TypeData, DstTable_TypeData, CtrlCode, Er
DstTable_TypeData%Alpha = SrcTable_TypeData%Alpha
end if
if (allocated(SrcTable_TypeData%Coefs)) then
LB(1:2) = lbound(SrcTable_TypeData%Coefs, kind=B8Ki)
UB(1:2) = ubound(SrcTable_TypeData%Coefs, kind=B8Ki)
LB(1:2) = lbound(SrcTable_TypeData%Coefs)
UB(1:2) = ubound(SrcTable_TypeData%Coefs)
if (.not. allocated(DstTable_TypeData%Coefs)) then
allocate(DstTable_TypeData%Coefs(LB(1):UB(1),LB(2):UB(2)), stat=ErrStat2)
if (ErrStat2 /= 0) then
Expand All @@ -553,8 +553,8 @@ subroutine AFI_CopyTable_Type(SrcTable_TypeData, DstTable_TypeData, CtrlCode, Er
DstTable_TypeData%Coefs = SrcTable_TypeData%Coefs
end if
if (allocated(SrcTable_TypeData%SplineCoefs)) then
LB(1:3) = lbound(SrcTable_TypeData%SplineCoefs, kind=B8Ki)
UB(1:3) = ubound(SrcTable_TypeData%SplineCoefs, kind=B8Ki)
LB(1:3) = lbound(SrcTable_TypeData%SplineCoefs)
UB(1:3) = ubound(SrcTable_TypeData%SplineCoefs)
if (.not. allocated(DstTable_TypeData%SplineCoefs)) then
allocate(DstTable_TypeData%SplineCoefs(LB(1):UB(1),LB(2):UB(2),LB(3):UB(3)), stat=ErrStat2)
if (ErrStat2 /= 0) then
Expand Down Expand Up @@ -617,7 +617,7 @@ subroutine AFI_UnPackTable_Type(RF, OutData)
type(RegFile), intent(inout) :: RF
type(AFI_Table_Type), intent(inout) :: OutData
character(*), parameter :: RoutineName = 'AFI_UnPackTable_Type'
integer(B8Ki) :: LB(3), UB(3)
integer(B4Ki) :: LB(3), UB(3)
integer(IntKi) :: stat
logical :: IsAllocAssoc
if (RF%ErrStat /= ErrID_None) return
Expand Down Expand Up @@ -743,8 +743,8 @@ subroutine AFI_CopyParam(SrcParamData, DstParamData, CtrlCode, ErrStat, ErrMsg)
integer(IntKi), intent(in ) :: CtrlCode
integer(IntKi), intent( out) :: ErrStat
character(*), intent( out) :: ErrMsg
integer(B8Ki) :: i1
integer(B8Ki) :: LB(1), UB(1)
integer(B4Ki) :: i1
integer(B4Ki) :: LB(1), UB(1)
integer(IntKi) :: ErrStat2
character(ErrMsgLen) :: ErrMsg2
character(*), parameter :: RoutineName = 'AFI_CopyParam'
Expand All @@ -757,8 +757,8 @@ subroutine AFI_CopyParam(SrcParamData, DstParamData, CtrlCode, ErrStat, ErrMsg)
DstParamData%ColUAf = SrcParamData%ColUAf
DstParamData%AFTabMod = SrcParamData%AFTabMod
if (allocated(SrcParamData%secondVals)) then
LB(1:1) = lbound(SrcParamData%secondVals, kind=B8Ki)
UB(1:1) = ubound(SrcParamData%secondVals, kind=B8Ki)
LB(1:1) = lbound(SrcParamData%secondVals)
UB(1:1) = ubound(SrcParamData%secondVals)
if (.not. allocated(DstParamData%secondVals)) then
allocate(DstParamData%secondVals(LB(1):UB(1)), stat=ErrStat2)
if (ErrStat2 /= 0) then
Expand All @@ -773,8 +773,8 @@ subroutine AFI_CopyParam(SrcParamData, DstParamData, CtrlCode, ErrStat, ErrMsg)
DstParamData%NonDimArea = SrcParamData%NonDimArea
DstParamData%NumCoords = SrcParamData%NumCoords
if (allocated(SrcParamData%X_Coord)) then
LB(1:1) = lbound(SrcParamData%X_Coord, kind=B8Ki)
UB(1:1) = ubound(SrcParamData%X_Coord, kind=B8Ki)
LB(1:1) = lbound(SrcParamData%X_Coord)
UB(1:1) = ubound(SrcParamData%X_Coord)
if (.not. allocated(DstParamData%X_Coord)) then
allocate(DstParamData%X_Coord(LB(1):UB(1)), stat=ErrStat2)
if (ErrStat2 /= 0) then
Expand All @@ -785,8 +785,8 @@ subroutine AFI_CopyParam(SrcParamData, DstParamData, CtrlCode, ErrStat, ErrMsg)
DstParamData%X_Coord = SrcParamData%X_Coord
end if
if (allocated(SrcParamData%Y_Coord)) then
LB(1:1) = lbound(SrcParamData%Y_Coord, kind=B8Ki)
UB(1:1) = ubound(SrcParamData%Y_Coord, kind=B8Ki)
LB(1:1) = lbound(SrcParamData%Y_Coord)
UB(1:1) = ubound(SrcParamData%Y_Coord)
if (.not. allocated(DstParamData%Y_Coord)) then
allocate(DstParamData%Y_Coord(LB(1):UB(1)), stat=ErrStat2)
if (ErrStat2 /= 0) then
Expand All @@ -798,8 +798,8 @@ subroutine AFI_CopyParam(SrcParamData, DstParamData, CtrlCode, ErrStat, ErrMsg)
end if
DstParamData%NumTabs = SrcParamData%NumTabs
if (allocated(SrcParamData%Table)) then
LB(1:1) = lbound(SrcParamData%Table, kind=B8Ki)
UB(1:1) = ubound(SrcParamData%Table, kind=B8Ki)
LB(1:1) = lbound(SrcParamData%Table)
UB(1:1) = ubound(SrcParamData%Table)
if (.not. allocated(DstParamData%Table)) then
allocate(DstParamData%Table(LB(1):UB(1)), stat=ErrStat2)
if (ErrStat2 /= 0) then
Expand All @@ -821,8 +821,8 @@ subroutine AFI_DestroyParam(ParamData, ErrStat, ErrMsg)
type(AFI_ParameterType), intent(inout) :: ParamData
integer(IntKi), intent( out) :: ErrStat
character(*), intent( out) :: ErrMsg
integer(B8Ki) :: i1
integer(B8Ki) :: LB(1), UB(1)
integer(B4Ki) :: i1
integer(B4Ki) :: LB(1), UB(1)
integer(IntKi) :: ErrStat2
character(ErrMsgLen) :: ErrMsg2
character(*), parameter :: RoutineName = 'AFI_DestroyParam'
Expand All @@ -838,8 +838,8 @@ subroutine AFI_DestroyParam(ParamData, ErrStat, ErrMsg)
deallocate(ParamData%Y_Coord)
end if
if (allocated(ParamData%Table)) then
LB(1:1) = lbound(ParamData%Table, kind=B8Ki)
UB(1:1) = ubound(ParamData%Table, kind=B8Ki)
LB(1:1) = lbound(ParamData%Table)
UB(1:1) = ubound(ParamData%Table)
do i1 = LB(1), UB(1)
call AFI_DestroyTable_Type(ParamData%Table(i1), ErrStat2, ErrMsg2)
call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName)
Expand All @@ -852,8 +852,8 @@ subroutine AFI_PackParam(RF, Indata)
type(RegFile), intent(inout) :: RF
type(AFI_ParameterType), intent(in) :: InData
character(*), parameter :: RoutineName = 'AFI_PackParam'
integer(B8Ki) :: i1
integer(B8Ki) :: LB(1), UB(1)
integer(B4Ki) :: i1
integer(B4Ki) :: LB(1), UB(1)
if (RF%ErrStat >= AbortErrLev) return
call RegPack(RF, InData%ColCd)
call RegPack(RF, InData%ColCl)
Expand All @@ -871,9 +871,9 @@ subroutine AFI_PackParam(RF, Indata)
call RegPack(RF, InData%NumTabs)
call RegPack(RF, allocated(InData%Table))
if (allocated(InData%Table)) then
call RegPackBounds(RF, 1, lbound(InData%Table, kind=B8Ki), ubound(InData%Table, kind=B8Ki))
LB(1:1) = lbound(InData%Table, kind=B8Ki)
UB(1:1) = ubound(InData%Table, kind=B8Ki)
call RegPackBounds(RF, 1, lbound(InData%Table), ubound(InData%Table))
LB(1:1) = lbound(InData%Table)
UB(1:1) = ubound(InData%Table)
do i1 = LB(1), UB(1)
call AFI_PackTable_Type(RF, InData%Table(i1))
end do
Expand All @@ -887,8 +887,8 @@ subroutine AFI_UnPackParam(RF, OutData)
type(RegFile), intent(inout) :: RF
type(AFI_ParameterType), intent(inout) :: OutData
character(*), parameter :: RoutineName = 'AFI_UnPackParam'
integer(B8Ki) :: i1
integer(B8Ki) :: LB(1), UB(1)
integer(B4Ki) :: i1
integer(B4Ki) :: LB(1), UB(1)
integer(IntKi) :: stat
logical :: IsAllocAssoc
if (RF%ErrStat /= ErrID_None) return
Expand Down
Loading

0 comments on commit dc04b70

Please sign in to comment.