This routine builds up the matrix for least square fit used in linear and quadratic interpolation.

Compute interpolation matrix for least square fit using stencil direction of available sources The parent of target childs coord is 0,0,0 so we could just use of stencil%cxDir to build up this matrix entries Every row in matrix is evaluated with coord of source element

Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|

type(tem_intpMatrixLSF_type), | intent(inout) | :: | me | intpMatrix for LSF fill |
||

integer, | intent(inout) | :: | order | interpolation order calculated for current element depending on nSources if quadratic LSF matrix is singular fall back to linear |
||

integer, | intent(in) | :: | QQ | Number of stencil directions |
||

integer, | intent(in) | :: | nDims | Number of dimensions |
||

integer, | intent(in) | :: | nSources | Number of sources from coarser found |
||

real(kind=rk), | intent(in) | :: | cxDirRK(3,QQ) | Stencil directions |
||

integer, | intent(in) | :: | neighDir(nSources) | direction in which sources are found |
||

integer, | intent(out) | :: | pos | Pointer to position of interpolation matrix in growing array of matrix |
||

logical, | intent(out) | :: | success | success if false if matrix is singular reduce interpolation order |

Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|

integer, | private | :: | hashID | ||||

type(tem_matrix_type), | private | :: | matLSF_tmp | ||||

logical, | private | :: | wasAdded | ||||

integer, | private | :: | iNeigh | ||||

integer, | private | :: | iSrc |