The Finite Difference Scheme type definition. More...
Data Types | |
type | t_stencil_1d |
The 1D stencil type. More... | |
type | t_stencil_2d |
The 2D stencil type. More... | |
type | t_stencil_3d |
The 3D stencil type. More... | |
Functions/Subroutines | |
subroutine | stencil_1d_init (self, index_start, index_end) |
Initialize a 1D stencil. | |
pure double precision function | stencil_1d_apply (self, values) |
Simply apply (multiply) the stencil to the given values. | |
subroutine | stencil_1d_set (self, weights) |
Simply sets the weight to the given value. | |
subroutine | stencil_2d_init (self, index_start, index_end) |
Initialize a 2D stencil. | |
pure double precision function | stencil_2d_apply (self, values) |
Simply apply (multiply) the stencil to the given values. | |
subroutine | stencil_3d_init (self, index_start, index_end) |
Initialize a 3D stencil. | |
pure double precision function | stencil_3d_apply (self, values) |
Simply apply (multiply) the stencil to the given values. | |
A finite difference scheme is defined as an array of weights associated to a serie of discrete values of a function \( \phi \). The reference element \( \phi_i \) is numbered \( 0 \). The finite difference scheme is relative to this element. Thus, relative indices are used as the array indices.
weight(-2)
is the weight associated to \( \phi_{i-2} \)fd_scheme
is defined by \( max\_index*2+1 \)The value of fd_scheme%index_start
(resp. index_end
) is set to the index of the first (resp. last) usable value in fd_scheme%weight
, when the scheme is built (see the various scheme constructors).
We advise the developer who develops his own scheme to read the Schemes documentation page.
pure double precision function type_discrete_stencil::stencil_1d_apply | ( | class(t_stencil_1d), intent(in) | self, |
double precision, dimension(:), intent(in) | values ) |
[in,out] | self | the element |
[in] | values | the input \( \phi_i \) values associated with the stencil, where the array is of of size thisindex_end:thisindex_start . |
subroutine type_discrete_stencil::stencil_1d_init | ( | class(t_stencil_1d), intent(inout) | self, |
integer, intent(in) | index_start, | ||
integer, intent(in) | index_end ) |
[in,out] | self | the element |
[in] | index_start | the starting index |
[in] | index_end | the ending index (>= index_start) |
subroutine type_discrete_stencil::stencil_1d_set | ( | class(t_stencil_1d), intent(inout) | self, |
double precision, dimension(:), intent(in) | weights ) |
[in,out] | self | the element |
[in] | weights | the given weights |
pure double precision function type_discrete_stencil::stencil_2d_apply | ( | class(t_stencil_2d), intent(in) | self, |
double precision, dimension(:,:), intent(in) | values ) |
[in,out] | self | the element |
[in] | values | the input \( \phi_i \) values associated with the stencil, where the array is of of size thisindex_end:thisindex_start . |
subroutine type_discrete_stencil::stencil_2d_init | ( | class(t_stencil_2d), intent(inout) | self, |
integer, dimension(2), intent(in) | index_start, | ||
integer, dimension(2), intent(in) | index_end ) |
[in,out] | self | the element |
[in] | index_start | the starting index |
[in] | index_end | the ending index (>= index_start) |
pure double precision function type_discrete_stencil::stencil_3d_apply | ( | class(t_stencil_3d), intent(in) | self, |
double precision, dimension(:,:,:), intent(in) | values ) |
[in,out] | self | the element |
[in] | values | the input \( \phi_i \) values associated with the stencil, where the array is of of size thisindex_end:thisindex_start . |
subroutine type_discrete_stencil::stencil_3d_init | ( | class(t_stencil_3d), intent(inout) | self, |
integer, dimension(3), intent(in) | index_start, | ||
integer, dimension(3), intent(in) | index_end ) |
[in,out] | self | the element |
[in] | index_start | the starting index |
[in] | index_end | the ending index (>= index_start) |