Cosmological Shocks in Adaptive Mesh Refinement Simulations and the Acceleration of Cosmic Rays