Topologically-based adaptive mesh generator for shape optimal design