version 0.6.0
Loading...
Searching...
No Matches
mod_interpolation_computer Module Reference

Computer for evaluating Interpolation Schemes. More...

Functions/Subroutines

double precision function int_weno_compute_from_values (scheme, int_step, steps, values)
 Compute the WENO interpolation via the scheme by giving the associated field values.
 
double precision function int_compute_from_values (scheme, int_step, steps, values)
 Compute the interpolation via the scheme by giving the associated field values.
 
double precision function int_compute_from_array (scheme, int_step, step_array, array, index)
 Compute the interpolation via the scheme by giving the associated array, the step array (see below), the (reference) index where to compute the interpolation.
 
double precision function int_weno_compute_from_array (scheme, int_step, step_array, array, index, fv)
 Compute the interpolation via the scheme by giving the associated array, the step array (see below), the index where to compute the FD.
 
double precision function int_weno_compute_from_field (scheme, int_step, x_step_array, y_step_array, z_step_array, field, i, j, k, axis, fv)
 Compute the WENO interpolation via the scheme by giving the associated field, the step arrays for each dimension, the indices (position) and the direction (x,y or z).
 
double precision function int_compute_from_field (scheme, int_step, x_step_array, y_step_array, z_step_array, field, i, j, k, axis, fv)
 Compute the interpolation via the scheme by giving the associated field, the step arrays for each dimension, the indices (position) and the direction (x,y or z).
 
double precision function int_compute_from_field_shift (scheme, int_step, x_step_array, y_step_array, z_step_array, field, i, j, k, axis, fv, shift)
 Compute the interpolation via the scheme by giving the associated field, the step arrays for each dimension, the indices (position) and the direction (x,y or z). Apply a shift to the *_step_array (useful when the steps' indices are not aligned with the field's indices).
 
double precision function int_weno_compute_point_from_field (scheme, x_pos_array, y_pos_array, z_pos_array, x_step_array, y_step_array, z_step_array, field, x, y, z, fv)
 Compute the WENO cross interpolation via the scheme by giving the associated field, the step arrays for each dimension, the position and the direction (x,y or z).
 
double precision function int_weno_dcompute_point_from_field (schemed, scheme, x_pos_array, y_pos_array, z_pos_array, x_step_array, y_step_array, z_step_array, field, x, y, z, axis, fv)
 Compute the WENO cross interpolation of the derivative via the scheme by giving the associated field, the step arrays for each dimension, the position and the direction (x,y or z).
 
double precision function rec_compute_from_field (scheme, step, x_cv_array, y_cv_array, z_cv_array, field, i, j, k, axis)
 Compute the reconstruction via the scheme by giving the associated field, the step arrays for each dimension, the indices (position) and the direction (x,y or z).
 
integer function compute_nearest_point_index (nx, x_pos, x)
 

Detailed Description

All the methods defined here are used to effectively compute/evaluate interpolation at grid nodes.

Function/Subroutine Documentation

◆ int_compute_from_field()

double precision function mod_interpolation_computer::int_compute_from_field ( class(t_int_scheme) scheme,
double precision, intent(in) int_step,
double precision, dimension(:), intent(in) x_step_array,
double precision, dimension(:), intent(in) y_step_array,
double precision, dimension(:), intent(in) z_step_array,
double precision, dimension(:,:,:), intent(in) field,
integer, intent(in) i,
integer, intent(in) j,
integer, intent(in) k,
integer, intent(in) axis,
integer, intent(in) fv )
Parameters
[in]schemethe interpolation scheme
[in]int_stepthe distance (from the reference node) where to interpolate
[in]x_step_arraythe discretization step array in the x direction (see "from_array" for specificity of FV method)
[in]y_step_arraythe discretization step array in the y direction
[in]z_step_arraythe discretization step array in the z direction
[in]fieldthe field \(\phi(i,j,k)\) to which apply the scheme at the given indices.
[in]i,j,kthe indices where to compute the interpolation
[in]axisthe axis (direction) \(axis={1,2,3}\) for \({x,y,z}\)
[in]FV\({0,1}\) is 0 for Point and 1 for Reconstruction
Returns
the value of the scheme evaluated with the input values
Warning
This function is not the most efficient, especialy when used in a i,j,k loop, because it switches for each direction!

◆ int_compute_from_field_shift()

