H-formulation for simulating levitation forces acting on HTS bulks and stacks of 2G coated conductors