Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Source Code
subroutine restrict_onto(mg,id,nc,iv)type(mg_t),intent(inout)::mginteger,intent(in)::idinteger,intent(in)::ncinteger,intent(in)::ivinteger::i,j,hnc,dsize,i_c,c_idinteger::c_rank,dix(2)hnc=nc/2dsize=hnc**2do i_c=1,mg_num_childrenc_id=mg%boxes(id)%children(i_c)if(c_id==mg_no_box)cycle! For coarsened gridc_rank=mg%boxes(c_id)%rankdix=mg_get_child_offset(mg,c_id)if(c_rank==mg%my_rank)then do j=1,hnc;do i=1,hncmg%boxes(id)%cc(dix(1)+i,dix(2)+j,&iv)=0.25_dp*sum(mg%boxes(c_id)%cc(2*i-1:2*i,2*j-1:2*j,&iv))end do;end do elsei=mg%buf(c_rank)%i_recvmg%boxes(id)%cc(dix(1)+1:dix(1)+hnc,dix(2)+1:dix(2)+hnc,&iv)=reshape(mg%buf(c_rank)%recv(i+1:i+dsize),[hnc,hnc])mg%buf(c_rank)%i_recv=mg%buf(c_rank)%i_recv+dsizeend if end do end subroutine restrict_onto