This module contains data types, function and routines for gradient computation.
author: Gregorio Gerardo Spinelli
function pointers to obtain full gradient of U along all directions
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | auxField(:) |
auxField |
||
type(mus_gradData_type), | intent(in) | :: | gradData |
gradient data |
||
integer, | intent(in) | :: | velPos(3) |
Position of velocity field in auxField |
||
integer, | intent(in) | :: | nAuxScalars |
Number of scalars in auxField array |
||
integer, | intent(in) | :: | nDims |
Dimensions |
||
integer, | intent(in) | :: | nSolve |
Number of element to solve in this level |
||
integer, | intent(in) | :: | elemOffset |
Offset for elements when computing chunkwise |
output is gradient of velocity
function pointers to obtain full gradient of U along main directions derived two times d^2U/dx^2
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | auxField(:) |
auxField |
||
type(mus_gradData_type), | intent(in) | :: | gradData |
gradient data |
||
integer, | intent(in) | :: | velPos(3) |
Position of velocity field in auxField |
||
integer, | intent(in) | :: | nAuxScalars |
Number of scalars in auxField array |
||
integer, | intent(in) | :: | nDims |
Dimensions |
||
integer, | intent(in) | :: | nSolve |
Number of element to solve in this level |
||
integer, | intent(in) | :: | elemOffset |
Offset for elements when computing chunkwise |
output is gradient of velocity:
function pointers to obtain grad Rho * U^3 along main directions
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | auxField(:) |
auxField |
||
type(mus_gradData_type), | intent(in) | :: | gradData |
gradient data |
||
integer, | intent(in) | :: | velPos(3) |
Position of velocity field in auxField |
||
integer, | intent(in) | :: | densPos |
Position of velocity field in auxField |
||
integer, | intent(in) | :: | nAuxScalars |
Number of scalars in auxField array |
||
integer, | intent(in) | :: | nDims |
Dimensions |
||
integer, | intent(in) | :: | nSolve |
Number of element to solve in this level |
||
integer, | intent(in) | :: | elemOffset |
Offset for elements when computing chunkwise |
output is gradient of velocity
function pointers to obtain grad Rho * u_x * u_y * u_z along main directions
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | auxField(:) |
auxField |
||
type(mus_gradData_type), | intent(in) | :: | gradData |
gradient data |
||
integer, | intent(in) | :: | velPos(3) |
Position of velocity field in auxField |
||
integer, | intent(in) | :: | densPos |
Position of velocity field in auxField |
||
integer, | intent(in) | :: | nDims |
Dimensions |
||
integer, | intent(in) | :: | nAuxScalars |
Number of scalars in auxField array |
||
integer, | intent(in) | :: | nSolve |
Number of element to solve in this level |
||
integer, | intent(in) | :: | elemOffset |
Offset for elements when computing chunkwise |
output is gradient of velocity
collection of properties of the Gradient type
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
procedure(getGradU), | public, | nopass, pointer | :: | U_ptr | => | null() |
function pointer to get Gradient U |
procedure(getGradXXU), | public, | nopass, pointer | :: | XXU_ptr | => | null() |
function pointer to get Gradient XX U |
procedure(getGradRhoU3), | public, | nopass, pointer | :: | RhoU3_ptr | => | null() |
function pointer to get Gradient rho U^3 |
procedure(getGradRhoUVZ), | public, | nopass, pointer | :: | RhoUVZ_ptr | => | null() |
function pointer to get Gradient Rho u_x u_y u_z |
Contains information required to compute gradient like position of six direct neigbors in the state array and coeff for the gradient operation
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public, | allocatable | :: | neighPos(:,:,:) |
Stores position of 6 direct face neighbors in the state array for each element Size: nSize, stencil%nDims, 2 last index refers to left and right side 1 is left/negative side and 2 is right/positive side |
||
real(kind=rk), | public, | allocatable | :: | FDcoeff(:,:) |
coeff to calculate 1st order derivative use forward difference for element with boundary (coeff = 1.0) and central difference for inner fluid element (coeff=0.5) size: nSize, stencil%nDims |
This function returns function pointer of nonEquilibrium scaling for interpolation according to scheme definition
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=labelLen), | intent(in) | :: | label |
Scheme header information |
GradRhoU3 function
This function computes gradient of velocity from gradient and veleocity data. Gradient is computed using central difference. if an element has an boundary then neighbor refers to current element then forward difference is used
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | auxField(:) |
auxField |
||
type(mus_gradData_type), | intent(in) | :: | gradData |
gradient data |
||
integer, | intent(in) | :: | velPos(3) |
Position of velocity field in auxField |
||
integer, | intent(in) | :: | nAuxScalars |
Number of scalars in auxField array |
||
integer, | intent(in) | :: | nDims |
Dimensions |
||
integer, | intent(in) | :: | nSolve |
Number of element to solve in this level |
||
integer, | intent(in) | :: | elemOffset |
Offset for elements when computing chunkwise |
output is gradient of velocity
This function computes gradient of velocity from gradient and veleocity data. Gradient is computed using central difference. if an element has an boundary then neighbor refers to current element then forward difference is used
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | auxField(:) |
auxField |
||
type(mus_gradData_type), | intent(in) | :: | gradData |
gradient data |
||
integer, | intent(in) | :: | velPos(3) |
Position of velocity field in auxField |
||
integer, | intent(in) | :: | nAuxScalars |
Number of scalars in auxField array |
||
integer, | intent(in) | :: | nDims |
Dimensions |
||
integer, | intent(in) | :: | nSolve |
Number of element to solve in this level |
||
integer, | intent(in) | :: | elemOffset |
Offset for elements when computing chunkwise |
output is gradient of velocity
This function computes gradient of velocity from gradient and veleocity data. Gradient is computed using central difference. if an element has an boundary then neighbor refers to current element then forward difference is used
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | auxField(:) |
auxField |
||
type(mus_gradData_type), | intent(in) | :: | gradData |
gradient data |
||
integer, | intent(in) | :: | velPos(3) |
Position of velocity field in auxField |
||
integer, | intent(in) | :: | nAuxScalars |
Number of scalars in auxField array |
||
integer, | intent(in) | :: | nDims |
Dimensions |
||
integer, | intent(in) | :: | nSolve |
Number of element to solve in this level |
||
integer, | intent(in) | :: | elemOffset |
Offset for elements when computing chunkwise |
output is gradient of velocity
This function computes gradient of velocity from gradient and veleocity data. Gradient is computed using central difference. if an element has an boundary then neighbor refers to current element then forward difference is used
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | auxField(:) |
auxField |
||
type(mus_gradData_type), | intent(in) | :: | gradData |
gradient data |
||
integer, | intent(in) | :: | velPos(3) |
Position of velocity field in auxField |
||
integer, | intent(in) | :: | nAuxScalars |
Number of scalars in auxField array |
||
integer, | intent(in) | :: | nDims |
Dimensions |
||
integer, | intent(in) | :: | nSolve |
Number of element to solve in this level |
||
integer, | intent(in) | :: | elemOffset |
Offset for elements when computing chunkwise |
output is gradient of velocity:
This function computes gradient of velocity from gradient and veleocity data. Gradient is computed using central difference. if an element has an boundary then neighbor refers to current element then forward difference is used
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | auxField(:) |
auxField |
||
type(mus_gradData_type), | intent(in) | :: | gradData |
gradient data |
||
integer, | intent(in) | :: | velPos(3) |
Position of velocity field in auxField |
||
integer, | intent(in) | :: | nAuxScalars |
Number of scalars in auxField array |
||
integer, | intent(in) | :: | nDims |
Dimensions |
||
integer, | intent(in) | :: | nSolve |
Number of element to solve in this level |
||
integer, | intent(in) | :: | elemOffset |
Offset for elements when computing chunkwise |
output is gradient of velocity:
This function computes gradient of velocity from gradient and veleocity data. Gradient is computed using central difference. if an element has an boundary then neighbor refers to current element then forward difference is used
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | auxField(:) |
auxField |
||
type(mus_gradData_type), | intent(in) | :: | gradData |
gradient data |
||
integer, | intent(in) | :: | velPos(3) |
Position of velocity field in auxField |
||
integer, | intent(in) | :: | nAuxScalars |
Number of scalars in auxField array |
||
integer, | intent(in) | :: | nDims |
Dimensions |
||
integer, | intent(in) | :: | nSolve |
Number of element to solve in this level |
||
integer, | intent(in) | :: | elemOffset |
Offset for elements when computing chunkwise |
output is gradient of velocity:
This function computes gradient of rho * velocity^3 from gradient, density and veleocity data. Just derivatives u_x, v_y and w_z. Gradient is computed using central difference. if an element has an boundary then neighbor refers to current element then forward difference is used.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | auxField(:) |
auxField |
||
type(mus_gradData_type), | intent(in) | :: | gradData |
gradient data |
||
integer, | intent(in) | :: | velPos(3) |
Position of velocity field in auxField |
||
integer, | intent(in) | :: | densPos |
Position of velocity field in auxField |
||
integer, | intent(in) | :: | nAuxScalars |
Number of scalars in auxField array |
||
integer, | intent(in) | :: | nDims |
Dimensions |
||
integer, | intent(in) | :: | nSolve |
Number of element to solve in this level |
||
integer, | intent(in) | :: | elemOffset |
Offset for elements when computing chunkwise |
output is gradient of velocity
This function computes gradient of rho * velocity^3 from gradient, density and veleocity data. Just derivatives u_x, v_y and w_z. Gradient is computed using central difference. if an element has an boundary then neighbor refers to current element then forward difference is used.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | auxField(:) |
auxField |
||
type(mus_gradData_type), | intent(in) | :: | gradData |
gradient data |
||
integer, | intent(in) | :: | velPos(3) |
Position of velocity field in auxField |
||
integer, | intent(in) | :: | densPos |
Position of velocity field in auxField |
||
integer, | intent(in) | :: | nAuxScalars |
Number of scalars in auxField array |
||
integer, | intent(in) | :: | nDims |
Dimensions |
||
integer, | intent(in) | :: | nSolve |
Number of element to solve in this level |
||
integer, | intent(in) | :: | elemOffset |
Offset for elements when computing chunkwise |
output is gradient of velocity
This function computes gradient of rho * velocity^3 from gradient, density and veleocity data. Just derivatives u_x, v_y and w_z. Gradient is computed using central difference. if an element has an boundary then neighbor refers to current element then forward difference is used.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | auxField(:) |
auxField |
||
type(mus_gradData_type), | intent(in) | :: | gradData |
gradient data |
||
integer, | intent(in) | :: | velPos(3) |
Position of velocity field in auxField |
||
integer, | intent(in) | :: | densPos |
Position of velocity field in auxField |
||
integer, | intent(in) | :: | nAuxScalars |
Number of scalars in auxField array |
||
integer, | intent(in) | :: | nDims |
Dimensions |
||
integer, | intent(in) | :: | nSolve |
Number of element to solve in this level |
||
integer, | intent(in) | :: | elemOffset |
Offset for elements when computing chunkwise |
output is gradient of velocity
This function computes gradient of rho * velocity^3 from gradient, density and veleocity data. Just derivatives u_x, v_y and w_z. Gradient is computed using central difference. if an element has an boundary then neighbor refers to current element then forward difference is used.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | auxField(:) |
auxField |
||
type(mus_gradData_type), | intent(in) | :: | gradData |
gradient data |
||
integer, | intent(in) | :: | velPos(3) |
Position of velocity field in auxField |
||
integer, | intent(in) | :: | densPos |
Position of velocity field in auxField |
||
integer, | intent(in) | :: | nDims |
Dimensions |
||
integer, | intent(in) | :: | nAuxScalars |
Number of scalars in auxField array |
||
integer, | intent(in) | :: | nSolve |
Number of element to solve in this level |
||
integer, | intent(in) | :: | elemOffset |
Offset for elements when computing chunkwise |
output is gradient of velocity
This routine initialize gradData with direct neighbors in state and finite difference coefficients.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_gradData_type), | intent(out) | :: | me |
Gradient type |
||
integer, | intent(in) | :: | neigh(:) |
neighbor connectivity array |
||
type(tem_stencilHeader_type), | intent(in) | :: | stencil |
stencil header |
||
integer, | intent(in) | :: | nSize |
Number of elements in state array |
||
integer, | intent(in) | :: | nSolve |
Number of elements solved in compute kernel i.e. excluding halos |
||
integer, | intent(in) | :: | nScalars |
number of scalars in state array |