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.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.