reset Subroutine

private subroutine reset(self)

Type Bound

nbprocs_info_t

Arguments

Type IntentOptional Attributes Name
class(nbprocs_info_t) :: self

Called by

proc~~reset~~CalledByGraph proc~reset nbprocs_info_t%reset proc~build_connectivity build_connectivity proc~build_connectivity->proc~reset proc~amr_coarsen_refine amr_coarsen_refine proc~amr_coarsen_refine->proc~build_connectivity proc~initlevelone initlevelone proc~initlevelone->proc~build_connectivity proc~read_forest read_forest proc~read_forest->proc~build_connectivity proc~main main proc~main->proc~initlevelone proc~read_snapshot read_snapshot proc~main->proc~read_snapshot proc~resettree_convert resettree_convert proc~main->proc~resettree_convert proc~settree settree proc~main->proc~settree proc~timeintegration timeintegration proc~main->proc~timeintegration proc~read_snapshot->proc~read_forest proc~read_snapshot_old read_snapshot_old proc~read_snapshot->proc~read_snapshot_old proc~read_snapshot_old->proc~read_forest proc~resettree resettree proc~resettree->proc~amr_coarsen_refine proc~resettree_convert->proc~amr_coarsen_refine proc~settree->proc~amr_coarsen_refine proc~timeintegration->proc~resettree program~agile agile program~agile->proc~main

Source Code

   subroutine reset(self)
     class(nbprocs_info_t) :: self
     ! .. local ..
     integer               :: i

     do i=1, self%nbprocs_srl
        
        if ( allocated(self%srl_nb(i)%rcv%buffer) ) then
           deallocate(self%srl_nb(i)%rcv%buffer)
           deallocate(self%srl_nb(i)%send%buffer)
           deallocate(self%srl_nb(i)%info_rcv%buffer)
           deallocate(self%srl_nb(i)%info_send%buffer)
        endif

        self%srl_nb(i)%info%nigrids=0
     end do

     do i=1, self%nbprocs_c
        
        if ( allocated(self%course_nb(i)%rcv%buffer) ) then
           deallocate(self%course_nb(i)%rcv%buffer)
           deallocate(self%course_nb(i)%send%buffer)
           deallocate(self%course_nb(i)%info_rcv%buffer)
           deallocate(self%course_nb(i)%info_send%buffer)
        endif

        self%course_nb(i)%info%nigrids=0
     end do

     do i=1, self%nbprocs_f
        
        if ( allocated(self%fine_nb(i)%rcv%buffer) ) then
           deallocate(self%fine_nb(i)%rcv%buffer)
           deallocate(self%fine_nb(i)%send%buffer)
           deallocate(self%fine_nb(i)%info_rcv%buffer)
           deallocate(self%fine_nb(i)%info_send%buffer)
        endif

        self%fine_nb(i)%info%nigrids=0
     end do

     self%nbprocs_srl         = 0
     self%imaxigrids_srl      = 0
     self%ipe_to_inbpe_srl(:) = -1

     self%nbprocs_c           = 0
     self%imaxigrids_c        = 0
     self%ipe_to_inbpe_c(:)   = -1

     self%nbprocs_f           = 0
     self%imaxigrids_f        = 0
     self%ipe_to_inbpe_f(:)   = -1

   end subroutine reset