mus_interpolate_module Module

Interpolation of flow quantities between different grid levels

Interpolation

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

Workflow

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


Uses

Used by

  • module~~mus_interpolate_module~~UsedByGraph module~mus_interpolate_module mus_interpolate_module module~mus_aux_module mus_aux_module module~mus_aux_module->module~mus_interpolate_module module~mus_hvs_aux_module mus_hvs_aux_module module~mus_hvs_aux_module->module~mus_interpolate_module module~mus_construction_module mus_construction_module module~mus_construction_module->module~mus_interpolate_module module~mus_dynloadbal_module mus_dynLoadBal_module module~mus_dynloadbal_module->module~mus_interpolate_module module~mus_dynloadbal_module->module~mus_construction_module module~mus_control_module mus_control_module module~mus_control_module->module~mus_aux_module module~mus_hvs_construction_module mus_hvs_construction_module module~mus_hvs_construction_module->module~mus_construction_module module~mus_program_module mus_program_module module~mus_program_module->module~mus_aux_module module~mus_program_module->module~mus_construction_module module~mus_program_module->module~mus_dynloadbal_module module~mus_program_module->module~mus_control_module program~mus_harvesting mus_harvesting program~mus_harvesting->module~mus_hvs_aux_module program~mus_harvesting->module~mus_construction_module program~mus_harvesting->module~mus_hvs_construction_module program~musubi musubi program~musubi->module~mus_aux_module program~musubi->module~mus_control_module program~musubi->module~mus_program_module

Contents


Variables

TypeVisibilityAttributesNameInitial
real(kind=rk), private, parameter:: childCoord_compact(3,8) =reshape([0.75_rk, 0.75_rk, 0.75_rk, 0.25_rk, 0.75_rk, 0.75_rk, 0.75_rk, 0.25_rk, 0.75_rk, 0.25_rk, 0.25_rk, 0.75_rk, 0.75_rk, 0.75_rk, 0.25_rk, 0.25_rk, 0.75_rk, 0.25_rk, 0.75_rk, 0.25_rk, 0.25_rk, 0.25_rk, 0.25_rk, 0.25_rk], [3, 8])

Subroutines

public subroutine mus_init_interpolate(intp, levelDesc, schemeHeader, stencil, minLevel, maxLevel, fieldProp)

This subroutine initialzes the interpolation

Read more…

Arguments

TypeIntentOptionalAttributesName
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

public subroutine mus_init_levelDescIntpArrays(intp, levelDesc, minLevel, maxLevel)

Initialize levelwise ghost and source list for interpolation

Arguments

TypeIntentOptionalAttributesName
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

public subroutine mus_dump_levelDescIntp_nElems(intp, levelDesc, minLevel, maxLevel, root, comm)

This routine dumps global nElems in intpFromCoarser, intpFromFiner, sourcesFromCoarser ans sourcesFromFiner

Arguments

TypeIntentOptionalAttributesName
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

public subroutine mus_intp_update_depFromCoarser(intp, levelDesc, stencil, minLevel, maxLevel)

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

Read more…

Arguments

TypeIntentOptionalAttributesName
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

public subroutine mus_intp_update_depFromFiner(intp, levelDesc, minLevel, 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

Arguments

TypeIntentOptionalAttributesName
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

private subroutine assign_intp_fluid(intp, nDims, QQ)

Set up interpolation routines for fluid (weakly compressible) scheme

Arguments

TypeIntentOptionalAttributesName
type(mus_interpolation_type), intent(inout) :: intp

interpolation type

integer, intent(in) :: nDims

Number of dimensions

integer, intent(in) :: QQ

number of stencil directions

private subroutine assign_intp_fluidIncomp(intp, nDims, QQ)

Set up interpolation routines for fluid_incomp scheme

Arguments

TypeIntentOptionalAttributesName
type(mus_interpolation_type), intent(inout) :: intp

interpolation type

integer, intent(in) :: nDims

Number of dimensions

integer, intent(in) :: QQ

number of stencil directions

private subroutine assign_intp_fluidLES(intp, nDims, QQ)

Set up interpolation routines for fluid (weakly compressible) scheme and turbulence active

Arguments

TypeIntentOptionalAttributesName
type(mus_interpolation_type), intent(inout) :: intp

interpolation type

integer, intent(in) :: nDims

Number of dimensions

integer, intent(in) :: QQ

number of stencil directions

private subroutine assign_intp_fluidIncompLES(intp, nDims, QQ)

Set up interpolation routines for fluid (incompressible) scheme and turbulence active

Arguments

TypeIntentOptionalAttributesName
type(mus_interpolation_type), intent(inout) :: intp

interpolation type

integer, intent(in) :: nDims

Number of dimensions

integer, intent(in) :: QQ

number of stencil directions

private subroutine init_intpArraysPerLevel(sourceFromCoarser, intpFromCoarser, sourceFromFiner, intpFromFiner, nGhostFromCoarser, nGhostFromFiner, intp_order, nMaxSourcesFromFiner, iLevel)

Arguments

TypeIntentOptionalAttributesName
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

private subroutine find_possIntpOrderAndUpdateMySources(intp, mySources, neighDir, nFoundSources, childNum, intpOrder)

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

Arguments

TypeIntentOptionalAttributesName
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 :: intpOrder

interpolation order

private subroutine compute_weight(weights, nFoundSources, neighDir, targetBary, intp_config, cxDirRK)

This routine computes weights for weighted_average interpolation.

Arguments

TypeIntentOptionalAttributesName
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