diff --git a/src/msspec/spec/fortran/eig/common/eig_mat_ms.f b/src/msspec/spec/fortran/eig/common/eig_mat_ms.f index 03ee7e7..06896f2 100644 --- a/src/msspec/spec/fortran/eig/common/eig_mat_ms.f +++ b/src/msspec/spec/fortran/eig/common/eig_mat_ms.f @@ -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 diff --git a/src/msspec/spec/fortran/eig/common/save_eigenvalues.f b/src/msspec/spec/fortran/eig/common/save_eigenvalues.f new file mode 100644 index 0000000..0824c4b --- /dev/null +++ b/src/msspec/spec/fortran/eig/common/save_eigenvalues.f @@ -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