Minimal geodesics on manifold with discontinuous metrics