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~4 hashtbl_obj%Get proc~monitor_set_getindex->none~get~4 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~4->proc~hashtbl_obj_get_int4 proc~hashtbl_obj_get_int8 hashtbl_obj%hashtbl_obj_Get_int8 none~get~4->proc~hashtbl_obj_get_int8 proc~hashtbl_obj_get_real_dp hashtbl_obj%hashtbl_obj_Get_real_dp none~get~4->proc~hashtbl_obj_get_real_dp proc~hashtbl_obj_get_real_sp hashtbl_obj%hashtbl_obj_Get_real_sp none~get~4->proc~hashtbl_obj_get_real_sp none~get~3 sllist_obj%Get proc~hashtbl_obj_get_int4->none~get~3 proc~hashtbl_obj_get_int8->none~get~3 proc~hashtbl_obj_get_real_dp->none~get~3 proc~hashtbl_obj_get_real_sp->none~get~3 proc~sllist_obj_get_int4 sllist_obj%sllist_obj_Get_int4 none~get~3->proc~sllist_obj_get_int4 proc~sllist_obj_get_int8 sllist_obj%sllist_obj_Get_int8 none~get~3->proc~sllist_obj_get_int8 proc~sllist_obj_get_real_dp sllist_obj%sllist_obj_Get_real_dp none~get~3->proc~sllist_obj_get_real_dp proc~sllist_obj_get_real_sp sllist_obj%sllist_obj_Get_real_sp none~get~3->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):: Xp(3)
      real(wp):: Vp(3)
      real(wp):: Ap(3)
      real(wp):: Fh(3)
      real(wp):: Th(3)
      real(wp):: Fc(3)
      real(wp):: Tc(3)
      real(wp):: buff(3)

      Xp = 0.0_wp
      Vp = 0.0_wp
      Ap = 0.0_wp
      Fh = 0.0_wp
      Th = 0.0_wp
      Fc = 0.0_wp
      Tc = 0.0_wp
      select type (centroid => this%p)
      type is (ResPart_obj)
        do n=1,this%count_
          ! Position
          Xp = Xp + centroid(n)%p
          ! Velocity
          Vp = Vp + centroid(n)%v
          ! Angular velocity
          Ap = Ap + centroid(n)%w
          ! Hydrodynamic force
          Fh = Fh + centroid(n)%Fh
          ! Hydrodynamic torque
          Th = Th + centroid(n)%Th
          ! Collision force
          Fc = Fc + centroid(n)%Fc
          ! Collision torque
          Tc = Tc + centroid(n)%Tc
        end do
      end select

      call this%parallel%Sum(Xp, buff); Xp = buff/this%count
      call this%parallel%Sum(Vp, buff); Vp = buff/this%count
      call this%parallel%Sum(Ap, buff); Ap = buff/this%count
      call this%parallel%Sum(Fh, buff); Fh = buff/this%count
      call this%parallel%Sum(Th, buff); Th = buff/this%count
      call this%parallel%Sum(Fc, buff); Fc = buff/this%count
      call this%parallel%Sum(Tc, buff); Tc = buff/this%count

      call this%monitors%Set('ResPart_1', 1,this%timer%iter)
      call this%monitors%Set('ResPart_1', 2,this%timer%time)
      call this%monitors%Set('ResPart_1', 3,this%count     )
      call this%monitors%Set('ResPart_1', 4,this%ib%count  )
      call this%monitors%Set('ResPart_1', 5,Xp(1)          )
      call this%monitors%Set('ResPart_1', 6,Xp(2)          )
      call this%monitors%Set('ResPart_1', 7,Xp(3)          )
      call this%monitors%Set('ResPart_1', 8,Vp(1)          )
      call this%monitors%Set('ResPart_1', 9,Vp(2)          )
      call this%monitors%Set('ResPart_1',10,Vp(3)          )
      call this%monitors%Set('ResPart_1',11,Ap(1)          )
      call this%monitors%Set('ResPart_1',12,Ap(2)          )
      call this%monitors%Set('ResPart_1',13,Ap(3)          )

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

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

      return
    end subroutine ResPart_set_UpdateMonitor