LCOV - code coverage report
Current view: top level - io - writeOutParameters.f90 (source / functions) Hit Total Coverage
Test: combined.info Lines: 44 45 97.8 %
Date: 2019-09-08 04:53:50 Functions: 1 2 50.0 %

          Line data    Source code
       1             : MODULE m_writeOutParameters
       2             : 
       3             : IMPLICIT NONE
       4             : 
       5             : CONTAINS
       6             : 
       7          38 : SUBROUTINE writeOutParameters(mpi,input,sym,stars,atoms,vacuum,obsolete,kpts,&
       8             :                               oneD,hybrid,cell,banddos,sliceplot,xcpot,&
       9             :                               noco,dimension,enpara,sphhar)
      10             : 
      11             :    USE m_types
      12             :    USE m_xmlOutput
      13             : 
      14             :    TYPE(t_mpi),       INTENT(IN) :: mpi
      15             :    TYPE(t_input),     INTENT(IN) :: input
      16             :    TYPE(t_sym),       INTENT(IN) :: sym
      17             :    TYPE(t_stars),     INTENT(IN) :: stars 
      18             :    TYPE(t_atoms),     INTENT(IN) :: atoms
      19             :    TYPE(t_vacuum),    INTENT(IN) :: vacuum
      20             :    TYPE(t_obsolete),  INTENT(IN) :: obsolete
      21             :    TYPE(t_kpts),      INTENT(IN) :: kpts
      22             :    TYPE(t_oneD),      INTENT(IN) :: oneD
      23             :    TYPE(t_hybrid),    INTENT(IN) :: hybrid
      24             :    TYPE(t_cell),      INTENT(IN) :: cell
      25             :    TYPE(t_banddos),   INTENT(IN) :: banddos
      26             :    TYPE(t_sliceplot), INTENT(IN) :: sliceplot
      27             :    CLASS(t_xcpot),    INTENT(IN) :: xcpot
      28             :    TYPE(t_noco),      INTENT(IN) :: noco
      29             :    TYPE(t_dimension), INTENT(IN) :: dimension
      30             :    TYPE(t_enpara),    INTENT(IN) :: enpara
      31             :    TYPE(t_sphhar),    INTENT(IN) :: sphhar
      32             : 
      33             :    INTEGER            :: i
      34             :    REAL               :: sumWeight
      35             :    CHARACTER(LEN=20)  :: attributes(7)
      36             : 
      37          38 :    CALL openXMLElementNoAttributes('numericalParameters')
      38             : 
      39          38 :    WRITE(attributes(1),'(i0)') atoms%nat
      40          38 :    WRITE(attributes(2),'(i0)') atoms%ntype
      41          38 :    WRITE(attributes(3),'(i0)') atoms%jmtd
      42          38 :    WRITE(attributes(4),'(i0)') atoms%n_u
      43             :    CALL writeXMLElementFormPoly('atomsInCell',(/'nat  ','ntype','jmtd ','n_u  '/),&
      44          38 :                                 attributes(:4),reshape((/3,6,6,6,8,8,8,8/),(/4,2/)))
      45             : 
      46          38 :    WRITE(attributes(1),'(i0)') dimension%nvd
      47          38 :    WRITE(attributes(2),'(i0)') atoms%lmaxd
      48          38 :    WRITE(attributes(3),'(i0)') atoms%nlotot
      49             :    CALL writeXMLElementFormPoly('basis',(/'nvd   ','lmaxd ','nlotot'/),&
      50          38 :                                 attributes(:3),reshape((/9,6,6,8,8,8/),(/3,2/)))
      51             : 
      52          38 :    WRITE(attributes(1),'(i0)') stars%ng3
      53          38 :    WRITE(attributes(2),'(i0)') stars%ng2
      54             :    CALL writeXMLElementFormPoly('density',(/'ng3','ng2'/),&
      55          38 :                                 attributes(:2),reshape((/7,6,8,8/),(/2,2/)))
      56             : 
      57          38 :    WRITE(attributes(1),'(i0)') dimension%neigd
      58             :    CALL writeXMLElementFormPoly('bands',(/'numbands'/),&
      59          38 :                                 attributes(:1),reshape((/9,8/),(/1,2/)))
      60             : 
      61          38 :    WRITE(attributes(1),'(f0.8)') cell%vol
      62          38 :    WRITE(attributes(2),'(f0.8)') cell%volint
      63          38 :    IF(input%film) THEN
      64           7 :       WRITE(attributes(3),'(f0.8)') cell%omtil
      65           7 :       WRITE(attributes(4),'(f0.8)') cell%area
      66           7 :       WRITE(attributes(5),'(f0.8)') cell%z1
      67             :       CALL openXMLElementFormPoly('volumes',(/'unitCell    ', 'interstitial', 'omegaTilda  ', 'surfaceArea ', 'z1          '/),&
      68           7 :                                   attributes(:5),reshape((/8,12,10,11,2,10,10,10,10,10/),(/5,2/)))
      69             :    ELSE
      70             :       CALL openXMLElementFormPoly('volumes',(/'unitCell    ', 'interstitial'/),&
      71          31 :                                   attributes(:2),reshape((/8,12,10,10/),(/2,2/)))
      72             :    END IF
      73         125 :    DO i = 1, atoms%ntype
      74          87 :       WRITE(attributes(1),'(i0)') i
      75          87 :       WRITE(attributes(2),'(f0.8)') atoms%rmt(i)
      76          87 :       WRITE(attributes(3),'(f0.8)') atoms%volmts(i)
      77             :       CALL writeXMLElementFormPoly('mtVolume',(/'atomType','mtRadius','mtVolume'/),&
      78         125 :                                    attributes(:3),reshape((/8,8,8,5,10,10/),(/3,2/)))
      79             :    END DO
      80          38 :    CALL closeXMLElement('volumes')
      81             : 
      82          38 :    sumWeight = SUM(kpts%wtkpt(:kpts%nkpt))
      83          38 :    WRITE(attributes(1),'(f0.8)') kpts%posScale
      84          38 :    WRITE(attributes(2),'(f0.8)') sumWeight
      85          38 :    WRITE(attributes(3),'(i0)') kpts%nkpt
      86             :    CALL openXMLElementFormPoly('kPointList',(/'posScale   ', 'weightScale', 'count      '/),&
      87          38 :                                attributes(:3),reshape((/8,11,5,10,10,5/),(/3,2/)))
      88         277 :    DO i = 1, kpts%nkpt
      89         239 :       WRITE(attributes(1),'(f12.6)') kpts%wtkpt(i)
      90         239 :       WRITE(attributes(2),'(f12.6)') kpts%bk(1,i)
      91         239 :       WRITE(attributes(3),'(f12.6)') kpts%bk(2,i)
      92         239 :       WRITE(attributes(4),'(f12.6)') kpts%bk(3,i)
      93         277 :       CALL writeXMLElementForm('kPoint', (/'weight'/), attributes(:1),reshape((/6,12/),(/1,2/)),attributes(2:4))
      94             :    END DO
      95          38 :    CALL closeXMLElement('kPointList')
      96             : 
      97          38 :    CALL closeXMLElement('numericalParameters')
      98             : 
      99          38 : END SUBROUTINE writeOutParameters
     100             : 
     101           0 : END MODULE m_writeOutParameters

Generated by: LCOV version 1.13