Computer for evaluating Extrapolation Schemes. More...
Functions/Subroutines | |
double precision function | ext_compute_from_values (scheme, ext_step, steps, values) |
Compute the extrapolation via the scheme by giving the associated field values. | |
double precision function | ext_compute_from_scheme (scheme, values) |
Compute the extrapolation of the scheme by giving the associated field values. | |
double precision function | ext_compute_from_field (scheme, ext_step, x_step_array, y_step_array, z_step_array, field, i, j, k, axis) |
Compute the extrapolation 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 | ext_compute_from_face_field (scheme, ext_step, x_step_array, y_step_array, z_step_array, field, i, j, k, axis) |
Compute the extrapolation via the scheme by giving the associated face field, the step arrays for each dimension, the indices (position) and the direction (x,y or z). | |
double precision function | ext_compute_with_neumann (scheme, ext_step, steps, values, derivative_value) |
Compute the extrapolation of the scheme by giving the associated field values and the derivative value (ie. Neumann constraint). | |
double precision function | new_ext_compute_from_field (scheme, ext_step, x_step_array, y_step_array, z_step_array, field, i, j, k, axis, direction) |
Compute the extrapolation 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 | ext_rec_compute_from_field (scheme, ext_step, x_cv_array, y_cv_array, z_cv_array, field, i, j, k, axis, direction) |
Compute the extrapolation with 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). | |
All the methods defined here are used to effectively compute/evaluate extrapolations. They take as argument a scheme that is built through the various schemes of the module (see mod_extrapolation_scheme_o1 for example).
double precision function mod_extrapolation_computer::ext_compute_from_face_field | ( | class(t_ext_scheme), intent(inout) | scheme, |
double precision, intent(in) | ext_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, | ||
type(t_face_field), intent(in) | field, | ||
integer, intent(in) | i, | ||
integer, intent(in) | j, | ||
integer, intent(in) | k, | ||
integer, intent(in) | axis ) |
[in] | scheme | the extrapolation scheme |
[in] | ext_step | the extrapolation step (gap) |
[in] | x_step_array | the discretization step array in the x direction ; x_step_array(i) is the distance from face(i+1) to face(i) (different from the cell field definition) |
[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\) to which to 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_extrapolation_computer::ext_compute_from_field | ( | class(t_ext_scheme), intent(inout) | scheme, |
double precision, intent(in) | ext_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 extrapolation scheme |
[in] | ext_step | the extrapolation step (gap) |
[in] | x_step_array | the discretization step array in the x direction ; x_step_array(i) is the distance from cell(i) to cell(i-1) |
[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\) to which to 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_extrapolation_computer::ext_compute_from_scheme | ( | class(t_ext_scheme), intent(inout) | scheme, |
double precision, dimension(:), intent(in) | values ) |
[in] | scheme | the extrapolation 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_extrapolation_computer::ext_compute_from_values | ( | class(t_ext_scheme), intent(inout) | scheme, |
double precision, intent(in) | ext_step, | ||
double precision, dimension(:), intent(in) | steps, | ||
double precision, dimension(:), intent(in) | values ) |
[in] | scheme | the extrapolation scheme |
[in] | ext_step | the extrapolation step (gap) |
[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_extrapolation_computer::ext_compute_with_neumann | ( | class(t_ext_neumann_scheme), intent(inout) | scheme, |
double precision, intent(in) | ext_step, | ||
double precision, dimension(:), intent(in) | steps, | ||
double precision, dimension(:), intent(in) | values, | ||
double precision, intent(in) | derivative_value ) |
[in] | scheme | the extrapolation scheme |
[in] | ext_step | the extrapolation step (gap) |
[in] | steps | the discretization steps excluding the extrapolation step included, hence with size(steps)==size(values)-1 |
[in] | values | the known function values to which to apply the scheme |
[in] | derivative_value | the value of the derivative at the extrapolated point |
index==0
double precision function mod_extrapolation_computer::ext_rec_compute_from_field | ( | class(t_rec_scheme), intent(inout) | scheme, |
double precision, intent(in) | ext_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, | ||
integer, intent(in) | direction ) |
[in] | scheme | the extrapolation scheme |
[in] | ext_step | the extrapolation step (gap) between the last/first node (depending on the direction) |
[in] | x_cv_array | the control volumes array in the x direction |
[in] | y_cv_array | the control volumesp array in the y direction |
[in] | z_cv_array | the control volumes array in the z direction |
[in] | field | the field \(\phi\) to which to apply the scheme at the given indices. |
[in] | i,j,k | the base indices of the stencil. This has to be the last (direction=-1) or first (direction=+1) node. |
[in] | axis | the axis (direction) \(axis={1,2,3}\) for \({x,y,z}\) |
[in] | direction | the direction of extrapolation \(direction={-1,+1}\) for backward and forward |
i,j,k
loop, because it switches for each axis! ext_rec_compute_from_field( rec...o2_instance, -dx, dx_u_array, dy_v_array, dz_w_array, field, i,j,k, 1, -1 ) \par Example\ilinebr If you want to extrapolate with a 2nd order scheme, starting from node (i,j,k), at a distance of 3*dy towards the top, you should use:
ext_rec_compute_from_field( rec...o2_instance, +3*dx, dx_u_array, dy_v_array, dz_w_array, field, i,j,k, 2, +1 ) double precision function mod_extrapolation_computer::new_ext_compute_from_field | ( | class(t_int_scheme), intent(inout) | scheme, |
double precision, intent(in) | ext_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) | direction ) |
[in] | scheme | the extrapolation scheme |
[in] | ext_step | the extrapolation step (gap) between the last/first node (depending on the direction) |
[in] | x_step_array | the discretization step array in the x direction ; x_step_array(i) is the distance from cell(i) to cell(i-1) |
[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\) to which to apply the scheme at the given indices. |
[in] | i,j,k | the base indices of the stencil. This has to be the last (direction=-1) or first (direction=+1) node. |
[in] | axis | the axis \(axis={1,2,3}\) for \({x,y,z}\) |
[in] | direction | the direction of extrapolation \(direction={-1,+1}\) for backward and forward |
i
and node i+1
. This corresponds to dx_u
for cells i,j,k
loop, because it switches for each axis! new_ext_compute_from_field( int...o2_instance, -dx, dx_array, dy_array, dz_array, field, i,j,k, 1, -1 ) \par Example\ilinebr If you want to extrapolate with a 2nd order scheme, starting from node (i,j,k), at a distance of 3*dy towards the top, you should use:
new_ext_compute_from_field( int...o2_instance, +3*dx, dx_array, dy_array, dz_array, field, i,j,k, 2, +1 )