particle_set_UpdateMonitor Subroutine

private impure subroutine particle_set_UpdateMonitor(this)

Updates monitoring data.

Type Bound

particle_set

Arguments

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

Collection of Point Particles


Calls

proc~~particle_set_updatemonitor~~CallsGraph proc~particle_set_updatemonitor particle_set%particle_set_UpdateMonitor centroid centroid proc~particle_set_updatemonitor->centroid proc~monitor_set_set monitor_set%monitor_set_Set proc~particle_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

Source Code

    impure subroutine particle_set_UpdateMonitor(this)
      !> Updates monitoring data.
      class(particle_set), intent(inout) :: this                               !! Collection of Point 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 (particle_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('PntPart', 1,this%timer%iter)
      call this%monitors%set('PntPart', 2,this%timer%time)
      call this%monitors%set('PntPart', 3,this%count     )
      call this%monitors%set('PntPart', 4,Vp(1)          )
      call this%monitors%set('PntPart', 5,Vp(2)          )
      call this%monitors%set('PntPart', 6,Vp(3)          )
      call this%monitors%set('PntPart', 7,Fh(1)          )
      call this%monitors%set('PntPart', 8,Fh(2)          )
      call this%monitors%set('PntPart', 9,Fh(3)          )

      return
    end subroutine particle_set_UpdateMonitor