LCOV - code coverage report
Current view: top level - hybrid - map_to_unit.f90 (source / functions) Hit Total Coverage
Test: FLEUR test coverage Lines: 5 5 100.0 %
Date: 2024-05-02 04:21:52 Functions: 1 1 100.0 %

          Line data    Source code
       1             : module m_map_to_unit
       2             : contains    
       3        1504 :    function map_to_unit(x) result(y)
       4             :     implicit none 
       5             :     real, intent(in) :: x(:)
       6             :     real             :: y(size(x))
       7             : 
       8        6016 :     y = x
       9             : 
      10             :     ! everything close to 0 or 1 get's mapped to 0 and 1
      11        6016 :     where (abs(y - anint(y)) < 1e-6) y = anint(y)
      12             :     ! map to 0 -> 1 interval
      13        6016 :     y = y - floor(y)
      14        1504 :  end function map_to_unit
      15             : end module m_map_to_unit

Generated by: LCOV version 1.14