[functions.flattop] updated order
[provider.cube] added optional num_refinements