Find the index value i in a vector x for the desired abscissa a so that x[i] < a < x[i+1]
function searchIndex1D input Real x[:] "Abscissa table vector (strict monotonically increasing values required)"; input Real xi "Desired abscissa value"; input Integer iLast = 1 "Index used in last search"; input Boolean ensureMonotonicity = false "chech that the vector x is strict monotonically increasing)"; output Real test; output Integer iNew = 1 "xi is in the interval x[iNew] <= xi < x[iNew+1]"; end searchIndex1D;