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 mg_set_next_level_ids(mg,lvl)type(mg_t),intent(inout)::mginteger,intent(in)::lvlinteger::n,i,idif(allocated(mg%lvls(lvl+1)%ids))deallocate(mg%lvls(lvl+1)%ids)! Set next level ids to children of this levelif(mg%box_size_lvl(lvl+1)==mg%box_size_lvl(lvl))thenn=mg_num_children*size(mg%lvls(lvl)%parents)allocate(mg%lvls(lvl+1)%ids(n))n=mg_num_childrendo i=1,size(mg%lvls(lvl)%parents)id=mg%lvls(lvl)%parents(i)mg%lvls(lvl+1)%ids(n*(i-1)+1:n*i)=mg%boxes(id)%childrenend do elsen=size(mg%lvls(lvl)%parents)allocate(mg%lvls(lvl+1)%ids(n))n=1do i=1,size(mg%lvls(lvl)%parents)id=mg%lvls(lvl)%parents(i)mg%lvls(lvl+1)%ids(i)=mg%boxes(id)%children(1)end do end if end subroutine mg_set_next_level_ids