cdifs_obj_PrepareSolverMonitor Subroutine

subroutine cdifs_obj_PrepareSolverMonitor(this)

Prepares the monitors used by CDIFS.

Arguments

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

CDIFS solver


Calls

proc~~cdifs_obj_preparesolvermonitor~~CallsGraph proc~cdifs_obj_preparesolvermonitor cdifs_obj_PrepareSolverMonitor proc~monitor_set_create monitor_set%monitor_set_Create proc~cdifs_obj_preparesolvermonitor->proc~monitor_set_create proc~monitor_set_init monitor_set%monitor_set_Init proc~cdifs_obj_preparesolvermonitor->proc~monitor_set_init proc~monitor_set_set monitor_set%monitor_set_Set proc~cdifs_obj_preparesolvermonitor->proc~monitor_set_set proc~respart_set_createmonitor ResPart_set%ResPart_set_CreateMonitor proc~cdifs_obj_preparesolvermonitor->proc~respart_set_createmonitor proc~timer_obj_addtiming timer_obj%timer_obj_AddTiming proc~cdifs_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~~cdifs_obj_preparesolvermonitor~~CalledByGraph proc~cdifs_obj_preparesolvermonitor cdifs_obj_PrepareSolverMonitor proc~cdifs_obj_preparesolver cdifs_obj_PrepareSolver proc~cdifs_obj_preparesolver->proc~cdifs_obj_preparesolvermonitor interface~cdifs_obj_preparesolver cdifs_obj%cdifs_obj_PrepareSolver interface~cdifs_obj_preparesolver->proc~cdifs_obj_preparesolver

Source Code

    subroutine cdifs_obj_PrepareSolverMonitor(this)
      !> Prepares the monitors used by CDIFS.
      implicit none
      class(cdifs_obj), intent(inout) :: this                                  !! CDIFS solver

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

      ! Initialize substep monitors
      call this%pmonitor%initialize(this%parallel)

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

      ! Timing monitor
      call this%monitors%Create('timing',9,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='Advance/V  (s)'   )
      call this%monitors%Set   ('timing',6,label='Advance/RP (s)'   )
      call this%monitors%Set   ('timing',7,label='Output (s)'       )
      call this%monitors%Set   ('timing',8,label='Restart (s)'      )
      call this%monitors%Set   ('timing',9,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 ='max|V1|'       )
      call this%monitors%Set   ('stdout', 4, label ='max|V2|'       )
      call this%monitors%Set   ('stdout', 5, label ='max|V3|'       )
      call this%monitors%Set   ('stdout', 6, label ='CFL'           )
      call this%monitors%Set   ('stdout', 7, label ='max|div(V)|'   )

      ! Additional monitors: write to files
      call this%monitors%Create('Velocity', 7, stdout=.false.       )
      call this%monitors%Set   ('Velocity', 1, label ='Iteration'   )
      call this%monitors%Set   ('Velocity', 2, label ='Time'        )
      call this%monitors%Set   ('Velocity', 3, label ='max|V1|'     )
      call this%monitors%Set   ('Velocity', 4, label ='max|V2|'     )
      call this%monitors%Set   ('Velocity', 5, label ='max|V3|'     )
      call this%monitors%Set   ('Velocity', 6, label ='CFL'         )
      call this%monitors%Set   ('Velocity', 7, label ='max|div(V)|' )

      call this%pmonitor%Create('Pressure', 6, stdout=.false.       )
      call this%pmonitor%Set   ('Pressure', 1, label ='Iteration'   )
      call this%pmonitor%Set   ('Pressure', 2, label ='Time'        )
      call this%pmonitor%Set   ('Pressure', 3, label ='Subiteration')
      call this%pmonitor%Set   ('Pressure', 4, label ='Residual'    )
      call this%pmonitor%Set   ('Pressure', 5, label ='intRHS'      )
      call this%pmonitor%Set   ('Pressure', 6, label ='Nbr P iter'  )

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

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

      return
    end subroutine cdifs_obj_PrepareSolverMonitor