LCOV - code coverage report
Current view: top level - atm/test/src - test_atm_setup.f90 (source / functions) Coverage Total Hit
Test: coverage.info Lines: 76.9 % 26 20
Test Date: 2025-05-08 18:23:42 Functions: 100.0 % 1 1

            Line data    Source code
       1              : module test_atm_setup
       2              :    use const_def
       3              :    use math_lib
       4              :    use atm_lib
       5              :    use chem_lib, only: chem_init
       6              :    use eos_def
       7              :    use eos_lib
       8              :    use kap_def
       9              :    use kap_lib
      10              :    use test_atm_support
      11              : 
      12              :    implicit none
      13              : 
      14              : contains
      15              : 
      16            4 :    subroutine setup
      17              :       use const_lib, only: const_init
      18              : 
      19              :       logical, parameter :: use_cache = .true.
      20              :       character(len=256) :: my_mesa_dir
      21              : 
      22              :       ierr = 0
      23              : 
      24            2 :       my_mesa_dir = '../..'
      25            2 :       call const_init(my_mesa_dir, ierr)
      26            2 :       if (ierr /= 0) then
      27            0 :          write (*, *) 'const_init failed'
      28            0 :          call mesa_error(__FILE__, __LINE__)
      29              :       end if
      30            2 :       cgrav = standard_cgrav
      31              : 
      32            2 :       call math_init()
      33              : 
      34            2 :       call chem_init('isotopes.data', ierr)
      35            2 :       if (ierr /= 0) then
      36            0 :          write (*, *) 'chem_init failed'
      37            0 :          call mesa_error(__FILE__, __LINE__)
      38              :       end if
      39            2 :       call eos_init(' ', use_cache, ierr)
      40            2 :       if (ierr /= 0) call mesa_error(__FILE__, __LINE__)
      41            2 :       eos_handle = alloc_eos_handle(ierr)
      42            2 :       if (ierr /= 0) call mesa_error(__FILE__, __LINE__)
      43            2 :       call kap_init(use_cache, ' ', ierr)
      44            2 :       if (ierr /= 0) call mesa_error(__FILE__, __LINE__)
      45            2 :       kap_handle = alloc_kap_handle(ierr)
      46            2 :       if (ierr /= 0) call mesa_error(__FILE__, __LINE__)
      47            2 :       call atm_init(.false., ierr)
      48            2 :       if (ierr /= 0) then
      49            0 :          if (test_verbosely) write (*, *) 'bad return from atm_init'
      50            0 :          call mesa_error(__FILE__, __LINE__)
      51              :       end if
      52              : 
      53            2 :       Pextra_factor = 1
      54              : 
      55            2 :    end subroutine setup
      56              : 
      57              : end module test_atm_setup
        

Generated by: LCOV version 2.0-1