MODgvec_LinAlg Module

Module Linear Algebra

Provides the linear algebra wrapper routines using LAPACK.

  • matrix inverse
  • solve linear system

Uses

  • module~~modgvec_linalg~~UsesGraph module~modgvec_linalg MODgvec_LinAlg module~modgvec_globals MODgvec_Globals module~modgvec_linalg->module~modgvec_globals iso_fortran_env iso_fortran_env module~modgvec_globals->iso_fortran_env

Used by

  • module~~modgvec_linalg~~UsedByGraph module~modgvec_linalg MODgvec_LinAlg proc~buildlegendrevdm buildLegendreVdm proc~buildlegendrevdm->module~modgvec_linalg proc~get_boozer_sinterp t_sfl_boozer%Get_Boozer_sinterp proc~get_boozer_sinterp->module~modgvec_linalg proc~lambda_setup_and_solve Lambda_setup_and_solve proc~lambda_setup_and_solve->module~modgvec_linalg proc~sbase_applybctodof_lgm t_sBase%sBase_applyBCtoDOF_LGM proc~sbase_applybctodof_lgm->module~modgvec_linalg proc~sbase_init t_sBase%sBase_init proc~sbase_init->module~modgvec_linalg

Functions

public function INV(A) result(Ainv)

Computes matrix inverse using LAPACK Input matrix should be a square matrix

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: A(:,:)

input matrix

Return Value real(kind=wp), (SIZE(A,1),SIZE(A,2))

public function SOLVE(A, RHS) result(X)

Solve linear system of dimension dims and multiple RHS

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: A(:,:)

matrix

real(kind=wp), intent(in) :: RHS(:)

RHS, sorting: (dimA,nRHS), two dimensions can be used in input

Return Value real(kind=wp), (SIZE(RHS,1))

public function SOLVEMAT(A, RHS) result(X)

Solve linear system of dimension dims and multiple RHS

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: A(:,:)

matrix

real(kind=wp), intent(in) :: RHS(:,:)

RHS, sorting: (dimA,nRHS), two dimensions can be used in input

Return Value real(kind=wp), (SIZE(A,1),SIZE(RHS,2))


Subroutines

public subroutine getLU(dimA, A, L, U, P)

Return P L U matrices of the LU decomposition, cmoputed from LAPACK Routine (if P is not passed, L=P*L)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: dimA
real(kind=wp), intent(in) :: A(1:dimA,1:dimA)

matrix

real(kind=wp), intent(out) :: L(1:dimA,1:dimA)

L or P*L (if P omitted)

real(kind=wp), intent(out) :: U(1:dimA,1:dimA)
real(kind=wp), intent(out), optional :: P(1:dimA,1:dimA)