The routines defined here, fill up the ghost elements with valid data. Ghost elements are employed at grid level interfaces to provide valid pdf values to the neighboring fluid elements. This way, the solvers can act on elements of the same size only, treating the levels successively. Target elements are the ghost elements, which have to be filled with valid values. Source elements are the fluid elements from other levels, from where to take the input values for the interpolation. The target ghost elements on the target level have corresponding source fluid elements on the source level.
tem_topology_module For a detailed description of the grid
Each interpolation routine acts on a list of ghost elements. This list contains pointers to the position in the total list. For each of these ghost elements, the source elements are identified. Before that, the sourceLevel is identified. However, the code is restricted to work with a level jump of only one level, so the sourceLevel is for sourceLevel = targetLevel+1 sourceLevel = targetLevel-1
For an overview over implemented interpolation methods, see Interpolation methods
This subroutine initialzes the interpolation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_interpolation_type), | intent(inout) | :: | intp | interpolation type |
||
type(tem_levelDesc_type), | intent(inout) | :: | levelDesc(minLevel:maxLevel) | level descriptor is actually used |
||
type(mus_scheme_header_type), | intent(in) | :: | schemeHeader | scheme header |
||
type(tem_stencilHeader_type), | intent(in) | :: | stencil | the stencil header |
||
integer, | intent(in) | :: | minLevel | |||
integer, | intent(in) | :: | maxLevel | |||
type(mus_field_prop_type), | intent(in) | :: | fieldProp(:) | field properties |
Initialize levelwise ghost and source list for interpolation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_interpolation_type), | intent(inout) | :: | intp | interpolation type |
||
type(tem_levelDesc_type), | intent(inout) | :: | levelDesc(minLevel:maxLevel) | levelDesc |
||
integer, | intent(in) | :: | minLevel | |||
integer, | intent(in) | :: | maxLevel |
This routine dumps global nElems in intpFromCoarser, intpFromFiner, sourcesFromCoarser ans sourcesFromFiner
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_interpolation_type), | intent(in) | :: | intp | interpolation type |
||
type(tem_levelDesc_type), | intent(inout) | :: | levelDesc(minLevel:maxLevel) | levelDesc |
||
integer, | intent(in) | :: | minLevel | |||
integer, | intent(in) | :: | maxLevel | |||
integer, | intent(in) | :: | root | |||
integer, | intent(in) | :: | comm |
The required source elements for ghost from coarser elements are identified in this routine. Moreover, the weights for each sources based on distance are calculated. \n
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_interpolation_type), | intent(inout) | :: | intp | interpolation type |
||
type(tem_levelDesc_type) | :: | levelDesc(minLevel:maxLevel) | Level Descriptor |
|||
type(tem_stencilHeader_type), | intent(in) | :: | stencil | |||
integer, | intent(in) | :: | minLevel | |||
integer, | intent(in) | :: | maxLevel |
All sources (children) have been found in treelm, updated number of sources needed, based on nDims collect all source elements into sourceFromFiner assign ghost intp list. Currently only average interpolation is implemented for fillMineFromFiner
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_interpolation_type), | intent(inout) | :: | intp | interpolation type |
||
type(tem_levelDesc_type) | :: | levelDesc(minLevel:maxLevel) | Level Descriptor |
|||
integer, | intent(in) | :: | minLevel | |||
integer, | intent(in) | :: | maxLevel | |||
type(tem_stencilHeader_type), | intent(in) | :: | stencil | Stencil |
Set up interpolation routines for fluid (weakly compressible) scheme
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_interpolation_type), | intent(inout) | :: | intp | interpolation type |
||
integer, | intent(in) | :: | nDims | Number of dimensions |
||
integer, | intent(in) | :: | number of stencil directions |
Set up interpolation routines for fluid_incomp scheme
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_interpolation_type), | intent(inout) | :: | intp | interpolation type |
||
integer, | intent(in) | :: | nDims | Number of dimensions |
||
integer, | intent(in) | :: | number of stencil directions |
Set up interpolation routines for fluid (weakly compressible) scheme and turbulence active
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_interpolation_type), | intent(inout) | :: | intp | interpolation type |
||
integer, | intent(in) | :: | nDims | Number of dimensions |
||
integer, | intent(in) | :: | number of stencil directions |
Set up interpolation routines for fluid (incompressible) scheme and turbulence active
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_interpolation_type), | intent(inout) | :: | intp | interpolation type |
||
integer, | intent(in) | :: | nDims | Number of dimensions |
||
integer, | intent(in) | :: | number of stencil directions |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dyn_intarray_type), | intent(out) | :: | sourceFromCoarser | dynamic array of source elements from coarser |
||
type(grw_intarray_type), | intent(out), | allocatable | :: | intpFromCoarser(:) | growing array of ghost elements from coarser for different intp order |
|
type(dyn_intarray_type), | intent(out) | :: | sourceFromFiner | dynamic array of source elements from finer |
||
type(grw_intarray_type), | intent(out) | :: | intpFromFiner | growing array of ghost elements from finer |
||
integer, | intent(in) | :: | nGhostFromCoarser | Number of ghost from coarser on this level |
||
integer, | intent(in) | :: | nGhostFromFiner | Number of ghost from finer on this level |
||
integer, | intent(in) | :: | intp_order | interpolation order defined by user |
||
integer, | intent(in) | :: | nMaxSourcesFromFiner | nMaxSources for fillMineFromFiner |
||
integer, | intent(in) | :: | iLevel | current level |
Find maximum possible interpolation order which can be used for fillFinerFromMe by comparing nFoundSources with nMaxSources of different interpolation order starting from interpolation order defined by user
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_interpolation_type), | intent(in) | :: | intp | interpolation type |
||
integer, | intent(inout) | :: | mySources(:) | position of found source elements in total list Update this list if intpStencil%isActive |
||
integer, | intent(inout) | :: | neighDir(:) | cxDir for found sounce elements |
||
integer, | intent(inout) | :: | nFoundSources | Number of source elements found |
||
integer, | intent(in) | :: | childNum | Curent finer ghost child number |
||
integer, | intent(out) | :: | intpOrder | interpolation order |
This routine computes weights for weighted_average interpolation.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(out), | allocatable | :: | weights(:) | computed weight |
|
integer, | intent(in) | :: | nFoundSources | Number of source elements found |
||
integer, | intent(in) | :: | neighDir(nFoundSources) | cxDir for found sounce elements |
||
real(kind=rk), | intent(in) | :: | targetBary(3) | child bary relative to parent |
||
type(mus_interpolation_config_type), | intent(in) | :: | intp_config | Interpolation config info |
||
real(kind=rk), | intent(in) | :: | cxDirRK(:,:) | cxDir of current source |