Apply operator to the tree and store in variable i_out
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mg_t), | intent(inout) | :: | mg | |||
| integer, | intent(in) | :: | i_out | |||
| procedure(mg_box_op), | optional | :: | op |
subroutine mg_apply_op(mg, i_out, op) type(mg_t), intent(inout) :: mg integer, intent(in) :: i_out procedure(mg_box_op), optional :: op integer :: lvl, i, id, nc do lvl = mg%lowest_lvl, mg%highest_lvl nc = mg%box_size_lvl(lvl) do i = 1, size(mg%lvls(lvl)%my_ids) id = mg%lvls(lvl)%my_ids(i) if (present(op)) then call op(mg, id, nc, i_out) else call mg%box_op(mg, id, nc, i_out) end if end do end do end subroutine mg_apply_op