diff --git a/sources/driver.F90 b/sources/driver.F90 index 46a69ba..4c4c706 100644 --- a/sources/driver.F90 +++ b/sources/driver.F90 @@ -74,8 +74,6 @@ program amun use parameters , only : get_parameter use problems , only : initialize_problems, finalize_problems use random , only : initialize_random, finalize_random - use sources , only : initialize_sources, finalize_sources - use sources , only : print_sources use timers , only : initialize_timers, finalize_timers use timers , only : start_timer, stop_timer, set_timer, get_timer use timers , only : get_timer_total, timer_enabled, timer_description @@ -406,14 +404,6 @@ program amun end if go to 3100 end if - call initialize_sources(master, status) - if (check_status(status /= 0)) then - if (master) then - write(error_unit,"('[AMUN::program]: ', a)") & - "Problem initializing SOURCES module!" - end if - go to 3000 - end if call initialize_problems(problem, nrun, master, status) if (check_status(status /= 0)) then if (master) then @@ -466,7 +456,6 @@ program amun ! print module information ! call print_equations(master) - call print_sources(master) call print_forcing(master) call print_coordinates(master) call print_boundaries(master) @@ -777,12 +766,6 @@ program amun write(error_unit,"('[AMUN::program]: ', a)") & "Problem finalizing PROBLEMS module!" end if - 3000 continue - call finalize_sources(status) - if (check_status(status /= 0) .and. master) then - write(error_unit,"('[AMUN::program]: ', a)") & - "Problem finalizing SOURCES module!" - end if 3100 continue call finalize_operators(status) if (check_status(status /= 0) .and. master) then diff --git a/sources/evolution.F90 b/sources/evolution.F90 index 4ced989..e55c35b 100644 --- a/sources/evolution.F90 +++ b/sources/evolution.F90 @@ -163,6 +163,7 @@ module evolution use parameters , only : get_parameter use schemes , only : initialize_schemes use shapes , only : initialize_shapes + use sources , only : initialize_sources implicit none @@ -907,6 +908,7 @@ module evolution ! initialize other modules ! + call initialize_sources(verbose, status) call initialize_schemes(verbose, status) call initialize_shapes(status) @@ -936,6 +938,7 @@ module evolution use iso_fortran_env, only : error_unit use schemes , only : finalize_schemes use shapes , only : finalize_shapes + use sources , only : finalize_sources implicit none @@ -954,6 +957,7 @@ module evolution call finalize_schemes(status) call finalize_shapes(status) + call finalize_sources(status) if (allocated(adecay)) deallocate(adecay) if (allocated(aglm)) deallocate(aglm) @@ -1003,6 +1007,7 @@ module evolution use helpers , only : print_section, print_parameter use schemes , only : print_schemes use shapes , only : print_shapes + use sources , only : print_sources implicit none @@ -1032,6 +1037,7 @@ module evolution end if + call print_sources(verbose) call print_schemes(verbose) call print_shapes(verbose)