The type for generic 1D point interpolation that has to be derived.
|
subroutine | int_point_1d_construct (self, index_start, index_end) |
| Initialize a 1D point interpolant.
|
|
subroutine | int_point_1d_place (self, x, coordinates, control_volumes) |
| Place (position) the interpolant to the corresponding 'index' given the coordinate 'X' of the point and the discrete nodes. The resulting index corresponds to the node that is just before (less than or equal) the point.
|
|
double precision function | int_point_1d_apply (self, values) |
| Apply the stencil of the interpolant after it has been placed, given the array of discrete node values. The result is the interpolation.
|
|
double precision function | int_point_1d_interpolate (self, x, coordinates, values, derivative, control_volumes) |
| Directly compute the interpolation at the given position. The result is the interpolation value.
|
|
pure integer function | compute_point_index_sorted_array_dichotomic (x, coordinates) |
| Returns the index of the node that is just before (<=) 'X'.
|
|
◆ compute_point_index_sorted_array_dichotomic()
pure integer function type_int_point_1d::compute_point_index_sorted_array_dichotomic |
( |
double precision, intent(in) | x, |
|
|
double precision, dimension(:), intent(in) | coordinates ) |
- Parameters
-
[in] | X | the point position |
[in] | coordinates | the coordinates of the nodes (in the interval '1:nx') |
- Returns
- the resulting node index
- Note
- the algorithm is dichotomic and should be the most efficient in the general "random X" case
◆ int_point_1d_apply()
double precision function type_int_point_1d::int_point_1d_apply |
( |
class(t_int_point_1d), intent(in) | self, |
|
|
double precision, dimension(:), intent(in) | values ) |
- Parameters
-
[in] | self | the element |
[in] | values | the values in the interval '1:nx' |
- Precondition
- - the subroutine 'place' has been previously called
-
- the subroutine 'compute_stencil' have been previously called
◆ int_point_1d_construct()
subroutine type_int_point_1d::int_point_1d_construct |
( |
class(t_int_point_1d), intent(inout) | self, |
|
|
integer, intent(in) | index_start, |
|
|
integer, intent(in) | index_end ) |
- Todo
- MCO: bring back the "construct" function instead for more clarity
◆ int_point_1d_interpolate()
double precision function type_int_point_1d::int_point_1d_interpolate |
( |
class(t_int_point_1d), intent(inout) | self, |
|
|
double precision, intent(in) | x, |
|
|
double precision, dimension(:), intent(in) | coordinates, |
|
|
double precision, dimension(:), intent(in) | values, |
|
|
integer, intent(in), optional | derivative, |
|
|
double precision, dimension(:), intent(in), optional | control_volumes ) |
- Parameters
-
[in,out] | self | the element |
[in] | X | the position where to interpolate |
[in] | coordinates | the coordinates of the nodes (in the interval '1:nx') |
[in] | values | the values (in the interval '1:nx') |
[in] | derivative | *(optional)* the derivative number: 0 (default) for value interpolation, 1 for first derivative, etc. |
[in] | control_volumes | the unused control volumes (used only for reconstruction) |
◆ int_point_1d_place()
subroutine type_int_point_1d::int_point_1d_place |
( |
class(t_int_point_1d), intent(inout) | self, |
|
|
double precision, intent(in) | x, |
|
|
double precision, dimension(:), intent(in) | coordinates, |
|
|
double precision, dimension(:), intent(in), optional | control_volumes ) |
- Warning
- if 'X' is less than 'coordinates(1)', then 'index' is set to '1'.
-
if 'X' is greater than 'coordinates(nx)', then 'index' is set to 'nx'.
- Note
- the index search algorithm is dichotomic
- Precondition
- coordinates is ordered and is at least of size 2