Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e5762db
hd_c_lib: placeholder interface and rough-in
andrew-platt May 17, 2021
005f909
NWTC lib: add InitFileInfo_FromNullCString subroutine
andrew-platt May 18, 2021
e60f275
NWTC lib: add unit test for InitFileInfo_FromNullCString subroutine a…
andrew-platt May 18, 2021
0feeb35
hd: update hd_end error handling a bit
andrew-platt May 28, 2021
45c967d
hd_c_lib: some updates for data passing to init
andrew-platt May 28, 2021
55f0020
ifw_c_lib: update init inputs, mesh+mapping, move stuff from driver t…
andrew-platt Jun 12, 2021
6f38412
hd_c_lib: add error checks at init, pass rootname
andrew-platt Jun 14, 2021
8735e14
hd_c_lib: add mesh transfers, CalcOutput interface, DBGoutput writing
andrew-platt Jun 15, 2021
b7c4018
Merge remote-tracking branch 'OpenFAST/dev' into f/HD_c_lib
andrew-platt Jun 15, 2021
00c9083
hd_c_lib: add updatestates interface, refine state time handling
andrew-platt Jun 25, 2021
a7d0de8
Merge remote-tracking branch 'OpenFAST/dev' into f/HD_c_lib
andrew-platt Jun 25, 2021
ba5ec1b
HD_c_lib: add VS solution
andrew-platt Jul 27, 2021
2c6ca6d
HD_c_lib: remove extra arguments from UpdateStates_C interface
andrew-platt Jul 30, 2021
57d7e87
HD_c_lib: update timestep handling UpdateStates_C and fix angle handling
andrew-platt Jul 30, 2021
fad2f0e
HD_c_lib: updates in r-test example driver case
andrew-platt Jul 30, 2021
9590ff1
HD_c_lib: add notes about potential channel name buffer overruns and …
andrew-platt Aug 6, 2021
2b40d69
Merge remote-tracking branch 'OpenFAST/dev' into f/HD_c_lib
andrew-platt Aug 6, 2021
9f8a537
HD_c_lib: add regression test for HD with python
andrew-platt Aug 6, 2021
08aba1a
hd_c_lib: update interp order in test case to match corresponding OF …
andrew-platt Aug 31, 2021
b60413d
Merge remote-tracking branch 'OpenFAST/dev' into f/HD_c_lib
andrew-platt Dec 7, 2021
5bbc63e
HD_C_lib: renaming HydroDyn_C.f90 to HydroDyn_C_Binding.f90
andrew-platt Dec 8, 2021
f1f4dfc
hd_c_lib: Update routine names to match how was done with ifw_c_lib
andrew-platt Dec 8, 2021
18a8be7
Merge remote-tracking branch 'OpenFAST/dev' into f/HD_c_lib
andrew-platt Apr 7, 2022
43415b7
Fix format and typo in comment
rafmudaf May 3, 2022
de12016
hd_c_lib: send current time to UpdateStates (was incorrectly sending …
andrew-platt May 6, 2022
90fc7f5
Merge remote-tracking branch 'OpenFAST/dev' into f/HD_c_lib
andrew-platt May 6, 2022
a05f571
Merge remote-tracking branch 'OpenFAST/dev' into f/HD_c_lib
andrew-platt Jun 29, 2022
7b6f870
HD_c_lib: update GH actions to run the python test as an interface test
andrew-platt Jun 29, 2022
6426609
HD_c_lib: hd_py_* regression tests missing `pthon` label
andrew-platt Jun 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/tests-module-hydrodyn/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ author: 'Rafael Mudafort https://github.com/rafmudaf'
runs:
using: "composite"
steps:
- run: ctest -VV -j7 -R hd_
- run: ctest -VV -j7 -R hd_ -LE python
working-directory: ${{runner.workspace}}/openfast/build
shell: bash
2 changes: 2 additions & 0 deletions .github/workflows/automated-dev-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ jobs:
cmake --build . --target openfastlib -- -j ${{env.NUM_PROCS}}
cmake --build . --target openfast_cpp -- -j ${{env.NUM_PROCS}}
cmake --build . --target openfastcpp -- -j ${{env.NUM_PROCS}}
cmake --build . --target hydrodyn_c_binding -- -j ${{env.NUM_PROCS}}
cmake --build . --target ifw_c_binding -- -j ${{env.NUM_PROCS}}
cmake --build . --target regression_tests -- -j ${{env.NUM_PROCS}}

Expand Down Expand Up @@ -493,5 +494,6 @@ jobs:
name: c-interface-reg-tests
path: |
${{runner.workspace}}/openfast/build/reg_tests/glue-codes/openfast-cpp
${{runner.workspace}}/openfast/build/reg_tests/modules/hydrodyn
${{runner.workspace}}/openfast/build/reg_tests/modules/inflowwind
!${{runner.workspace}}/openfast/build/reg_tests/glue-codes/openfast-cpp/5MW_Baseline
9 changes: 8 additions & 1 deletion modules/hydrodyn/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,21 @@ set(HYDRODYN_SOURCES
add_library(hydrodynlib ${HYDRODYN_SOURCES})
target_link_libraries(hydrodynlib nwtclibs)

# c-bindings interface library
add_library(hydrodyn_c_binding SHARED src/HydroDyn_C_Binding.f90)
target_link_libraries(hydrodyn_c_binding hydrodynlib)
if(APPLE OR UNIX)
target_compile_definitions(hydrodyn_c_binding PUBLIC -DIMPLICIT_DLLEXPORT)
endif()

add_executable(hydrodyn_driver src/HydroDyn_DriverCode.f90)
target_link_libraries(hydrodyn_driver hydrodynlib nwtclibs versioninfolib)

#add_executable(ss_radiation
# src/SS_Radiation_DriverCode.f90)
#target_link_libraries(ss_radiation hydrodynlib nwtclibs)

install(TARGETS hydrodynlib hydrodyn_driver
install(TARGETS hydrodynlib hydrodyn_driver hydrodyn_c_binding
EXPORT "${CMAKE_PROJECT_NAME}Libraries"
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
Expand Down
621 changes: 621 additions & 0 deletions modules/hydrodyn/python-lib/hydrodyn_library.py

Large diffs are not rendered by default.

45 changes: 20 additions & 25 deletions modules/hydrodyn/src/HydroDyn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1793,52 +1793,47 @@ SUBROUTINE HydroDyn_End( u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg )
CHARACTER(*), INTENT( OUT) :: ErrMsg !< Error message if ErrStat /= ErrID_None


INTEGER(IntKi) :: ErrStat2 ! local error status
CHARACTER(ErrMsgLen) :: ErrMsg2 ! local error message
CHARACTER(*), PARAMETER :: RoutineName = 'HydroDyn_End'

! Initialize ErrStat

ErrStat = ErrID_None
ErrMsg = ""


! Place any last minute operations or calculations here:



! Write the HydroDyn-level output file data if the user requested module-level output
! and the current time has advanced since the last stored time step.

IF ( p%OutSwtch == 1 .OR. p%OutSwtch == 3) THEN
CALL HDOut_WriteOutputs( m%LastOutTime, y, p, m%Decimate, ErrStat, ErrMsg )
CALL HDOut_WriteOutputs( m%LastOutTime, y, p, m%Decimate, ErrStat2, ErrMsg2 )
call SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
END IF

! Close files here:
CALL HDOut_CloseOutput( p, ErrStat, ErrMsg )
CALL HDOut_CloseOutput( p, ErrStat2, ErrMsg2 )
call SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )


! Destroy the input data:

CALL HydroDyn_DestroyInput( u, ErrStat, ErrMsg )
! Destroy the input data: (ignore errors)
CALL HydroDyn_DestroyInput( u, ErrStat2, ErrMsg2 )


! Destroy the parameter data:

CALL HydroDyn_DestroyParam( p, ErrStat, ErrMsg )
! Destroy the parameter data: (ignore errors)
CALL HydroDyn_DestroyParam( p, ErrStat2, ErrMsg2 )


! Destroy the state data:

CALL HydroDyn_DestroyContState( x, ErrStat, ErrMsg )
CALL HydroDyn_DestroyDiscState( xd, ErrStat, ErrMsg )
CALL HydroDyn_DestroyConstrState( z, ErrStat, ErrMsg )
CALL HydroDyn_DestroyOtherState( OtherState, ErrStat, ErrMsg )
! Destroy the state data: (ignore errors)
CALL HydroDyn_DestroyContState( x, ErrStat2, ErrMsg2 )
CALL HydroDyn_DestroyDiscState( xd, ErrStat2, ErrMsg2 )
CALL HydroDyn_DestroyConstrState( z, ErrStat2, ErrMsg2 )
CALL HydroDyn_DestroyOtherState( OtherState, ErrStat2, ErrMsg2 )

! Destroy misc variables:

CALL HydroDyn_DestroyMisc( m, ErrStat, ErrMsg )
! Destroy misc variables: (ignore errors)
CALL HydroDyn_DestroyMisc( m, ErrStat2, ErrMsg2 )

! Destroy the output data:

CALL HydroDyn_DestroyOutput( y, ErrStat, ErrMsg )
! Destroy the output data: (ignore errors)
CALL HydroDyn_DestroyOutput( y, ErrStat2, ErrMsg2 )


END SUBROUTINE HydroDyn_End
Expand Down
Loading