The Finite Difference Scheme type definition. More...
Data Types | |
type | t_fd_scheme |
The Finite Difference type. More... | |
Functions/Subroutines | |
subroutine | scheme_construct (self) |
Construct a FD Scheme (will use the polymorph "init" procedure) | |
subroutine | scheme_declare_stencil (self, index_start, index_end) |
Declare a fd_scheme istarting and ending at the specified indices. | |
double precision function | scheme_apply (self, values) |
Simply apply the scheme to the given values. | |
subroutine | scheme_init_fill (self, steps) |
Simply call init() and fill() procedures. | |
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.
double precision function type_fd_scheme::scheme_apply | ( | class(t_fd_scheme), intent(in) | self, |
double precision, dimension(:), intent(in) | values ) |
[in,out] | self | the element |
[in] | values | the input \( \phi_i \) values, where the array is of of size thisindex_end:thisindex_start . |
subroutine type_fd_scheme::scheme_construct | ( | class(t_fd_scheme), intent(inout) | self | ) |
[in,out] | self | the element |
subroutine type_fd_scheme::scheme_declare_stencil | ( | class(t_fd_scheme), intent(inout) | self, |
integer, intent(in) | index_start, | ||
integer, intent(in) | index_end ) |
[in,out] | self | the element |
[in] | index_start | the istarting index, between -max_index and +max_index-1 |
[in] | index_end | the ending index, between -max_index+1 and +max_index |
subroutine type_fd_scheme::scheme_init_fill | ( | class(t_fd_scheme), intent(inout) | self, |
double precision, dimension(:), intent(in) | steps ) |
[in,out] | self | the element |
[in] | steps | the disc. steps |