Potential flow analysis by finite elements