solve linear equation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(type_solver_dense_lu), | intent(inout) | :: | self | |||
| class(abst_matrix), | intent(in) | :: | A | |||
| real(kind=real64), | intent(inout) | :: | b(:) | |||
| real(kind=real64), | intent(inout) | :: | x(:) | |||
| integer(kind=int32), | intent(inout) | :: | status |
LU decomposition |
module subroutine solve_dense_lu(self, A, b, x, status) implicit none class(type_solver_dense_lu), intent(inout) :: self class(abst_matrix), intent(in) :: A real(real64), intent(inout) :: b(:) real(real64), intent(inout) :: x(:) integer(int32), intent(inout) :: status !* LU decomposition select type (matrix => A) type is (type_dense) call dgetrf(self%N, self%N, matrix%val, self%N, self%IPIV, self%ERROR) if (self%ERROR /= 0) call error_message(942) !* solve linear equation call dgetrs('N', self%N, 1, matrix%val, self%N, self%IPIV, b, self%N, self%ERROR) if (self%ERROR /= 0) call error_message(943) x(:) = b(:) status = transfer(self%ERROR, status) end select end subroutine solve_dense_lu