Add a new column by linearly interpolating the (x, y) data
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LT_t), | intent(inout) | :: | my_lt | |||
| real(kind=dp), | intent(in) | :: | x(:) | |||
| real(kind=dp), | intent(in) | :: | y(:) |
pure subroutine LT_add_col(my_lt, x, y) type(LT_t), intent(inout) :: my_lt real(dp), intent(in) :: x(:), y(:) type(LT_t) :: temp_lt temp_lt = my_lt deallocate(my_lt%cols_rows) deallocate(my_lt%rows_cols) allocate(my_lt%cols_rows(my_lt%n_cols+1, my_lt%n_points)) allocate(my_lt%rows_cols(my_lt%n_points, my_lt%n_cols+1)) my_lt%cols_rows(1:my_lt%n_cols, :) = temp_lt%cols_rows my_lt%rows_cols(:, 1:my_lt%n_cols) = temp_lt%rows_cols my_lt%n_cols = my_lt%n_cols + 1 my_lt%cols_rows(my_lt%n_cols, :) = LT_get_spaced_data(x, y,& LT_get_xdata(my_lt%x_min, my_lt%dx, my_lt%n_points)) my_lt%rows_cols(:, my_lt%n_cols) = my_lt%cols_rows(my_lt%n_cols, :) end subroutine LT_add_col