Skip to content

Commit 70130e8

Browse files
Copilotivan-pi
andauthored
Add LAPACK banded LU/solve interface declarations (single + double precision) (#31)
* Add LAPACK banded solver interface blocks in linalg module Agent-Logs-Url: https://github.com/ivan-pi/stiff3/sessions/d57763e0-309f-425d-981d-e9b5c4917ba3 Co-authored-by: ivan-pi <21085643+ivan-pi@users.noreply.github.com> * Apply review feedback on LAPACK interface declarations Agent-Logs-Url: https://github.com/ivan-pi/stiff3/sessions/fd2af19c-bad3-4516-b368-62491b6b28e6 Co-authored-by: ivan-pi <21085643+ivan-pi@users.noreply.github.com> * Reorder LAPACK interface size declarations before dependent arrays Agent-Logs-Url: https://github.com/ivan-pi/stiff3/sessions/4627e9eb-b7df-491d-9fb3-5202f9bbbcf3 Co-authored-by: ivan-pi <21085643+ivan-pi@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ivan-pi <21085643+ivan-pi@users.noreply.github.com>
1 parent 8d527f4 commit 70130e8

1 file changed

Lines changed: 46 additions & 22 deletions

File tree

src/stiff3_linalg.f90

Lines changed: 46 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,53 +26,77 @@ module stiff3_linalg
2626
integer, parameter :: dp = kind(1.0d0)
2727

2828
interface lapack_getrf
29-
pure subroutine sgetrf(m,n,a,lda,ipiv,info)
29+
subroutine sgetrf(m,n,a,lda,ipiv,info)
3030
import :: sp
31+
integer, intent(in) :: m, n, lda
3132
real(sp), intent(inout) :: a(lda,*)
32-
integer, intent(out) :: ipiv(*)
33-
integer, intent(out) :: info
34-
integer, intent(in) :: m
35-
integer, intent(in) :: n
36-
integer, intent(in) :: lda
33+
integer, intent(out) :: ipiv(*), info
3734
end subroutine sgetrf
38-
pure subroutine dgetrf(m,n,a,lda,ipiv,info)
35+
subroutine dgetrf(m,n,a,lda,ipiv,info)
3936
import :: dp
37+
integer, intent(in) :: m, n, lda
4038
real(dp), intent(inout) :: a(lda,*)
41-
integer, intent(out) :: ipiv(*)
42-
integer, intent(out) :: info
43-
integer, intent(in) :: m
44-
integer, intent(in) :: n
45-
integer, intent(in) :: lda
39+
integer, intent(out) :: ipiv(*), info
4640
end subroutine dgetrf
4741
end interface lapack_getrf
4842

4943
interface lapack_getrs
50-
pure subroutine sgetrs(trans,n,nrhs,a,lda,ipiv,b,ldb,info)
44+
subroutine sgetrs(trans,n,nrhs,a,lda,ipiv,b,ldb,info)
5145
import :: sp
46+
integer, intent(in) :: n, nrhs, lda, ldb
5247
real(sp), intent(in) :: a(lda,*)
5348
integer, intent(in) :: ipiv(*)
5449
real(sp), intent(inout) :: b(ldb,*)
5550
character(len=1), intent(in) :: trans
5651
integer, intent(out) :: info
57-
integer, intent(in) :: n
58-
integer, intent(in) :: nrhs
59-
integer, intent(in) :: lda
60-
integer, intent(in) :: ldb
6152
end subroutine sgetrs
62-
pure subroutine dgetrs(trans,n,nrhs,a,lda,ipiv,b,ldb,info)
53+
subroutine dgetrs(trans,n,nrhs,a,lda,ipiv,b,ldb,info)
6354
import :: dp
55+
integer, intent(in) :: n, nrhs, lda, ldb
6456
real(dp), intent(in) :: a(lda,*)
6557
integer, intent(in) :: ipiv(*)
6658
real(dp), intent(inout) :: b(ldb,*)
6759
character(len=1), intent(in) :: trans
6860
integer, intent(out) :: info
69-
integer, intent(in) :: n
70-
integer, intent(in) :: nrhs
71-
integer, intent(in) :: lda
72-
integer, intent(in) :: ldb
7361
end subroutine dgetrs
7462
end interface lapack_getrs
7563

64+
interface lapack_gbtrf
65+
subroutine sgbtrf(m,n,kl,ku,ab,ldab,ipiv,info)
66+
import :: sp
67+
integer, intent(in) :: m, n, kl, ku, ldab
68+
real(sp), intent(inout) :: ab(ldab,*)
69+
integer, intent(out) :: ipiv(*), info
70+
end subroutine sgbtrf
71+
subroutine dgbtrf(m,n,kl,ku,ab,ldab,ipiv,info)
72+
import :: dp
73+
integer, intent(in) :: m, n, kl, ku, ldab
74+
real(dp), intent(inout) :: ab(ldab,*)
75+
integer, intent(out) :: ipiv(*), info
76+
end subroutine dgbtrf
77+
end interface lapack_gbtrf
78+
79+
interface lapack_gbtrs
80+
subroutine sgbtrs(trans,n,kl,ku,nrhs,ab,ldab,ipiv,b,ldb,info)
81+
import :: sp
82+
integer, intent(in) :: n, kl, ku, nrhs, ldab, ldb
83+
real(sp), intent(in) :: ab(ldab,*)
84+
integer, intent(in) :: ipiv(*)
85+
real(sp), intent(inout) :: b(ldb,*)
86+
character(len=1), intent(in) :: trans
87+
integer, intent(out) :: info
88+
end subroutine sgbtrs
89+
subroutine dgbtrs(trans,n,kl,ku,nrhs,ab,ldab,ipiv,b,ldb,info)
90+
import :: dp
91+
integer, intent(in) :: n, kl, ku, nrhs, ldab, ldb
92+
real(dp), intent(in) :: ab(ldab,*)
93+
integer, intent(in) :: ipiv(*)
94+
real(dp), intent(inout) :: b(ldb,*)
95+
character(len=1), intent(in) :: trans
96+
integer, intent(out) :: info
97+
end subroutine dgbtrs
98+
end interface lapack_gbtrs
99+
76100
contains
77101

78102
subroutine lu_sp(amat,ipiv,info)

0 commit comments

Comments
 (0)