0.6.0
Loading...
Searching...
No Matches
mod_discretize_cell_temporal_term Module Reference

Data Types

interface  discretize_cell_temporal_term
 

Functions/Subroutines

subroutine discretize_cell_temporal_term_implicit (matrix, rhs, coefficient, scalar_field_n, scalar_field_nm1, equation_time_step, equation_time_step_n, equation_time_order_discretization, equation_stencil, equation_ls_map)
 Discretize the temporal term of an equation defined on cells:
 
subroutine discretize_cell_temporal_term_fully_explicit (matrix, rhs, coefficient, scalar_field_n, scalar_field_nm1, equation_time_step, equation_time_step_n, equation_time_order_discretization, equation_stencil, equation_ls_map, work_cell_field_save, equation_is_fully_explicit)
 
subroutine discretize_cell_temporal_term_to3 (matrix, rhs, coefficient, scalar_field_n, scalar_field_nm1, scalar_field_nm2, equation_time_step, equation_time_step_n, equation_time_step_nm1, equation_time_order_discretization, equation_stencil, equation_ls_map, equation_is_fully_explicit)
 

Function/Subroutine Documentation

◆ discretize_cell_temporal_term_fully_explicit()

subroutine mod_discretize_cell_temporal_term::discretize_cell_temporal_term_fully_explicit ( double precision, dimension(:), intent(inout) matrix,
double precision, dimension(:), intent(inout) rhs,
double precision, dimension(:,:,:), intent(in) coefficient,
double precision, dimension(:,:,:), intent(in) scalar_field_n,
double precision, dimension(:,:,:), intent(in), allocatable scalar_field_nm1,
double precision, intent(in) equation_time_step,
double precision, intent(in) equation_time_step_n,
integer, intent(in) equation_time_order_discretization,
type(t_cell_stencil), intent(in) equation_stencil,
type(t_ls_map), intent(in) equation_ls_map,
double precision, dimension(:,:,:), intent(inout) work_cell_field_save,
logical, intent(in) equation_is_fully_explicit )

◆ discretize_cell_temporal_term_implicit()

subroutine mod_discretize_cell_temporal_term::discretize_cell_temporal_term_implicit ( double precision, dimension(:), intent(inout) matrix,
double precision, dimension(:), intent(inout) rhs,
double precision, dimension(:,:,:), intent(in) coefficient,
double precision, dimension(:,:,:), intent(in) scalar_field_n,
double precision, dimension(:,:,:), intent(in), allocatable scalar_field_nm1,
double precision, intent(in) equation_time_step,
double precision, intent(in) equation_time_step_n,
integer, intent(in) equation_time_order_discretization,
type(t_cell_stencil), intent(in) equation_stencil,
type(t_ls_map), intent(in) equation_ls_map )

Discretize the temporal term of an equation defined on cells:

Note
The diagonal of the matrix and the right-hand-side are modified accordingly to the scheme chosen.

Documentation need to be updated

Discretize the temporal term of an equation defined on cells:

In PDE, the term \( C \frac {\partial \phi} {\partial t} \) is discretized using a Backward Differentiation Formula (BDF) of first or second order. Notations are

\begin{align} \frac {\partial \phi} {\partial t} &\approx \alpha \phi^{n+1} + \beta \phi^{n} + \gamma \phi^{n-1}. \end{align}

BDF1 (Equivalent to Backward Euler.)

\begin{align} \alpha &= \frac1 {\Delta t^{n+1}}, & \beta &= - \frac1 {\Delta t^{n+1}}, & \gamma &= 0. \end{align}

BDF2

\begin{align} \alpha &= \frac {2\Delta t^{n+1} + \Delta t^{n}} {\Delta t^{n+1} (\Delta t^{n+1} + \Delta t^{n})}, & \beta &= \frac {\Delta t^{n+1} + \Delta t^{n}} {\Delta t^{n+1} \Delta t^{n}}, & \gamma &= \frac {\Delta t^{n+1}} {\Delta t^{n} (\Delta t^{n+1} + \Delta t^{n})}. \end{align}

◆ discretize_cell_temporal_term_to3()

subroutine mod_discretize_cell_temporal_term::discretize_cell_temporal_term_to3 ( double precision, dimension(:), intent(inout) matrix,
double precision, dimension(:), intent(inout) rhs,
double precision, dimension(:,:,:), intent(in) coefficient,
double precision, dimension(:,:,:), intent(in) scalar_field_n,
double precision, dimension(:,:,:), intent(in) scalar_field_nm1,
double precision, dimension(:,:,:), intent(in) scalar_field_nm2,
double precision, intent(in) equation_time_step,
double precision, intent(in) equation_time_step_n,
double precision, intent(in) equation_time_step_nm1,
integer, intent(in) equation_time_order_discretization,
type(t_cell_stencil), intent(in) equation_stencil,
type(t_ls_map), intent(in) equation_ls_map,
logical, intent(in) equation_is_fully_explicit )