build_matrixLSF_quadIntp Subroutine

private subroutine build_matrixLSF_quadIntp(me, QQ, nDims, nSources, cxDirRK, neighDir, nCoeffs, success)

This routine builds up the matrix for least square fit used in quadratic interpolation. We extract momentum information completely on the view of the source coordinate system Set the right hand side of the equation system Solve the problem, where b = rhs, x = coefficients Ax = b overdetermined, solve the least Square fit problem (A^T)Ax = (A^T)b x = ((A^T)A)^-1(A^T)b Solve linear system of equation with inverted matrix. Size of matrix: (nCoeffs, QQ) matrix_LSF = ((A^T)A)^-1(A^T)

Arguments

TypeIntentOptionalAttributesName
type(tem_matrix_type), intent(out) :: me

Matrix to fill

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(in) :: nCoeffs

nUnknown coeffs

logical, intent(out) :: success

success if false if matrix is singular reduce interpolation order


Calls

proc~~build_matrixlsf_quadintp~~CallsGraph proc~build_matrixlsf_quadintp build_matrixLSF_quadIntp proc~alloc_matrix alloc_matrix proc~build_matrixlsf_quadintp->proc~alloc_matrix proc~invert_matrix invert_matrix proc~build_matrixlsf_quadintp->proc~invert_matrix proc~tem_matrix_dump tem_matrix_dump proc~build_matrixlsf_quadintp->proc~tem_matrix_dump proc~polyquadratic_3d polyQuadratic_3D proc~build_matrixlsf_quadintp->proc~polyquadratic_3d proc~tem_abort tem_abort proc~build_matrixlsf_quadintp->proc~tem_abort proc~polyquadratic_1d polyQuadratic_1D proc~build_matrixlsf_quadintp->proc~polyquadratic_1d proc~polyquadratic_2d polyQuadratic_2D proc~build_matrixlsf_quadintp->proc~polyquadratic_2d proc~alloc_matrix->proc~tem_abort proc~invert_matrix->proc~tem_abort dgetri dgetri proc~invert_matrix->dgetri dgetrf dgetrf proc~invert_matrix->dgetrf mpi_abort mpi_abort proc~tem_abort->mpi_abort

Called by

proc~~build_matrixlsf_quadintp~~CalledByGraph proc~build_matrixlsf_quadintp build_matrixLSF_quadIntp proc~append_intpmatrixlsf append_intpMatrixLSF proc~append_intpmatrixlsf->proc~build_matrixlsf_quadintp interface~append~38 append interface~append~38->proc~append_intpmatrixlsf

Contents


Variables

TypeVisibilityAttributesNameInitial
integer, private :: iDir
integer, private :: iSrc
type(tem_matrix_type), private :: tmp_matrix

Each row represents a polynomial evaluated at coord of elements in

real(kind=rk), private :: inv_AtA(nCoeffs,nCoeffs)
real(kind=rk), private :: AtA(nCoeffs,nCoeffs)
integer, private :: errCode