Computer for evaluating Finite Difference Schemes. More...
Functions/Subroutines | |
double precision function | fd_compute_from_values (scheme, steps, values) |
Compute the finite difference via the scheme by giving the associated field values. | |
double precision function | fd_weno_compute_from_values (scheme, step, steps, values) |
Compute the WENO finite difference via the scheme by giving the associated field values. | |
double precision function | fd_compute_from_scheme (scheme, values) |
Compute the finite difference of the scheme by giving the associated field values. | |
double precision function | fd_compute_from_array (scheme, step_array, array, index) |
Compute the finite difference via the scheme by giving the associated array, the step array (see below), the index where to compute the FD. | |
double precision function | fd_compute_from_field (scheme, x_step_array, y_step_array, z_step_array, field, i, j, k, axis) |
Compute the finite difference 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 | fd_compute_from_field_offset (scheme, x_step_array, y_step_array, z_step_array, field, i, j, k, axis, offset) |
Compute the finite difference 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 | fd_weno_compute_from_array (scheme, step, step_array, array, index) |
Compute the WENO finite difference via the scheme by giving the associated array, the step array (see below), the index where to compute the FD. | |
double precision function | fd_weno_compute_from_field (scheme, step, x_step_array, y_step_array, z_step_array, field, i, j, k, axis) |
Compute the WENO finite difference via the scheme by giving the associated field, the step arrays for each dimension, the indices (position) and the direction (x,y or z). | |
All the methods defined here are used to effectively compute/evaluate finite differences. They take as argument a scheme that is built through the various schemes of the module (see mod_finite_differences_scheme_first_o1 for example).
double precision function mod_finite_differences_computer::fd_compute_from_array | ( | class(t_fd_scheme) | scheme, |
double precision, dimension(:), intent(in) | step_array, | ||
double precision, dimension(:), intent(in) | array, | ||
integer, intent(in) | index ) |
[in] | scheme | the finite difference scheme |
[in] | step_array | the discretization step array where step_array(i) is the step between array(i) and array(i+1) |
[in] | array | the array \(\phi(i)\) to which apply the scheme at the given indices. |
[in] | index | the index where to compute the FD |
double precision function mod_finite_differences_computer::fd_compute_from_field | ( | class(t_fd_scheme) | scheme, |
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 ) |
[in] | scheme | the finite difference scheme |
[in] | x_step_array | the discretization step array in the x direction |
[in] | y_step_array | the discretization step array in the y direction |
[in] | z_step_array | the discretization step array in the z direction |
[in] | field | the field \(\phi(i,j,k)\) to which apply the scheme at the given indices. |
[in] | i,j,k | the indices where to compute the FD |
[in] | axis | the axis (direction) \(axis={1,2,3}\) for \({x,y,z}\) |
i,j,k
loop, because it switches for each direction! double precision function mod_finite_differences_computer::fd_compute_from_field_offset | ( | class(t_fd_scheme) | scheme, |
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) | offset ) |
[in] | scheme | the finite difference scheme |
[in] | x_step_array | the discretization step array in the x direction |
[in] | y_step_array | the discretization step array in the y direction |
[in] | z_step_array | the discretization step array in the z direction |
[in] | field | the field \(\phi(i,j,k)\) to which apply the scheme at the given indices. |
[in] | i,j,k | the indices where to compute the FD |
[in] | axis | the axis (direction) \(axis={1,2,3}\) for \({x,y,z}\) |
[in] | offset | offset the dx |
i,j,k
loop, because it switches for each direction! double precision function mod_finite_differences_computer::fd_compute_from_scheme | ( | class(t_fd_scheme) | scheme, |
double precision, dimension(:), intent(in) | values ) |
[in] | scheme | the finite difference scheme (previously defined) |
[in] | values | the field values to which to apply the scheme. They must be of the same dimension as the scheme |
double precision function mod_finite_differences_computer::fd_compute_from_values | ( | class(t_fd_scheme) | scheme, |
double precision, dimension(:), intent(in) | steps, | ||
double precision, dimension(:), intent(in) | values ) |
[in] | scheme | the finite difference scheme |
[in] | steps | the discretization steps, with size(steps)==size(values)-1 |
[in] | values | the field values to which to apply the scheme. They must be of the same dimension as the scheme |
double precision function mod_finite_differences_computer::fd_weno_compute_from_array | ( | class(t_fd_weno_scheme) | scheme, |
double precision, intent(in) | step, | ||
double precision, dimension(:), intent(in) | step_array, | ||
double precision, dimension(:), intent(in) | array, | ||
integer, intent(in) | index ) |
[in] | scheme | the finite difference scheme |
[in] | step | the step where to evaluate the scheme (starting from the reference node) |
[in] | step_array | the discretization step array where step_array(i) is the step between array(i) and array(i+1) |
[in] | array | the array \(\phi(i)\) to which apply the scheme at the given indices. |
[in] | index | the index where to compute the FD |
double precision function mod_finite_differences_computer::fd_weno_compute_from_field | ( | class(t_fd_weno_scheme) | scheme, |
double precision, intent(in) | 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 ) |
[in] | scheme | the finite difference scheme |
[in] | step | the step where to evaluate the scheme (starting from the reference node) |
[in] | x_step_array | the discretization step array in the x direction |
[in] | y_step_array | the discretization step array in the y direction |
[in] | z_step_array | the discretization step array in the z direction |
[in] | field | the field \(\phi(i,j,k)\) to which apply the scheme at the given indices. |
[in] | i,j,k | the indices where to compute the FD |
[in] | axis | the axis (direction) \(axis={1,2,3}\) for \({x,y,z}\) |
i,j,k
loop, because it switches for each direction! double precision function mod_finite_differences_computer::fd_weno_compute_from_values | ( | class(t_fd_weno_scheme) | scheme, |
double precision, intent(in) | step, | ||
double precision, dimension(:), intent(in) | steps, | ||
double precision, dimension(:), intent(in) | values ) |
[in] | scheme | the finite difference scheme |
[in] | step | the step where to evaluate the scheme (starting from the reference node) |
[in] | steps | the discretization steps, with size(steps)==size(values)-1 |
[in] | values | the field values to which to apply the scheme. They must be of the same dimension as the scheme |