double precision function mod_interpolation_computer::int_compute_from_field_shift ( class(t_int_scheme) scheme,
double precision, intent(in) int_step,
double precision, dimension(:), intent(in) x_step_array,
double precision, dimension(:), intent(in) y_step_array,
double precision, dimension(:), intent(in) z_step_array,
double precision, dimension(:,:,:), intent(in) field,
integer, intent(in) i,
integer, intent(in) j,
integer, intent(in) k,
integer, intent(in) axis,
integer, intent(in) fv,
integer, intent(in) shift )
Parameters
[in]schemethe interpolation scheme
[in]int_stepthe distance (from the reference node) where to interpolate
[in]x_step_arraythe discretization step array in the x direction (see "from_array" for specificity of FV method)
[in]y_step_arraythe discretization step array in the y direction
[in]z_step_arraythe discretization step array in the z direction
[in]fieldthe field \(\phi(i,j,k)\) to which apply the scheme at the given indices.
[in]i,j,kthe indices where to compute the interpolation
[in]axisthe axis (direction) \(axis={1,2,3}\) for \({x,y,z}\)
[in]FV\({0,1}\) is 0 for Point and 1 for Reconstruction
[in]shiftThe shift for the steps array
Returns
the value of the scheme evaluated with the input values
Warning
This function is not the most efficient, especialy when used in a i,j,k loop, because it switches for each direction!

◆ int_compute_from_values()

double precision function mod_interpolation_computer::int_compute_from_values ( class(t_int_scheme) scheme,
double precision, intent(in) int_step,
double precision, dimension(:), intent(in) steps,
double precision, dimension(:), intent(in) values )
Parameters
[in]schemethe interpolation scheme
[in]int_stepthe distance (from the reference node) where to interpolate
[in]stepsthe discretization steps, with size(steps)==size(values)-1
[in]valuesthe field values to which to apply the scheme. They must be of the same dimension as the scheme
Returns
the value of the scheme evaluated with the input values

◆ int_weno_compute_from_array()

double precision function mod_interpolation_computer::int_weno_compute_from_array ( class(t_int_weno_scheme) scheme,
double precision, intent(in) int_step,
double precision, dimension(:), intent(in) step_array,
double precision, dimension(:), intent(in) array,
integer, intent(in) index,
integer, intent(in) fv )
Parameters
[in]schemethe interpolation scheme
[in]int_stepthe distance (from the reference node) where to interpolate
[in]step_arraythe discretization step array where (if FV=0) step_array(i) is the step between array(i) and array(i+1) (or if FV=1) step_array(i) is the size of the \(i^th\) interval
[in]arraythe array \(\phi(i)\) to which apply the scheme at the given indices.
[in]indexthe index where to compute the FD
[in]FV\({0,1}\) is 0 for Finite Differences and 1 for Finite Volumes
Returns
the value of the scheme evaluated with the input values
Todo
MCO derivate from ext_scheme would be better

◆ int_weno_compute_from_field()

double precision function mod_interpolation_computer::int_weno_compute_from_field ( class(t_int_weno_scheme) scheme,
double precision, intent(in) int_step,
double precision, dimension(:), intent(in) x_step_array,
double precision, dimension(:), intent(in) y_step_array,
double precision, dimension(:), intent(in) z_step_array,
double precision, dimension(:,:,:), intent(in) field,
integer, intent(in) i,
integer, intent(in) j,
integer, intent(in) k,
integer, intent(in) axis,
integer, intent(in) fv )
Parameters
[in]schemethe interpolation scheme
[in]int_stepthe distance (from the reference node) where to interpolate
[in]x_step_arraythe discretization step array in the x direction (see "from_array" for specificity of FV method)
[in]y_step_arraythe discretization step array in the y direction
[in]z_step_arraythe discretization step array in the z direction
[in]fieldthe field \(\phi(i,j,k)\) to which apply the scheme at the given indices.
[in]i,j,kthe indices where to compute the interpolation
[in]axisthe axis (direction) \(axis={1,2,3}\) for \({x,y,z}\)
[in]FV\({0,1}\) is 0 for Point and 1 for Reconstruction
Returns
the value of the scheme evaluated with the input values
Warning
This function is not the most efficient, especialy when used in a i,j,k loop, because it switches for each direction!

◆ int_weno_compute_from_values()

double precision function mod_interpolation_computer::int_weno_compute_from_values ( class(t_int_weno_scheme) scheme,
double precision, intent(in) int_step,
double precision, dimension(:), intent(in) steps,
double precision, dimension(:), intent(in) values )
Parameters
[in]schemethe WENO interpolation scheme
[in]int_stepthe distance (from the reference node) where to interpolate
[in]stepsthe discretization steps, with size(steps)==size(values)-1
[in]valuesthe field values to which to apply the scheme. They must be of the same dimension as the scheme
Returns
the value of the scheme evaluated with the input values

◆ int_weno_compute_point_from_field()

double precision function mod_interpolation_computer::int_weno_compute_point_from_field ( class(t_int_weno_scheme) scheme,
double precision, dimension(:), intent(in) x_pos_array,
double precision, dimension(:), intent(in) y_pos_array,
double precision, dimension(:), intent(in) z_pos_array,
double precision, dimension(:), intent(in) x_step_array,
double precision, dimension(:), intent(in) y_step_array,
double precision, dimension(:), intent(in) z_step_array,
double precision, dimension(:,:,:), intent(in) field,
double precision, intent(in) x,
double precision, intent(in) y,
double precision, intent(in) z,
integer, intent(in) fv )
Parameters
[in]schemethe interpolation scheme
[in]x_pos_arraythe position of the nodes in the x direction
[in]y_pos_arraythe position of the nodes in the y direction
[in]z_pos_arraythe position of the nodes in the z direction
[in]x_step_arraythe discretization step array in the x direction (see "from_array" for specificity of FV method)
[in]y_step_arraythe discretization step array in the y direction
[in]z_step_arraythe discretization step array in the z direction
[in]fieldthe field \(\phi(i,j,k)\) to which apply the scheme at the given indices.
[in]x,y,zthe position where to compute the interpolation
[in]FV\({0,1}\) is 0 for Point and 1 for Reconstruction
Returns
the value of the scheme evaluated with the input values
Warning
This function is not the most efficient, especialy when used in a i,j,k loop, because it switches for each direction!

◆ int_weno_dcompute_point_from_field()

double precision function mod_interpolation_computer::int_weno_dcompute_point_from_field ( class(t_int_weno_scheme) schemed,
class(t_int_weno_scheme) scheme,
double precision, dimension(:), intent(in) x_pos_array,
double precision, dimension(:), intent(in) y_pos_array,
double precision, dimension(:), intent(in) z_pos_array,
double precision, dimension(:), intent(in) x_step_array,
double precision, dimension(:), intent(in) y_step_array,
double precision, dimension(:), intent(in) z_step_array,
double precision, dimension(:,:,:), intent(in) field,
double precision, intent(in) x,
double precision, intent(in) y,
double precision, intent(in) z,
integer, intent(in) axis,
integer, intent(in) fv )
Parameters
[in]schemethe interpolation scheme
[in]schemeDthe interpolation derivative scheme
[in]x_pos_arraythe position of the nodes in the x direction
[in]y_pos_arraythe position of the nodes in the y direction
[in]z_pos_arraythe position of the nodes in the z direction
[in]x_step_arraythe discretization step array in the x direction (see "from_array" for specificity of FV method)
[in]y_step_arraythe discretization step array in the y direction
[in]z_step_arraythe discretization step array in the z direction
[in]fieldthe field \(\phi(i,j,k)\) to which apply the scheme at the given indices.
[in]x,y,zthe position where to compute the interpolation
[in]axisthe axis along which to interpolate (1, 2 or 3)
[in]FV\({0,1}\) is 0 for Point and 1 for Reconstruction
Returns
the value of the scheme evaluated with the input values
Warning
This function is not the most efficient, especialy when used in a i,j,k loop, because it switches for each direction!

◆ rec_compute_from_field()

double precision function mod_interpolation_computer::rec_compute_from_field ( class(t_rec_scheme) scheme,
double precision, intent(in) step,
double precision, dimension(:), intent(in) x_cv_array,
double precision, dimension(:), intent(in) y_cv_array,
double precision, dimension(:), intent(in) z_cv_array,
double precision, dimension(:,:,:), intent(in) field,
integer, intent(in) i,
integer, intent(in) j,
integer, intent(in) k,
integer, intent(in) axis )
Parameters
[in]schemethe reconstruction scheme
[in]stepthe distance (from the reference node) where to reconstruct
[in]x_cv_arraythe control volume array in the x direction
[in]y_cv_arraythe control volume array in the y direction
[in]z_cv_arraythe control volume array in the z direction
[in]fieldthe field \(\phi(i,j,k)\) to which apply the scheme at the given indices.
[in]i,j,kthe indices where to compute the reconstruction
[in]axisthe axis (direction) \(axis={1,2,3}\) for \({x,y,z}\)
Returns
the value of the scheme evaluated with the input values
Warning
This function is not the most efficient, especialy when used in a i,j,k loop, because it switches for each direction!