-
Notifications
You must be signed in to change notification settings - Fork 508
Updates to c-bindings #3108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates to c-bindings #3108
Conversation
- cleanup moordyn.py to use common stuff in interface_abc - cleanup seastate.py to use common stuff in interface_abc - cleanup aerodyn_inflow.py to use common stuff in interface_abc - use interface_abc with inflowwind.py - use interface_abc with hydrodyn.py
- New external routines: - IfW_C_GetFlowFieldPointer - IfW_C_SetFlowFieldPointer - IfW_C_GetWindVel - Updated to use NWTC_C_BINDING - minor linting - add routine to clear library memory
- ADI_C_GetFlowFieldPointer - ADI_C_SetFlowFieldPointer
to set the pointer, IfW will need to be initialized with a null data set. Init doesn't allow this at the moment
This is accurate for 1st order waves, but will exagerate a bit for 2nd order
- SeaSt_C_GetDens - SeaSt_C_GetDpth - SeaSt_C_GetMSL2SWL Also improved check on valid pointer
Interfaces are not up to date for all the changes here
Co-authored-by: andrew-platt <[email protected]>
Fix get_elevMinMax function signature to match implementation
WaveField_GetMinWaveElevEstimate --> WaveField_GetMinMaxWaveElevEstimate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little worried about the use of .encode('utf-8') in a lot of the Python code as I'm not sure how Fortran will handle it. I researched it a bit and it seemed to be compiler and OS dependent. UTF-8 is essentially ASCII if there aren't any non-ASCII characters, so that should be fine. I think we should leave it for now, but if we get bugs in the future, the solution is to change it to .encode('ascii', 'strict') which will force the user to use ASCII file paths.
Co-authored-by: Derek Slaughter <[email protected]>
|
I agree on the |
b13a579 to
9463e62
Compare
Ready to merge
Feature or improvement description
Several improvements to the c-bindings interfaces were developed jointly with an external partner. This PR brings in updates for the following:
AeroDyn_Inflow_C_Binding
InflowWindoutside of the libraryADI_C_GetFlowFieldPointerandADI_C_GetFlowFieldPointerfor directly manipulatingFlowFieldpointerFlowFielddata (i.e. from an instance ofInflowWindoutside the c-bind library)ADI_C_InittoADI_C_PreInitHydroDyn_C_Binding
InflowWind_C_Binding
NWTC_C_Bindingerror handling and paramsDebugLeveloutputs for troubleshooting interface issuesMemClearroutine)IfW_C_GetWindVelIfW_C_GetFlowFieldPointerIfW_C_SetFlowFieldPointerSeaState
SeaSt_WaveField.f90and c-bindingsWaveField_GetMinMaxWaveElevEstimateroutine (simple sum of max/min values of 1st and second )SeaState_C_Binding.f90DebugLeveloutputs for troubleshooting interface issuesSeaSt_C_GetDensSeaSt_C_GetDpthSeaSt_C_GetMSL2SWLpyOpenFAST
OpenFASTInterfaceTypeclass ininterface_abc.pyinterface_abc.pybase class between module interfaces, but that is not addressed hereWaveTank.f90
Related issue, if one exists
Depends on #3065
Impacted areas of the software
C-binding library interfaces,
pyOpenFAST, and regression testing interfacesTest results, if applicable
No results change, but interface in
py_seastate_1is updated to match changes inseastate.py