OpenFAST
Wind turbine multiphysics simulator
Public Member Functions | List of all members
nwtc_num::locatestp Interface Reference

This subroutine finds the lower-bound index of an input x-value located in an array. More...

Public Member Functions

subroutine locatestpr4 (XVal, XAry, Ind, AryLen)
 This subroutine finds the lower-bound index of an input x-value located in an array. More...
 
subroutine locatestpr8 (XVal, XAry, Ind, AryLen)
 This subroutine finds the lower-bound index of an input x-value located in an array. More...
 
subroutine locatestpr16 (XVal, XAry, Ind, AryLen)
 This subroutine finds the lower-bound index of an input x-value located in an array. More...
 

Detailed Description

This subroutine finds the lower-bound index of an input x-value located in an array.

On return, Ind has a value such that XAry(Ind) <= XVal < XAry(Ind+1), with the exceptions that Ind = 0 when XVal < XAry(1), and Ind = AryLen when XAry(AryLen) <= XVal.

It uses the passed index as the starting point and does a stepwise search from there. This is especially useful when the calling routines save the value from the last time this routine was called for a given case where XVal does not change much from call to call. When there is no correlation from one interpolation to another, a binary search may be a better choice (see nwtc_num::locatebin).

Use LocateStp (nwtc_num::locatestp) instead of directly calling a specific routine in the generic interface.

Parameters
[in]arylenLength of the array.
[in,out]indInitial and final index into the array.
[in]xaryArray of X values to be interpolated.
[in]xvalX value to be interpolated.

Member Function/Subroutine Documentation

◆ locatestpr16()

subroutine nwtc_num::locatestp::locatestpr16 ( real(quki), intent(in)  XVal,
real(quki), dimension (arylen), intent(in)  XAry,
integer, intent(inout)  Ind,
integer, intent(in)  AryLen 
)

This subroutine finds the lower-bound index of an input x-value located in an array.

On return, Ind has a value such that XAry(Ind) <= XVal < XAry(Ind+1), with the exceptions that Ind = 0 when XVal < XAry(1), and Ind = AryLen when XAry(AryLen) <= XVal.

It uses the passed index as the starting point and does a stepwise search from there. This is especially useful when the calling routines save the value from the last time this routine was called for a given case where XVal does not change much from call to call. When there is no correlation from one interpolation to another, a binary search may be a better choice (see nwtc_num::locatebin).

Use LocateStp (nwtc_num::locatestp) instead of directly calling a specific routine in the generic interface.

Parameters
[in]arylenLength of the array.
[in,out]indInitial and final index into the array.
[in]xaryArray of X values to be interpolated.
[in]xvalX value to be interpolated.

◆ locatestpr4()

subroutine nwtc_num::locatestp::locatestpr4 ( real(siki), intent(in)  XVal,
real(siki), dimension (arylen), intent(in)  XAry,
integer, intent(inout)  Ind,
integer, intent(in)  AryLen 
)

This subroutine finds the lower-bound index of an input x-value located in an array.

On return, Ind has a value such that XAry(Ind) <= XVal < XAry(Ind+1), with the exceptions that Ind = 0 when XVal < XAry(1), and Ind = AryLen when XAry(AryLen) <= XVal.

It uses the passed index as the starting point and does a stepwise search from there. This is especially useful when the calling routines save the value from the last time this routine was called for a given case where XVal does not change much from call to call. When there is no correlation from one interpolation to another, a binary search may be a better choice (see nwtc_num::locatebin).

Use LocateStp (nwtc_num::locatestp) instead of directly calling a specific routine in the generic interface.

Parameters
[in]arylenLength of the array.
[in,out]indInitial and final index into the array.
[in]xaryArray of X values to be interpolated.
[in]xvalX value to be interpolated.

◆ locatestpr8()

subroutine nwtc_num::locatestp::locatestpr8 ( real(r8ki), intent(in)  XVal,
real(r8ki), dimension (arylen), intent(in)  XAry,
integer, intent(inout)  Ind,
integer, intent(in)  AryLen 
)

This subroutine finds the lower-bound index of an input x-value located in an array.

On return, Ind has a value such that XAry(Ind) <= XVal < XAry(Ind+1), with the exceptions that Ind = 0 when XVal < XAry(1), and Ind = AryLen when XAry(AryLen) <= XVal.

It uses the passed index as the starting point and does a stepwise search from there. This is especially useful when the calling routines save the value from the last time this routine was called for a given case where XVal does not change much from call to call. When there is no correlation from one interpolation to another, a binary search may be a better choice (see nwtc_num::locatebin).

Use LocateStp (nwtc_num::locatestp) instead of directly calling a specific routine in the generic interface.

Parameters
[in]arylenLength of the array.
[in,out]indInitial and final index into the array.
[in]xaryArray of X values to be interpolated.
[in]xvalX value to be interpolated.

The documentation for this interface was generated from the following file: