AN ELEMENT-BY-ELEMENT ALGORITHM FOR THE ANALYSIS OF PIPE NETWORKS