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

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.
 

Detailed Description

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.

Example
weight(-2) is the weight associated to \( \phi_{i-2} \)
Note
The maximum size of any 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.

Function/Subroutine Documentation

◆ scheme_apply()

double precision function type_fd_scheme::scheme_apply ( class(t_fd_scheme), intent(in) self,
double precision, dimension(:), intent(in) values )
Parameters
[in,out]selfthe element
[in]valuesthe input \( \phi_i \) values, where the array is of of size thisindex_end:thisindex_start.
Returns
the resulting scheme applied to the input values

◆ scheme_construct()

subroutine type_fd_scheme::scheme_construct ( class(t_fd_scheme), intent(inout) self)
Parameters
[in,out]selfthe element

◆ scheme_declare_stencil()

subroutine type_fd_scheme::scheme_declare_stencil ( class(t_fd_scheme), intent(inout) self,
integer, intent(in) index_start,
integer, intent(in) index_end )
Parameters
[in,out]selfthe element
[in]index_startthe istarting index, between -max_index and +max_index-1
[in]index_endthe ending index, between -max_index+1 and +max_index

◆ scheme_init_fill()

subroutine type_fd_scheme::scheme_init_fill ( class(t_fd_scheme), intent(inout) self,
double precision, dimension(:), intent(in) steps )
Parameters
[in,out]selfthe element
[in]stepsthe disc. steps