A general decomposition algorithm applied to multi-element airfoil grids