TABLE OF CONTENTS


m_abi_linalg/abi_chpgv [ Functions ]

[ Top ] [ m_abi_linalg ] [ Functions ]

NAME

 abi_chpgv

FUNCTION

INPUTS

PARENTS

SOURCE

230   subroutine abi_chpgv(itype,jobz,uplo,n,a,b,w,z,ldz,work,rwork,info)
231 
232 !This section has been created automatically by the script Abilint (TD).
233 !Do not modify the following lines by hand.
234 #undef ABI_FUNC
235 #define ABI_FUNC 'abi_chpgv'
236 !End of the abilint section
237 
238  implicit none
239 
240 !Arguments ------------------------------------
241  integer,intent(in) :: itype
242  character(len=1), intent(in) :: jobz
243  character(len=1), intent(in) :: uplo
244  integer, intent(in) :: n
245  integer, intent(in) :: ldz
246  complex(spc), intent(inout) :: a(:,:)
247  complex(spc), intent(inout) :: b(:,:)
248  complex(spc), intent(out) :: z(:,:)
249  complex(spc), intent(inout) :: work(:)
250  real(sp), intent(inout) :: rwork(:)
251  real(sp), intent(out) :: w(n)
252  integer, intent(out) :: info
253 
254 ! *********************************************************************
255 
256  call chpgv(itype,jobz,uplo,n,a,b,w,z,ldz,work,rwork,info)
257 
258 end subroutine abi_chpgv

m_abi_linalg/abi_chpgv_alloc [ Functions ]

[ Top ] [ m_abi_linalg ] [ Functions ]

NAME

 abi_chpgv_alloc

FUNCTION

INPUTS

PARENTS

SOURCE

273   subroutine abi_chpgv_alloc(itype,jobz,uplo,n,a,b,w,z)
274 
275 !This section has been created automatically by the script Abilint (TD).
276 !Do not modify the following lines by hand.
277 #undef ABI_FUNC
278 #define ABI_FUNC 'abi_chpgv_alloc'
279 
280 !End of the abilint section
281 
282  implicit none
283 
284 !Arguments ------------------------------------
285  character(len=1), intent(in) :: jobz
286  character(len=1), intent(in) :: uplo
287  integer,intent(in) :: itype
288  integer, intent(in) :: n
289  complex(spc), intent(inout) :: a(:,:)
290  complex(spc), intent(inout) :: b(:,:)
291  complex(spc), intent(out) :: z(:,:)
292  real(sp), intent(out) :: w(n)
293 
294  integer :: info
295 
296 ! *********************************************************************
297 
298  call abi_chpgv(itype,jobz,uplo,n,a,b,w,z,n,eigen_c_work,eigen_c_rwork,info)
299 
300 end subroutine abi_chpgv_alloc

m_abi_linalg/abi_dhpgv [ Functions ]

[ Top ] [ m_abi_linalg ] [ Functions ]

NAME

 abi_dhpgv

PARENTS

SOURCE

32   subroutine abi_dhpgv(itype,jobz,uplo,n,a,b,w,z,ldz,work,info,rwork,istwf_k)
33 
34 !This section has been created automatically by the script Abilint (TD).
35 !Do not modify the following lines by hand.
36 #undef ABI_FUNC
37 #define ABI_FUNC 'abi_dhpgv'
38 !End of the abilint section
39 
40  implicit none
41 
42 !Arguments ------------------------------------
43  integer,intent(in) :: itype
44  character(len=1), intent(in) :: jobz
45  character(len=1), intent(in) :: uplo
46  integer, intent(in) :: n
47  integer, intent(in) :: ldz
48  real(dp) :: a(*)    !vz_d
49  real(dp) :: b(*)    !vz_d
50  real(dp) :: z(*)    !vz_d
51  real(dp), intent(inout) :: work(*)
52  real(dp), optional,intent(inout) :: rwork(*)
53  real(dp) :: w(*)    !vz_d
54  integer, intent(out) :: info
55  integer, optional, intent(in) :: istwf_k
56 
57 !Local Arguments ------------------------------------
58  integer :: istwf_k_
59 
60 ! *********************************************************************
61 
62  istwf_k_ = 1; if (present(istwf_k)) istwf_k_ = istwf_k
63 
64  !MG: FIXME This is clearly wrong but tests are OK!
65  !if ( present(istwf_k) .and. istwf_k == 2 .and. present(rwork)) then
66  if (istwf_k_ /= 2) then
67     ABI_CHECK(present(rwork),"rwork must be present")
68     call zhpgv(itype,jobz,uplo,n,a,b,w,z,ldz,work,rwork,info)
69  else
70     call dspgv(itype,jobz,uplo,n,a,b,w,z,ldz,work,info)
71  endif
72 
73  ABI_CHECK(info==0,"[z,d]hpgv returned info !=0")
74 
75 end subroutine abi_dhpgv

