ResPart_set_UpdateMonitor Subroutine

private subroutine ResPart_set_UpdateMonitor(this)

Type Bound

ResPart_set

Arguments

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

Collection of Resolved Particles


Calls

proc~~respart_set_updatemonitor~~CallsGraph proc~respart_set_updatemonitor ResPart_set%ResPart_set_UpdateMonitor centroid centroid proc~respart_set_updatemonitor->centroid proc~monitor_set_set monitor_set%monitor_set_Set proc~respart_set_updatemonitor->proc~monitor_set_set 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~parallel_obj_rankisroot parallel_obj%parallel_obj_RankIsRoot proc~monitor_set_set->proc~parallel_obj_rankisroot none~get~3 hashtbl_obj%Get proc~monitor_set_getindex->none~get~3 proc~hashtbl_obj_hashstring hashtbl_obj%hashtbl_obj_HashString proc~monitor_set_getindex->proc~hashtbl_obj_hashstring 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 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~~respart_set_updatemonitor~~CalledByGraph proc~respart_set_updatemonitor ResPart_set%ResPart_set_UpdateMonitor proc~cdifs_obj_monitor cdifs_obj_Monitor proc~cdifs_obj_monitor->proc~respart_set_updatemonitor proc~grans_obj_monitor grans_obj_monitor proc~grans_obj_monitor->proc~respart_set_updatemonitor interface~cdifs_obj_monitor cdifs_obj%cdifs_obj_Monitor interface~cdifs_obj_monitor->proc~cdifs_obj_monitor interface~grans_obj_monitor grans_obj%grans_obj_Monitor interface~grans_obj_monitor->proc~grans_obj_monitor proc~cdifs_obj_preparesolver cdifs_obj_PrepareSolver proc~cdifs_obj_preparesolver->interface~cdifs_obj_monitor proc~grans_obj_preparesolver grans_obj_PrepareSolver proc~grans_obj_preparesolver->interface~grans_obj_monitor interface~cdifs_obj_preparesolver cdifs_obj%cdifs_obj_PrepareSolver interface~cdifs_obj_preparesolver->proc~cdifs_obj_preparesolver interface~grans_obj_preparesolver grans_obj%grans_obj_PrepareSolver interface~grans_obj_preparesolver->proc~grans_obj_preparesolver

Source Code

    subroutine ResPart_set_UpdateMonitor(this)
      class(ResPart_set), intent(inout) :: this                                !! Collection of Resolved Particles
      ! Work variables
      integer :: n
      real(wp):: Vp(3)
      real(wp):: Fh(3)
      real(wp):: buff(3)

      Vp = 0.0_wp
      Fh = 0.0_wp
      select type (centroid => this%p)
      type is (ResPart_obj)
        do n=1,this%count_
          ! Velocity
          Vp = Vp + centroid(n)%v
          ! Hydrodynamic force
          Fh = Fh + centroid(n)%Fh
        end do
      end select

      call this%parallel%Sum(Vp, buff); Vp = buff/this%count
      call this%parallel%Sum(Fh, buff); Fh = buff/this%count

      call this%monitors%Set('ResPart', 1,this%timer%iter)
      call this%monitors%Set('ResPart', 2,this%timer%time)
      call this%monitors%Set('ResPart', 3,this%count     )
      call this%monitors%Set('ResPart', 4,this%ib%count  )
      call this%monitors%Set('ResPart', 5,Vp(1)          )
      call this%monitors%Set('ResPart', 6,Vp(2)          )
      call this%monitors%Set('ResPart', 7,Vp(3)          )
      call this%monitors%Set('ResPart', 8,Fh(1)          )
      call this%monitors%Set('ResPart', 9,Fh(2)          )
      call this%monitors%Set('ResPart',10,Fh(3)          )

      return
    end subroutine ResPart_set_UpdateMonitor