MPI-AMRVAC  3.1
The MPI - Adaptive Mesh Refinement - Versatile Advection Code
Data Types | Modules | Functions/Subroutines
mod_lookup_table.t File Reference

Go to the source code of this file.

Modules

module  mod_lookup_table
 A Fortran 90 module for creating 1D and 2D lookup tables. These tables can be used to efficiently interpolate one or more values.
 

Functions/Subroutines

pure integer function, public mod_lookup_table::find_index_linear (list, val)
 Linear search of sorted list for the smallest ix such that list(ix) >= val. On failure, returns size(list)+1. More...
 
pure integer function, public mod_lookup_table::find_index_bsearch (list, val)
 Binary search of sorted list for the smallest ix such that list(ix) >= val. On failure, returns size(list)+1. More...
 
pure integer function, public mod_lookup_table::find_index_adaptive (list, val)
 Adaptive search (combination of linear and binary search) of sorted list for the smallest ix such that list(ix) >= val. On failure, returns size(list)+1. More...
 
type(lt_t) function, public mod_lookup_table::lt_create (x_min, x_max, n_points, n_cols)
 This function returns a new lookup table. More...
 
type(lt_t) function, public mod_lookup_table::lt_create_from_data (x_min, x_max, spaced_data)
 This function returns a new lookup table from regularly spaced data. More...
 
pure real(dp) function, dimension(n_points), public mod_lookup_table::lt_get_xdata (x_min, dx, n_points)
 Returns the x-coordinates of the lookup table. More...
 
pure real(dp) function, dimension(size(new_x)), public mod_lookup_table::lt_get_spaced_data (in_x, in_y, new_x)
 Linearly interpolate the (x, y) input data to the new_x coordinates. More...
 
pure subroutine, public mod_lookup_table::lt_set_col (my_lt, col_ix, x, y)
 Fill the column with index col_ix using the linearly interpolated (x, y) data. More...
 
pure subroutine, public mod_lookup_table::lt_add_col (my_lt, x, y)
 Add a new column by linearly interpolating the (x, y) data. More...
 
elemental type(lt_loc_t) function, public mod_lookup_table::lt_get_loc (my_lt, x)
 Get a location in the lookup table. More...
 
pure real(dp) function, dimension(my_lt%n_cols), public mod_lookup_table::lt_get_mcol (my_lt, x)
 Get the values of all columns at x. More...
 
elemental real(dp) function, public mod_lookup_table::lt_get_col (my_lt, col_ix, x)
 Get the value of a single column at x. More...
 
pure real(dp) function, dimension(my_lt%n_cols), public mod_lookup_table::lt_get_mcol_at_loc (my_lt, loc)
 Get the values of all columns at a location. More...
 
elemental real(dp) function, public mod_lookup_table::lt_get_col_at_loc (my_lt, col_ix, loc)
 Get the value of a single column at a location. More...
 
pure subroutine, public mod_lookup_table::lt_get_data (my_lt, x_data, cols_rows)
 Get the x-coordinates and the columns of the lookup table. More...
 
pure subroutine, public mod_lookup_table::lt_lin_interp_list (x_list, y_list, x_value, y_value)
 Compute by use of linear interpolation the value in the middle. More...
 
subroutine, public mod_lookup_table::lt_to_file (my_lt, filename)
 Write the lookup table to file (in binary, potentially unportable) More...
 
subroutine, public mod_lookup_table::lt_from_file (my_lt, filename)
 Read the lookup table from file (in binary, potentially unportable) More...
 
type(lt2_t) function, public mod_lookup_table::lt2_create (x_min, x_max, n_points, n_cols)
 This function returns a new lookup table. More...
 
type(lt2_t) function, public mod_lookup_table::lt2_create_from_data (x_min, x_max, spaced_data)
 This function returns a new lookup table from regularly spaced data. More...
 
pure subroutine, public mod_lookup_table::lt2_set_col (my_lt, col_ix, x1, x2, y)
 Fill the column with index col_ix using linearly interpolated data. More...
 
elemental type(lt2_loc_t) function, public mod_lookup_table::lt2_get_loc (my_lt, x1, x2)
 Get a location in the lookup table. More...
 
elemental real(dp) function, public mod_lookup_table::lt2_get_col (my_lt, col_ix, x1, x2)
 Get the value of a single column at x. More...
 
elemental real(dp) function, public mod_lookup_table::lt2_get_col_at_loc (my_lt, col_ix, loc)
 Get the value of a single column at a location. More...
 
type(lt3_t) function, public mod_lookup_table::lt3_create (x_min, x_max, n_points, n_cols)
 This function returns a new lookup table. More...
 
type(lt3_t) function, public mod_lookup_table::lt3_create_from_data (x_min, x_max, spaced_data)
 This function returns a new lookup table from regularly spaced data. More...
 
elemental type(lt3_loc_t) function, public mod_lookup_table::lt3_get_loc (my_lt, x1, x2, x3)
 Get a location in the lookup table. More...
 
elemental real(dp) function, public mod_lookup_table::lt3_get_col (my_lt, col_ix, x1, x2, x3)
 Get the value of a single column at x. More...
 
elemental real(dp) function, public mod_lookup_table::lt3_get_col_at_loc (my_lt, col_ix, loc)
 Get the value of a single column at a location. More...