LCOV - code coverage report
Current view: top level - inpgen - element.f (source / functions) Hit Total Coverage
Test: combined.info Lines: 10 12 83.3 %
Date: 2019-09-08 04:53:50 Functions: 1 1 100.0 %

          Line data    Source code
       1             :       MODULE m_element
       2             :       CONTAINS
       3             : !  ---------------------------------------------------------------------
       4           1 :       INTEGER FUNCTION z_namat(element)
       5             :       USE m_constants,ONLY: namat_const
       6             :       IMPLICIT NONE
       7             : 
       8             :       CHARACTER(len=2)  element
       9             :       CHARACTER(len=2)  ele
      10             :       INTEGER           adiff,n
      11             : 
      12           1 :       adiff = IACHAR('a') - IACHAR('A')
      13             : 
      14           1 :       ele = ADJUSTL( element ) ! takes care of single letter elements
      15             : 
      16           1 :       IF ( LLT(ele(2:2),'a') .AND. ele(2:2).NE.' ' ) 
      17           0 :      &     ele(2:2) = achar( iachar(ele(2:2))+adiff )
      18           1 :       IF ( LGE(ele(1:1),'a') ) 
      19           0 :      &     ele(1:1) = achar( iachar(ele(1:1))-adiff )
      20             : 
      21             :       z_namat = -1
      22          29 :       DO n = 0, size(namat_const)-1
      23          15 :         IF (TRIM(ADJUSTL(ele)) == TRIM(ADJUSTL(namat_const(n)))) THEN
      24           1 :           z_namat = n
      25           1 :           EXIT
      26             :         ENDIF
      27             :       ENDDO
      28             : 
      29           1 :       END FUNCTION z_namat
      30             : !  ---------------------------------------------------------------------
      31             :       END MODULE m_element

Generated by: LCOV version 1.13