subbasin delineation algorithms

Does someone can tell me the algorithm used in subbasin delineation in
GRASS?

thanks in advance

----------------------
Lihong Zhang