Added file src/msspec/spec/fortran/eig/common/save_eigenvalues.f
which writes the eigenvalues to a fortran stream file called eigenvalues.dat, facilitating reading by a python script. Added call to save_eigenvalues in src/msspec/spec/fortran/eig/common/eig_mat_ms.f
This commit is contained in:
parent
39ba8c3983
commit
cb0b432041
|
@ -178,6 +178,10 @@ CKMD WRITE(IUO1,*) ' '
|
|||
CKMD WRITE(IUO1,*) ' ---> WORK(1),INFO =',WORK(1),INFO
|
||||
CKMD WRITE(IUO1,*) ' '
|
||||
CKMD ENDIF
|
||||
C
|
||||
CKMD Save eigenvalues to unformatted stream file eigenvalues.dat
|
||||
C
|
||||
call save_eigenvalues(w, jlin, e_kin)
|
||||
C
|
||||
N_EIG=0
|
||||
C
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
c
|
||||
c=======================================================================
|
||||
c
|
||||
subroutine save_eigenvalues (evalues, n, ke)
|
||||
c
|
||||
implicit none
|
||||
c
|
||||
integer, intent(in) :: n
|
||||
real, intent(in) :: ke
|
||||
complex*16, intent(in) :: evalues(n)
|
||||
c
|
||||
c Local variables
|
||||
c
|
||||
integer :: io
|
||||
logical :: exists
|
||||
c
|
||||
c
|
||||
inquire(file='eigenvalues.dat', exist=exists)
|
||||
c
|
||||
if (exists) then
|
||||
open(newunit=io, file='eigenvalues.dat', status='old',
|
||||
+ form='unformatted', access='stream', action='write',
|
||||
+ position='append')
|
||||
else
|
||||
open(newunit=io, file='eigenvalues.dat', status='new',
|
||||
+ form='unformatted', access='stream', action='write')
|
||||
end if
|
||||
c
|
||||
write(io) ke, n, evalues(1:n)
|
||||
c
|
||||
close(io)
|
||||
c
|
||||
return
|
||||
end subroutine save_eigenvalues
|
||||
c
|
||||
c=======================================================================
|
||||
c
|
Loading…
Reference in New Issue