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-06-06 17:08:43 Functions: 100.0 % 1 1

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

Generated by: LCOV version 2.0-1