m_abi_linalg/abi_dhpgv_alloc_1d [ Functions ]

[ Top ] [ m_abi_linalg ] [ Functions ]

NAME

 abi_dhpgv_alloc_1d

FUNCTION

INPUTS

PARENTS

SOURCE

 90   subroutine abi_dhpgv_alloc_1d(itype,jobz,uplo,n,a,b,w,z,istwf_k,use_slk)
 91 
 92 !This section has been created automatically by the script Abilint (TD).
 93 !Do not modify the following lines by hand.
 94 #undef ABI_FUNC
 95 #define ABI_FUNC 'abi_dhpgv_alloc_1d'
 96 
 97 !End of the abilint section
 98 
 99  implicit none
100 
101 !Arguments ------------------------------------
102  integer :: itype
103  character(len=1), intent(in) :: jobz
104  character(len=1), intent(in) :: uplo
105  integer, intent(in) :: n
106  real(dp), intent(inout) :: a(:)
107  real(dp), intent(inout) :: b(:)
108  real(dp), intent(out) :: z(:,:)
109  real(dp), intent(out) :: w(:)
110  integer, optional, intent(in) :: istwf_k
111  integer, optional, intent(in) :: use_slk
112 
113 !Local Arguments ------------------------------------
114  character(len=500) :: msg
115  integer :: info,use_slk_,istwf_k_
116 #ifdef HAVE_LINALG_SCALAPACK
117  type(matrix_scalapack)    :: sca_a,sca_b,sca_ev
118  integer :: ierr
119 #endif
120 
121  use_slk_ = 0; if (present(use_slk)) use_slk_ = use_slk
122  istwf_k_ = 1; if (present(istwf_k)) istwf_k_ = istwf_k
123 
124  if( n > eigen_d_maxsize ) then
125    write(msg,'(a,2i3)')' Eigen size higher than max size set!!',n,eigen_d_maxsize
126    MSG_ERROR(msg)
127  endif
128  info = 0 !to avoid unwanted warning when info is not set by scalapack
129 
130 #ifdef HAVE_LINALG_SCALAPACK
131  if (use_slk_ == 1) then
132    z = 0._dp
133    call init_matrix_scalapack(sca_a,n,n,abi_processor,istwf_k_,10)
134    call init_matrix_scalapack(sca_b,n,n,abi_processor,istwf_k_,10)
135    call init_matrix_scalapack(sca_ev,n,n,abi_processor,istwf_k_,10)
136 #ifdef HAVE_LINALG_ELPA
137    call matrix_from_global_sym(sca_a,a,istwf_k_)
138    call matrix_from_global_sym(sca_b,b,istwf_k_)
139 #else
140    call matrix_from_global(sca_a,a,istwf_k_)
141    call matrix_from_global(sca_b,b,istwf_k_)
142 #endif
143    call compute_generalized_eigen_problem(abi_processor,sca_a,sca_b,&
144 &       sca_ev,w,abi_communicator,istwf_k_)
145 
146    call matrix_to_global(sca_a,a,istwf_k_)
147    call matrix_to_global(sca_b,b,istwf_k_)
148    call matrix_to_reference(sca_ev,z,istwf_k_)
149 
150    call xmpi_sum(z,abi_communicator,ierr)
151 
152    CALL destruction_matrix_scalapack(sca_a)
153    CALL destruction_matrix_scalapack(sca_ev)
154  else
155 #endif
156    call  abi_dhpgv(itype,jobz,uplo,n,a,b,w,z,n, &    !vz_d
157 &            eigen_d_work,info, rwork=eigen_z_rwork,istwf_k=istwf_k_)
158 #ifdef HAVE_LINALG_SCALAPACK
159  end if
160 #endif
161 
162  if(info/=0) then
163    write(msg,'(a,i0)')' Problem in abi_xhpgv, info= ',info
164    MSG_ERROR(msg)
165  endif
166 
167 end subroutine abi_dhpgv_alloc_1d

m_abi_linalg/abi_dhpgv_alloc_2d [ Functions ]

[ Top ] [ m_abi_linalg ] [ Functions ]

NAME

 abi_dhpgv_alloc_2d

FUNCTION

INPUTS

PARENTS

SOURCE

