mod_linear_systems Module

Module containing functions to solve linear systems .



Contents


Functions

public function solve_linear_system_complex_banded(bandmatrix, vector) result(xvector)

Calculates the solution to a system of linear equations where is a complex banded matrix and is a complex vector.

Arguments

TypeIntentOptionalAttributesName
type(banded_matrix_t), intent(in) :: bandmatrix

the banded -matrix on the left-hand side

complex(kind=dp), intent(in) :: vector(:)

the -vector on the right-hand side

Return Value complex(kind=dp)(size(vector))

the solution vector

public function solve_linear_system_complex_banded_LU(bandmatrix, vector, LU, ipiv) result(xvector)

Calculates the solution to a system of linear equations where is a complex banded matrix and is a complex vector. Uses the LU factorisation of and pivoting information from zgbtrf.

Arguments

TypeIntentOptionalAttributesName
type(banded_matrix_t), intent(in) :: bandmatrix

the banded -matrix on the left-hand side

complex(kind=dp), intent(in) :: vector(:)

the -vector on the right-hand side

complex(kind=dp), intent(in) :: LU(:,:)

the LU factorisation of , from zgbtrf

integer, intent(in) :: ipiv(:)

the pivoting information from zgbtrf

Return Value complex(kind=dp)(size(vector))

the solution vector


Subroutines

public subroutine get_LU_factorisation_banded(bandmatrix, LU, ipiv)

Calculates the LU factorisation of a complex banded matrix . Uses the LAPACK routine zgbtrf.

Arguments

TypeIntentOptionalAttributesName
type(banded_matrix_t), intent(in) :: bandmatrix

the banded -matrix on the left-hand side

complex(kind=dp), intent(out), allocatable:: LU(:,:)

the LU factorisation of

integer, intent(out), allocatable:: ipiv(:)

the pivoting information after factorisation

private subroutine throw_info_nonzero_warning(info, routine_name)

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: info
character(len=*), intent(in) :: routine_name