Commit 96517d1c authored by Gregor Michalicek's avatar Gregor Michalicek

Introduce oUnit to all files in cdn_mt directory

parent 2b82ef27
......@@ -20,6 +20,7 @@ CONTAINS
nbasf0,alo1,blo1,clo1,kvec, nkvec,enough,bascof_lo )
!
USE m_types
USE m_constants
IMPLICIT NONE
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_atoms),INTENT(IN) :: atoms
......@@ -118,12 +119,10 @@ CONTAINS
ENDIF ! s > eps & l >= 1
END DO
IF ((k.EQ.nv) .AND. (.NOT.enough(na))) THEN
WRITE (6,FMT=*)&
& 'abclocdn did not find enough linearly independent'
WRITE (6,FMT=*)&
& 'ccof coefficient-vectors. the linear independence'
WRITE (6,FMT=*) 'quality, linindq, is set to: ',linindq,'.'
WRITE (6,FMT=*) 'this value might be to large.'
WRITE (oUnit,FMT=*) 'abclocdn did not find enough linearly independent'
WRITE (oUnit,FMT=*) 'ccof coefficient-vectors. the linear independence'
WRITE (oUnit,FMT=*) 'quality, linindq, is set to: ',linindq,'.'
WRITE (oUnit,FMT=*) 'this value might be to large.'
STOP 'abclocdn: did not find enough lin. ind. ccof-vectors'
END IF
......
......@@ -10,15 +10,19 @@ MODULE m_cdnmt
! Philipp Kurz 2000-02-03
!***********************************************************************
CONTAINS
SUBROUTINE cdnmt(mpi,jspd,input,atoms,sym,sphhar,noco,jsp_start,jsp_end,enpara,banddos,&
vr,denCoeffs,usdus,orb,denCoeffsOffdiag,moments,rho,hub1inp,jDOS,hub1data)
use m_constants,only: sfp_const
USE m_types
USE m_constants
USE m_rhosphnlo
USE m_radfun
USE m_orbmom2
USE m_types
USE m_xmlOutput
IMPLICIT NONE
TYPE(t_input), INTENT(IN) :: input
TYPE(t_mpi), INTENT(IN) :: mpi
TYPE(t_usdus), INTENT(INOUT) :: usdus !in fact only the lo part is intent(in)
......@@ -277,13 +281,13 @@ CONTAINS
DEALLOCATE ( f,g)
! !$OMP END PARALLEL
WRITE (6,FMT=8000)
WRITE (oUnit,FMT=8000)
8000 FORMAT (/,5x,'l-like charge',/,t6,'atom',t15,'s',t24,'p',&
& t33,'d',t42,'f',t51,'total')
DO itype = 1,atoms%ntype
DO ispin = jsp_start,jsp_end
WRITE ( 6,FMT=8100) itype, (qmtl(l,ispin,itype),l=0,3),moments%chmom(itype,ispin)
WRITE (oUnit,FMT=8100) itype, (qmtl(l,ispin,itype),l=0,3),moments%chmom(itype,ispin)
8100 FORMAT (' -->',i3,2x,4f9.5,2x,f9.5)
attributes = ''
WRITE(attributes(1),'(i0)') itype
......@@ -300,15 +304,15 @@ CONTAINS
IF(banddos%l_jDOS) THEN
IF(PRESENT(jDOS)) THEN
WRITE(6,8200)
WRITE(oUnit,8200)
8200 FORMAT(/,5x,'j-decomposed charge',/,t6,'atom',t15,'s',t24,'p1/2',t33,'p3/2',&
t42,'d3/2',t51,'d5/2',t60,'f5/2',t69,'f7/2')
DO itype = 1, atoms%ntype
natom = SUM(atoms%neq(:itype-1)) + 1
WRITE(6,8300) itype, jDOS%occ(0,1,natom), ((jDOS%occ(l,jj,natom),jj = 1, 2),l = 1, 3)
WRITE(oUnit,8300) itype, jDOS%occ(0,1,natom), ((jDOS%occ(l,jj,natom),jj = 1, 2),l = 1, 3)
8300 FORMAT(' -->',i3,2x,f9.5,2x,6f9.5)
WRITE(6,*)
WRITE(oUnit,*)
CALL openXMLElementPoly('mtJcharge',['atomType'],[itype])
......
......@@ -25,48 +25,48 @@ SUBROUTINE denMultipoleExp(input, mpi, atoms, sphhar, stars, sym, cell, oneD, de
IF(input%jspins == 2) THEN
IF(mpi%irank.EQ.0) THEN
WRITE(6,*) 'Multipole expansion for spin-up density:'
WRITE(6,*) '======================================='
WRITE(oUnit,*) 'Multipole expansion for spin-up density:'
WRITE(oUnit,*) '======================================='
END IF
qlm = CMPLX(0.0,0.0)
workDen = den
CALL mpmom(input,mpi,atoms,sphhar,stars,sym,cell,oneD,workDen%pw(1:,1),workDen%mt(:,0:,1:,1),POTDEN_TYPE_DEN,qlm,.FALSE.)
IF(mpi%irank.EQ.0) THEN
WRITE(6,*) '======================================='
WRITE(oUnit,*) '======================================='
END IF
IF(mpi%irank.EQ.0) THEN
WRITE(6,*) 'Multipole expansion for spin-down density:'
WRITE(6,*) '======================================='
WRITE(oUnit,*) 'Multipole expansion for spin-down density:'
WRITE(oUnit,*) '======================================='
END IF
qlm = CMPLX(0.0,0.0)
CALL mpmom(input,mpi,atoms,sphhar,stars,sym,cell,oneD,workDen%pw(1:,2),workDen%mt(:,0:,1:,2),POTDEN_TYPE_DEN,qlm,.FALSE.)
IF(mpi%irank.EQ.0) THEN
WRITE(6,*) '======================================='
WRITE(oUnit,*) '======================================='
END IF
END IF
IF(mpi%irank.EQ.0) THEN
WRITE(6,*) 'Multipole expansion for charge density:'
WRITE(6,*) '======================================='
WRITE(oUnit,*) 'Multipole expansion for charge density:'
WRITE(oUnit,*) '======================================='
END IF
qlm = CMPLX(0.0,0.0)
workDen = den
IF(input%jspins == 2) CALL workDen%SpinsToChargeAndMagnetisation()
CALL mpmom(input,mpi,atoms,sphhar,stars,sym,cell,oneD,workDen%pw(1:,1),workDen%mt(:,0:,1:,1),POTDEN_TYPE_DEN,qlm,.FALSE.)
IF(mpi%irank.EQ.0) THEN
WRITE(6,*) '======================================='
WRITE(oUnit,*) '======================================='
END IF
IF(input%jspins == 2) THEN
IF(mpi%irank.EQ.0) THEN
WRITE(6,*) 'Multipole expansion for magnetization density:'
WRITE(6,*) '======================================='
WRITE(oUnit,*) 'Multipole expansion for magnetization density:'
WRITE(oUnit,*) '======================================='
END IF
qlm = CMPLX(0.0,0.0)
CALL mpmom(input,mpi,atoms,sphhar,stars,sym,cell,oneD,workDen%pw(1:,2),workDen%mt(:,0:,1:,2),POTDEN_TYPE_DEN,qlm,.FALSE.)
IF(mpi%irank.EQ.0) THEN
WRITE(6,*) '======================================='
WRITE(oUnit,*) '======================================='
END IF
END IF
......
......@@ -226,7 +226,7 @@ SUBROUTINE magDiMom(sym,input,atoms,sphhar,noco,nococonv,l_fmpl2,rho,magDipoles,
DO iType = 1, atoms%ntype
DO i = 1, atoms%jri(iType)
IF (ANY(AIMAG(rhoSphHarms(i,1,iType,:)).GT.1.0e-11)) THEN
WRITE(6,*) 'imaginary part too large!'
WRITE(oUnit,*) 'imaginary part too large!'
END IF
END DO
END DO
......
......@@ -11,6 +11,7 @@ CONTAINS
SUBROUTINE magMoms(input,atoms,noco,nococonv,vTot,moments)
USE m_types
USE m_constants
USE m_xmlOutput
USE m_m_perp
......@@ -28,12 +29,12 @@ SUBROUTINE magMoms(input,atoms,noco,nococonv,vTot,moments)
REAL :: sval,stot,scor,smom
CHARACTER(LEN=20) :: attributes(4)
WRITE (6,FMT=8000)
WRITE (oUnit,FMT=8000)
DO iType = 1,atoms%ntype
sval = moments%svdn(iType,1) - moments%svdn(iType,input%jspins)
stot = moments%stdn(iType,1) - moments%stdn(iType,input%jspins)
scor = stot - sval
WRITE (6,FMT=8010) iType,stot,sval,scor,moments%svdn(iType,1),moments%stdn(iType,1)
WRITE (oUnit,FMT=8010) iType,stot,sval,scor,moments%svdn(iType,1),moments%stdn(iType,1)
END DO
8000 FORMAT (/,/,10x,'spin density at the nucleus:',/,10x,'type',t25,&
......@@ -41,13 +42,13 @@ SUBROUTINE magMoms(input,atoms,noco,nococonv,vTot,moments)
'majority valence and total density',/)
8010 FORMAT (i13,2x,3e20.8,5x,2e20.8)
WRITE (6,FMT=8020)
WRITE (oUnit,FMT=8020)
CALL openXMLElement('magneticMomentsInMTSpheres',(/'units'/),(/'muBohr'/))
iRepAtom = 1
DO iType = 1, atoms%ntype
smom = moments%chmom(iType,1) - moments%chmom(iType,input%jspins)
WRITE (6,FMT=8030) iType,smom, (moments%chmom(iType,j),j=1,input%jspins)
WRITE (oUnit,FMT=8030) iType,smom, (moments%chmom(iType,j),j=1,input%jspins)
attributes = ''
WRITE(attributes(1),'(i0)') iType
WRITE(attributes(2),'(f15.10)') smom
......
......@@ -47,11 +47,11 @@ CONTAINS
CALL divergence(input,stars,atoms,sphhar,vacuum,sym,cell,noco,m_den,div)
CALL mt_moments( input, atoms, sym,sphhar, div%mt(:,:,:,1), POTDEN_TYPE_POTCOUL,qlmo,.FALSE.)
WRITE(6,*) "Magnetic Multipoles:"
WRITE(oUnit,*) "Magnetic Multipoles:"
DO n=1,atoms%ntype
WRITE(6,*) "Atom type:",n
WRITE(oUnit,*) "Atom type:",n
DO l=0,4
WRITE(6,"(10(2f12.7,3x))") (qlmo(m,l,n),m=-l,l)
WRITE(oUnit,"(10(2f12.7,3x))") (qlmo(m,l,n),m=-l,l)
ENDDO
ENDDO
END SUBROUTINE magMultipoles
......
......@@ -11,6 +11,7 @@ CONTAINS
SUBROUTINE orbMagMoms(input,atoms,noco,nococonv,clmom)
USE m_types
USE m_constants
USE m_xmlOutput
IMPLICIT NONE
......@@ -30,7 +31,7 @@ SUBROUTINE orbMagMoms(input,atoms,noco,nococonv,clmom)
thetai = nococonv%theta
phii = nococonv%phi
WRITE (6,FMT=9020)
WRITE (oUnit,FMT=9020)
CALL openXMLElement('orbitalMagneticMomentsInMTSpheres',(/'units'/),(/'muBohr'/))
DO iType = 1, atoms%ntype
! magn. moment(-)
......@@ -57,7 +58,7 @@ SUBROUTINE orbMagMoms(input,atoms,noco,nococonv,clmom)
sin(thetai)*(cos(phii)*clmom(1,iType,2) + &
sin(phii)*clmom(2,iType,2))
WRITE (6,FMT=8030) iType,slmom,(clmom(3,iType,j),j=1,2)
WRITE (oUnit,FMT=8030) iType,slmom,(clmom(3,iType,j),j=1,2)
attributes = ''
WRITE(attributes(1),'(i0)') iType
WRITE(attributes(2),'(f15.10)') slmom
......
......@@ -77,15 +77,15 @@ SUBROUTINE resMoms(sym,input,atoms,sphhar,noco,nococonv,den,rhoLRes)
END DO
DO iType = 1, atoms%ntype
WRITE(6,*) 'Intraatomic electric and magnetic dipole moments for atom type ', iType,':'
WRITE(6,'(a)') ' lowL largeL p_x p_y p_z t_x t_y t_z'
WRITE(6,'(a,6f15.8)') 'Overall: ', elecDip(:,iType), t_op(:,iType)
WRITE(oUnit,*) 'Intraatomic electric and magnetic dipole moments for atom type ', iType,':'
WRITE(oUnit,'(a)') ' lowL largeL p_x p_y p_z t_x t_y t_z'
WRITE(oUnit,'(a,6f15.8)') 'Overall: ', elecDip(:,iType), t_op(:,iType)
DO l = 0, atoms%lmax(iType)
DO lp = 0, l
llp = (l* (l+1))/2 + lp
IF(ALL(ABS(res_T_op(:,iType,llp)).LT.1.0e-8).AND.&
ALL(ABS(resElecDip(:,iType,llp)).LT.1.0e-8)) CYCLE
WRITE(6,'(a,2i6,6f15.8)') ' ', lp, l, resElecDip(:,iType,llp),res_T_op(:,iType,llp)
WRITE(oUnit,'(a,2i6,6f15.8)') ' ', lp, l, resElecDip(:,iType,llp),res_T_op(:,iType,llp)
END DO
END DO
END DO
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment