LinearSolversModule Module

Solve the matrix equation AX = B



Contents


Subroutines

public subroutine CGSolver(AMat, XMat, BMat, solver_parameters_in)

Solve the matrix equation AX = B using the conjugate gradient method.

Arguments

Type IntentOptional AttributesName
type(Matrix_ps), intent(in) :: AMat

The matrix A, must be hermitian, positive definite.

type(Matrix_ps), intent(inout) :: XMat

The solved for matrix X.

type(Matrix_ps), intent(in) :: BMat

The right hand side.

type(SolverParameters_t), intent(in), optional :: solver_parameters_in

Parameters for the solver

public subroutine CholeskyDecomposition(AMat, LMat, solver_parameters_in)

Compute The Cholesky Decomposition of a Hermitian Positive Definite matrix. This is a really naive implementation, that might be worth revisiting.

Arguments

Type IntentOptional AttributesName
type(Matrix_ps), intent(in) :: AMat

The matrix A, must be hermitian, positive definite.

type(Matrix_ps), intent(inout) :: LMat

The lower diagonal matrix computed.

type(SolverParameters_t), intent(in), optional :: solver_parameters_in

Parameters for the solver

public subroutine PivotedCholeskyDecomposition(AMat, LMat, rank_in, solver_parameters_in)

Compute The Pivoted Cholesky Decomposition of a Hermitian Semi-Definite matrix. Pass it the target rank of the matrix.

Arguments

Type IntentOptional AttributesName
type(Matrix_ps), intent(in) :: AMat

The matrix A, must be hermitian, positive semi-definite.

type(Matrix_ps), intent(inout) :: LMat

The matrix computed.

integer, intent(in) :: rank_in

The target rank of the matrix.

type(SolverParameters_t), intent(in), optional :: solver_parameters_in

Tarameters for the solver