Multigrid optimization in applications