|
1 |
| - |
| 1 | + |
2 | 2 | subroutine lapack_decsol(iop,n,ndim,a,ml,mu,b,ip,lrd,rpar_decsol,lid,ipar_decsol,ier)
|
3 | 3 | use const_def, only: dp
|
4 | 4 | integer, intent(in) :: iop, n, ndim, lrd, lid
|
|
37 | 37 | end if
|
38 | 38 | end subroutine lapack_decsol
|
39 | 39 |
|
40 |
| - |
| 40 | + |
41 | 41 | subroutine lapack_work_sizes(n,lrd,lid)
|
42 | 42 | integer, intent(in) :: n
|
43 | 43 | integer, intent(out) :: lrd,lid
|
|
46 | 46 | end subroutine lapack_work_sizes
|
47 | 47 |
|
48 | 48 |
|
49 |
| - |
| 49 | + |
50 | 50 | ! complex(dp) routines
|
51 | 51 |
|
52 |
| - |
| 52 | + |
53 | 53 | subroutine lapack_zwork_sizes(n,mu,ml,lcd,lrd,lid)
|
54 | 54 | integer, intent(in) :: n,mu,ml
|
55 | 55 | integer, intent(out) :: lcd,lrd,lid
|
|
63 | 63 | lrd = 0
|
64 | 64 | lcd = lda*(n+1) + n
|
65 | 65 | end subroutine lapack_zwork_sizes
|
66 |
| - |
| 66 | + |
67 | 67 |
|
68 | 68 |
|
69 | 69 | subroutine lapack_decsolc(iop,n,ndim,ar,ai,ml,mu,br,bi,ip,lcd,cpar_decsol,lrd,rpar_decsol,lid,ipar_decsol,ier)
|
|
112 | 112 | real(dp), intent(inout), pointer :: rpar_decsol(:) ! (lrd)
|
113 | 113 | integer, intent(inout), pointer :: ipar_decsol(:) ! (lid)
|
114 | 114 | integer, intent(out) :: ier
|
115 |
| - |
| 115 | + |
116 | 116 | ! lcd must be >= n*ndim
|
117 |
| - |
| 117 | + |
118 | 118 | complex(dp), pointer :: a(:,:)
|
119 | 119 | integer :: i, j
|
120 |
| - |
| 120 | + |
121 | 121 | i=1
|
122 | 122 | a(1:ndim,1:n) => cpar_decsol(i:i+n*ndim-1)
|
123 | 123 | i=i+n*ndim
|
124 | 124 | if (i-1 > lcd) then
|
125 | 125 | ier = -1
|
126 | 126 | return
|
127 | 127 | end if
|
128 |
| - |
| 128 | + |
129 | 129 | do j=1,n
|
130 | 130 | do i=1,ndim
|
131 | 131 | a(i,j) = cmplx(ar(i,j),ai(i,j), kind=dp)
|
|
138 | 138 | ai(i,j) = AIMAG(a(i,j))
|
139 | 139 | end do
|
140 | 140 | end do
|
141 |
| - |
| 141 | + |
142 | 142 | end subroutine lapack_decc
|
143 |
| - |
144 |
| - |
145 |
| - |
| 143 | + |
| 144 | + |
| 145 | + |
146 | 146 | subroutine lapack_decbc(n,ndim,ar,ai,ml,mu,ip,lcd,cpar_decsol,lrd,rpar_decsol,lid,ipar_decsol,ier)
|
147 | 147 | use const_def, only: dp
|
148 | 148 | integer, intent(in) :: n, ndim, ml, mu, lcd, lrd, lid
|
|
152 | 152 | real(dp), intent(inout), pointer :: rpar_decsol(:) ! (lrd)
|
153 | 153 | integer, intent(inout), pointer :: ipar_decsol(:) ! (lid)
|
154 | 154 | integer, intent(out) :: ier
|
155 |
| - |
| 155 | + |
156 | 156 | ! ldc must be >= n*ndim
|
157 |
| - |
| 157 | + |
158 | 158 | complex(dp), pointer :: a(:,:)
|
159 | 159 | integer :: i, j
|
160 |
| - |
| 160 | + |
161 | 161 | i=1
|
162 | 162 | a(1:ndim,1:n) => cpar_decsol(i:i+n*ndim-1)
|
163 | 163 | i=i+n*ndim
|
164 | 164 | if (i-1 > lcd) then
|
165 | 165 | ier = -1
|
166 | 166 | return
|
167 | 167 | end if
|
168 |
| - |
| 168 | + |
169 | 169 | do j=1,n
|
170 | 170 | do i=1,ndim
|
171 | 171 | a(i,j) = cmplx(ar(i,j),ai(i,j), kind=dp)
|
|
178 | 178 | ai(i,j) = AIMAG(a(i,j))
|
179 | 179 | end do
|
180 | 180 | end do
|
181 |
| - |
| 181 | + |
182 | 182 | end subroutine lapack_decbc
|
183 |
| - |
184 |
| - |
| 183 | + |
| 184 | + |
185 | 185 | subroutine lapack_solc(n,ndim,ar,ai,br,bi,ip,lcd,cpar_decsol,lrd,rpar_decsol,lid,ipar_decsol,ier)
|
186 | 186 | integer, intent(in) :: n, ndim, lcd, lrd, lid
|
187 | 187 | integer, intent(in) :: ip(n)
|
|
191 | 191 | real(dp), intent(inout), pointer :: rpar_decsol(:) ! (lrd)
|
192 | 192 | integer, intent(inout), pointer :: ipar_decsol(:) ! (lid)
|
193 | 193 | integer, intent(out) :: ier
|
194 |
| - |
| 194 | + |
195 | 195 | ! ldc must be >= n*(ndim+1)
|
196 |
| - |
| 196 | + |
197 | 197 | complex(dp), pointer :: a(:,:), b(:)
|
198 | 198 | integer :: i, j
|
199 |
| - |
| 199 | + |
200 | 200 | i = 1
|
201 | 201 | a(1:ndim,1:n) => cpar_decsol(i:i+n*ndim-1)
|
202 | 202 | i=i+n*ndim
|
|
205 | 205 | ier = -1
|
206 | 206 | return
|
207 | 207 | end if
|
208 |
| - |
| 208 | + |
209 | 209 | do j=1,n
|
210 | 210 | do i=1,ndim
|
211 | 211 | a(i,j) = cmplx(ar(i,j),ai(i,j), kind=dp)
|
|
232 | 232 | real(dp), intent(inout), pointer :: rpar_decsol(:) ! (lrd)
|
233 | 233 | integer, intent(inout), pointer :: ipar_decsol(:) ! (lid)
|
234 | 234 | integer, intent(out) :: ier
|
235 |
| - |
| 235 | + |
236 | 236 | ! ldc must be >= n*(ndim+1)
|
237 |
| - |
| 237 | + |
238 | 238 | complex(dp), pointer :: a(:,:), b(:)
|
239 | 239 | integer :: i, j
|
240 |
| - |
| 240 | + |
241 | 241 | i = 1
|
242 | 242 | a(1:ndim,1:n) => cpar_decsol(i:i+n*ndim-1)
|
243 | 243 | i=i+n*ndim
|
|
246 | 246 | ier = -1
|
247 | 247 | return
|
248 | 248 | end if
|
249 |
| - |
| 249 | + |
250 | 250 | do j=1,n
|
251 | 251 | do i=1,ndim
|
252 | 252 | a(i,j) = cmplx(ar(i,j),ai(i,j), kind=dp)
|
|
260 | 260 | bi(j) = AIMAG(b(j))
|
261 | 261 | end do
|
262 | 262 | end do
|
263 |
| - |
264 |
| - |
| 263 | + |
| 264 | + |
265 | 265 | end subroutine lapack_solbc
|
266 |
| - |
267 |
| - |
| 266 | + |
| 267 | + |
0 commit comments