Skip to content

Commit

Permalink
NWTC Library: minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bjonkman committed Aug 28, 2024
1 parent 29b60df commit e325456
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 45 deletions.
2 changes: 1 addition & 1 deletion modules/nwtc-library/src/ModMesh.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3396,7 +3396,7 @@ SUBROUTINE CreateInputPointMesh(mesh, posInit, orientInit, errStat, errMsg, hasM
endif
if (hasMotion) then
mesh%Orientation = mesh%RefOrientation
mesh%TranslationDisp = 0.0_ReKi
mesh%TranslationDisp = 0.0_R8Ki
mesh%TranslationVel = 0.0_ReKi
mesh%RotationVel = 0.0_ReKi
endif
Expand Down
84 changes: 43 additions & 41 deletions modules/nwtc-library/src/Registry_NWTC_Library.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,40 @@
#.............................................................


typedef NWTC_Library ProgDesc CHARACTER(99) Name - - - "Name of the program or module"
typedef ^ ^ CHARACTER(99) Ver - - - "Version number of the program or module"
typedef ^ ^ CHARACTER(24) Date - - - "String containing date module was last updated"

typedef NWTC_Library FASTdataType CHARACTER(1024) File - - - "Name of the FAST-style binary file"
typedef ^ ^ CHARACTER(1024) Descr - - - "String describing file"
typedef ^ ^ IntKi NumChans - - - "Number of output channels in this binary file (not including the time channel)"
typedef ^ ^ IntKi NumRecs - - - "Number of records (rows) of data in the file"
typedef ^ ^ DbKi TimeStep - - - "Time step for evenly-spaced data in the output file (when NumRecs is not allo"
typedef ^ ^ CHARACTER(ChanLen) ChanNames {:} - - "Strings describing the names of the channels from the binary file (including the time channel)"
typedef ^ ^ CHARACTER(ChanLen) ChanUnits {:} - - "Strings describing the units of the channels from the binary file (including the time channel)"
typedef ^ ^ ReKi Data {:}{:} - - "numeric data (rows and columns) from the binary file, including the time channel"

typedef NWTC_Library OutParmType IntKi Indx - - - "An index into AllOuts array where this channel is computed/stored"
typedef ^ ^ CHARACTER(ChanLen) Name - - - "Name of the output channel"
typedef ^ ^ CHARACTER(ChanLen) Units - - - "Units this channel is specified in"
typedef ^ ^ IntKi SignM - - - "Multiplier for output channel; usually -1 (minus) or 0 (invalid channel)"

typedef NWTC_Library FileInfoType IntKi NumLines
typedef ^ ^ IntKi NumFiles
typedef ^ ^ IntKi FileLine {:}
typedef ^ ^ IntKi FileIndx {:}
typedef NWTC_Library ProgDesc CHARACTER(99) Name - - - "Name of the program or module"
typedef ^ ^ CHARACTER(99) Ver - - - "Version number of the program or module"
typedef ^ ^ CHARACTER(24) Date - - - "String containing date module was last updated"

typedef NWTC_Library FASTdataType CHARACTER(1024) File - - - "Name of the FAST-style binary file"
typedef ^ ^ CHARACTER(1024) Descr - - - "String describing file"
typedef ^ ^ IntKi NumChans - - - "Number of output channels in this binary file (not including the time channel)"
typedef ^ ^ IntKi NumRecs - - - "Number of records (rows) of data in the file"
typedef ^ ^ DbKi TimeStep - - - "Time step for evenly-spaced data in the output file (when NumRecs is not allo"
typedef ^ ^ CHARACTER(ChanLen) ChanNames {:} - - "Strings describing the names of the channels from the binary file (including the time channel)"
typedef ^ ^ CHARACTER(ChanLen) ChanUnits {:} - - "Strings describing the units of the channels from the binary file (including the time channel)"
typedef ^ ^ ReKi Data {:}{:} - - "numeric data (rows and columns) from the binary file, including the time channel"
typedef ^ ^ DbKi Time {:}
typedef ^ ^ IntKi OutputFileFmtID

typedef NWTC_Library OutParmType IntKi Indx - - - "An index into AllOuts array where this channel is computed/stored"
typedef ^ ^ CHARACTER(ChanLen) Name - - - "Name of the output channel"
typedef ^ ^ CHARACTER(ChanLen) Units - - - "Units this channel is specified in"
typedef ^ ^ IntKi SignM - - - "Multiplier for output channel; usually -1 (minus) or 0 (invalid channel)"

typedef NWTC_Library FileInfoType IntKi NumLines
typedef ^ ^ IntKi NumFiles
typedef ^ ^ IntKi FileLine {:}
typedef ^ ^ IntKi FileIndx {:}
typedef ^ ^ CHARACTER(MaxFileInfoLineLen) FileList {:}
typedef ^ ^ CHARACTER(MaxFileInfoLineLen) Lines {:}

typedef NWTC_Library Quaternion ReKi q0
typedef ^ ^ ReKi v {3}
typedef NWTC_Library Quaternion ReKi q0
typedef ^ ^ ReKi v {3}

typedef NWTC_Library NWTC_RandomNumber_ParameterType IntKi pRNG
typedef ^ ^ IntKi RandSeed {3}
typedef ^ ^ IntKi RandSeedAry {:}
typedef ^ ^ CHARACTER(6) RNG_type
typedef NWTC_Library NWTC_RandomNumber_ParameterType IntKi pRNG
typedef ^ ^ IntKi RandSeed {3}
typedef ^ ^ IntKi RandSeedAry {:}
typedef ^ ^ CHARACTER(6) RNG_type

#-------------------------------------------------------------------------------
# Module Variables
Expand Down Expand Up @@ -138,17 +140,17 @@ typedef ^ ^ R8Ki distance
typedef ^ ^ R8Ki couple_arm {3} - - "Vector between a point and node 1 of an element (p_ODR - p_OSR)" m
typedef ^ ^ R8Ki shape_fn {2} - - "shape functions: 1-D element-level location [0,1] based on closest-line projection of point" -

typedef NWTC_Library MeshMapLinearizationType R8Ki mi {:}{:} - - "block matrix of motions that reflects identity (i.e., solely the mapping of one quantity to itself on another mesh)"
typedef ^ ^ R8Ki fx_p {:}{:} - - "block matrix of motions that reflects skew-symmetric (cross-product) matrix"
typedef ^ ^ R8Ki tv_uD {:}{:} - - "block matrix of translational velocity that is multiplied by destination translational displacement"
typedef ^ ^ R8Ki tv_uS {:}{:} - - "block matrix of translational velocity that is multiplied by source translational displacement"
typedef ^ ^ R8Ki ta_uD {:}{:} - - "block matrix of translational acceleration that is multiplied by destination translational displacement"
typedef ^ ^ R8Ki ta_uS {:}{:} - - "block matrix of translational acceleration that is multiplied by source translational displacement"
typedef ^ ^ R8Ki ta_rv {:}{:} - - "block matrix of translational acceleration that is multiplied by omega (RotationVel)"
typedef ^ ^ R8Ki li {:}{:} - - "block matrix of loads that reflects identity (i.e., solely the mapping on one quantity to itself on another mesh)"
typedef ^ ^ R8Ki M_uS {:}{:} - - "block matrix of moment that is multiplied by Source u (translationDisp)"
typedef ^ ^ R8Ki M_uD {:}{:} - - "block matrix of moment that is multiplied by Destination u (translationDisp)"
typedef ^ ^ R8Ki M_f {:}{:} - - "block matrix of moment that is multiplied by force"
typedef NWTC_Library MeshMapLinearizationType R8Ki mi {:}{:} - - "block matrix of motions that reflects identity (i.e., solely the mapping of one quantity to itself on another mesh)"
typedef ^ ^ R8Ki fx_p {:}{:} - - "block matrix of motions that reflects skew-symmetric (cross-product) matrix"
typedef ^ ^ R8Ki tv_uD {:}{:} - - "block matrix of translational velocity that is multiplied by destination translational displacement"
typedef ^ ^ R8Ki tv_uS {:}{:} - - "block matrix of translational velocity that is multiplied by source translational displacement"
typedef ^ ^ R8Ki ta_uD {:}{:} - - "block matrix of translational acceleration that is multiplied by destination translational displacement"
typedef ^ ^ R8Ki ta_uS {:}{:} - - "block matrix of translational acceleration that is multiplied by source translational displacement"
typedef ^ ^ R8Ki ta_rv {:}{:} - - "block matrix of translational acceleration that is multiplied by omega (RotationVel)"
typedef ^ ^ R8Ki li {:}{:} - - "block matrix of loads that reflects identity (i.e., solely the mapping on one quantity to itself on another mesh)"
typedef ^ ^ R8Ki M_uS {:}{:} - - "block matrix of moment that is multiplied by Source u (translationDisp)"
typedef ^ ^ R8Ki M_uD {:}{:} - - "block matrix of moment that is multiplied by Destination u (translationDisp)"
typedef ^ ^ R8Ki M_f {:}{:} - - "block matrix of moment that is multiplied by force"

typedef NWTC_Library MeshMapType MapType MapLoads {:} - - "mapping data structure for load fields on the mesh"
typedef ^ ^ MapType MapMotions {:} - - "mapping data structure for motion and/or scalar fields on the mesh"
Expand All @@ -160,6 +162,6 @@ typedef ^ ^ R8Ki DisplacedPo
typedef ^ ^ R8Ki LoadLn2_A_Mat {:}{:} - - "The 3-components of the forces for each node of an element in the point-to-line load mapping (for each element)"
typedef ^ ^ R8Ki LoadLn2_F {:}{:} - - "The 6-by-6 matrix that makes up the diagonal of the [A 0; B A] matrix in the point-to-line load mapping"
typedef ^ ^ R8Ki LoadLn2_M {:}{:} - - "The 3-components of the moments for each node of an element in the point-to-line load mapping (for each element)"
typedef ^ ^ MeshMapLinearizationType dM
#typedef ^ ^ MeshType Lumped_Points_Dest - - - "temporary mesh for debugging the lumped values in the line2-to-line2"
typedef ^ ^ MeshMapLinearizationType dM
#typedef ^ ^ MeshType Lumped_Points_Dest - - - "temporary mesh for debugging the lumped values in the line2-to-line2"

4 changes: 3 additions & 1 deletion modules/nwtc-library/src/Registry_NWTC_Library_base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ typedef ^ ^ DbKi TimeStep -
typedef ^ ^ CHARACTER(ChanLen) ChanNames {:} - - "Strings describing the names of the channels from the binary file (including the time channel)"
typedef ^ ^ CHARACTER(ChanLen) ChanUnits {:} - - "Strings describing the units of the channels from the binary file (including the time channel)"
typedef ^ ^ ReKi Data {:}{:} - - "numeric data (rows and columns) from the binary file, including the time channel"
typedef ^ ^ DbKi Time {:} - - "The time being output to the file (if using FileFmtID_WithoutTime [or FileFmtID_ChanLen]: element 1 is the first output time, element 2 is the delta t)"
typedef ^ ^ IntKi OutputFileFmtID - - - "Identifier for file format (changes definition of Time field)"

typedef NWTC_Library OutParmType IntKi Indx - - - "An index into AllOuts array where this channel is computed/stored"
typedef ^ ^ CHARACTER(ChanLen) Name - - - "Name of the output channel"
Expand All @@ -34,7 +36,7 @@ typedef ^ ^ CHARACTER(MaxFileInfoLineLen) Lines
typedef NWTC_Library Quaternion ReKi q0
typedef ^ ^ ReKi v {3}

typedef NWTC_Library NWTC_RandomNumber_ParameterType IntKi pRNG
typedef NWTC_Library NWTC_RandomNumber_ParameterType IntKi pRNG
typedef ^ ^ IntKi RandSeed {3}
typedef ^ ^ IntKi RandSeedAry {:}
typedef ^ ^ CHARACTER(6) RNG_type
Expand Down
2 changes: 1 addition & 1 deletion modules/nwtc-library/src/Registry_NWTC_Library_mesh.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


#BJJ: the following three types will actually be placed in the ModMesh_Mapping.f90 file instead of NWTC_Library_Types.f90
typedef NWTC_Library MapType IntKi OtherMesh_Element - - - "Node (for point meshes) or Element (for line2 meshes) number on other mesh; for loads, other mesh is Dest, for motions/scalars, other mesh is Src"
typedef NWTC_Library MapType IntKi OtherMesh_Element - - - "Node (for point meshes) or Element (for line2 meshes) number on other mesh; for loads, other mesh is Dest, for motions/scalars, other mesh is Src" -
typedef ^ ^ R8Ki distance - - - "Magnitude of couple_arm" m
typedef ^ ^ R8Ki couple_arm {3} - - "Vector between a point and node 1 of an element (p_ODR - p_OSR)" m
typedef ^ ^ R8Ki shape_fn {2} - - "shape functions: 1-D element-level location [0,1] based on closest-line projection of point" -
Expand Down
5 changes: 4 additions & 1 deletion modules/nwtc-library/src/SingPrec.f90
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ MODULE Precision

#endif

INTEGER, PARAMETER :: BYTES_IN_B4Ki = 4 !< Number of bytes per B4Ki number
INTEGER, PARAMETER :: BYTES_IN_B8Ki = 8 !< Number of bytes per B8Ki number

INTEGER, PARAMETER :: BYTES_IN_R4Ki = 4 !< Number of bytes per R4Ki number
INTEGER, PARAMETER :: BYTES_IN_R8Ki = 8 !< Number of bytes per R8Ki number

Expand All @@ -64,7 +67,7 @@ MODULE Precision
! The default kinds for reals and integers, and the number of bytes they contain:

INTEGER, PARAMETER :: IntKi = B4Ki !< Default kind for integers
INTEGER, PARAMETER :: BYTES_IN_INT = 4 !< Number of bytes per IntKi number - use SIZEOF()
INTEGER, PARAMETER :: BYTES_IN_INT = BYTES_IN_B4Ki !< Number of bytes per IntKi number - use SIZEOF()

INTEGER, PARAMETER :: SiKi = R4Ki !< Default kind for single floating-point numbers
INTEGER, PARAMETER :: BYTES_IN_SiKi = BYTES_IN_R4Ki !< Number of bytes per R4Ki number - use SIZEOF()
Expand Down

0 comments on commit e325456

Please sign in to comment.