Shock capturing with PDE-based artificial viscosity for DGFEM: Part I, Formulation