Skip to content
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

Add unit tests for BD_ComputeIniNodalCrv #636

Merged
merged 2 commits into from
Jan 19, 2021
Merged
Changes from 1 commit
Commits
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
10 changes: 5 additions & 5 deletions modules/beamdyn/tests/test_BD_ComputeIniNodalCrv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ subroutine test_BD_ComputeIniNodalCrv()

! --------------------------------------------------------------------------
testname = "Tangent aligned with z-axis and 0 degree twist:"
n = (/ 0.0_BDKi, 0.0_BDKi, 1.0_BDKi /) ! tangent axis
n = (/ real(0.0, BDKi), real(0.0, BDKi), real(1.0, BDKi) /) ! tangent axis
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised there were any issues with the original code for this line. I can see other lines were missing the _BDKi part, but I'm surprised that writing 0.0_BDKi was problematic.

angle = 0

! Baseline Wiener-Milenkovic parameters
Expand All @@ -45,7 +45,7 @@ subroutine test_BD_ComputeIniNodalCrv()

! Baseline Wiener-Milenkovic parameters
param = 4*tan((Pi_D/4)/4)
baseline_wmparams = (/ 0.0, param, 0.0 /)
baseline_wmparams = (/ real(0.0, BDKi), param, real(0.0, BDKi) /)

call BD_ComputeIniNodalCrv(n, angle, test_wmparams, ErrStat, ErrMsg)

Expand All @@ -59,7 +59,7 @@ subroutine test_BD_ComputeIniNodalCrv()

! Baseline Wiener-Milenkovic parameters
param = 4*tan((-Pi_D/4)/4)
baseline_wmparams = (/ param, 0.0, 0.0 /)
baseline_wmparams = (/ param, real(0.0, BDKi), real(0.0, BDKi) /)

call BD_ComputeIniNodalCrv(n, angle, test_wmparams, ErrStat, ErrMsg)

Expand All @@ -68,12 +68,12 @@ subroutine test_BD_ComputeIniNodalCrv()

! --------------------------------------------------------------------------
testname = "Tangent along z-axis with 45 degree twist:"
n = (/ 0.0_BDKi, 0.0, 1.0_BDKi /) ! tangent axis
n = (/ real(0.0, BDKi), real(0.0, BDKi), 1.0_BDKi /) ! tangent axis
angle = 45.0_BDKi

! Baseline Wiener-Milenkovic parameters
param = 4*tan((Pi_D/4)/4)
baseline_wmparams = (/ 0.0, 0.0, param /)
baseline_wmparams = (/ real(0.0, BDKi), real(0.0, BDKi), param /)

call BD_ComputeIniNodalCrv(n, angle, test_wmparams, ErrStat, ErrMsg)

Expand Down