Loading [MathJax]/jax/output/HTML-CSS/jax.js

lookup_table_value Function

public function lookup_table_value(x, x_values, y_values, allow_outside) result(y_found)

Function for fast table-lookup, returns the corresponding y-value in y_values based on a given based on a given x0. If the allow_outside flag is given as .true. then values on the edge of the table are returned when the lookup value is outside the array. Uses simple linear interpolation.

Arguments

TypeIntentOptionalAttributesName
real(kind=dp), intent(in) :: x

value to look up

real(kind=dp), intent(in) :: x_values(:)

array of x-values

real(kind=dp), intent(in) :: y_values(:)

array of y-values, assuming y(x) relation

logical, optional :: allow_outside

flag to allow for lookups outside of the array

Return Value real(kind=dp)

interpolated y-value based on x0


Contents

None