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

Gradient operator from cells to cells.

Functions/Subroutines

subroutine gradient_operator_cell_to_cell (field, order, direction, gradient)
 Gradient using n-th order differences.
 
subroutine gradient_operator_cell_to_cell_generic (scheme, field, field_res)
 Compute the gradient of field on cells with the given scheme.
 
double precision function, dimension(spatial_dimension) gradient_operator_cell_to_cell_unit_generic (scheme, field, i, j, k)
 Compute the gradient of the field at i,j,k
 
subroutine gradient_operator_cell_to_cell_weno_generic (scheme, field, field_res)
 Compute the gradient of field on cells with the given scheme.
 
double precision function, dimension(spatial_dimension) gradient_operator_cell_to_cell_weno_unit_generic (scheme, field, i, j, k)
 Compute the gradient of the field at i,j,k
 

Function/Subroutine Documentation

◆ gradient_operator_cell_to_cell()

subroutine mod_gradient_operator_cell_to_cell::gradient_operator_cell_to_cell ( double precision, dimension(:,:,:), intent(in) field,
integer, intent(in) order,
integer, intent(in) direction,
double precision, dimension(:,:,:,:), intent(inout) gradient )

Gradient using n-th order differences.

The gradient of \( \phi \) is the vector

\begin{align} \nabla \phi &= \left( \frac{\partial \phi}{\partial x} , \frac{\partial \phi}{\partial y} , \frac{\partial \phi}{\partial z} \right) \,. \end{align}

The actual scheme is selected using the order and direction arguments. The former selects the order of finites differences, while the latter select the centering

Valid values for order is 1, 2, 3, and 4.

Valid values for direction is -1 (backward), 0 (centered), and +1 (forward).

Note
Choosing order == 3 corresponds to the WENO3 scheme, in which case the direction is ignored.
Parameters
[in]fieldcell field to derivate
[in]orderorder of the finite-difference scheme
[in]directioncentering of the finite-difference scheme
[out]gradientrank-4 cell field holding the gradient

◆ gradient_operator_cell_to_cell_generic()

subroutine mod_gradient_operator_cell_to_cell::gradient_operator_cell_to_cell_generic ( class(t_fd_scheme), intent(inout) scheme,
double precision, dimension(:,:,:), intent(in) field,
double precision, dimension(:,:,:,:), intent(inout) field_res )
Parameters
[in,out]schemethe FD scheme
[in]fieldthe input field for which we compute the gradient
[in,out]field_resthe resulting gradient field

◆ gradient_operator_cell_to_cell_unit_generic()

double precision function, dimension(spatial_dimension) mod_gradient_operator_cell_to_cell::gradient_operator_cell_to_cell_unit_generic ( class(t_fd_scheme), intent(inout) scheme,
double precision, dimension(:,:,:), intent(in) field,
integer, intent(in) i,
integer, intent(in) j,
integer, intent(in) k )
Parameters
[in,out]schemethe FD scheme
[in]fieldthe input field
[in]i,j,kthe indices where to compute the gradient
Returns
the gradient of field at i,j,k with the given scheme

◆ gradient_operator_cell_to_cell_weno_generic()

subroutine mod_gradient_operator_cell_to_cell::gradient_operator_cell_to_cell_weno_generic ( class(t_fd_weno_scheme), intent(inout) scheme,
double precision, dimension(:,:,:), intent(in) field,
double precision, dimension(:,:,:,:), intent(inout) field_res )
Parameters
[in,out]schemethe WENO FD scheme
[in]fieldthe input field for which we comptue the gradient
[in,out]field_resthe resulting gradient field

◆ gradient_operator_cell_to_cell_weno_unit_generic()

double precision function, dimension(spatial_dimension) mod_gradient_operator_cell_to_cell::gradient_operator_cell_to_cell_weno_unit_generic ( class(t_fd_weno_scheme), intent(inout) scheme,
double precision, dimension(:,:,:), intent(in) field,
integer, intent(in) i,
integer, intent(in) j,
integer, intent(in) k )
Parameters
[in,out]schemethe FD scheme
[in]fieldthe input field
[in]i,j,kthe indices where to compute the gradient
Returns
the gradient of field at i,j,k with the given scheme