Commit 1df3cbc6 authored by Gregor Michalicek's avatar Gregor Michalicek

Introduce oUnit to files in fleurinput directory

...removed output to out file in fleurinput/calculator.f because
the usage of the constants module lead to circular dependencies.
parent f156fed2
......@@ -5,7 +5,7 @@
!--------------------------------------------------------------------------------
MODULE m_calculator
use m_juDFT
USE m_juDFT
!
! This module implements a parser able to evaluate expressions in
! input files
......@@ -66,7 +66,6 @@
!>
WRITE(*,*) m
WRITE(6,*) m
WRITE(*,*) "Defined variables:"
DO n = 1,n_vars
......
......@@ -459,12 +459,12 @@ SUBROUTINE read_xml_atoms(this,xml)
DO n = 1, this%ntype
IF (this%nlo(n).GE.1) THEN
IF (this%nlo(n).GT.this%nlod) THEN
WRITE (6,*) 'nlo(n) =',this%nlo(n),' > nlod =',this%nlod
WRITE (oUnit,*) 'nlo(n) =',this%nlo(n),' > nlod =',this%nlod
CALL juDFT_error("nlo(n)>nlod",calledby ="postprocessInput")
END IF
DO j=1,this%nlo(n)
IF ( (this%llo(j,n).GT.this%llod).OR.(MOD(-this%llod,10)-1).GT.this%llod ) THEN
WRITE (6,*) 'llo(j,n) =',this%llo(j,n),' > llod =',this%llod
WRITE (oUnit,*) 'llo(j,n) =',this%llo(j,n),' > llod =',this%llod
CALL juDFT_error("llo(j,n)>llod",calledby ="postprocessInput")
END IF
END DO
......@@ -481,7 +481,7 @@ SUBROUTINE read_xml_atoms(this,xml)
END DO
DO ilo = 1,this%nlo(n)
WRITE(6,'(A,I2,A,I2)') 'I use',this%ulo_der(ilo,n),'. derivative of l =',this%llo(ilo,n)
WRITE(oUnit,'(A,I2,A,I2)') 'I use',this%ulo_der(ilo,n),'. derivative of l =',this%llo(ilo,n)
IF (this%llo(ilo,n)>this%llod) CALL juDFT_error(" l > llod!!!",calledby="postprocessInput")
l = this%llo(ilo,n)
IF (ilo.EQ.1) THEN
......@@ -493,7 +493,7 @@ SUBROUTINE read_xml_atoms(this,xml)
END IF
this%nlol(l,n) = this%nlol(l,n) + 1
END DO
WRITE (6,*) 'atoms%lapw_l(n) = ',this%lapw_l(n)
WRITE (oUnit,*) 'atoms%lapw_l(n) = ',this%lapw_l(n)
END IF
END DO
......
......@@ -199,6 +199,7 @@ SUBROUTINE init(sym, cell, film)
!tau,mrot and nop have to be specified alread
USE m_types_cell
USE m_types_input
USE m_constants
CLASS(t_sym), INTENT(INOUT):: sym
TYPE(t_cell), INTENT(IN) :: cell
LOGICAL, INTENT(IN) :: film
......@@ -321,8 +322,8 @@ SUBROUTINE init(sym, cell, film)
n = 1
DO WHILE(n <= sym%nop)
IF(ABS(sym%tau(3, n)) > 0.000001) THEN
WRITE(6, '(/," Full space group has",i3," operations.",/)') sym%nop
WRITE(6, '(i3,"th operation violate the 2d symmetry in fleur and has been removed.",/)') n
WRITE(oUnit, '(/," Full space group has",i3," operations.",/)') sym%nop
WRITE(oUnit, '(i3,"th operation violate the 2d symmetry in fleur and has been removed.",/)') n
DO nn = n + 1, sym%nop
sym%mrot(:, :, nn - 1) = sym%mrot(:, :, nn)
sym%tau(:, nn - 1) = sym%tau(:, nn)
......@@ -340,6 +341,7 @@ SUBROUTINE init(sym, cell, film)
END SUBROUTINE init
FUNCTION closure(sym) RESULT(lclose)
USE m_constants
CLASS(t_sym), INTENT(IN):: sym
LOGICAL :: lclose
......@@ -371,8 +373,8 @@ FUNCTION closure(sym) RESULT(lclose)
IF(map(i) .EQ. 0) THEN
map(i) = k
ELSE
WRITE(6, *) 'ERROR Closure: Multiplying ', j, ' with ', k, ' and with ', map(i)
WRITE(6, *) 'yields the same matrix'
WRITE(oUnit, *) 'ERROR Closure: Multiplying ', j, ' with ', k, ' and with ', map(i)
WRITE(oUnit, *) 'yields the same matrix'
lclose = .FALSE.
RETURN
END IF
......@@ -380,7 +382,7 @@ FUNCTION closure(sym) RESULT(lclose)
END DO
IF(map(i) .EQ. 0) THEN
WRITE(6, *) 'ERROR Closure:', i, ' times', j, ' leaves group'
WRITE(oUnit, *) 'ERROR Closure:', i, ' times', j, ' leaves group'
lclose = .FALSE.
RETURN
END IF
......@@ -392,6 +394,7 @@ FUNCTION closure(sym) RESULT(lclose)
END FUNCTION closure
SUBROUTINE check_close(sym, optype)
USE m_constants
CLASS(t_sym), INTENT(inout)::sym
INTEGER, INTENT(OUT) :: optype(sym%nop)
......@@ -421,15 +424,15 @@ SUBROUTINE check_close(sym, optype)
sym%multab(j, i) = k
IF(k .EQ. 1) sym%invtab(j) = i
ELSE
WRITE(6, '(" Symmetry error: multiple ops")')
WRITE(oUnit, '(" Symmetry error: multiple ops")')
CALL juDFT_error("check_close: Multiple ops", calledby="closure")
END IF
END IF
END DO
IF(sym%multab(j, i) .EQ. 0) THEN
WRITE(6, '(" Group not closed")')
WRITE(6, '(" j , i =",2i4)') j, i
WRITE(oUnit, '(" Group not closed")')
WRITE(oUnit, '(" j , i =",2i4)') j, i
CALL juDFT_error("check_close: Not closed", calledby="closure")
END IF
END DO
......
......@@ -306,6 +306,7 @@ CONTAINS
SUBROUTINE read_xml_wannier(this,xml)
USE m_types_xml
USE m_constants
CLASS(t_wann),INTENT(inout):: this
TYPE(t_xml),INTENT(INOUT) ::xml
! Read in optional Wannier functions parameters
......@@ -395,14 +396,14 @@ CONTAINS
! backspace(916)
! read(916,*,iostat=ios)task,this%gfthick,this%gfcut
! if (ios /= 0) CALL juDFT_error ("error reading gfcut", calledby="wann_read_inp")
! if(l_p0)write(6,*)"gfcut=",this%gfthick,this%gfcut
! if(l_p0)write(oUnit,*)"gfcut=",this%gfthick,this%gfcut
!Not done
! ELSEIF(this%jobList(i).EQ.'lapw')THEN
! this%l_lapw=.TRUE.
! backspace(916)
! read(916,*,iostat=ios)task,this%unigrid(:)
! if (ios /= 0) CALL juDFT_error ("error reading unigrid", calledby="wann_read_inp")
! if(l_p0)write(6,*)"unigrid=",this%unigrid(:)
! if(l_p0)write(oUnit,*)"unigrid=",this%unigrid(:)
ELSEIF(this%jobList(i).EQ.'plot_lapw')THEN
this%l_plot_lapw=.TRUE.
ELSEIF(this%jobList(i).EQ.'bzsym')THEN
......@@ -488,11 +489,11 @@ CONTAINS
! backspace(916)
! read(916,*,iostat=ios)task,this%ikptstart
! if (ios /= 0) CALL juDFT_error ("error reading ikptstart", calledby="wann_read_inp")
! if(l_p0)write(6,*)"ikptstart=",this%ikptstart
! if(l_p0)write(oUnit,*)"ikptstart=",this%ikptstart
ELSEIF(this%jobList(i).EQ.'endjobs')THEN
Exit
ELSE
WRITE(6,*)"unrecognized key: ",this%jobList(i)
WRITE(oUnit,*)"unrecognized key: ",this%jobList(i)
CALL juDFT_error ("unrecognized key in wann_inp", calledby="wann_read_inp")
END IF
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