Hydrogenation effects on the structure and morphology of graphene and single-walled carbon nanotubes