An algorithm for finite element analysis of partly wrinkled membranes