grans_obj_PrepareSolverMonitor Subroutine

subroutine grans_obj_PrepareSolverMonitor(this)

Prepares the monitors used by GRANS.

Arguments

Type IntentOptional Attributes Name
class(grans_obj), intent(inout) :: this

GRANS solver


Calls

proc~~grans_obj_preparesolvermonitor~~CallsGraph proc~grans_obj_preparesolvermonitor grans_obj_PrepareSolverMonitor proc~monitor_set_create monitor_set%monitor_set_Create proc~grans_obj_preparesolvermonitor->proc~monitor_set_create proc~monitor_set_init monitor_set%monitor_set_Init proc~grans_obj_preparesolvermonitor->proc~monitor_set_init proc~monitor_set_set monitor_set%monitor_set_Set proc~grans_obj_preparesolvermonitor->proc~monitor_set_set proc~respart_set_createmonitor ResPart_set%ResPart_set_CreateMonitor proc~grans_obj_preparesolvermonitor->proc~respart_set_createmonitor proc~timer_obj_addtiming timer_obj%timer_obj_AddTiming proc~grans_obj_preparesolvermonitor->proc~timer_obj_addtiming proc~hashtbl_obj_hashstring hashtbl_obj%hashtbl_obj_HashString proc~monitor_set_create->proc~hashtbl_obj_hashstring proc~hashtbl_obj_put hashtbl_obj%hashtbl_obj_Put proc~monitor_set_create->proc~hashtbl_obj_put proc~monitor_obj_init monitor_obj%monitor_obj_Init proc~monitor_set_create->proc~monitor_obj_init proc~monitor_set_expand monitor_set%monitor_set_Expand proc~monitor_set_create->proc~monitor_set_expand proc~parallel_obj_rankisroot parallel_obj%parallel_obj_RankIsRoot proc~monitor_set_create->proc~parallel_obj_rankisroot proc~hashtbl_obj_init hashtbl_obj%hashtbl_obj_Init proc~monitor_set_init->proc~hashtbl_obj_init proc~monitor_obj_setval monitor_obj%monitor_obj_SetVal proc~monitor_set_set->proc~monitor_obj_setval proc~monitor_set_getindex monitor_set%monitor_set_GetIndex proc~monitor_set_set->proc~monitor_set_getindex proc~monitor_set_set->proc~parallel_obj_rankisroot proc~respart_set_createmonitor->proc~monitor_set_create proc~respart_set_createmonitor->proc~monitor_set_set proc~timer_obj_addtiming->proc~hashtbl_obj_hashstring proc~timer_obj_addtiming->proc~hashtbl_obj_put proc~sllist_obj_put sllist_obj%sllist_obj_Put proc~hashtbl_obj_put->proc~sllist_obj_put proc~monitor_obj_formats monitor_obj%monitor_obj_Formats proc~monitor_obj_init->proc~monitor_obj_formats proc~sysutils_obj_createdirectory sysutils_obj%sysutils_obj_CreateDirectory proc~monitor_obj_init->proc~sysutils_obj_createdirectory proc~monitor_set_getindex->proc~hashtbl_obj_hashstring none~get~3 hashtbl_obj%Get proc~monitor_set_getindex->none~get~3 proc~hashtbl_obj_get_int4 hashtbl_obj%hashtbl_obj_Get_int4 none~get~3->proc~hashtbl_obj_get_int4 proc~hashtbl_obj_get_int8 hashtbl_obj%hashtbl_obj_Get_int8 none~get~3->proc~hashtbl_obj_get_int8 proc~hashtbl_obj_get_real_dp hashtbl_obj%hashtbl_obj_Get_real_dp none~get~3->proc~hashtbl_obj_get_real_dp proc~hashtbl_obj_get_real_sp hashtbl_obj%hashtbl_obj_Get_real_sp none~get~3->proc~hashtbl_obj_get_real_sp proc~sllist_obj_put->proc~sllist_obj_put none~get~2 sllist_obj%Get proc~hashtbl_obj_get_int4->none~get~2 proc~hashtbl_obj_get_int8->none~get~2 proc~hashtbl_obj_get_real_dp->none~get~2 proc~hashtbl_obj_get_real_sp->none~get~2 proc~sllist_obj_get_int4 sllist_obj%sllist_obj_Get_int4 none~get~2->proc~sllist_obj_get_int4 proc~sllist_obj_get_int8 sllist_obj%sllist_obj_Get_int8 none~get~2->proc~sllist_obj_get_int8 proc~sllist_obj_get_real_dp sllist_obj%sllist_obj_Get_real_dp none~get~2->proc~sllist_obj_get_real_dp proc~sllist_obj_get_real_sp sllist_obj%sllist_obj_Get_real_sp none~get~2->proc~sllist_obj_get_real_sp proc~sllist_obj_get_int4->proc~sllist_obj_get_int4 proc~sllist_obj_get_int8->proc~sllist_obj_get_int8 proc~sllist_obj_get_real_dp->proc~sllist_obj_get_real_dp proc~sllist_obj_get_real_sp->proc~sllist_obj_get_real_sp

