|
[Sponsors] |
Modification of the ldu matrix
← Older revision | Revision as of 06:19, 23 May 2022 | ||
(One intermediate revision by the same user not shown) | |||
Line 1,386: | Line 1,386: | ||
</td><td width="5%">(1)</td></tr></table> |
</td><td width="5%">(1)</td></tr></table> |
||
− | This equation establishes a linear relation between the interpoloted cells and the donor cells. The following code snipet shows how the overset interpolation is achived on matrix level: |
+ | This equation establishes a linear relation between the interpoloted cells and the donor cells. Note that the coupling is only one way: The interpolated cells are influenced by the donor cells but not visa versa. The solution of the donor cells is achieved by standart finite volume discretization. The following code snipet shows how the overset interpolation is achived on matrix level: |
<br><cpp> |
<br><cpp> |
||
Line 1,472: | Line 1,472: | ||
The above code starts with a loop over all interpolated cells. The loop starts by retrieving the information required for the interpolation: f is 1 for an interpolated cells and 0 else, the weights w required for the interpolation, the indexes nbrs of the donor cells for each interpolated cells. The list stencilFaces_[celli] containts the position of the donor cells for the cell with the index celli in the extended upperAddr and lowerAddr array and stencilPatches_[celli] contains the id of the neighbor processor if the donor cell lays on a processor boundary. |
The above code starts with a loop over all interpolated cells. The loop starts by retrieving the information required for the interpolation: f is 1 for an interpolated cells and 0 else, the weights w required for the interpolation, the indexes nbrs of the donor cells for each interpolated cells. The list stencilFaces_[celli] containts the position of the donor cells for the cell with the index celli in the extended upperAddr and lowerAddr array and stencilPatches_[celli] contains the id of the neighbor processor if the donor cell lays on a processor boundary. |
||
+ | |||
+ | The loop continous by setting the diagonal and the source to zero. Note that the diagonal will be set to one in the later stage of the loop since the sum of the weights is one. |
||
+ | After that the coefficients of the matrix resulting from the overset interpolation are written. The lable facei determines the position in the lower and upper array very the coupling coefficients between donor and acceptor have to be stored. As fininal step the entries in the lower or upper array are written depending on which of the donor or acceptor cell lable is higher. |
||
=References= |
=References= |
||
<references/> |
<references/> |