mus_intp_update_depFromCoarser Subroutine

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

The depdendencies for ghostFromCoarser elements initially only include its parent element. Additional dependencies Y for the element x are found which were not included in the construction routine before hand. However, they are defined to be inherently part of the stencil and hence exist locally and can simply be added to the dependencies. Two different ways are implemented. Full interpolation stencil the complete compute stencil is included into the dependency list

  Y       Y       Y

        x   o
  Y       O       Y
        o   o

  Y       Y       Y

Note: The view here is according to how the interpolation will be done. The coarse level does the interpolation for the finer level. Thus, we access the information from the levelDesc with the targetLevel and sourceLevel perspective.

Steps of finding sources: 1. loop over all neighbors: iNeigh = 1, QQ 2. get neighbor posInTotal: elemPos = neigh(1)%nghElems 3. if elemPos > 0, add this source into depFromCoarser%elem add this source into sourceFromCoarser save its position in sourceFromCoarser into depFromCoarser%elemBuffer calculate its weight based on relative coordinates in stencil weight is inverse proportional to the distance from source to target weight is normalized at last, so that sum of weights equals 1 4. save its offset on stencil

After finding sources, append target to low or high interpolation list based on if all required sources are found.

suppChild = 1

write(dbgUnit(5),"(A, I0)") ' suppChild: ', suppChild write(dbgUnit(5),"(A, I0)") ' childNum: ', childNum

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

Calls

proc~~mus_intp_update_depfromcoarser~~CallsGraph proc~mus_intp_update_depfromcoarser mus_intp_update_depFromCoarser proc~depsource_append depSource_append proc~mus_intp_update_depfromcoarser->proc~depsource_append proc~tem_abort tem_abort proc~mus_intp_update_depfromcoarser->proc~tem_abort interface~append~5 append proc~mus_intp_update_depfromcoarser->interface~append~5 proc~compute_weight compute_weight proc~mus_intp_update_depfromcoarser->proc~compute_weight proc~find_possintporderandupdatemysources find_possIntpOrderAndUpdateMySources proc~mus_intp_update_depfromcoarser->proc~find_possintporderandupdatemysources proc~tem_horizontalspacer tem_horizontalSpacer proc~mus_intp_update_depfromcoarser->proc~tem_horizontalspacer proc~compute_weight->proc~tem_abort none~updatemysources updateMySources proc~find_possintporderandupdatemysources->none~updatemysources

Called by

proc~~mus_intp_update_depfromcoarser~~CalledByGraph proc~mus_intp_update_depfromcoarser mus_intp_update_depFromCoarser proc~mus_construct mus_construct proc~mus_construct->proc~mus_intp_update_depfromcoarser proc~mus_initialize mus_initialize proc~mus_initialize->proc~mus_construct program~mus_harvesting mus_harvesting program~mus_harvesting->proc~mus_construct proc~mus_perform_dynloadbal mus_perform_dynLoadBal proc~mus_perform_dynloadbal->proc~mus_construct none~do_balance do_balance none~do_balance->proc~mus_perform_dynloadbal program~musubi musubi program~musubi->proc~mus_initialize proc~mus_solve mus_solve proc~mus_solve->none~do_balance

Contents


Variables

TypeVisibilityAttributesNameInitial
integer, private :: sourceLevel
integer, private :: targetLevel
integer, private :: targetElem
integer, private :: iElem
integer, private :: iNeigh
integer, private :: nGhostElems
integer, private :: nFoundSources
integer, private :: posInTotal
integer, private :: parentPosInTotal
real(kind=rk), private :: targetBary(3)
integer, private :: mySources(stencil%QQ)
integer, private :: myNeighDir(stencil%QQ)
integer, private :: posInMatArray
integer, private :: intpOrder
integer, private :: childNum
integer, private :: iOrder
logical, private :: success
integer, private :: sourceElem
integer, private :: iSourceElem