Skip to content

Commit

Permalink
Resolved bug in solver_lin
Browse files Browse the repository at this point in the history
by ensuring correct dimensions for variable 'x'.
  • Loading branch information
gha3mi committed Dec 9, 2023
1 parent 3b31a4f commit 229b02f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/forsolver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pure function solver_lin(A, b, method) result(x)
character(*), optional, intent(in) :: method

! outputs:
real(rk), dimension(size(b)) :: x ! solution matrix x
real(rk), dimension(size(A,2)) :: x ! solution matrix x

if (present(method)) then
select case (method)
Expand Down Expand Up @@ -86,7 +86,7 @@ pure function dgesv_rel(A, b) result(x)
real(rk), dimension(:), contiguous, intent(in) :: b ! right-hand side matrix b

! outputs:
real(rk), dimension(size(b)) :: x ! solution matrix x
real(rk), dimension(size(A,2)) :: x ! solution matrix x

! local variables
integer :: info ! result info
Expand Down Expand Up @@ -133,7 +133,7 @@ pure function dgels_rel(A, b) result(x)
real(rk), dimension(:), contiguous, intent(in) :: b ! right-hand side matrix b

! outputs:
real(rk), dimension(size(b)) :: x ! solution matrix x
real(rk), dimension(size(A,2)) :: x ! solution matrix x

! local variables
integer :: info ! result info
Expand Down

0 comments on commit 229b02f

Please sign in to comment.