yaeos__math_linalg Module

Wrapper module around LAPACK’s dgesv



Functions

public function solve_system(a, b) result(x)

Solve a linear sytem AX = b

Arguments

Type IntentOptional Attributes Name
real(kind=pr), intent(in) :: a(size(b),size(b))
real(kind=pr), intent(in) :: b(:)

Return Value real(kind=pr), (size(b))


Subroutines

public subroutine cubic_roots(parameters, real_roots, complex_roots, flag)

Arguments

Type IntentOptional Attributes Name
real(kind=pr), intent(in) :: parameters(4)
real(kind=pr), intent(out) :: real_roots(3)
complex(kind=pr), intent(out) :: complex_roots(3)
integer, intent(out) :: flag

flag that identifies which case the solution is - 0: 3 real rotos, one of them repeated (use real_roots(1) and real_roots(2)) - 1: 1 real root, 2 complex roots. Use real_roots(1) and complex_roots(1) and complex_roots(2) - -1: 3 real roots, all different

public subroutine cubic_roots_rosendo(parameters, real_roots, complex_roots, flag)

Arguments

Type IntentOptional Attributes Name
real(kind=pr), intent(in) :: parameters(4)
real(kind=pr), intent(out) :: real_roots(3)
complex(kind=pr), intent(out) :: complex_roots(3)
integer, intent(out) :: flag