Energy shaping of distributed parameter port-Hamiltonian systems based on finite element approximation