Called by

proc~~grans_obj_preparesolvermonitor~~CalledByGraph proc~grans_obj_preparesolvermonitor grans_obj_PrepareSolverMonitor proc~grans_obj_preparesolver grans_obj_PrepareSolver proc~grans_obj_preparesolver->proc~grans_obj_preparesolvermonitor interface~grans_obj_preparesolver grans_obj%grans_obj_PrepareSolver interface~grans_obj_preparesolver->proc~grans_obj_preparesolver

Source Code

    subroutine grans_obj_PrepareSolverMonitor(this)
      !> Prepares the monitors used by GRANS.
      implicit none
      class(grans_obj), intent(inout) :: this                                  !! GRANS solver

      ! Initialize monitors
      call this%monitors%Initialize(this%parallel)

      ! Timing monitor
      call this%timer%AddTiming('Advance')
      call this%timer%AddTiming('Output' )
      call this%timer%AddTiming('Restart')
      call this%timer%AddTiming('Monitor')

      ! Timing monitor
      call this%monitors%Create('timing',7,stdout=.false.      )
      call this%monitors%Set   ('timing',1,label='Iteration'   )
      call this%monitors%Set   ('timing',2,label='Time'        )
      call this%monitors%Set   ('timing',3,label='Total (s)'   )
      call this%monitors%Set   ('timing',4,label='Advance (s)' )
      call this%monitors%Set   ('timing',5,label='Output (s)'  )
      call this%monitors%Set   ('timing',6,label='Restart (s)' )
      call this%monitors%Set   ('timing',7,label='Monitor (s)' )

      ! Main monitor: writes to stdout
      call this%monitors%Create('stdout',7,stdout=.true.       )
      call this%monitors%Set   ('stdout',1,label='Iteration'   )
      call this%monitors%Set   ('stdout',2,label='Time'        )
      call this%monitors%Set   ('stdout',3,label='# particles' )
      call this%monitors%Set   ('stdout',4,label='max CFL'     )
      call this%monitors%Set   ('stdout',5,label='max|Vx|'     )
      call this%monitors%Set   ('stdout',6,label='max|Vy|'     )
      call this%monitors%Set   ('stdout',7,label='max|Vz|'     )

      ! Initialize additional monitors
      call this%monitors%Create('hypre', 4,stdout=.false.      )
      call this%monitors%Set   ('hypre', 1,label='Iteration'   )
      call this%monitors%Set   ('hypre', 2,label='Time'        )
      call this%monitors%Set   ('hypre', 3,label='Sub-iterions')
      call this%monitors%Set   ('hypre', 4,label='Rel. error'  )

      call this%monitors%Create('stats', 8,stdout=.false.      )
      call this%monitors%Set   ('stats', 1,label='Iteration'   )
      call this%monitors%Set   ('stats', 2,label='Time'        )
      call this%monitors%Set   ('stats', 3,label='xp_1'        )
      call this%monitors%Set   ('stats', 4,label='xp_2'        )
      call this%monitors%Set   ('stats', 5,label='xp_3'        )
      call this%monitors%Set   ('stats', 6,label='vp_1'        )
      call this%monitors%Set   ('stats', 7,label='vp_2'        )
      call this%monitors%Set   ('stats', 8,label='vp_3'        )

      if (this%use_RP) call this%RP%CreateMonitor()
      if (this%use_PP) call this%PP%CreateMonitor()

      ! Write headers
      call this%monitors%Print(print_labels=.true.)

      return
    end subroutine grans_obj_PrepareSolverMonitor