182   subroutine abi_dhpgv_alloc_2d(itype,jobz,uplo,n,a,b,w,z,istwf_k)
183 
184 !This section has been created automatically by the script Abilint (TD).
185 !Do not modify the following lines by hand.
186 #undef ABI_FUNC
187 #define ABI_FUNC 'abi_dhpgv_alloc_2d'
188 
189 !End of the abilint section
190 
191  implicit none
192 
193 !Arguments ------------------------------------
194  integer,intent(in) :: itype
195  character(len=1), intent(in) :: jobz
196  character(len=1), intent(in) :: uplo
197  integer, intent(in) :: n
198  real(dp), intent(inout) :: a(:,:)
199  real(dp), intent(inout) :: b(:,:)
200  real(dp), intent(out) :: z(:,:)
201  real(dp), intent(out) :: w(:)
202  integer :: info
203  integer, optional, intent(in) :: istwf_k
204 
205 !Local Arguments ------------------------------------
206  integer :: istwf_k_
207 
208 ! *********************************************************************
209 
210  istwf_k_ = 1; if (present(istwf_k)) istwf_k_ = istwf_k
211 
212  call  abi_dhpgv(itype,jobz,uplo,n,a,b,w,z,n,eigen_d_work,info,&
213 &         rwork=eigen_z_rwork,istwf_k=istwf_k_)
214 
215 end subroutine abi_dhpgv_alloc_2d

m_abi_linalg/abi_xhpgv [ Functions ]

[ Top ] [ m_abi_linalg ] [ Functions ]

NAME

  abi_xhpgv

FUNCTION

  abi_xhpgv is the generic function that compute
  all eigenvalues and, optionally, eigenvectors of a
  generalized symmetric-definite eigenproblem, of the form
  A*x=(lambda)*B*x,  A*Bx=(lambda)*x,  or B*A*x=(lambda)*x.
  Here A and B are assumed to be symmetric (or hermitian),
  stored in packed format  and B is also positive definite.

COPYRIGHT

  Copyright (C) 2001-2018 ABINIT group (LNguyen,FDahm (CS))
  This file is distributed under the terms of the
  GNU General Public License, see ~ABINIT/Infos/copyright
  or http://www.gnu.org/copyleft/gpl.txt .

SOURCE


m_abi_linalg/abi_zhpgv [ Functions ]

[ Top ] [ m_abi_linalg ] [ Functions ]

NAME

 abi_zhpgv

FUNCTION

INPUTS

PARENTS

SOURCE

315 subroutine abi_zhpgv(itype,jobz,uplo,n,a,b,w,z,ldz,work,rwork,info)
316 
317 !This section has been created automatically by the script Abilint (TD).
318 !Do not modify the following lines by hand.
319 #undef ABI_FUNC
320 #define ABI_FUNC 'abi_zhpgv'
321 !End of the abilint section
322 
323  implicit none
324 
325 !Arguments ------------------------------------
326  integer,intent(in) :: itype
327  integer, intent(in) :: n
328  integer, intent(in) :: ldz
329  character(len=1), intent(in) :: jobz
330  character(len=1), intent(in) :: uplo
331  complex(dpc), intent(inout) :: a(:,:)
332  complex(dpc), intent(inout) :: b(:,:)
333  complex(dpc), intent(out) :: z(:,:)
334  complex(dpc), intent(inout) :: work(:)
335  real(dp), intent(inout) :: rwork(:)
336  real(dp), intent(out) :: w(n)
337  integer, intent(out) :: info
338 
339  ! *********************************************************************
340 
341  call zhpgv(itype,jobz,uplo,n,a,b,w,z,ldz,work,rwork,info)
342 
343 end subroutine abi_zhpgv

m_abi_linalg/abi_zhpgv_alloc [ Functions ]

[ Top ] [ m_abi_linalg ] [ Functions ]

NAME

 abi_zhpgv_alloc

FUNCTION

INPUTS

PARENTS

SOURCE

358 subroutine abi_zhpgv_alloc(itype,jobz,uplo,n,a,b,w,z)
359 
360 !This section has been created automatically by the script Abilint (TD).
361 !Do not modify the following lines by hand.
362 #undef ABI_FUNC
363 #define ABI_FUNC 'abi_zhpgv_alloc'
364 !End of the abilint section
365 
366  implicit none
367 
368 !Arguments ------------------------------------
369  integer,intent(in) :: itype
370  character(len=1), intent(in) :: jobz
371  character(len=1), intent(in) :: uplo
372  integer, intent(in) :: n
373  complex(dpc), intent(inout) :: a(:,:)
374  complex(dpc), intent(inout) :: b(:,:)
375  complex(dpc), intent(out) :: z(:,:)
376  real(dp), intent(out) :: w(n)
377 
378  integer :: info
379 
380 ! *********************************************************************
381  call abi_zhpgv(itype,jobz,uplo,n,a,b,w,z,n,eigen_z_work,eigen_z_rwork,info)
382 
383 end subroutine abi_zhpgv_alloc